-
Notifications
You must be signed in to change notification settings - Fork 12k
Comparing changes
Open a pull request
base repository: angular/angular-cli
base: 15.0.2
head repository: angular/angular-cli
compare: 15.0.3
- 7 commits
- 12 files changed
- 4 contributors
Commits on Dec 1, 2022
-
fix(@angular-devkit/build-angular): prevent optimization adding unsup…
…ported ECMASCript features When optimization is enabled with the `@angular-devkit/build-angular:browser` builder, terser is used as a second phase optimizer. The terser configuration previously set its `ecma` option to `es2020` due to all officially supported browsers supporting the version. However, it is possible to add browsers to the browserslist configuration that are not officially supported that still may work but do not support es2020 syntax features. By setting the terser `ecma` option to `es2015`, terser will not turn existing syntax into newer syntax features that might be unsupported. Terser will also not downlevel any code based on this option. Fixes #24347 (cherry picked from commit ef99a68)
Configuration menu - View commit details
-
Copy full SHA for e6461ba - Browse repository at this point
Copy the full SHA e6461baView commit details
Commits on Dec 2, 2022
-
fix(@angular-devkit/build-angular): downlevel class properties when t…
…argeting Safari <=v15 The Angular compiler is dependent on static fields being attached to user-defined classes. e.g. `static ecmp = defineComponent`. These static fields sometimes rely on variables from outside of the class. e.g. the Angular compiler generates constants for content projection that are then accessed in the static field initializer. Surprisingly such access to these variables may break in Safari <=v15 when a page is loaded without devtools open. The bug (already solved in v16 of Safari)- is very subtle, hard to re-reproduce but basically variable scope tracking is broken. This bug is triggered by additional parenthesis in the initializer expression. See: https://bugs.webkit.org/show_bug.cgi?id=236843. The TypeScript compiler may generate such additional parenthesis when it tries to adjust the `this` context when invoking methods, such as for defining animations in the `ecmp` definition. More details can be found here: #24355 (comment) To ensure Angular applications are not subject to this bug when targeting Safari <=v15. v15 Safari, both for iOS and Mac is still part of the default CLI browserslist with `last 2 Safari majors` (at time of writing). Note that it is important that the Babel plugin properly handles the downleveling of static block-defined members. TypeScript will transform static fields, like `static ecmp` into `static { this.ecmp = X }` when `useDefineForClassFields = false` (which is the case for CLI apps). The class properties plugin from Babel seems to handle this in an acceptable way. Unlike actual static fields, Babel will not use helpers like `defineProperty` for such extracted static blocks though. e.g. See repro: https://gist.github.com/devversion/dec0dea26e348c509921bf62079b60be ```js class Test { x = true; static b = true; static { this.a = true; } } // into class X { constructor() { _defineProperty(this, "x", true); } } _defineProperty(X, "b", true); X.a = true; ``` note that in practice TypeScript with `useDefineForClassFields = false` will put non-static members into the constructor as normal assignments regardless- so there would be no change by the Babel plugin. Fixes #24355. (cherry picked from commit 25eaaa2)
Configuration menu - View commit details
-
Copy full SHA for 45afc42 - Browse repository at this point
Copy the full SHA 45afc42View commit details -
refactor(@angular-devkit/build-angular): convert into a function to g…
…ive more control when the readable stream is initialized (cherry picked from commit 65f78be)
Configuration menu - View commit details
-
Copy full SHA for 18f3100 - Browse repository at this point
Copy the full SHA 18f3100View commit details -
refactor(@angular-devkit/build-angular): update browserslist conversi…
…on to latest esbuild browsers The conversion of browserslist targets to esbuild targets has been updated to reflect additions to esbuild. Additional browsers are now supported and the major/minor versions have been normalized. The later of which ensures that `.0` major versions are not misinterpreted as ranges rather than specific versions. (cherry picked from commit a0f9db8)
Configuration menu - View commit details
-
Copy full SHA for 20e0742 - Browse repository at this point
Copy the full SHA 20e0742View commit details -
fix(@angular-devkit/build-angular): downlevel class fields with Safar…
…i <= v15 for esbuild To provide a workaround for a Safari bug involving class fields and variable scoping, the esbuild-based browser application builder will now downlevel class fields if Safari (desktop or iOS) v15.x or earlier is within the target browsers for an application. This is an esbuild variant of the fix for the Webpack-based builder. For more details regarding the issue, please see: #24357 (cherry picked from commit cf2f30a)
Configuration menu - View commit details
-
Copy full SHA for 24f4b51 - Browse repository at this point
Copy the full SHA 24f4b51View commit details
Commits on Dec 5, 2022
-
fix(@angular-devkit/build-angular): default preserve symlinks to Node…
….js value for esbuild When using the experimental esbuild-based browser application builder, the `preserveSymlinks` option will now default to the value of the Node.js `--preserve-symlinks` argument. This removes the need to manually specify the option in two places if executing the build manually with Node.js or via the `NODE_OPTIONS` environment variable. This behavior mimics that of the default Webpack-based builder. (cherry picked from commit 9771696)
Configuration menu - View commit details
-
Copy full SHA for 3d9971e - Browse repository at this point
Copy the full SHA 3d9971eView commit details
Commits on Dec 7, 2022
-
Configuration menu - View commit details
-
Copy full SHA for eb2a73a - Browse repository at this point
Copy the full SHA eb2a73aView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 15.0.2...15.0.3