chore: update nx

This commit is contained in:
Jan Jaap
2025-05-25 17:31:43 +03:00
parent 0e7ce4d442
commit 01f23a2516
12 changed files with 1756 additions and 1846 deletions

View File

@@ -14,17 +14,10 @@ module.exports = [
...nx.configs['flat/typescript'],
...nx.configs['flat/javascript'],
{
ignores: ['**/dist', "**/tsconfig.**"],
ignores: ['**/dist', '**/tsconfig.**', '**/vite.config.*.timestamp*', '**/vitest.config.*.timestamp*'],
},
{
files: [
'**/*.ts',
'**/*.tsx',
'**/*.js',
'**/*.jsx',
'**/*.cjs',
'**/*.mjs',
],
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
// Override or add rules here
rules: {
'@nx/enforce-module-boundaries': [
@@ -40,22 +33,15 @@ module.exports = [
],
},
],
'no-warning-comments': 'off'},
'no-warning-comments': 'off',
},
},
// Add special configuration for CI environment that converts warnings to errors
...(process.env.CI === 'true'
? [
{
files: [
'**/*.ts',
'**/*.tsx',
'**/*.js',
'**/*.jsx',
'**/*.cjs',
'**/*.mjs',
],
rules: {
},
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
rules: {},
},
]
: []),

View File

@@ -14,7 +14,7 @@
"dependencies": {
"tslib": "^2.3.0",
"zod": "^3.24.4",
"@nestjs/common": "^11.1.1",
"@nestjs/common": "^11.1.0",
"@nestjs/config": "^4.0.2"
}
}

View File

@@ -5,10 +5,9 @@
"projectType": "library",
"release": {
"version": {
"generatorOptions": {
"packageRoot": "dist/{projectRoot}",
"currentVersionResolver": "git-tag"
}
"currentVersionResolver": "git-tag",
"preserveLocalDependencyProtocols": false,
"manifestRootsToUpdate": ["dist/{projectRoot}"]
}
},
"tags": [],

View File

@@ -5,10 +5,9 @@
"projectType": "library",
"release": {
"version": {
"generatorOptions": {
"packageRoot": "dist/{projectRoot}",
"currentVersionResolver": "git-tag"
}
"currentVersionResolver": "git-tag",
"preserveLocalDependencyProtocols": false,
"manifestRootsToUpdate": ["dist/{projectRoot}"]
}
},
"tags": [],

View File

@@ -5,10 +5,9 @@
"projectType": "library",
"release": {
"version": {
"generatorOptions": {
"packageRoot": "dist/{projectRoot}",
"currentVersionResolver": "git-tag"
}
"currentVersionResolver": "git-tag",
"preserveLocalDependencyProtocols": false,
"manifestRootsToUpdate": ["dist/{projectRoot}"]
}
},
"tags": [],

View File

@@ -5,10 +5,9 @@
"projectType": "library",
"release": {
"version": {
"generatorOptions": {
"packageRoot": "dist/{projectRoot}",
"currentVersionResolver": "git-tag"
}
"currentVersionResolver": "git-tag",
"preserveLocalDependencyProtocols": false,
"manifestRootsToUpdate": ["dist/{projectRoot}"]
}
},
"tags": [],

View File

@@ -5,10 +5,9 @@
"projectType": "library",
"release": {
"version": {
"generatorOptions": {
"packageRoot": "dist/{projectRoot}",
"currentVersionResolver": "git-tag"
}
"currentVersionResolver": "git-tag",
"preserveLocalDependencyProtocols": false,
"manifestRootsToUpdate": ["dist/{projectRoot}"]
}
},
"tags": [],

134
migrations.json Normal file
View File

