Skip to content

Commit 00f42df

Browse files
authored
feat: migrate plugin tools 5.2 (#39)
Nx 18+
1 parent fb27523 commit 00f42df

8 files changed

Lines changed: 48 additions & 52 deletions

File tree

.eslintrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"root": true,
33
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nrwl/nx"],
4+
"plugins": ["@nx"],
55
"overrides": [
66
{
77
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
88
"rules": {
9-
"@nrwl/nx/enforce-module-boundaries": [
9+
"@nx/enforce-module-boundaries": [
1010
"error",
1111
{
1212
"enforceBuildableLibDependency": true,
@@ -23,12 +23,12 @@
2323
},
2424
{
2525
"files": ["*.ts", "*.tsx"],
26-
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nrwl/nx/typescript"],
26+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nx/typescript"],
2727
"rules": {}
2828
},
2929
{
3030
"files": ["*.js", "*.jsx"],
31-
"extends": ["plugin:@nrwl/nx/javascript"],
31+
"extends": ["plugin:@nx/javascript"],
3232
"rules": {}
3333
},
3434
{

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ Thumbs.db
4242

4343
*.tgz
4444
packages/**/angular/dist
45+
46+
.nx/cache

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
/dist
44
/coverage
55
native-src
6+
7+
/.nx/cache

apps/demo-angular/project.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependsOn": [
1818
{
1919
"target": "build.all",
20-
"projects": "dependencies"
20+
"dependencies": true
2121
}
2222
]
2323
},
@@ -29,7 +29,7 @@
2929
"dependsOn": [
3030
{
3131
"target": "build.all",
32-
"projects": "dependencies"
32+
"dependencies": true
3333
}
3434
]
3535
},
@@ -41,7 +41,7 @@
4141
"dependsOn": [
4242
{
4343
"target": "build.all",
44-
"projects": "dependencies"
44+
"dependencies": true
4545
}
4646
]
4747
},
@@ -52,10 +52,7 @@
5252
}
5353
},
5454
"lint": {
55-
"executor": "@nrwl/linter:eslint",
56-
"options": {
57-
"lintFilePatterns": ["apps/demo-angular/**/*.ts"]
58-
}
55+
"executor": "@nx/eslint:lint"
5956
}
6057
}
6158
}

apps/demo/project.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"dependsOn": [
1818
{
1919
"target": "build.all",
20-
"projects": "dependencies"
20+
"dependencies": true
2121
}
2222
]
2323
},
@@ -29,7 +29,7 @@
2929
"dependsOn": [
3030
{
3131
"target": "build.all",
32-
"projects": "dependencies"
32+
"dependencies": true
3333
}
3434
]
3535
},
@@ -41,7 +41,7 @@
4141
"dependsOn": [
4242
{
4343
"target": "build.all",
44-
"projects": "dependencies"
44+
"dependencies": true
4545
}
4646
]
4747
},
@@ -52,10 +52,7 @@
5252
}
5353
},
5454
"lint": {
55-
"executor": "@nrwl/linter:eslint",
56-
"options": {
57-
"lintFilePatterns": ["apps/demo/**/*.ts"]
58-
}
55+
"executor": "@nx/eslint:lint"
5956
}
6057
}
6158
}

jest.config.ts

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

33
export default { projects: [...getJestProjects()] };

