chore: Nx 20 (#10636)

This commit is contained in:
Nathan Walker
2024-10-23 09:25:25 -07:00
committed by GitHub
parent 1cee35d4fb
commit 148a54b60c
17 changed files with 1550 additions and 831 deletions

View File

@ -1,7 +1,4 @@
#!/bin/sh #!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh" . "$(dirname -- "$0")/_/husky.sh"
export NVM_DIR="$HOME/.nvm" npx lint-staged --allow-empty
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
npx lint-staged

View File

@ -13,7 +13,7 @@
"devDependencies": { "devDependencies": {
"@nativescript/android": "~8.8.0", "@nativescript/android": "~8.8.0",
"@nativescript/ios": "~8.8.0", "@nativescript/ios": "~8.8.0",
"@nativescript/visionos": "~8.7.0", "@nativescript/visionos": "~8.8.0",
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz", "@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
"circular-dependency-plugin": "^5.2.2", "circular-dependency-plugin": "^5.2.2",
"typescript": "~5.4.0" "typescript": "~5.4.0"

View File

@ -17,44 +17,34 @@
"uglify": true, "uglify": true,
"release": true, "release": true,
"forDevice": true "forDevice": true
}
}, },
"ios": { "configurations": {}
"executor": "@nativescript/nx:build", },
"inputs": ["default", "^production"], "debug": {
"outputs": [], "executor": "@nativescript/nx:debug",
"options": { "options": {
"noHmr": true, "noHmr": true,
"platform": "ios" "uglify": false,
} "release": false,
"forDevice": false,
"prepare": false
}, },
"vision": { "configurations": {}
"executor": "@nativescript/nx:build", },
"inputs": ["default", "^production"], "prepare": {
"outputs": [], "executor": "@nativescript/nx:prepare",
"options": { "options": {
"noHmr": true, "noHmr": true,
"debug": false, "production": true,
"platform": "vision" "uglify": true,
} "release": true,
"forDevice": true,
"prepare": true
}, },
"android": { "configurations": {}
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"noHmr": true,
"platform": "android"
}
},
"clean": {
"executor": "@nativescript/nx:build",
"options": {
"clean": true
}
}, },
"lint": { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nx/eslint:lint",
"options": { "options": {
"lintFilePatterns": ["apps/automated/**/*.ts", "apps/automated/src/**/*.html"] "lintFilePatterns": ["apps/automated/**/*.ts", "apps/automated/src/**/*.html"]
} }

View File

@ -14,7 +14,7 @@
"devDependencies": { "devDependencies": {
"@nativescript/android": "~8.8.0", "@nativescript/android": "~8.8.0",
"@nativescript/ios": "~8.8.0", "@nativescript/ios": "~8.8.0",
"@nativescript/visionos": "~8.7.0", "@nativescript/visionos": "~8.8.0",
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz", "@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
"typescript": "~5.4.0" "typescript": "~5.4.0"
} }

View File

@ -17,44 +17,34 @@
"uglify": true, "uglify": true,
"release": true, "release": true,
"forDevice": true "forDevice": true
}
}, },
"ios": { "configurations": {}
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"platform": "ios",
"noHmr": true
}
}, },
"vision": { "debug": {
"executor": "@nativescript/nx:build", "executor": "@nativescript/nx:debug",
"inputs": ["default", "^production"],
"outputs": [],
"options": { "options": {
"noHmr": true, "noHmr": true,
"debug": false, "uglify": false,
"platform": "vision" "release": false,
} "forDevice": false,
"prepare": false
}, },
"android": { "configurations": {}
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"platform": "android",
"noHmr": true
}
}, },
"clean": { "prepare": {
"executor": "@nativescript/nx:build", "executor": "@nativescript/nx:prepare",
"options": { "options": {
"clean": true "noHmr": true,
} "production": true,
"uglify": true,
"release": true,
"forDevice": true,
"prepare": true
},
"configurations": {}
}, },
"lint": { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nx/eslint:lint",
"options": { "options": {
"lintFilePatterns": ["apps/toolbox/**/*.ts", "apps/toolbox/src/**/*.html"] "lintFilePatterns": ["apps/toolbox/**/*.ts", "apps/toolbox/src/**/*.html"]
} }

View File

@ -13,7 +13,7 @@
"devDependencies": { "devDependencies": {
"@nativescript/android": "~8.8.0", "@nativescript/android": "~8.8.0",
"@nativescript/ios": "~8.8.0", "@nativescript/ios": "~8.8.0",
"@nativescript/visionos": "~8.7.0", "@nativescript/visionos": "~8.8.0",
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz", "@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
"typescript": "~5.4.0" "typescript": "~5.4.0"
}, },

View File

@ -17,44 +17,38 @@
"uglify": true, "uglify": true,
"release": true, "release": true,
"forDevice": true "forDevice": true
}
}, },
"ios": { "configurations": {}
"executor": "@nativescript/nx:build",
"inputs": ["default", "^production"],
"outputs": [],
"options": {
"platform": "ios",
"noHmr": true
}
}, },
"vision": { "debug": {
"executor": "@nativescript/nx:build", "executor": "@nativescript/nx:debug",
"inputs": ["default", "^production"],
"outputs": [],
"options": { "options": {
"noHmr": true, "noHmr": true,
"debug": false, "uglify": false,
"platform": "vision" "release": false,
} "forDevice": false,
"prepare": false
}, },
"android": { "configurations": {}
"executor": "@nativescript/nx:build", },
"inputs": ["default", "^production"], "prepare": {
"outputs": [], "executor": "@nativescript/nx:prepare",
"options": { "options": {
"platform": "android", "noHmr": true,
"noHmr": true "production": true,
} "uglify": true,
"release": true,
"forDevice": true,
"prepare": true
},
"configurations": {}
}, },
"clean": { "clean": {
"executor": "@nativescript/nx:build", "executor": "@nativescript/nx:clean",
"options": { "options": {}
"clean": true
}
}, },
"lint": { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nx/eslint:lint",
"options": { "options": {
"lintFilePatterns": ["apps/ui/**/*.ts", "apps/ui/src/**/*.html"] "lintFilePatterns": ["apps/ui/**/*.ts", "apps/ui/src/**/*.html"]
} }

View File

@ -1,3 +1,3 @@
const { getJestProjects } = require('@nx/jest'); const { getJestProjectsAsync } = require('@nx/jest');
export default { projects: getJestProjects() }; export default async () => ({ projects: await getJestProjectsAsync() });

7
migrations.json Normal file
View File

@ -0,0 +1,7 @@
{
"migrations": [
{ "version": "20.0.0-beta.7", "description": "Migration for v20.0.0-beta.7", "implementation": "./src/migrations/update-20-0-0/move-use-daemon-process", "package": "nx", "name": "move-use-daemon-process" },
{ "version": "20.0.1", "description": "Set `useLegacyCache` to true for migrating workspaces", "implementation": "./src/migrations/update-20-0-1/use-legacy-cache", "x-repair-skip": true, "package": "nx", "name": "use-legacy-cache" },
{ "cli": "nx", "version": "20.0.0-beta.5", "description": "replace getJestProjects with getJestProjectsAsync", "implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync", "package": "@nx/jest", "name": "replace-getJestProjects-with-getJestProjectsAsync" }
]
}

View File

@ -112,5 +112,6 @@
"nxCloudAccessToken": "NzRmNDM3NDgtZjlmNy00MTUwLWIxZDktYjJlZTRhMWM5ODY3fHJlYWQtd3JpdGU=", "nxCloudAccessToken": "NzRmNDM3NDgtZjlmNy00MTUwLWIxZDktYjJlZTRhMWM5ODY3fHJlYWQtd3JpdGU=",
"parallel": 1, "parallel": 1,
"useInferencePlugins": false, "useInferencePlugins": false,
"defaultBase": "master" "defaultBase": "master",
"useLegacyCache": true
} }