@@ -0,0 +1,134 @@
{
"migrations": [
{
"version": "21.0.0-beta.8",
"description": "Removes the legacy cache configuration from nx.json",
"implementation": "./src/migrations/update-21-0-0/remove-legacy-cache",
"package": "nx",
"name": "remove-legacy-cache"
},
{
"version": "21.0.0-beta.8",
"description": "Removes the legacy cache configuration from nx.json",
"implementation": "./src/migrations/update-21-0-0/remove-custom-tasks-runner",
"package": "nx",
"name": "remove-custom-tasks-runner"
},
{
"version": "21.0.0-beta.11",
"description": "Updates release version config based on the breaking changes in Nx v21",
"implementation": "./src/migrations/update-21-0-0/release-version-config-changes",
"package": "nx",
"name": "release-version-config-changes"
},
{
"version": "21.0.0-beta.11",
"description": "Updates release changelog config based on the breaking changes in Nx v21",
"implementation": "./src/migrations/update-21-0-0/release-changelog-config-changes",
"package": "nx",
"name": "release-changelog-config-changes"
},
{
"version": "21.1.0-beta.2",
"description": "Adds **/nx-rules.mdc and **/nx.instructions.md to .gitignore if not present",
"implementation": "./src/migrations/update-21-1-0/add-gitignore-entry",
"package": "nx",
"name": "21-1-0-add-ignore-entries-for-nx-rule-files"
},
{
"cli": "nx",
"version": "20.8.0-beta.0",
"requires": { "cypress": ">=14.0.0" },
"description": "Replaces the `experimentalSkipDomainInjection` configuration option with the new `injectDocumentDomain` configuration option.",
"implementation": "./src/migrations/update-20-8-0/set-inject-document-domain",
"package": "@nx/cypress",
"name": "set-inject-document-domain"
},
{
"cli": "nx",
"version": "20.8.0-beta.0",
"requires": { "cypress": ">=14.0.0" },
"description": "Removes the `experimentalFetchPolyfill` configuration option.",
"implementation": "./src/migrations/update-20-8-0/remove-experimental-fetch-polyfill",
"package": "@nx/cypress",
"name": "remove-experimental-fetch-polyfill"
},
{
"cli": "nx",
"version": "20.8.0-beta.0",
"requires": { "cypress": ">=14.0.0" },
"description": "Replaces the `experimentalJustInTimeCompile` configuration option with the new `justInTimeCompile` configuration option.",
"implementation": "./src/migrations/update-20-8-0/replace-experimental-just-in-time-compile",
"package": "@nx/cypress",
"name": "replace-experimental-just-in-time-compile"
},
{
"cli": "nx",
"version": "20.8.0-beta.0",
"requires": { "cypress": ">=14.0.0" },
"description": "Updates the module specifier for the Component Testing `mount` function.",
"implementation": "./src/migrations/update-20-8-0/update-component-testing-mount-imports",
"package": "@nx/cypress",
"name": "update-component-testing-mount-imports"
},
{
"version": "21.0.0-beta.10",
"description": "Removes the `tsConfig` and `copyFiles` options from the `@nx/cypress:cypress` executor.",
"implementation": "./src/migrations/update-21-0-0/remove-tsconfig-and-copy-files-options-from-cypress-executor",
"package": "@nx/cypress",
"name": "remove-tsconfig-and-copy-files-options-from-cypress-executor"
},
{
"version": "20.5.0-beta.2",
"description": "Install jiti as a devDependency to allow vite to parse TS postcss files.",
"implementation": "./src/migrations/update-20-5-0/install-jiti",
"package": "@nx/vite",
"name": "update-20-5-0-install-jiti"
},
{
"version": "20.5.0-beta.3",
"description": "Update resolve.conditions to include defaults that are no longer provided by Vite.",
"implementation": "./src/migrations/update-20-5-0/update-resolve-conditions",
"package": "@nx/vite",
"name": "update-20-5-0-update-resolve-conditions"
},
{
"version": "20.5.0-beta.3",
"description": "Add vite config temporary files to the ESLint configuration ignore patterns if ESLint is used.",
"implementation": "./src/migrations/update-20-5-0/eslint-ignore-vite-temp-files",
"package": "@nx/vite",
"name": "eslint-ignore-vite-temp-files"
},
{
"cli": "nx",
"version": "21.0.0-beta.9",
"description": "Replace usage of `getJestProjects` with `getJestProjectsAsync`.",
"implementation": "./src/migrations/update-21-0-0/replace-getJestProjects-with-getJestProjectsAsync",
"package": "@nx/jest",
"name": "replace-getJestProjects-with-getJestProjectsAsync-v21"
},
{
"version": "21.0.0-beta.10",
"description": "Remove the previously deprecated and unused `tsConfig` option from the `@nx/jest:jest` executor.",
"implementation": "./src/migrations/update-21-0-0/remove-tsconfig-option-from-jest-executor",
"package": "@nx/jest",
"name": "remove-tsconfig-option-from-jest-executor"
},
{
"cli": "nx",
"version": "21.0.0-beta.11",
"description": "Remove isolatedConfig option for @nx/webpack:webpack",
"implementation": "./src/migrations/update-21-0-0/remove-isolated-config",
"package": "@nx/webpack",
"name": "update-21-0-0-remove-isolated-config"
},
{
"cli": "nx",
"version": "21.0.0-beta.11",
"description": "Replaces `classProperties.loose` option with `loose`.",
"factory": "./src/migrations/update-21-0-0/update-babel-loose",
"package": "@nx/react",
"name": "update-21-0-0-update-babel-loose"
}
]
}

