-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Angular upgrade v17 to v18 #7099
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,33 +1,20 @@ | ||
| diff --git a/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/BUILD.bazel b/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/BUILD.bazel | ||
| index 870da1b..3f1e5c5 100755 | ||
| --- a/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/BUILD.bazel | ||
| +++ b/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/BUILD.bazel | ||
| @@ -23,6 +23,7 @@ js_library( | ||
| deps = [ | ||
| "@npm//@babel/core", | ||
| "@npm//@babel/helper-annotate-as-pure", | ||
| + "@npm//@babel/helper-split-export-declaration", | ||
| ], | ||
| ) | ||
|
|
||
| diff --git a/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/esbuild-plugin.mjs b/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/esbuild-plugin.mjs | ||
| index 6d5ec3f..ad4217f 100755 | ||
| --- a/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/esbuild-plugin.mjs | ||
| +++ b/node_modules/@angular/build-tooling/shared-scripts/angular-optimization/esbuild-plugin.mjs | ||
| @@ -86,11 +86,11 @@ export async function createEsbuildAngularOptimizePlugin(opts, additionalBabelPl | ||
| devkitOptimizePlugins.adjustTypeScriptEnumsPlugin, | ||
| ); | ||
| @@ -55,11 +55,11 @@ | ||
| if (opts.optimize) { | ||
| plugins.push(adjustStaticMembers, adjustTypeScriptEnums, elideAngularMetadata); | ||
|
|
||
| - // If the current file is denoted as explicit side effect free, add the pure | ||
| - // top-level functions optimization plugin for this file. | ||
| - if (opts.optimize.isSideEffectFree && opts.optimize.isSideEffectFree(args.path)) { | ||
| - plugins.push(devkitOptimizePlugins.pureToplevelFunctionsPlugin); | ||
| - plugins.push(markTopLevelPure); | ||
| - } | ||
| + // For TensorBoard: This plugin aggressively culls symbols in a way that | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like all of this is being commented out from the patch? Should it just be removed? Or am I misunderstanding something?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because its a patch from a file that exists in I can delete it, but I think is better to keep to know what was disabled from |
||
| + // is incompatible with TensorBoard source. Disable it. As result the binary is bigger. | ||
| + //if (opts.optimize.isSideEffectFree && opts.optimize.isSideEffectFree(args.path)) { | ||
| + // plugins.push(devkitOptimizePlugins.pureToplevelFunctionsPlugin); | ||
| + // plugins.push(markTopLevelPure); | ||
| + //} | ||
| } | ||
|
|
||
| const shouldRunLinker = | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,12 +25,10 @@ | |
| import sys | ||
|
|
||
|
|
||
| # @TODO(@cdavalos7): Remove this exception when the patch file is no longer needed. | ||
| # Patch files use a trailing space on blank lines to mark them as context. | ||
| # This is required by patch-package and cannot be removed. | ||
| # This is required by patch format and cannot be removed. | ||
| exceptions = frozenset( | ||
| [ | ||
| "patches/@angular+build-tooling+0.0.0-2113cd7f66a089ac0208ea84eee672b2529f4f6c.patch", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I realize this is a test, but does this mean the patch is no longer needed? It seems the file still exists, above. Should that file just be removed altogether? Or is it the case that it's not needed only for the test, for some reason?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The list of frozenset exceptions it's just the list of files the whitespace test skips. Package patches add trailing spaces on blank lines (the patch format needs them), so those files would fail the check otherwise. It fails in the This patch for this version was wrote by hand without those trailing spaces, so it has no whitespace issues to skip. The test also fails if you list a file that doesn't actually need it, so keeping it there would just break CI. Only the protobuf patch still has a trailing space, so that's the only one left. I hope my explanation was clear about it, let me know otherwise |
||
| "patches/protobuf_6_31_1_java_export.patch", | ||
| ] | ||
| ) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be a new dependency? Do you know if this was bundled with something else before this version, and that's why it's added here now?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was bundled before under the scenes pulled by other libraries. The new v18 build tooling asks for a newer version of it, and yarn would normally grab the latest one. But the latest versions need Node 20, and we're still on Node 18, so they'd break our build.
We shouldn't need it when we have node.js 20.