Skip to content

Commit adfbebe

Browse files
feat: upgrade to Angular 22 RC and Nx 22.7.5
Bump @angular/* and @angular-devkit/* to ^22.0.0-rc.0, @nx/* to 22.7.5, regenerate the pnpm lockfile, and apply the nx migrate formatting/config updates (nx.json, tsconfig.base.json, plugin builders). Ignore the new .nx/polygraph and .nx/self-healing nx caches. Widen package peer ranges to admit Angular 22 RC and drop the unsupported <17 floor, and fix migration build fallout (nx-plugin and storybook-angular type errors, blog-app sharp trace, docs-app webpack pin). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 986f8d6 commit adfbebe

40 files changed

Lines changed: 3611 additions & 2690 deletions

.github/workflows/test-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
steps:
9696
- uses: actions/setup-node@v4
9797
with:
98-
node-version: '24.11.0'
98+
node-version: '24.15.0'
9999
- run: npm install --global corepack@0.34.6
100100
- run: corepack enable
101101
- run: npm --version

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,6 @@ vite.config.*.timestamp*
7474
vitest.config.*.timestamp*
7575

7676
.claude/worktrees
77-
.claude/settings.local.json
77+
.claude/settings.local.json
78+
.nx/polygraph
79+
.nx/self-healing

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ pnpm-lock.yaml
1111
/packages/create-analog/template-*
1212
.vite-inspect
1313
.all-contributorsrc
14+
15+
.nx/self-healing

apps/blog-app/vite.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ export default defineConfig(() => {
8484
prerender: {
8585
failOnError: true,
8686
},
87+
externals: {
88+
// `sharp` lists `@img/sharp-wasm32` as an optional dependency.
89+
// pnpm leaves a dangling symlink for it on non-wasm platforms
90+
// (the package is never fetched), and nitro's external file
91+
// trace calls `realpath()` on every traced file — throwing
92+
// ENOENT on that dangling link. Exclude it from the trace; the
93+
// wasm32 fallback is never used when a native binary is present.
94+
traceOptions: {
95+
ignore: (path: string) => path.includes('@img/sharp-wasm32'),
96+
},
97+
},
8798
},
8899
}),
89100
nxViteTsPaths(),

nx.json

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,51 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
3-
"workspaceLayout": { "libsDir": "packages" },
4-
"cli": { "packageManager": "pnpm" },
3+
"workspaceLayout": {
4+
"libsDir": "packages"
5+
},
6+
"cli": {
7+
"packageManager": "pnpm"
8+
},
59
"targetDefaults": {
610
"build": {
711
"dependsOn": ["^build"],
812
"inputs": ["production", "^production"]
913
},
10-
"test": { "dependsOn": ["^build"], "cache": true },
11-
"e2e": { "dependsOn": ["^build"], "cache": true },
12-
"serve": { "dependsOn": ["^build"] },
13-
"build-package": { "cache": false },
14-
"@nx/js:tsc": { "cache": false },
14+
"test": {
15+
"dependsOn": ["^build"],
16+
"cache": true
17+
},
18+
"e2e": {
19+
"dependsOn": ["^build"],
20+
"cache": true
21+
},
22+
"serve": {
23+
"dependsOn": ["^build"]
24+
},
25+
"build-package": {
26+
"cache": false
27+
},
28+
"@nx/js:tsc": {
29+
"cache": false
30+
},
1531
"@nx/eslint:lint": {
16-
"inputs": ["default", "{workspaceRoot}/eslint.config.mjs"],
32+
"inputs": [
33+
"default",
34+
"^default",
35+
"{workspaceRoot}/eslint.config.mjs",
36+
"{workspaceRoot}/tools/eslint-rules/**/*"
37+
],
1738
"cache": true
1839
},
1940
"@angular-devkit/build-angular:application": {
2041
"cache": true,
2142
"dependsOn": ["^build"],
2243
"inputs": ["production", "^production"]
2344
},
24-
"@nx/vitest:test": { "cache": true, "inputs": ["default", "^production"] }
45+
"@nx/vitest:test": {
46+
"cache": true,
47+
"inputs": ["default", "^production"]
48+
}
2549
},
2650
"generators": {
2751
"@nx/angular:application": {
@@ -34,7 +58,9 @@
3458
"linter": "eslint",
3559
"unitTestRunner": "vitest-analog"
3660
},
37-
"@nx/angular:component": { "style": "css" }
61+
"@nx/angular:component": {
62+
"style": "css"
63+
}
3864
},
3965
"defaultProject": "analog-app",
4066
"namedInputs": {
@@ -57,7 +83,9 @@
5783
"plugins": [
5884
{
5985
"plugin": "@nx/eslint/plugin",
60-
"options": { "targetName": "eslint:lint" }
86+
"options": {
87+
"targetName": "eslint:lint"
88+
}
6189
}
6290
],
6391
"analytics": false

package.json

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,25 @@
4343
},
4444
"private": true,
4545
"dependencies": {
46-
"@angular/animations": "21.2.7",
47-
"@angular/cdk": "21.2.5",
48-
"@angular/common": "21.2.7",
49-
"@angular/compiler": "21.2.7",
50-
"@angular/core": "21.2.7",
51-
"@angular/forms": "21.2.7",
52-
"@angular/localize": "21.2.7",
53-
"@angular/material": "21.2.5",
54-
"@angular/platform-browser": "21.2.7",
55-
"@angular/platform-browser-dynamic": "21.2.7",
56-
"@angular/platform-server": "21.2.7",
57-
"@angular/router": "21.2.7",
58-
"@angular/ssr": "21.2.6",
46+
"@angular/animations": "^22.0.0-rc.2",
47+
"@angular/cdk": "^22.0.0-rc.2",
48+
"@angular/common": "^22.0.0-rc.2",
49+
"@angular/compiler": "^22.0.0-rc.2",
50+
"@angular/core": "^22.0.0-rc.2",
51+
"@angular/forms": "^22.0.0-rc.2",
52+
"@angular/localize": "^22.0.0-rc.2",
53+
"@angular/material": "^22.0.0-rc.2",
54+
"@angular/platform-browser": "^22.0.0-rc.2",
55+
"@angular/platform-browser-dynamic": "^22.0.0-rc.2",
56+
"@angular/platform-server": "^22.0.0-rc.2",
57+
"@angular/router": "^22.0.0-rc.2",
58+
"@angular/ssr": "^22.0.0-rc.2",
5959
"@astrojs/mdx": "^5.0.0",
6060
"@astrojs/react": "^5.0.0",
6161
"@babel/core": "^7.29.0",
6262
"@mdx-js/react": "3.1.1",
63-
"@nx/angular": "22.6.4",
64-
"@nx/devkit": "22.6.4",
63+
"@nx/angular": "22.7.5",
64+
"@nx/devkit": "22.7.5",
6565
"@trpc/client": "^10.45.2",
6666
"@trpc/server": "^10.45.2",
6767
"ajv-formats": "^3.0.1",
@@ -90,34 +90,34 @@
9090
"zone.js": "^0.16.1"
9191
},
9292
"devDependencies": {
93-
"@angular-devkit/architect": "0.2102.6",
94-
"@angular-devkit/build-angular": "21.2.6",
95-
"@angular-devkit/core": "21.2.6",
96-
"@angular-devkit/schematics": "21.2.6",
93+
"@angular-devkit/architect": "^0.2200.0-rc.2",
94+
"@angular-devkit/build-angular": "^22.0.0-rc.2",
95+
"@angular-devkit/core": "^22.0.0-rc.2",
96+
"@angular-devkit/schematics": "^22.0.0-rc.2",
9797
"@angular-eslint/eslint-plugin": "21.3.0",
9898
"@angular-eslint/eslint-plugin-template": "21.3.0",
9999
"@angular-eslint/template-parser": "21.3.0",
100-
"@angular/build": "21.2.6",
101-
"@angular/cli": "21.2.6",
102-
"@angular/compiler-cli": "21.2.7",
103-
"@angular/language-service": "21.2.7",
100+
"@angular/build": "^22.0.0-rc.2",
101+
"@angular/cli": "^22.0.0-rc.2",
102+
"@angular/compiler-cli": "^22.0.0-rc.2",
103+
"@angular/language-service": "^22.0.0-rc.2",
104104
"@astrojs/markdown-component": "^1.0.5",
105105
"@commitlint/cli": "^20.4.3",
106106
"@commitlint/config-conventional": "^20.4.3",
107107
"@compodoc/compodoc": "^1.2.1",
108108
"@eslint/eslintrc": "^3.3.5",
109109
"@eslint/js": "^10.0.1",
110110
"@netlify/functions": "^2.8.2",
111-
"@nx/cypress": "22.6.4",
112-
"@nx/eslint": "22.6.4",
113-
"@nx/eslint-plugin": "22.6.4",
114-
"@nx/js": "22.6.4",
115-
"@nx/playwright": "22.6.4",
116-
"@nx/plugin": "22.6.4",
117-
"@nx/storybook": "22.6.4",
118-
"@nx/vite": "22.6.4",
119-
"@nx/vitest": "22.6.4",
120-
"@nx/web": "22.6.4",
111+
"@nx/cypress": "22.7.5",
112+
"@nx/eslint": "22.7.5",
113+
"@nx/eslint-plugin": "22.7.5",
114+
"@nx/js": "22.7.5",
115+
"@nx/playwright": "22.7.5",
116+
"@nx/plugin": "22.7.5",
117+
"@nx/storybook": "22.7.5",
118+
"@nx/vite": "22.7.5",
119+
"@nx/vitest": "22.7.5",
120+
"@nx/web": "22.7.5",
121121
"@oxc-angular/vite": "^0.0.15",
122122
"@oxc-project/runtime": "^0.117.0",
123123
"@playwright/test": "^1.58.2",
@@ -141,6 +141,7 @@
141141
"@types/prismjs": "^1.26.6",
142142
"@types/react": "^18.3.23",
143143
"@types/react-dom": "^18.3.7",
144+
"@types/semver": "7.7.1",
144145
"@typescript-eslint/eslint-plugin": "8.57.0",
145146
"@typescript-eslint/parser": "8.57.0",
146147
"@typescript-eslint/utils": "^8.57.0",
@@ -175,9 +176,9 @@
175176
"marked-mangle": "^1.1.12",
176177
"marked-shiki": "^1.2.1",
177178
"minimist": "^1.2.8",
178-
"ng-packagr": "21.2.2",
179+
"ng-packagr": "^22.0.0-rc.0",
179180
"nitropack": "^2.13.1",
180-
"nx": "22.6.4",
181+
"nx": "22.7.5",
181182
"playwright": "^1.58.2",
182183
"postcss": "^8.5.8",
183184
"postcss-import": "~16.1.1",
@@ -192,6 +193,7 @@
192193
"satori-html": "^0.3.2",
193194
"semantic-release": "^25.0.3",
194195
"semantic-release-replace-plugin": "^1.2.7",
196+
"semver": "7.7.4",
195197
"sharp": "^0.34.5",
196198
"shiki": "^1.29.2",
197199
"start-server-and-test": "^2.1.5",
@@ -201,7 +203,7 @@
201203
"ts-dedent": "^2.2.0",
202204
"ts-morph": "^27.0.2",
203205
"ts-node": "10.9.2",
204-
"typescript": "5.9.3",
206+
"typescript": "~6.0.0",
205207
"typescript-eslint": "^8.57.0",
206208
"vite": "^8.0.0",
207209
"vite-plugin-eslint": "^1.8.1",
@@ -229,7 +231,8 @@
229231
],
230232
"overrides": {
231233
"vite": "^8.0.0",
232-
"@typescript-eslint/type-utils": "8.57.0"
234+
"@typescript-eslint/type-utils": "8.57.0",
235+
"webpack": "5.105.4"
233236
}
234237
}
235238
}