nx.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,33 @@
11
{
2-
"npmScope": "nativescript",
3-
"affected": {
4-
"defaultBase": "master"
5-
},
62
"workspaceLayout": {
73
"appsDir": "apps",
84
"libsDir": "packages"
95
},
106
"tasksRunnerOptions": {
117
"default": {
12-
"runner": "nx/tasks-runners/default",
138
"options": {
14-
"cacheableOperations": ["build", "build.all", "lint", "test", "e2e"],
15-
"runtimeCacheInputs": ["node -v"],
16-
"parallel": 1,
17-
"useDaemonProcess": false
9+
"runtimeCacheInputs": ["node -v"]
1810
}
1911
}
2012
},
2113
"$schema": "./node_modules/nx/schemas/nx-schema.json",
2214
"namedInputs": {
2315
"default": ["{projectRoot}/**/*", "sharedGlobals"],
2416
"sharedGlobals": ["{workspaceRoot}/workspace.json", "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/tslint.json", "{workspaceRoot}/nx.json"],
25-
"production": ["default", "!{projectRoot}/.eslintrc.json"]
17+
"production": ["default", "!{projectRoot}/.eslintrc.json", "!{projectRoot}/src/test-setup.[jt]s"]
2618
},
2719
"targetDefaults": {
2820
"build": {
29-
"inputs": ["production", "^production"]
21+
"inputs": ["production", "^production"],
22+
"cache": true
3023
},
31-
"lint": {
32-
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
24+
"@nx/eslint:lint": {
25+
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
26+
"cache": true
3327
}
34-
}
28+
},
29+
"useDaemonProcess": false,
30+
"parallel": 1,
31+
"useInferencePlugins": false,
32+
"defaultBase": "master"
3533
}

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "MIT",
55
"scripts": {
66
"postinstall": "husky install && npx ts-patch install",
7-
"setup": "npx rimraf node_modules package-lock.json dist tmp yarn.lock && yarn config set ignore-engines true && ns package-manager set npm && yarn",
7+
"setup": "npx rimraf node_modules package-lock.json dist tmp yarn.lock && yarn",
88
"start": "nps",
99
"add": "nx g @nativescript/plugin-tools:add-package",
1010
"add-angular": "nx g @nativescript/plugin-tools:add-angular",
@@ -16,29 +16,29 @@
1616
},
1717
"private": true,
1818
"devDependencies": {
19-
"@angular/animations": "^15.0.0",
20-
"@angular/common": "^15.0.0",
21-
"@angular/compiler": "^15.0.0",
22-
"@angular/compiler-cli": "^15.0.0",
23-
"@angular/core": "^15.0.0",
24-
"@angular/forms": "^15.0.0",
25-
"@angular/platform-browser": "^15.0.0",
26-
"@angular/platform-browser-dynamic": "^15.0.0",
27-
"@angular/router": "^15.0.0",
28-
"@nativescript/angular": "^15.0.0",
19+
"@angular/animations": "^17.0.0",
20+
"@angular/common": "^17.0.0",
21+
"@angular/compiler": "^17.0.0",
22+
"@angular/compiler-cli": "^17.0.0",
23+
"@angular/core": "^17.0.0",
24+
"@angular/forms": "^17.0.0",
25+
"@angular/platform-browser": "^17.0.0",
26+
"@angular/platform-browser-dynamic": "^17.0.0",
27+
"@angular/router": "^17.0.0",
28+
"@nativescript/angular": "^17.0.0",
2929
"@nativescript/core": "~8.6.0",
30-
"@nativescript/plugin-tools": "5.1.0",
30+
"@nativescript/plugin-tools": "5.2.0",
3131
"@nativescript/types": "~8.6.0",
3232
"@nativescript/webpack": "~5.0.5",
33-
"@ngtools/webpack": "^15.0.0",
34-
"husky": "^8.0.0",
33+
"@ngtools/webpack": "^17.0.0",
34+
"husky": "~9.0.0",
3535
"nativescript-vue": "~2.9.0",
3636
"nativescript-vue-template-compiler": "~2.9.0",
37-
"ng-packagr": "^15.0.0",
38-
"rxjs": "~7.5.0",
39-
"typescript": "~4.8.0",
40-
"zone.js": "~0.11.1",
41-
"@angular-devkit/build-angular": "^15.0.0"
37+
"ng-packagr": "^17.0.0",
38+
"rxjs": "~7.8.0",
39+
"typescript": "~5.4.0",
40+
"zone.js": "~0.14.0",
41+
"@angular-devkit/build-angular": "^17.0.0"
4242
},
4343
"lint-staged": {
4444
"**/*.{js,ts,scss,json,html}": [

0 commit comments

Comments
 (0)