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(pnp): support the --conditions flag #5228

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Jan 29, 2023

What's the problem this PR addresses?

Node.js allows users to customise the conditions used when resolving exports and imports but PnP doesn't.
https://nodejs.org/dist/latest-v18.x/docs/api/cli.html#-ccondition---conditionscondition

Fixes #5171
Ref #2431
Ref nodejs/node#36935

How did you fix it?

Adapted the CLI parsing from https://github.com/TypeStrong/ts-node to add support for custom conditions.

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@arcanis arcanis merged commit e20f836 into master Jan 31, 2023
@arcanis arcanis deleted the merceyz/feat/custom-conditions branch January 31, 2023 20:34
merceyz added a commit that referenced this pull request Jan 31, 2023
* feat(pnp): support the `--conditions` flag

* test: check `NODE_OPTIONS` works
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] - Support for node --conditions flag in subpath imports
2 participants