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(externals): trace externals with their commonjs / esm status #1562

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Aug 10, 2023

πŸ”— Linked issue

resolves #1558 (comment)

❓ 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

Reproduction: https://stackblitz.com/edit/github-kkcfd3?file=package.json

vercel/nft smartly applies import OR require conditions based on the parent file. By overriding (giving both import and require conditions) we were allowing nft to resolve as ESM even for CommonJS modules.

image

πŸ“ Checklist

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

@pi0 pi0 changed the title fix(externals): use default node.js conditions for nft fix(externals): trace externals with their commonjs / esm status Aug 10, 2023
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #1562 (7b34f88) into main (576b920) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1562      +/-   ##
==========================================
- Coverage   76.48%   76.44%   -0.05%     
==========================================
  Files          73       73              
  Lines        7579     7582       +3     
  Branches      751      752       +1     
==========================================
- Hits         5797     5796       -1     
- Misses       1781     1784       +3     
- Partials        1        2       +1     
Files Changed Coverage Ξ”
src/rollup/plugins/externals.ts 93.33% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

@pi0 pi0 merged commit 75ddbf4 into main Aug 10, 2023
8 checks passed
@pi0 pi0 deleted the fix/vercel-nft branch August 10, 2023 21:45
@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
1 participant