packages/astro-angular/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
"rehype": "^13.0.2"
3939
},
4040
"peerDependencies": {
41-
"@angular/build": ">=20.0.0",
42-
"@angular/animations": ">=20.0.0",
43-
"@angular/common": ">=20.0.0",
44-
"@angular/compiler-cli": ">=20.0.0",
45-
"@angular/compiler": ">=20.0.0",
46-
"@angular/core": ">=20.0.0",
47-
"@angular/language-service": ">=20.0.0",
48-
"@angular/platform-browser": ">=20.0.0",
49-
"@angular/platform-server": ">=20.0.0",
41+
"@angular/build": ">=20.0.0 || ^22.0.0-rc.0",
42+
"@angular/animations": ">=20.0.0 || ^22.0.0-rc.0",
43+
"@angular/common": ">=20.0.0 || ^22.0.0-rc.0",
44+
"@angular/compiler-cli": ">=20.0.0 || ^22.0.0-rc.0",
45+
"@angular/compiler": ">=20.0.0 || ^22.0.0-rc.0",
46+
"@angular/core": ">=20.0.0 || ^22.0.0-rc.0",
47+
"@angular/language-service": ">=20.0.0 || ^22.0.0-rc.0",
48+
"@angular/platform-browser": ">=20.0.0 || ^22.0.0-rc.0",
49+
"@angular/platform-server": ">=20.0.0 || ^22.0.0-rc.0",
5050
"rxjs": "^7.8.0",
5151
"tslib": "^2.4.0"
5252
},

