Skip to content

Commit 148a54b

Browse files
authored
chore: Nx 20 (#10636)
1 parent 1cee35d commit 148a54b

File tree

17 files changed

+1651
-932
lines changed

17 files changed

+1651
-932
lines changed

.husky/pre-commit

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
33

4-
export NVM_DIR="$HOME/.nvm"
5-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
6-
7-
npx lint-staged
4+
npx lint-staged --allow-empty

apps/automated/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"devDependencies": {
1414
"@nativescript/android": "~8.8.0",
1515
"@nativescript/ios": "~8.8.0",
16-
"@nativescript/visionos": "~8.7.0",
16+
"@nativescript/visionos": "~8.8.0",
1717
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
1818
"circular-dependency-plugin": "^5.2.2",
1919
"typescript": "~5.4.0"

apps/automated/project.json

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,34 @@
1717
"uglify": true,
1818
"release": true,
1919
"forDevice": true
20-
}
20+
},
21+
"configurations": {}
2122
},
22-
"ios": {
23-
"executor": "@nativescript/nx:build",
24-
"inputs": ["default", "^production"],
25-
"outputs": [],
23+
"debug": {
24+
"executor": "@nativescript/nx:debug",
2625
"options": {
2726
"noHmr": true,
28-
"platform": "ios"
29-
}
27+
"uglify": false,
28+
"release": false,
29+
"forDevice": false,
30+
"prepare": false
31+
},
32+
"configurations": {}
3033
},
31-
"vision": {
32-
"executor": "@nativescript/nx:build",
33-
"inputs": ["default", "^production"],
34-
"outputs": [],
35-
"options": {
36-
"noHmr": true,
37-
"debug": false,
38-
"platform": "vision"
39-
}
40-
},
41-
"android": {
42-
"executor": "@nativescript/nx:build",
43-
"inputs": ["default", "^production"],
44-
"outputs": [],
34+
"prepare": {
35+
"executor": "@nativescript/nx:prepare",
4536
"options": {
4637
"noHmr": true,
47-
"platform": "android"
48-
}
49-
},
50-
"clean": {
51-
"executor": "@nativescript/nx:build",
52-
"options": {
53-
"clean": true
54-
}
38+
"production": true,
39+
"uglify": true,
40+
"release": true,
41+
"forDevice": true,
42+
"prepare": true
43+
},
44+
"configurations": {}
5545
},
5646
"lint": {
57-
"executor": "@nrwl/linter:eslint",
47+
"executor": "@nx/eslint:lint",
5848
"options": {
5949
"lintFilePatterns": ["apps/automated/**/*.ts", "apps/automated/src/**/*.html"]
6050
}

apps/toolbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"devDependencies": {
1515
"@nativescript/android": "~8.8.0",
1616
"@nativescript/ios": "~8.8.0",
17-
"@nativescript/visionos": "~8.7.0",
17+
"@nativescript/visionos": "~8.8.0",
1818
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
1919
"typescript": "~5.4.0"
2020
}

apps/toolbox/project.json

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,34 @@
1717
"uglify": true,
1818
"release": true,
1919
"forDevice": true
20-
}
20+
},
21+
"configurations": {}
2122
},
22-
"ios": {
23-
"executor": "@nativescript/nx:build",
24-
"inputs": ["default", "^production"],
25-
"outputs": [],
26-
"options": {
27-
"platform": "ios",
28-
"noHmr": true
29-
}
30-
},
31-
"vision": {
32-
"executor": "@nativescript/nx:build",
33-
"inputs": ["default", "^production"],
34-
"outputs": [],
23+
"debug": {
24+
"executor": "@nativescript/nx:debug",
3525
"options": {
3626
"noHmr": true,
37-
"debug": false,
38-
"platform": "vision"
39-
}
27+
"uglify": false,
28+
"release": false,
29+
"forDevice": false,
30+
"prepare": false
31+
},
32+
"configurations": {}
4033
},
41-
"android": {
42-
"executor": "@nativescript/nx:build",
43-
"inputs": ["default", "^production"],
44-
"outputs": [],
34+
"prepare": {
35+
"executor": "@nativescript/nx:prepare",
4536
"options": {
46-
"platform": "android",
47-
"noHmr": true
48-
}
49-
},
50-
"clean": {
51-
"executor": "@nativescript/nx:build",
52-
"options": {
53-
"clean": true
54-
}
37+
"noHmr": true,
38+
"production": true,
39+
"uglify": true,
40+
"release": true,
41+
"forDevice": true,
42+
"prepare": true
43+
},
44+
"configurations": {}
5545
},
5646
"lint": {
57-
"executor": "@nrwl/linter:eslint",
47+
"executor": "@nx/eslint:lint",
5848
"options": {
5949
"lintFilePatterns": ["apps/toolbox/**/*.ts", "apps/toolbox/src/**/*.html"]
6050
}

apps/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"devDependencies": {
1414
"@nativescript/android": "~8.8.0",
1515
"@nativescript/ios": "~8.8.0",
16-
"@nativescript/visionos": "~8.7.0",
16+
"@nativescript/visionos": "~8.8.0",
1717
"@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz",
1818
"typescript": "~5.4.0"
1919
},

apps/ui/project.json

Lines changed: 23 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -17,44 +17,38 @@
1717
"uglify": true,
1818
"release": true,
1919
"forDevice": true
20-
}
21-
},
22-
"ios": {
23-
"executor": "@nativescript/nx:build",
24-
"inputs": ["default", "^production"],
25-
"outputs": [],
26-
"options": {
27-
"platform": "ios",
28-
"noHmr": true
29-
}
20+
},
21+
"configurations": {}
3022
},
31-
"vision": {
32-
"executor": "@nativescript/nx:build",
33-
"inputs": ["default", "^production"],
34-
"outputs": [],
23+
"debug": {
24+
"executor": "@nativescript/nx:debug",
3525
"options": {
3626
"noHmr": true,
37-
"debug": false,
38-
"platform": "vision"
39-
}
27+
"uglify": false,
28+
"release": false,
29+
"forDevice": false,
30+
"prepare": false
31+
},
32+
"configurations": {}
4033
},
41-
"android": {
42-
"executor": "@nativescript/nx:build",
43-
"inputs": ["default", "^production"],
44-
"outputs": [],
34+
"prepare": {
35+
"executor": "@nativescript/nx:prepare",
4536
"options": {
46-
"platform": "android",
47-
"noHmr": true
48-
}
37+
"noHmr": true,
38+
"production": true,
39+
"uglify": true,
40+
"release": true,
41+
"forDevice": true,
42+
"prepare": true
43+
},
44+
"configurations": {}
4945
},
5046
"clean": {
51-
"executor": "@nativescript/nx:build",
52-
"options": {
53-
"clean": true
54-
}
47+
"executor": "@nativescript/nx:clean",
48+
"options": {}
5549
},
5650
"lint": {
57-
"executor": "@nrwl/linter:eslint",
51+
"executor": "@nx/eslint:lint",
5852
"options": {
5953
"lintFilePatterns": ["apps/ui/**/*.ts", "apps/ui/src/**/*.html"]
6054
}

jest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const { getJestProjects } = require('@nx/jest');
1+
const { getJestProjectsAsync } = require('@nx/jest');
22

3-
export default { projects: getJestProjects() };
3+
export default async () => ({ projects: await getJestProjectsAsync() });

migrations.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"migrations": [
3+
{ "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" },
4+
{ "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" },
5+
{ "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" }
6+
]
7+
}

nx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,6 @@
112112
"nxCloudAccessToken": "NzRmNDM3NDgtZjlmNy00MTUwLWIxZDktYjJlZTRhMWM5ODY3fHJlYWQtd3JpdGU=",
113113
"parallel": 1,
114114
"useInferencePlugins": false,
115-
"defaultBase": "master"
115+
"defaultBase": "master",
116+
"useLegacyCache": true
116117
}

0 commit comments

Comments
 (0)