Skip to content

Migrate to ESM#45

Open
tobiasdiez wants to merge 2 commits into
zotero:masterfrom
tobiasdiez:migrate-esm
Open

Migrate to ESM#45
tobiasdiez wants to merge 2 commits into
zotero:masterfrom
tobiasdiez:migrate-esm

Conversation

@tobiasdiez
Copy link
Copy Markdown

I've migrated the whole codebase to ESM (including updating package metadata, converting core modules and tests, and refreshing the README examples for ESM imports).

Moving to ESM matches modern Node/browser module semantics, and down the road enables tree-shaking and better static analysis.

I should note that this is a breaking change as one cannot require an ESM module. Normally, this is addressed by having a bundler (like rollup) emit CJS and ESM at the same time, and ship that. But the other Zotero projects are just including this repo verbatim, so this is not really an option. On the other hand, one has to start with the migration somewhere and the utilities (and later translator) repo is a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant