Skip to content

Commit f6f79a1

Browse files
authored
feat: update to Angular 19 (#200)
Changes that were applied: - bump dependency versions - applied migrations from `migrations.json` - remove unused component imports - add `as unknown` to `updateOptions` to fix a previously working type conversion - add `skipToken` check to `normalizeOptions` to narrow down typing
1 parent b0d39bb commit f6f79a1

24 files changed

+12227
-11773
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prefix": "query",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@angular-eslint/prefer-standalone": "off"
2829
}
2930
},
3031
{

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ testem.log
3939
Thumbs.db
4040

4141
.nx/cache
42+
.nx/workspace-data
4243
.angular

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
/coverage
55
.angular
66
.nx
7+
8+
/.nx/workspace-data

devtools/.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@
2424
"prefix": "query",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@angular-eslint/prefer-standalone": "off"
2829
}
2930
},
3031
{

devtools/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"url": "https://github.com/sponsors/ngneat"
1111
},
1212
"peerDependencies": {
13-
"@angular/core": ">=16.0.0 <19.0.0",
14-
"@tanstack/query-devtools": "5.4.2"
13+
"@angular/core": ">=16.0.0 <=19.0.4",
14+
"@tanstack/query-devtools": "5.61.4"
1515
},
1616
"dependencies": {
17-
"tslib": "^2.3.0"
17+
"tslib": "^2.4.0"
1818
},
1919
"publishConfig": {
2020
"access": "public"

jest.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { getJestProjects } from '@nx/jest';
1+
import { getJestProjectsAsync } from '@nx/jest';
22

3-
export default {
4-
projects: getJestProjects(),
5-
};
3+
export default async () => ({
4+
projects: await getJestProjectsAsync(),
5+
});

migrations.json

Lines changed: 175 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,209 @@
11
{
22
"migrations": [
33
{
4-
"version": "18.1.0-beta.3",
5-
"description": "Moves affected.defaultBase to defaultBase in `nx.json`",
6-
"implementation": "./src/migrations/update-17-2-0/move-default-base",
4+
"cli": "nx",
5+
"version": "19.2.0-beta.2",
6+
"description": "Updates the default workspace data directory to .nx/workspace-data",
7+
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
8+
"package": "nx",
9+
"name": "19-2-0-move-graph-cache-directory"
10+
},
11+
{
12+
"cli": "nx",
13+
"version": "19.2.2-beta.0",
14+
"description": "Updates the nx wrapper.",
15+
"implementation": "./src/migrations/update-17-3-0/update-nxw",
16+
"package": "nx",
17+
"name": "19-2-2-update-nx-wrapper"
18+
},
19+
{
20+
"version": "19.2.4-beta.0",
21+
"description": "Set project name in nx.json explicitly",
22+
"implementation": "./src/migrations/update-19-2-4/set-project-name",
23+
"x-repair-skip": true,
724
"package": "nx",
8-
"name": "move-default-base-to-nx-json-root"
25+
"name": "19-2-4-set-project-name"
26+
},
27+
{
28+
"version": "20.0.0-beta.7",
29+
"description": "Migration for v20.0.0-beta.7",
30+
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process",
31+
"package": "nx",
32+
"name": "move-use-daemon-process"
33+
},
34+
{
35+
"version": "20.0.1",
36+
"description": "Set `useLegacyCache` to true for migrating workspaces",
37+
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
38+
"x-repair-skip": true,
39+
"package": "nx",
40+
"name": "use-legacy-cache"
41+
},
42+
{
43+
"version": "20.2.0-beta.5",
44+
"description": "Update TypeScript ESLint packages to v8.13.0 if they are already on v8",
45+
"implementation": "./src/migrations/update-20-2-0/update-typescript-eslint-v8-13-0",
46+
"package": "@nx/eslint",
47+
"name": "update-typescript-eslint-v8.13.0"
948
},
1049
{
1150
"cli": "nx",
12-
"version": "19.1.0-beta.6",
13-
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
14-
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
15-
"package": "@nx/eslint-plugin",
16-
"name": "update-19-1-0-rename-no-extra-semi"
51+
"version": "20.0.0-beta.5",
52+
"description": "replace getJestProjects with getJestProjectsAsync",
53+
"implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync",
54+
"package": "@nx/jest",
55+
"name": "replace-getJestProjects-with-getJestProjectsAsync"
1756
},
1857
{
1958
"cli": "nx",
20-
"version": "18.1.0-beta.1",
21-
"requires": {
22-
"@angular/core": ">=17.2.0"
23-
},
24-
"description": "Update the @angular/cli package version to ~17.2.0.",
25-
"factory": "./src/migrations/update-18-1-0/update-angular-cli",
59+
"version": "19.6.0-beta.0",
60+
"description": "Use serve-static or preview for webServerCommand.",
61+
"implementation": "./src/migrations/update-19-6-0/use-serve-static-preview-for-command",
62+
"package": "@nx/playwright",
63+
"name": "19-6-0-use-serve-static-preview-for-command"
64+
},
65+
{
66+
"cli": "nx",
67+
"version": "19.6.0-beta.1",
68+
"description": "Add inferred ciTargetNames to targetDefaults with dependsOn to ensure dependent application builds are scheduled before atomized tasks.",
69+
"implementation": "./src/migrations/update-19-6-0/add-e2e-ci-target-defaults",
70+
"package": "@nx/playwright",
71+
"name": "update-19-6-0-add-e2e-ci-target-defaults"
72+
},
73+
{
74+
"cli": "nx",
75+
"version": "19.2.1-beta.0",
76+
"requires": { "@angular-eslint/eslint-plugin": ">=18.0.0" },
77+
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.",
78+
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils",
2679
"package": "@nx/angular",
27-
"name": "update-angular-cli-version-17-2-0"
80+
"name": "add-typescript-eslint-utils"
2881
},
2982
{
3083
"cli": "nx",
31-
"version": "18.1.1-beta.0",
32-
"description": "Ensure targetDefaults inputs for task hashing when '@nx/angular:webpack-browser' is used are correct for Module Federation.",
33-
"factory": "./src/migrations/update-18-1-1/fix-target-defaults-inputs",
84+
"version": "19.5.0-beta.1",
85+
"requires": { "@angular/core": ">=18.1.0" },
86+
"description": "Update the @angular/cli package version to ~18.1.0.",
87+
"factory": "./src/migrations/update-19-5-0/update-angular-cli",
3488
"package": "@nx/angular",
35-
"name": "fix-target-defaults-for-webpack-browser"
89+
"name": "update-angular-cli-version-18-1-0"
3690
},
3791
{
3892
"cli": "nx",
39-
"version": "18.2.0-beta.0",
40-
"requires": {
41-
"@angular/core": ">=17.3.0"
42-
},
43-
"description": "Update the @angular/cli package version to ~17.3.0.",
44-
"factory": "./src/migrations/update-18-2-0/update-angular-cli",
93+
"version": "19.6.0-beta.4",
94+
"description": "Ensure Module Federation DTS is turned off by default.",
95+
"factory": "./src/migrations/update-19-6-0/turn-off-dts-by-default",
4596
"package": "@nx/angular",
46-
"name": "update-angular-cli-version-17-3-0"
97+
"name": "update-19-6-0"
4798
},
4899
{
49100
"cli": "nx",
50-
"version": "19.1.0-beta.2",
51-
"requires": {
52-
"@angular/core": ">=18.0.0"
53-
},
54-
"description": "Update the @angular/cli package version to ~18.0.0.",
55-
"factory": "./src/migrations/update-19-1-0/update-angular-cli",
101+
"version": "19.6.0-beta.7",
102+
"requires": { "@angular/core": ">=18.2.0" },
103+
"description": "Update the @angular/cli package version to ~18.2.0.",
104+
"factory": "./src/migrations/update-19-6-0/update-angular-cli",
56105
"package": "@nx/angular",
57-
"name": "update-angular-cli-version-18-0-0"
106+
"name": "update-angular-cli-version-18-2-0"
58107
},
59108
{
60109
"cli": "nx",
61-
"version": "18.1.0-beta.3",
62-
"description": "Remove invalid baseUrl option from @nx/playwright:playwright targets in project.json.",
63-
"implementation": "./src/migrations/update-18-1-0/remove-baseUrl-from-project-json",
64-
"package": "@nx/playwright",
65-
"name": "18-1-0-remove-baseUrl-from-project-json"
110+
"version": "19.6.1-beta.0",
111+
"description": "Ensure Target Defaults are set correctly for Module Federation.",
112+
"factory": "./src/migrations/update-19-6-1/ensure-depends-on-for-mf",
113+
"package": "@nx/angular",
114+
"name": "update-19-6-1-ensure-module-federation-target-defaults"
115+
},
116+
{
117+
"cli": "nx",
118+
"version": "20.2.0-beta.2",
119+
"description": "Update the ModuleFederationConfig import use @nx/module-federation.",
120+
"factory": "./src/migrations/update-20-2-0/migrate-mf-imports-to-new-package",
121+
"package": "@nx/angular",
122+
"name": "update-20-2-0-update-module-federation-config-import"
123+
},
124+
{
125+
"cli": "nx",
126+
"version": "20.2.0-beta.2",
127+
"description": "Update the withModuleFederation import use @nx/module-federation/angular.",
128+
"factory": "./src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package",
129+
"package": "@nx/angular",
130+
"name": "update-20-2-0-update-with-module-federation-import"
131+
},
132+
{
133+
"cli": "nx",
134+
"version": "20.2.0-beta.5",
135+
"requires": { "@angular/core": ">=19.0.0" },
136+
"description": "Update the @angular/cli package version to ~19.0.0.",
137+
"factory": "./src/migrations/update-20-2-0/update-angular-cli",
138+
"package": "@nx/angular",
139+
"name": "update-angular-cli-version-19-0-0"
140+
},
141+
{
142+
"cli": "nx",
143+
"version": "20.2.0-beta.5",
144+
"requires": { "@angular/core": ">=19.0.0" },
145+
"description": "Add the '@angular/localize/init' polyfill to the 'polyfills' option of targets using esbuild-based executors.",
146+
"factory": "./src/migrations/update-20-2-0/add-localize-polyfill-to-targets",
147+
"package": "@nx/angular",
148+
"name": "add-localize-polyfill-to-targets"
149+
},
150+
{
151+
"cli": "nx",
152+
"version": "20.2.0-beta.5",
153+
"requires": { "@angular/core": ">=19.0.0" },
154+
"description": "Update '@angular/ssr' import paths to use the new '/node' entry point when 'CommonEngine' is detected.",
155+
"factory": "./src/migrations/update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point",
156+
"package": "@nx/angular",
157+
"name": "update-angular-ssr-imports-to-use-node-entry-point"
158+
},
159+
{
160+
"cli": "nx",
161+
"version": "20.2.0-beta.6",
162+
"requires": { "@angular/core": ">=19.0.0" },
163+
"description": "Disable the Angular ESLint prefer-standalone rule if not set.",
164+
"factory": "./src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone",
165+
"package": "@nx/angular",
166+
"name": "disable-angular-eslint-prefer-standalone"
167+
},
168+
{
169+
"cli": "nx",
170+
"version": "20.2.0-beta.8",
171+
"requires": { "@angular/core": ">=19.0.0" },
172+
"description": "Remove Angular ESLint rules that were removed in v19.0.0.",
173+
"factory": "./src/migrations/update-20-2-0/remove-angular-eslint-rules",
174+
"package": "@nx/angular",
175+
"name": "remove-angular-eslint-rules"
176+
},
177+
{
178+
"cli": "nx",
179+
"version": "20.2.0-beta.8",
180+
"requires": { "@angular/core": ">=19.0.0" },
181+
"description": "Remove the deprecated 'tailwindConfig' option from ng-packagr executors. Tailwind CSS configurations located at the project or workspace root will be picked up automatically.",
182+
"factory": "./src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors",
183+
"package": "@nx/angular",
184+
"name": "remove-tailwind-config-from-ng-packagr-executors"
185+
},
186+
{
187+
"version": "19.0.0",
188+
"description": "Updates non-standalone Directives, Component and Pipes to 'standalone:false' and removes 'standalone:true' from those who are standalone",
189+
"factory": "./bundles/explicit-standalone-flag#migrate",
190+
"package": "@angular/core",
191+
"name": "explicit-standalone-flag"
66192
},
67193
{
68-
"version": "18.0.0",
69-
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
70-
"factory": "./migrations/invalid-two-way-bindings/bundle",
194+
"version": "19.0.0",
195+
"description": "Updates ExperimentalPendingTasks to PendingTasks",
196+
"factory": "./bundles/pending-tasks#migrate",
71197
"package": "@angular/core",
72-
"name": "invalid-two-way-bindings"
198+
"name": "pending-tasks"
73199
},
74200
{
75-
"version": "18.0.0",
76-
"description": "Replace deprecated HTTP related modules with provider functions",
77-
"factory": "./migrations/http-providers/bundle",
201+
"version": "19.0.0",
202+
"description": "Replaces `APP_INITIALIZER`, `ENVIRONMENT_INITIALIZER` & `PLATFORM_INITIALIZER` respectively with `provideAppInitializer`, `provideEnvironmentInitializer` & `providePlatformInitializer`.",
203+
"factory": "./bundles/provide-initializer#migrate",
204+
"optional": true,
78205
"package": "@angular/core",
79-
"name": "migration-http-providers"
206+
"name": "provide-initializer"
80207
}
81208
]
82-
}
209+
}

nx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,6 @@
6262
"style": "scss"
6363
}
6464
},
65-
"defaultProject": "query-playground"
65+
"defaultProject": "query-playground",
66+
"useLegacyCache": true
6667
}

0 commit comments

Comments
 (0)