+
Skip to content

build: update to Nx 21.2.1 #1783

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 3 commits into from
Jun 20, 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
39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@
"@angular/platform-browser-dynamic": "^20.0.0",
"@angular/platform-server": "^20.0.0",
"@angular/router": "^20.0.0",
"@angular/ssr": "~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.1.3",
"@nx/devkit": "21.1.3",
"@nx/angular": "21.2.1",
"@nx/devkit": "21.2.1",
"@trpc/client": "^10.25.0",
"@trpc/server": "^10.25.0",
"ajv-formats": "^2.1.1",
Expand Down Expand Up @@ -88,33 +89,33 @@
"@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-eslint/eslint-plugin": "20.1.1",
"@angular-eslint/eslint-plugin-template": "20.1.1",
"@angular-eslint/template-parser": "20.1.1",
"@angular/build": "^20.0.0",
"@angular/cli": "^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.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",
"@nx/cypress": "21.2.1",
"@nx/eslint": "21.2.1",
"@nx/eslint-plugin": "21.2.1",
"@nx/jest": "21.2.1",
"@nx/js": "21.2.1",
"@nx/playwright": "21.2.1",
"@nx/plugin": "21.2.1",
"@nx/storybook": "21.2.1",
"@nx/vite": "21.2.1",
"@nx/web": "21.2.1",
"@playwright/test": "^1.36.0",
"@schematics/angular": "19.2.5",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@storybook/angular": "8.6.12",
"@storybook/angular": "9.0.9",
"@storybook/builder-vite": "^8.6.12",
"@swc-node/register": "1.9.2",
"@swc/cli": "0.6.0",
Expand Down Expand Up @@ -164,7 +165,7 @@
"minimist": "^1.2.7",
"ng-packagr": "^20.0.0",
"nitropack": "^2.11.0",
"nx": "21.1.3",
"nx": "21.2.1",
"playwright": "^1.49.1",
"postcss": "^8.4.21",
"postcss-import": "~15.1.0",
Expand All @@ -182,7 +183,7 @@
"sharp": "^0.33.5",
"shiki": "^1.6.1",
"start-server-and-test": "^1.15.4",
"storybook": "^8.4.6",
"storybook": "9.0.9",
"tailwindcss": "^3.1.0",
"ts-dedent": "^2.0.0",
"ts-jest": "29.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export function updateAppTsConfig(
tree,
tsconfigPath,
(json) => {
json.files = [...json.files, 'src/main.server.ts'];
json.files = [...(json.files || []), 'src/main.server.ts'];

json.include = [
...json.include,
...(json.include || []),
'src/app/pages/**/*.page.ts',
'src/server/middleware/**/*.ts',
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,65 +18,6 @@ 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 @@ -124,7 +65,7 @@ exports[`preset generator > should match project.json 1`] = `
}
},
"extract-i18n": {
"executor": "@angular-devkit/build-angular:extract-i18n",
"executor": "@angular/build:extract-i18n",
"options": {
"buildTarget": "my-app:build"
}
Expand All @@ -151,17 +92,18 @@ exports[`preset generator > should match project.json 1`] = `
`;

exports[`preset generator > should match src/test-setup.ts 1`] = `
"import '@analogjs/vitest-angular/setup-zone';
"import '@angular/compiler';
import '@analogjs/vitest-angular/setup-zone';

import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
BrowserTestingModule,
platformBrowserTesting,
} from '@angular/platform-browser/testing';
import { getTestBed } from '@angular/core/testing';

getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting(),
BrowserTestingModule,
platformBrowserTesting(),
);
"
`;
Expand Down Expand Up @@ -206,44 +148,3 @@ 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',
},
};
});
"
`;
Loading
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载