Title: feat(zone.js): upgrade zone.js to angular package format(APF) by JiaLiPassion · Pull Request #36540 · angular/angular · GitHub
Open Graph Title: feat(zone.js): upgrade zone.js to angular package format(APF) by JiaLiPassion · Pull Request #36540 · angular/angular
X Title: feat(zone.js): upgrade zone.js to angular package format(APF) by JiaLiPassion · Pull Request #36540 · angular/angular
Description: Close #35157 In the current version of zone.js, zone.js uses it's own package format, and it is not following the rule of Angualr package format(APF), so it is not easily to be consumed by Angular CLI or other bundle tools. For example, zone.js npm package has two bundles, zone.js/dist/zone.js, this is a es5 bundle. zone.js/dist/zone-evergreen.js, this is a es2015 bundle. And Angular CLI has to add some hard-coding code to handle this case, ohttps://github.com/angular/angular-cli/blob/5376a8b1392ac7bd252782d8474161ce03a4d1cb/packages/schematics/angular/application/files/src/polyfills.ts.template#L55-L58 This PR upgrade zone.js npm package format to follow APF rule, https://docs.google.com/document/d/1CZC2rcpxffTDfRDs6p1cfbmKNLA6x5O-NtkJglDaBVs/edit#heading=h.k0mh3o8u5hx The updated points are: in package.json, update all bundle related properties "main": "./bundles/zone.umd.js", "module": "./fesm2015/zone.js", "es2015": "./fesm2015/zone.js", "fesm2015": "./fesm2015/zone.js", re-organize dist folder, for example for zone.js bundle, now we have dist/ bundles/ zone.js // this is the es5 bundle fesm2015/ zone.js // this is the es2015 bundle (in the old version is `zone-evergreen.js`) have several sub-packages. zone-testing, provide zone-testing bundles include zone.js and testing libraries zone-node, provide zone.js implemention for NodeJS zone-mix, provide zone.js patches for both Browser and NodeJS All those sub-packages will have their own package.json and the bundle will reference bundles(es5) and fesm2015(es2015). typings property are removed from package.json, instead using files property, because now we have several d.ts files as typings. "files": [ "./zone.js.d.ts", "./zone.api.extensions.ts", "./zone.configurations.api.ts" ], Does this PR introduce a breaking change? Yes No All zone.js npm package folder and file name are changed, so we need to create PR for angular/cli to migrate the changes. make announcement for the users not using angular/cli. I created a sample repo to show the contents of the new npm package contents. https://github.com/JiaLiPassion/zone-new-package-format/tree/master/npm_package package.json, https://github.com/JiaLiPassion/zone-new-package-format/blob/master/npm_package/package.json bundles folder, https://github.com/JiaLiPassion/zone-new-package-format/tree/master/npm_package/bundles fesm2015 folder, https://github.com/JiaLiPassion/zone-new-package-format/tree/master/npm_package/bundles node sub package, https://github.com/JiaLiPassion/zone-new-package-format/tree/master/npm_package/node mix sub package, https://github.com/JiaLiPassion/zone-new-package-format/tree/master/npm_package/mix testing, https://github.com/JiaLiPassion/zone-new-package-format/tree/master/npm_package/testing Please check whether the output satisfy the requirements. And the following up tasks will be. make angular repo work with the new format. add PR for angular cli for migration. update documentation involving the import 'zone.js/dist/zone' of polyfills.ts.
Open Graph Description: Close #35157 In the current version of zone.js, zone.js uses it's own package format, and it is not following the rule of Angualr package format(APF), so it is not easily to be consumed by Angu...
X Description: Close #35157 In the current version of zone.js, zone.js uses it's own package format, and it is not following the rule of Angualr package format(APF), so it is not easily to be consumed by ...
Opengraph URL: https://github.com/angular/angular/pull/36540
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7bb112d5-d418-88c7-4bae-487cd03aad77 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BB5A:1712DC:24BF7CC:2FB465D:6A5C98D0 |
| html-safe-nonce | 9e689fe2c5f0264c5cfe8a0c983ec47c9fe2c6d90e730c9202143b4f595f244c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjVBOjE3MTJEQzoyNEJGN0NDOjJGQjQ2NUQ6NkE1Qzk4RDAiLCJ2aXNpdG9yX2lkIjoiNzg5NDUyNjc5MjM5MjU0NjUxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ec14a712b81ada34168b3ff75b427f16ea90f3ba8fcd59e575430ac646b95326 |
| hovercard-subject-tag | pull_request:401382696 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/angular/angular/pull/36540/files |
| twitter:image | https://avatars.githubusercontent.com/u/1442575?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1442575?s=400&v=4 |
| og:image:alt | Close #35157 In the current version of zone.js, zone.js uses it's own package format, and it is not following the rule of Angualr package format(APF), so it is not easily to be consumed by Angu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width