Repository navigation
feat: publish ESM only, drop the CommonJS build - #112
Conversation
🦋 Changeset detectedLatest commit: d837631 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
genaris
left a comment
There was a problem hiding this comment.
The Node.js tests and the React Native tests both load the packages from src/ (the Vitest alias and the Metro config of the example). So no test loads build/index.mjs, the exports maps, or the package root lookup in register.ts. Can you add a CI step after pnpm build that imports the built Node.js package with import() and with require(), and calls version()?
The changeset says that require() works on Node.js 22.12 and later. Should engines be >= 22.12?
Please add a link to the tsdown issue in the comment on the tsdown: 0.23.1 pin, so that we can remove the pin later.
Nit: no script uses clean now, because tsdown cleans outDir.
9df6e8b to
ef7ece4
Compare
Auto-merge was disabled for another pull request in the stack
Build the packages with tsdown, like identity-common, into a single build/index.mjs with index.d.mts types per package. The exports maps only have types and default conditions, plus askar-shared/installBinary for the install scripts. The Node.js package finds its native directory through its own package.json instead of __dirname. Signed-off-by: TimoGlastra <timo@animo.id>
Signed-off-by: TimoGlastra <timo@animo.id>
Signed-off-by: TimoGlastra <timo@animo.id>
ef7ece4 to
d837631
Compare
Build the packages with tsdown, like identity-common, into a single build/index.mjs with index.d.mts types per package. The exports maps only have types and default conditions, plus askar-shared/installBinary for the install scripts. The Node.js package finds its native directory through its own package.json instead of __dirname.