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

feat: hybrid bundles - esm + cjs #10

Merged
merged 5 commits into from
Nov 15, 2021
Merged

feat: hybrid bundles - esm + cjs #10

merged 5 commits into from
Nov 15, 2021

Conversation

norskeld
Copy link
Owner

@norskeld norskeld commented Nov 15, 2021

What's in this PR:

  • The @nrsk/sigma package is a module now.
    This actually opens a darn Pandora's box, because tooling isn't really ready, mainly due to the experimental status of the ESM loaders, but whatever, tsm worked decently here.
  • Now we produce two unminified bundles with rollup: esm and cjs.
    Why unminified? Because nowadays we either use bundlers in userland, so everything used/imported will be tree-shaked and optimized anyway, or don't use them at all, e.g. we are on node with CJS, which doesn't really make use of tree-shaking and minification.
  • For each bundle we produce bundled d.ts.
  • There's the exports field in the package.json.
  • Removes re-export for the combinators in index.ts. This is actually related, so had to do that here.

Resolves #4

@norskeld norskeld added the feat New feature or request label Nov 15, 2021
@norskeld norskeld self-assigned this Nov 15, 2021
@coveralls
Copy link

coveralls commented Nov 15, 2021

Pull Request Test Coverage Report for Build 1460564001

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 1454402623: 0.0%
Covered Lines: 144
Relevant Lines: 144

💛 - Coveralls

@norskeld norskeld merged commit 5987ad7 into master Nov 15, 2021
@norskeld norskeld deleted the feat/esm branch November 15, 2021 03:38
norskeld pushed a commit that referenced this pull request Nov 15, 2021
# [1.1.0](v1.0.0...v1.1.0) (2021-11-15)

### Features

* hybrid bundles - esm + cjs ([#10](#10)) ([5987ad7](5987ad7))
github-actions bot pushed a commit that referenced this pull request Nov 15, 2021
# [1.1.0](v1.0.0...v1.1.0) (2021-11-15)

### Features

* hybrid bundles - esm + cjs ([#10](#10)) ([5987ad7](5987ad7))
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: add esm bundle
2 participants