64
nx.json
View File

@@ -22,10 +22,25 @@
"plugins": [
{
"plugin": "@nx/webpack/plugin",
"options": { "buildTargetName": "build", "serveTargetName": "serve", "previewTargetName": "preview" }
"options": {
"buildTargetName": "build",
"serveTargetName": "serve",
"previewTargetName": "preview"
}
},
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
},
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test"
},
"exclude": ["apps/api-e2e/**/*"]
},
{ "plugin": "@nx/eslint/plugin", "options": { "targetName": "lint" } },
{ "plugin": "@nx/jest/plugin", "options": { "targetName": "test" }, "exclude": ["apps/api-e2e/**/*"] },
{
"plugin": "@nx/vite/plugin",
"options": {
@@ -56,20 +71,47 @@
}
],
"targetDefaults": {
"@nx/js:tsc": { "cache": true, "dependsOn": ["^build"], "inputs": ["production", "^production"] },
"e2e-ci--**/*": { "dependsOn": ["^build"] },
"lint": { "options": { "max-warnings": 0 } },
"@nx/esbuild:esbuild": { "cache": true, "dependsOn": ["^build"], "inputs": ["production", "^production"] }
"@nx/js:tsc": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
},
"e2e-ci--**/*": {
"dependsOn": ["^build"]
},
"lint": {
"options": {
"max-warnings": 0
}
},
"@nx/esbuild:esbuild": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
}
},
"generators": {
"@nx/react": {
"application": { "babel": true, "style": "tailwind", "linter": "eslint", "bundler": "vite" },
"component": { "style": "tailwind" },
"library": { "style": "tailwind", "linter": "eslint", "unitTestRunner": "vitest" }
"application": {
"babel": true,
"style": "tailwind",
"linter": "eslint",
"bundler": "vite"
},
"component": {
"style": "tailwind"
},
"library": {
"style": "tailwind",
"linter": "eslint",
"unitTestRunner": "vitest"
}
}
},
"release": {
"version": { "preVersionCommand": "pnpm nx run-many -t build" },
"version": {
"preVersionCommand": "pnpm nx run-many -t build"
},
"projects": [
"api-client",
"database-entities",

View File

@@ -34,7 +34,7 @@
"@nestjs/testing": "^11.1.0",
"@nestjs/typeorm": "^11.0.0",
"@nestjs/websockets": "^11.1.0",
"@nx/devkit": "20.3.3",
"@nx/devkit": "21.1.2",
"@react-stately/data": "^3.12.3",
"@rollup/plugin-replace": "^6.0.2",
"@tanstack/react-query": "^5.75.5",
@@ -50,7 +50,7 @@
"date-fns": "^4.1.0",
"decompress": "^4.2.1",
"docsify-cli": "^4.4.4",
"express": "^4.21.2",
"express": "4.21.2",
"express-session": "^1.18.1",
"framer-motion": "^12.10.0",
"glob": "^11.0.2",
@@ -96,26 +96,26 @@
"devDependencies": {
"@babel/core": "^7.27.1",
"@babel/preset-react": "^7.27.1",
"@nx/cypress": "20.4.0",
"@nx/esbuild": "20.3.3",
"@nx/eslint": "20.3.3",
"@nx/eslint-plugin": "20.3.3",
"@nx/jest": "20.3.3",
"@nx/js": "20.4.0",
"@nx/nest": "20.3.3",
"@nx/node": "20.3.3",
"@nx/plugin": "20.3.3",
"@nx/react": "^20.8.1",
"@nx/rollup": "20.4.0",
"@nx/vite": "20.3.3",
"@nx/web": "20.3.3",
"@nx/webpack": "20.3.3",
"@nx/workspace": "20.3.3",
"@nx/cypress": "21.1.2",
"@nx/esbuild": "21.1.2",
"@nx/eslint": "21.1.2",
"@nx/eslint-plugin": "21.1.2",
"@nx/jest": "21.1.2",
"@nx/js": "21.1.2",
"@nx/nest": "21.1.2",
"@nx/node": "21.1.2",
"@nx/plugin": "21.1.2",
"@nx/react": "21.1.2",
"@nx/rollup": "21.1.2",
"@nx/vite": "21.1.2",
"@nx/web": "21.1.2",
"@nx/webpack": "21.1.2",
"@nx/workspace": "21.1.2",
"@originjs/vite-plugin-federation": "^1.4.1",
"@rollup/plugin-url": "^8.0.2",
"@svgr/rollup": "^8.1.0",
"@swc-node/register": "~1.9.2",
"@swc/cli": "~0.3.12",
"@swc/cli": "0.6.0",
"@swc/core": "~1.5.29",
"@swc/helpers": "~0.5.17",
"@testing-library/dom": "10.4.0",
@@ -123,7 +123,7 @@
"@testing-library/react": "16.1.0",
"@testing-library/user-event": "^14.6.1",
"@types/bcrypt": "^5.0.2",
"@types/express": "^4.17.21",
"@types/express": "4.17.22",
"@types/express-session": "^1.18.1",
"@types/jest": "^29.5.14",
"@types/mjml": "^4.7.4",
@@ -143,10 +143,10 @@
"babel-jest": "^29.7.0",
"buffer": "^6.0.3",
"core-js": "^3.42.0",
"cypress": "^13.13.0",
"cypress": "14.4.0",
"esbuild": "^0.19.2",
"eslint": "^9.26.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-prettier": "10.1.5",
"eslint-plugin-cypress": "^3.5.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.1",
@@ -156,9 +156,10 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jiti": "2.4.2",
"jsdom": "~22.1.0",
"jsonc-eslint-parser": "^2.4.0",
"nx": "20.3.3",
"nx": "21.1.2",
"prettier": "^2.8.8",
"rollup": "^4.40.2",
"stream-browserify": "^3.0.0",
@@ -169,9 +170,9 @@
"typescript": "^5.8.3",
"typescript-eslint": "^8.32.0",
"util": "^0.12.5",
"verdaccio": "^6.1.2",
"vite": "^5.4.19",
"vite-plugin-dts": "~3.8.1",
"verdaccio": "6.1.2",
"vite": "6.3.5",
"vite-plugin-dts": "4.5.4",
"vitest": "^1.6.1",
"webpack-cli": "^5.1.4"
},

3286
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,9 +6,9 @@
"main": "./src/index.js",
"types": "./src/index.d.ts",
"dependencies": {
"@nx/devkit": "20.3.3",
"@nx/devkit": "21.1.2",
"tslib": "^2.3.0",
"@nx/nest": "20.3.3"
"@nx/nest": "21.1.2"
},
"generators": "./generators.json"
}