+
Skip to content

build: update to Angular v20 and Nx 21.1.3 #1773

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

Merged
merged 2 commits into from
Jun 11, 2025
Merged
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
3 changes: 2 additions & 1 deletion apps/analog-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
},
"test": {
"executor": "@nx/vite:test",
"outputs": ["{projectRoot}/coverage"]
"outputs": ["{projectRoot}/coverage"],
"dependsOn": ["^build"]
}
}
}
3 changes: 2 additions & 1 deletion apps/ng-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nx/vite:test"
"executor": "@nx/vite:test",
"dependsOn": ["^build"]
}
}
}
3 changes: 2 additions & 1 deletion apps/trpc-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
},
"test": {
"executor": "@nx/vite:test",
"outputs": ["{projectRoot}/coverage"]
"outputs": ["{projectRoot}/coverage"],
"dependsOn": ["^build"]
}
}
}
70 changes: 35 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@
},
"private": true,
"dependencies": {
"@angular/animations": "20.0.0-rc.2",
"@angular/cdk": "20.0.0-rc.2",
"@angular/common": "20.0.0-rc.2",
"@angular/compiler": "20.0.0-rc.2",
"@angular/core": "20.0.0-rc.2",
"@angular/forms": "20.0.0-rc.2",
"@angular/material": "20.0.0-rc.2",
"@angular/platform-browser": "20.0.0-rc.2",
"@angular/platform-browser-dynamic": "20.0.0-rc.2",
"@angular/platform-server": "20.0.0-rc.2",
"@angular/router": "20.0.0-rc.2",
"@angular/animations": "^20.0.0",
"@angular/cdk": "^20.0.0",
"@angular/common": "^20.0.0",
"@angular/compiler": "^20.0.0",
"@angular/core": "^20.0.0",
"@angular/forms": "^20.0.0",
"@angular/material": "^20.0.0",
"@angular/platform-browser": "^20.0.0",
"@angular/platform-browser-dynamic": "^20.0.0",
"@angular/platform-server": "^20.0.0",
"@angular/router": "^20.0.0",
"@astrojs/mdx": "^3.0.1",
"@astrojs/react": "^3.0.0",
"@babel/core": "^7.21.8",
"@mdx-js/react": "3.0.1",
"@nx/angular": "21.0.3",
"@nx/devkit": "21.0.3",
"@nx/angular": "21.1.3",
"@nx/devkit": "21.1.3",
"@trpc/client": "^10.25.0",
"@trpc/server": "^10.25.0",
"ajv-formats": "^2.1.1",
Expand All @@ -84,31 +84,31 @@
"zone.js": "^0.15.0"
},
"devDependencies": {
"@angular-devkit/architect": "0.2000.0-rc.3",
"@angular-devkit/build-angular": "20.0.0-rc.3",
"@angular-devkit/core": "20.0.0-rc.3",
"@angular-devkit/schematics": "20.0.0-rc.3",
"@angular-devkit/architect": "^0.2000.0",
"@angular-devkit/build-angular": "^20.0.0",
"@angular-devkit/core": "^20.0.0",
"@angular-devkit/schematics": "^20.0.0",
"@angular-eslint/eslint-plugin": "19.3.0",
"@angular-eslint/eslint-plugin-template": "19.3.0",
"@angular-eslint/template-parser": "19.3.0",
"@angular/build": "20.0.0-rc.3",
"@angular/cli": "20.0.0-rc.3",
"@angular/compiler-cli": "20.0.0-rc.2",
"@angular/language-service": "20.0.0-rc.2",
"@angular/build": "^20.0.0",
"@angular/cli": "^20.0.0",
"@angular/compiler-cli": "^20.0.0",
"@angular/language-service": "^20.0.0",
"@astrojs/markdown-component": "^1.0.5",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@netlify/functions": "^2.3.0",
"@nx/cypress": "21.0.3",
"@nx/eslint": "21.0.3",
"@nx/eslint-plugin": "21.0.3",
"@nx/jest": "21.0.3",
"@nx/js": "21.0.3",
"@nx/playwright": "21.0.3",
"@nx/plugin": "21.0.3",
"@nx/storybook": "21.0.3",
"@nx/vite": "21.0.3",
"@nx/web": "21.0.3",
"@nx/cypress": "21.1.3",
"@nx/eslint": "21.1.3",
"@nx/eslint-plugin": "21.1.3",
"@nx/jest": "21.1.3",
"@nx/js": "21.1.3",
"@nx/playwright": "21.1.3",
"@nx/plugin": "21.1.3",
"@nx/storybook": "21.1.3",
"@nx/vite": "21.1.3",
"@nx/web": "21.1.3",
"@playwright/test": "^1.36.0",
"@schematics/angular": "19.2.5",
"@semantic-release/changelog": "^6.0.3",
Expand Down Expand Up @@ -162,9 +162,9 @@
"marked-mangle": "^1.1.10",
"marked-shiki": "^1.1.0",
"minimist": "^1.2.7",
"ng-packagr": "20.0.0-rc.1",
"ng-packagr": "^20.0.0",
"nitropack": "^2.11.0",
"nx": "21.0.3",
"nx": "21.1.3",
"playwright": "^1.49.1",
"postcss": "^8.4.21",
"postcss-import": "~15.1.0",
Expand All @@ -190,12 +190,12 @@
"ts-node": "10.9.1",
"typescript": "~5.8.0",
"vfile": "^6.0.3",
"vite": "6.2.3",
"vite": "6.3.5",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-inspect": "~0.8",
"vite-tsconfig-paths": "4.2.0",
"vitefu": "^1.0.0",
"vitest": "^3.0.5",
"vitest": "^3.2.0",
"webpack-bundle-analyzer": "^4.7.0",
"xmlbuilder2": "^3.0.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,65 @@ exports[`preset generator > should match index.html 1`] = `
"
`;

exports[`preset generator > should match index.html 2`] = `
"/// <reference types="vitest" />

import analog from '@analogjs/platform';
import { defineConfig } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
import tailwindcss from '@tailwindcss/vite';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
root: __dirname,
cacheDir: \`../node_modules/.vite\`,
build: {
outDir: '../dist/./my-app/client',
reportCompressedSize: true,
target: ['es2020'],
},
server: {
fs: {
allow: ['.'],
},
},
plugins: [tailwindcss(), analog(), nxViteTsPaths()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['src/test-setup.ts'],
include: ['**/*.spec.ts'],
reporters: ['default'],
},
define: {
'import.meta.vitest': mode !== 'production',
},
};
});
"
`;

exports[`preset generator > should match index.html 3`] = `
"<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>my-app</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
</head>
<body>
<app-root></app-root>
<script type="module" src="/my-app/src/main.ts"></script>
</body>
</html>
"
`;

exports[`preset generator > should match project.json 1`] = `
"{
"name": "my-app",
Expand Down Expand Up @@ -147,3 +206,44 @@ export default defineConfig(({ mode }) => {
});
"
`;

exports[`preset generator > should match vite.config.ts 2`] = `
"/// <reference types="vitest" />

import analog from '@analogjs/platform';
import { defineConfig } from 'vite';
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';

// @ts-expect-error @tailwindcss/vite currently uses mts. TypeScript is complaining this, but it works as expected.
import tailwindcss from '@tailwindcss/vite';

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
return {
root: __dirname,
cacheDir: \`../node_modules/.vite\`,
build: {
outDir: '../dist/./my-app/client',
reportCompressedSize: true,
target: ['es2020'],
},
server: {
fs: {
allow: ['.'],
},
},
plugins: [tailwindcss(), analog(), nxViteTsPaths()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['src/test-setup.ts'],
include: ['**/*.spec.ts'],
reporters: ['default'],
},
define: {
'import.meta.vitest': mode !== 'production',
},
};
});
"
`;
1 change: 1 addition & 0 deletions packages/nx-plugin/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineConfig(({ mode }) => {
include: ['**/*.spec.ts'],
exclude: ['**/files/**/*.spec.ts'],
cacheDir: '../../node_modules/.vitest',
testTimeout: 10000,
},
define: {
'import.meta.vitest': mode !== 'production',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function getPageHandlers({

return {
handler: endpointFile,
route: `${hasAPIDir ? '/api' : ''}/_analog${route}`,
route: `${hasAPIDir ? '/api' : ''}/_analog${route}.json`,
lazy: true,
};
});
Expand Down
Loading
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载