packages/content/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
"url": "https://github.com/sponsors/brandonroberts"
2424
},
2525
"peerDependencies": {
26-
"@angular/common": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0",
27-
"@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0",
28-
"@angular/platform-browser": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0",
29-
"@angular/router": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0",
26+
"@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0-rc.0",
27+
"@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0-rc.0",
28+
"@angular/platform-browser": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0-rc.0",
29+
"@angular/router": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0-rc.0",
3030
"@nx/devkit": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0 || ^22",
3131
"front-matter": "^4.0.2",
3232
"marked": "^15.0.7",

packages/nx-plugin/src/generators/app/generator.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export async function appGenerator(
109109
});
110110

111111
const angularVersion = getInstalledPackageVersion(tree, '@angular/core');
112-
const majorAngularVersion = major(coerce(angularVersion));
112+
const majorAngularVersion = major(coerce(angularVersion!)!);
113113
addFiles(tree, normalizedOptions, majorAngularVersion);
114114
addDependenciesToPackageJson(
115115
tree,
@@ -122,11 +122,15 @@ export async function appGenerator(
122122
{},
123123
);
124124

125-
updateJson<{ dependencies: object }>(tree, '/package.json', (json) => {
126-
json.dependencies['@angular/platform-server'] = `~${angularVersion}`;
125+
updateJson<{ dependencies: Record<string, string> }>(
126+
tree,
127+
'/package.json',
128+
(json) => {
129+
json.dependencies['@angular/platform-server'] = `~${angularVersion}`;
127130

128-
return json;
129-
});
131+
return json;
132+
},
133+
);
130134

131135
updateIndex(tree, normalizedOptions.analogAppName);
132136

packages/nx-plugin/src/generators/app/lib/add-analog-project-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function addAnalogProjectConfig(
1616
const targets = isNx ? 'targets' : 'architect';
1717
const builders = isNx ? 'executor' : 'builder';
1818

19-
let projectConfiguration: ProjectConfiguration = {
19+
let projectConfiguration: any = {
2020
root: projectRoot,
2121
projectType: 'application',
2222
[targets]: {
@@ -57,7 +57,7 @@ export function addAnalogProjectConfig(
5757
};
5858

5959
if (isNx) {
60-
projectConfiguration.targets['build'].outputs = [
60+
projectConfiguration[targets]['build'].outputs = [
6161
'{options.outputPath}',
6262
`{workspaceRoot}/dist/${workspaceAppsDir}${projectName}/.nitro`,
6363
`{workspaceRoot}/dist/${workspaceAppsDir}${projectName}/ssr`,

0 commit comments

Comments
 (0)