Skip to content

Feature(trace-deps, trace-pkg): User conditions#12

Merged
ryan-roemer merged 10 commits intomainfrom
feature/conditions
Sep 10, 2022
Merged

Feature(trace-deps, trace-pkg): User conditions#12
ryan-roemer merged 10 commits intomainfrom
feature/conditions

Conversation

@ryan-roemer
Copy link
Member

@ryan-roemer ryan-roemer commented Sep 8, 2022

Adds user conditions flag. We're following the https://github.com/vercel/nft#exports--imports model of always including some built-in Node.js conditions because the Node.js runtime actually does this (e.g., if I'm running node -C my-bespoke ./file.js and there's an import condition before my-bespoke the Node.js built-in matching means import wins).

/cc @yankovalera

@ryan-roemer ryan-roemer changed the title Feature: User conditions [trace-deps] Feature: User conditions Sep 8, 2022
@ryan-roemer ryan-roemer changed the title [trace-deps] Feature: User conditions trace-deps Feature: User conditions Sep 8, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2022

Codecov Report

Merging #12 (9b1bb5b) into main (0370bab) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #12   +/-   ##
=======================================
  Coverage   98.87%   98.87%           
=======================================
  Files          18       18           
  Lines         713      713           
=======================================
  Hits          705      705           
  Misses          8        8           
Impacted Files Coverage Δ
packages/trace-pkg/lib/config.js 96.87% <ø> (ø)
packages/trace-pkg/lib/worker/bundle.js 96.92% <ø> (ø)
packages/trace-deps/lib/trace.js 98.97% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ryan-roemer ryan-roemer changed the title trace-deps Feature: User conditions Feature(trace-deps): User conditions Sep 8, 2022
@@ -0,0 +1,7 @@
---
"trace-deps": minor
"trace-pkg": minor
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this is minor for changesets, this is a 0.X release which allows breaking changes.

Copy link

@carbonrobot carbonrobot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plot thickens! So many edge cases

Copy link

@yankovalera yankovalera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@ryan-roemer ryan-roemer merged commit 43552d1 into main Sep 10, 2022
@ryan-roemer ryan-roemer deleted the feature/conditions branch September 10, 2022 15:36
@ryan-roemer ryan-roemer changed the title Feature(trace-deps): User conditions Feature(trace-deps, trace-pkg): User conditions Sep 10, 2022
@github-actions github-actions bot mentioned this pull request Sep 10, 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.

Feature: Add user-specified conditions to ESM resolution.

4 participants