Skip to content

fix(zone.js): add conditional exports to zone.js package#51652

Closed
alan-agius4 wants to merge 4 commits intoangular:mainfrom
alan-agius4:zone-js-add-conditional-exports
Closed

fix(zone.js): add conditional exports to zone.js package#51652
alan-agius4 wants to merge 4 commits intoangular:mainfrom
alan-agius4:zone-js-add-conditional-exports

Conversation

@alan-agius4
Copy link
Copy Markdown
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
Comment thread packages/zone.js/package.json Outdated
Comment thread packages/zone.js/package.json Outdated
Copy link
Copy Markdown
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
@alan-agius4 alan-agius4 requested a review from clydin September 6, 2023 09:42
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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.

7 participants