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

fix: remove non-standard module export condition #1559

Merged
merged 3 commits into from Aug 9, 2023
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Aug 9, 2023

πŸ”— Linked issue

resolves #1558

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

module is a non-standard export condition not supported by Node.js or any runtimes which was previously used as a top-level property in order to help bundlers pick the esm-like/browser builds.

We disabled top level module field long before because of this externals, new resolution conditions in #1401 added it back and makes issues with packages such as ts-lib and @sanity/client that are (wrongly!) using AND preferring this export condition over `import.

I also updated Bun conditions. Checking their docs, it seems they recently made same decition.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 requested a review from danielroe August 9, 2023 16:12
@danielroe
Copy link
Member

Nice work πŸ‘Œ

@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #1559 (fd9c76b) into main (7fa8408) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main    #1559      +/-   ##
==========================================
- Coverage   76.49%   76.48%   -0.01%     
==========================================
  Files          73       73              
  Lines        7580     7579       -1     
  Branches      751      751              
==========================================
- Hits         5798     5797       -1     
  Misses       1781     1781              
  Partials        1        1              
Files Changed Coverage Ξ”
src/rollup/config.ts 90.60% <0.00%> (ΓΈ)
src/options.ts 96.64% <100.00%> (ΓΈ)
src/presets/bun.ts 100.00% <100.00%> (ΓΈ)

@pi0 pi0 merged commit 8c0473c into main Aug 9, 2023
8 of 9 checks passed
@pi0 pi0 deleted the fix/module-condition branch August 9, 2023 17:00
@pi0 pi0 mentioned this pull request Aug 21, 2023
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.

export condition issues with packages using module condition and commonJS modules
2 participants