Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add CommonJS distribution #54

Merged
merged 1 commit into from Aug 3, 2022

Conversation

privatenumber
Copy link
Contributor

@privatenumber privatenumber commented Aug 3, 2022

Problem

The ESM migration from #35 is a breaking change (which warrants a major version bump).

This is an intrusive change since all dependent projects will also have to convert to ESM or use a bundler.

Changes

  • Revert default package type to CommonJS
  • Use pkgroll (bundler) to create a CommonJS and ESM distribution. This allows for the ESM source-code and distribution without forcing dependents to use ESM or a bundler.
  • Since normalize-url is an ESM dependency, it's bundled in so that it can also be used in the CJS distribution. This way, we can always pull the latest changes from normalize-url without being stuck on an older version that get no updates.

Other info

Also created another PR improving the regular expression: privatenumber#1

@IonicaBizau IonicaBizau mentioned this pull request Aug 3, 2022
@IonicaBizau IonicaBizau merged commit 8f0dfd7 into IonicaBizau:master Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants