Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions packages/shared-lib/src/tsr.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import * as TSR from 'timeline-state-resolver-types'
export { TSR }

import * as tsrPkgInfo from 'timeline-state-resolver-types/package.json'
export const TSR_VERSION: string = tsrPkgInfo.version
// Dynamically import package.json to avoid import attributes error
const TSR_VERSION = require('timeline-state-resolver-types/package.json').version

// Below line should work in Node.js 18+ and with bundlers that support import attributes, and replace the above
// import { version as TSR_VERSION } from 'timeline-state-resolver-types/package.json' with { type: 'json' }

export { TSR_VERSION }
Loading