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(zone.js): add conditional exports to zone.js package #51652

Closed

Conversation

alan-agius4
Copy link
Contributor

This is needed to better support native ESM modules and avoid the otherwise necessary deep imports like zone.js/fesm2015/zone-node.js due to disallowed directory imports.

@alan-agius4 alan-agius4 force-pushed the zone-js-add-conditional-exports branch from fda742a to f5d1915 Compare September 5, 2023 10:13
@alan-agius4 alan-agius4 added the target: major This PR is targeted for the next major release label Sep 5, 2023
@alan-agius4 alan-agius4 force-pushed the zone-js-add-conditional-exports branch 9 times, most recently from b25b6ca to 1ed0b00 Compare September 5, 2023 12:03
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Sep 5, 2023
@ngbot ngbot bot added this to the Backlog milestone Sep 5, 2023
@alan-agius4 alan-agius4 force-pushed the zone-js-add-conditional-exports branch 5 times, most recently from 1097ede to ea5b7b7 Compare September 5, 2023 13:49
@alan-agius4 alan-agius4 marked this pull request as ready for review September 5, 2023 13:59
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Sep 5, 2023
Copy link
Contributor

@JiaLiPassion JiaLiPassion left a comment

Choose a reason for hiding this comment

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

LGTM!

This is needed to better support native ESM modules and avoid the otherwise necessary deep imports like `zone.js/fesm2015/zone-node.js` due to disallowed directory imports.
@alan-agius4 alan-agius4 force-pushed the zone-js-add-conditional-exports branch from ea5b7b7 to 2e49034 Compare September 6, 2023 09:37
@angular-robot angular-robot bot removed the area: build & ci Related the build and CI infrastructure of the project label Sep 6, 2023
@ngbot ngbot bot removed this from the Backlog milestone Sep 6, 2023
This commit update the lock file to force a new `node_modules` cache as this causes the patch to fail due to GitHub caching and at present, there is also no way to provide a key to invalidate the cache.
@angular-robot angular-robot bot added the area: build & ci Related the build and CI infrastructure of the project label Sep 6, 2023
@ngbot ngbot bot added this to the Backlog milestone Sep 6, 2023
Copy link
Member

@clydin clydin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

Nice, only thing that will be a little slower is having to build the full zone npm package for benchmarks- but I think that is reasonable

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 6, 2023
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit cfe2f1d.

jessicajaniuk pushed a commit that referenced this pull request Sep 6, 2023
This commit update the lock file to force a new `node_modules` cache as this causes the patch to fail due to GitHub caching and at present, there is also no way to provide a key to invalidate the cache.

PR Close #51652
@alan-agius4 alan-agius4 deleted the zone-js-add-conditional-exports branch September 6, 2023 16:55
"default": "./package.json"
},
".": {
"typings": "./zone.d.ts",
Copy link

Choose a reason for hiding this comment

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

this must say "types" for typescript to pick it up when project uses "moduleResolution" that respects "exports" (e.g. moduleResolution": "bundler").

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for bringing this up. Here's a fix #51737

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Oct 13, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
This is needed to better support native ESM modules and avoid the otherwise necessary deep imports like `zone.js/fesm2015/zone-node.js` due to disallowed directory imports.

PR Close angular#51652
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
This commit update the lock file to force a new `node_modules` cache as this causes the patch to fail due to GitHub caching and at present, there is also no way to provide a key to invalidate the cache.

PR Close angular#51652
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants