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!: remove the constraint on packages exports default must be the last one #171

Merged
merged 1 commit into from
May 27, 2024

Conversation

Boshen
Copy link
Member

@Boshen Boshen commented May 27, 2024

closes #160

The spec never mentioned the logic where "default" must be last or it should throw an error.

https://nodejs.org/api/esm.html#resolution-and-loading-algorithm

enhanced-resolve took the meaning from https://nodejs.org/docs/v20.13.1/api/packages.html#conditional-exports

"This condition should always come last."

This statement is not part of the specification, it is a recommendation.

Copy link

codspeed-hq bot commented May 27, 2024

CodSpeed Performance Report

Merging #171 will not alter performance

Comparing esm-exports-last (10110b2) with main (e1713c5)

Summary

✅ 2 untouched benchmarks

Copy link

codecov bot commented May 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.87%. Comparing base (e1713c5) to head (c404bfc).

Current head c404bfc differs from pull request most recent head 10110b2

Please upload reports for the commit 10110b2 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
- Coverage   96.89%   96.87%   -0.02%     
==========================================
  Files          11       11              
  Lines        2283     2275       -8     
==========================================
- Hits         2212     2204       -8     
  Misses         71       71              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…e last one

closes #160

The spec never mentioned the logic where "default" must be last or it should throw an error.

https://nodejs.org/api/esm.html#resolution-and-loading-algorithm

`enhanced-resolve` took the meaning from https://nodejs.org/docs/v20.13.1/api/packages.html#conditional-exports

"This condition should always come last."

This statement is not part of the specification, it is a recommendation.
@Boshen Boshen merged commit be288ba into main May 27, 2024
18 checks passed
@Boshen Boshen deleted the esm-exports-last branch May 27, 2024 14:42
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.

Allow to disable validation of "Default condition should be last one"
1 participant