Skip to content

feat(@angular-devkit/schematics): update zone.js to 0.11.8 and add async tagging API support #23750

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,6 @@
"webpack-subresource-integrity": "5.1.0",
"yargs": "17.5.1",
"yargs-parser": "21.1.1",
"zone.js": "^0.11.3"
"zone.js": "^0.11.8"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ export const environment = {
* on performance if an error is thrown.
*/
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
import 'zone.js/plugins/async-stack-tagging'; // Included with Angular CLI to support async stack tagging API.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question: Should this be enabled by default or commented out like the above line and users can opt-in? Does it have any side effects of having this enabled for production?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alan-agius4

  • I believe this one should be included in the development mode by default since this need to integrate with Angular Devtools.
  • in production mode, if we enable it, it will have a little impact to the performance, since it will add a new parent Zone to the ngZone, just like TaskTackingZone.
    @mgechev , could you confirm my understanding is correct? Thank you.

Copy link
Collaborator

Choose a reason for hiding this comment

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

At the moment there is no way to conditionally include polyfills based on if it’s development/production.

I think a better approach would be to add zone-error and async-stack-tagging internally in the builder so that we can conditionally add this based on if the build is optimized not.

Copy link
Member

Choose a reason for hiding this comment

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

We'd like to enable it by default in development so folks can get complete stack traces and not use it in production. Async stack tagging (AST) is independent from Angular DevTools and we use it to concatenate async stack traces so that we can give the entire picture to developers.

AST is very similar to Zone's long stack traces with the difference that they work with debugging tools out of the box.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Migration to update Angular packages version prefix to `^` instead of
'@nguniversal/commom': '^13.1.0',
'rxjs': '~7.4.0',
'tslib': '^2.3.0',
'zone.js': '~0.11.4',
'zone.js': '~0.11.8',
},
devDependencies: {
'@angular-devkit/build-angular': '~13.1.3',
Expand Down Expand Up @@ -74,7 +74,7 @@ describe('Migration to update Angular packages version prefix to `^` instead of
'@nguniversal/commom': '^13.1.0',
'rxjs': '~7.4.0',
'tslib': '^2.3.0',
'zone.js': '~0.11.4',
'zone.js': '~0.11.8',
});

expect(pkg['devDependencies']).toEqual({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"tslib": "^2.3.0",
"ts-node": "~10.9.0",
"typescript": "~4.7.2",
"zone.js": "~0.11.4"
"zone.js": "~0.11.8"
}
}
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/assets/webpack/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@angular/router": "^14.0.0-rc",
"@ngtools/webpack": "0.0.0",
"rxjs": "^6.6.7",
"zone.js": "^0.11.4"
"zone.js": "^0.11.8"
},
"devDependencies": {
"sass": "^1.32.8",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11621,9 +11621,9 @@ z-schema@~5.0.2:
optionalDependencies:
commander "^2.20.3"

zone.js@^0.11.3:
version "0.11.7"
resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.7.tgz#262194267c7b964e8da77ce16b9fba9bea23cfdc"
integrity sha512-e39K2EdK5JfA3FDuUTVRvPlYV4aBfnOOcGuILhQAT7nzeV12uSrLBzImUM9CDVoncDSX4brR/gwqu0heQ3BQ0g==
zone.js@^0.11.8:
version "0.11.8"
resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.11.8.tgz#40dea9adc1ad007b5effb2bfed17f350f1f46a21"
integrity sha512-82bctBg2hKcEJ21humWIkXRlLBBmrc3nN7DFh5LGGhcyycO2S7FN8NmdvlcKaGFDNVL4/9kFLmwmInTavdJERA==
dependencies:
tslib "^2.3.0"