1424
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,10 +5,10 @@
"scripts": { "scripts": {
"clean": "git clean -f -X -d --exclude=!.idea/ --exclude=!.vscode/* --exclude=!.npmrc", "clean": "git clean -f -X -d --exclude=!.idea/ --exclude=!.vscode/* --exclude=!.npmrc",
"clean.all": "npm run setup && nx run-many --target=clean --all", "clean.all": "npm run setup && nx run-many --target=clean --all",
"setup": "npm run clean && npm install --legacy-peer-deps", "setup": "npm run clean && npm install",
"setup:yarn": "yarn clean && yarn", "setup:yarn": "yarn clean && yarn",
"setup:pnpm": "pnpm run clean && pnpm install", "setup:pnpm": "pnpm run clean && pnpm install",
"postinstall": "ts-patch install && husky install && nx run webpack5:build", "postinstall": "ts-patch install && husky && nx run webpack5:build",
"start": "nps", "start": "nps",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
}, },
@ -22,16 +22,16 @@
}, },
"devDependencies": { "devDependencies": {
"@nativescript/hook": "^2.0.0", "@nativescript/hook": "^2.0.0",
"@nativescript/nx": "^19.0.0", "@nativescript/nx": "^20.0.0",
"@nstudio/focus": "^19.0.0", "@nstudio/focus": "^20.0.0",
"@nstudio/nps-i": "~2.0.0", "@nstudio/nps-i": "~2.0.0",
"@nx/devkit": "19.4.2", "@nx/devkit": "20.0.3",
"@nx/eslint-plugin": "19.4.2", "@nx/eslint-plugin": "20.0.3",
"@nx/jest": "19.4.2", "@nx/jest": "20.0.3",
"@nx/js": "19.4.2", "@nx/js": "20.0.3",
"@nx/node": "19.4.2", "@nx/node": "20.0.3",
"@nx/plugin": "19.4.2", "@nx/plugin": "20.0.3",
"@nx/workspace": "19.4.2", "@nx/workspace": "20.0.3",
"@prettier/plugin-xml": "^3.4.1", "@prettier/plugin-xml": "^3.4.1",
"@types/jest": "~29.5.0", "@types/jest": "~29.5.0",
"@types/node": "^20.0.0", "@types/node": "^20.0.0",
@ -55,7 +55,7 @@
"module-alias": "^2.2.2", "module-alias": "^2.2.2",
"nativescript": "8.8.0-pre-next-07-03-2024-9781798152", "nativescript": "8.8.0-pre-next-07-03-2024-9781798152",
"nativescript-typedoc-theme": "1.1.0", "nativescript-typedoc-theme": "1.1.0",
"nx": "19.4.2", "nx": "20.0.3",
"parse-css": "git+https://github.com/tabatkins/parse-css.git", "parse-css": "git+https://github.com/tabatkins/parse-css.git",
"parserlib": "^1.1.1", "parserlib": "^1.1.1",
"prettier": "^3.2.5", "prettier": "^3.2.5",

View File

@ -10,7 +10,7 @@
}, },
"targets": { "targets": {
"lint": { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nx/eslint:lint",
"options": { "options": {
"lintFilePatterns": ["packages/core/**/*.ts", "packages/core/references.d.ts", "packages/core/**/*.spec.ts", "packages/core/**/*.spec.tsx", "packages/core/**/*.spec.js", "packages/core/**/*.spec.jsx", "packages/core/**/*.d.ts"] "lintFilePatterns": ["packages/core/**/*.ts", "packages/core/references.d.ts", "packages/core/**/*.spec.ts", "packages/core/**/*.spec.tsx", "packages/core/**/*.spec.js", "packages/core/**/*.spec.jsx", "packages/core/**/*.d.ts"]
} }

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,7 @@
"generators": {}, "generators": {},
"targets": { "targets": {
"lint": { "lint": {
"executor": "@nrwl/linter:eslint", "executor": "@nx/eslint:lint",
"options": { "options": {
"lintFilePatterns": [] "lintFilePatterns": []
} }

View File

@ -5,7 +5,7 @@ module.exports = {
default: 'nps-i', default: 'nps-i',
nx: { nx: {
script: 'nx', script: 'nx',
description: 'Execute any command with the @nrwl/cli' description: 'Execute any command with the Nx cli'
}, },
format: { format: {
script: 'nx format:write', script: 'nx format:write',
@ -24,19 +24,19 @@ module.exports = {
// Automated test runner which executes e2e tests on the target platform // Automated test runner which executes e2e tests on the target platform
automated: { automated: {
clean: { clean: {
script: 'nx run apps-automated:clean', script: 'nx clean apps-automated',
description: '⚆ Clean 🧹' description: '⚆ Clean 🧹'
}, },
ios: { ios: {
script: 'nx run apps-automated:ios', script: 'nx debug apps-automated ios',
description: '⚆ Run iOS ' description: '⚆ Run iOS '
}, },
visionos: { visionos: {
script: 'nx run apps-automated:vision', script: 'nx debug apps-automated vision',
description: '⚆ Run visionOS 🥽' description: '⚆ Run visionOS 🥽'
}, },
android: { android: {
script: 'nx run apps-automated:android', script: 'nx debug apps-automated android',
description: '⚆ Run Android 🤖' description: '⚆ Run Android 🤖'
}, },
}, },
@ -47,19 +47,19 @@ module.exports = {
// Toolbox useful for livesyncing changes and experimenting // Toolbox useful for livesyncing changes and experimenting
toolbox: { toolbox: {
clean: { clean: {
script: 'nx run apps-toolbox:clean', script: 'nx clean apps-toolbox',
description: '⚆ Clean 🧹' description: '⚆ Clean 🧹'
}, },
ios: { ios: {
script: 'nx run apps-toolbox:ios', script: 'nx debug apps-toolbox ios',
description: '⚆ Run iOS ' description: '⚆ Run iOS '
}, },
visionos: { visionos: {
script: 'nx run apps-toolbox:vision', script: 'nx debug apps-toolbox vision',
description: '⚆ Run visionOS 🥽' description: '⚆ Run visionOS 🥽'
}, },
android: { android: {
script: 'nx run apps-toolbox:android', script: 'nx debug apps-toolbox android',
description: '⚆ Run Android 🤖' description: '⚆ Run Android 🤖'
}, },
}, },
@ -70,19 +70,19 @@ module.exports = {
// Various UI level setups for @nativescript/core testing // Various UI level setups for @nativescript/core testing
ui: { ui: {
clean: { clean: {
script: 'nx run apps-ui:clean', script: 'nx clean apps-ui',
description: '⚆ Clean 🧹' description: '⚆ Clean 🧹'
}, },
ios: { ios: {
script: 'nx run apps-ui:ios', script: 'nx debug apps-ui ios',
description: '⚆ Run iOS ' description: '⚆ Run iOS '
}, },
visionos: { visionos: {
script: 'nx run apps-ui:vision', script: 'nx debug apps-ui vision',
description: '⚆ Run visionOS 🥽' description: '⚆ Run visionOS 🥽'
}, },
android: { android: {
script: 'nx run apps-ui:android', script: 'nx debug apps-ui android',
description: '⚆ Run Android 🤖' description: '⚆ Run Android 🤖'
}, },
}, },
@ -97,36 +97,36 @@ module.exports = {
// @nativescript/core // @nativescript/core
core: { core: {
build: { build: {
script: 'nx run core:build', script: 'nx build core',
description: '@nativescript/core: Build' description: '@nativescript/core: Build'
}, },
test: { test: {
script: 'nx run core:test', script: 'nx test core',
description: '@nativescript/core: Unit tests' description: '@nativescript/core: Unit tests'
}, },
}, },
// @nativescript/core API Reference Docs // @nativescript/core API Reference Docs
'core-api-docs': { 'core-api-docs': {
build: { build: {
script: 'nx run core-api-docs:build', script: 'nx build core-api-docs',
description: '@nativescript/core: API Reference Docs Build' description: '@nativescript/core: API Reference Docs Build'
} }
}, },
// @nativescript/ui-mobile-base // @nativescript/ui-mobile-base
'ui-mobile-base': { 'ui-mobile-base': {
build: { build: {
script: 'nx run ui-mobile-base:build', script: 'nx build ui-mobile-base',
description: '@nativescript/ui-mobile-base: Build for npm' description: '@nativescript/ui-mobile-base: Build for npm'
}, },
}, },
// @nativescript/webpack (5) // @nativescript/webpack (5)
webpack5: { webpack5: {
build: { build: {
script: 'nx run webpack5:build', script: 'nx build webpack5',
description: '@nativescript/webpack(5): Build for npm' description: '@nativescript/webpack(5): Build for npm'
}, },
test: { test: {
script: 'nx run webpack5:test', script: 'nx test webpack5',
description: '@nativescript/webpack(5): Unit tests' description: '@nativescript/webpack(5): Unit tests'
}, },
}, },