Skip to content

Commit d9d30e3

Browse files
authored
chore: nx migrate @nativescript/[email protected] (#579)
1 parent 3152b80 commit d9d30e3

File tree

66 files changed

+419
-439
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+419
-439
lines changed

.eslintrc.json

+4-4
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

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ packages/shared-notification-delegate/common.js.map
5656
# iOS:
5757
packages/**/native-src/ios/**/xcuserdata/
5858
packages/**/native-src/ios/**/project.xcworkspace/
59-
packages/**/native-src/ios/**/build
59+
packages/**/native-src/ios/**/build
60+
.nx/cache

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
/dist
44
/coverage
55
native-src
6+
7+
/.nx/cache

.vscode/settings.json

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"files.exclude": {
3+
"**/apps/demo": false,
4+
"**/apps/demo-angular": false,
5+
"**/packages/animated-circle": false,
6+
"**/packages/appavailability": false,
7+
"**/packages/apple-sign-in": false,
8+
"**/packages/auth0": false,
9+
"**/packages/auto-fit-text": false,
10+
"**/packages/background-http": false,
11+
"**/packages/biometrics": false,
12+
"**/packages/brightness": false,
13+
"**/packages/camera": false,
14+
"**/packages/contacts": false,
15+
"**/packages/datetimepicker": false,
16+
"**/packages/debug-android": false,
17+
"**/packages/debug-ios": false,
18+
"**/packages/detox": false,
19+
"**/packages/directions": false,
20+
"**/packages/email": false,
21+
"**/packages/facebook": false,
22+
"**/packages/fingerprint-auth": false,
23+
"**/packages/geolocation": false,
24+
"**/packages/google-maps": false,
25+
"**/packages/google-signin": false,
26+
"**/packages/haptics": false,
27+
"**/packages/imagepicker": false,
28+
"**/packages/ios-security": false,
29+
"**/packages/iqkeyboardmanager": false,
30+
"**/packages/keyboard-toolbar": false,
31+
"**/packages/local-notifications": false,
32+
"**/packages/localize": false,
33+
"**/packages/pdf": false,
34+
"**/packages/picker": false,
35+
"**/packages/secure-storage": false,
36+
"**/packages/shared-notification-delegate": false,
37+
"**/packages/social-share": false,
38+
"**/packages/theme-switcher": false,
39+
"**/packages/twitter": false,
40+
"**/packages/zip": false
41+
},
42+
"search.exclude": {
43+
"**/apps/demo": false,
44+
"**/apps/demo-angular": false,
45+
"**/packages/animated-circle": false,
46+
"**/packages/appavailability": false,
47+
"**/packages/apple-sign-in": false,
48+
"**/packages/auth0": false,
49+
"**/packages/auto-fit-text": false,
50+
"**/packages/background-http": false,
51+
"**/packages/biometrics": false,
52+
"**/packages/brightness": false,
53+
"**/packages/camera": false,
54+
"**/packages/contacts": false,
55+
"**/packages/datetimepicker": false,
56+
"**/packages/debug-android": false,
57+
"**/packages/debug-ios": false,
58+
"**/packages/detox": false,
59+
"**/packages/directions": false,
60+
"**/packages/email": false,
61+
"**/packages/facebook": false,
62+
"**/packages/fingerprint-auth": false,
63+
"**/packages/geolocation": false,
64+
"**/packages/google-maps": false,
65+
"**/packages/google-signin": false,
66+
"**/packages/haptics": false,
67+
"**/packages/imagepicker": false,
68+
"**/packages/ios-security": false,
69+
"**/packages/iqkeyboardmanager": false,
70+
"**/packages/keyboard-toolbar": false,
71+
"**/packages/local-notifications": false,
72+
"**/packages/localize": false,
73+
"**/packages/pdf": false,
74+
"**/packages/picker": false,
75+
"**/packages/secure-storage": false,
76+
"**/packages/shared-notification-delegate": false,
77+
"**/packages/social-share": false,
78+
"**/packages/theme-switcher": false,
79+
"**/packages/twitter": false,
80+
"**/packages/zip": false
81+
}
82+
}

apps/demo-angular/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
"main": "./src/main.ts",
33
"dependencies": {
44
"@nativescript/core": "file:../../node_modules/@nativescript/core",
5-
"@nativescript/keyboard-toolbar": "file:../../dist/packages/keyboard-toolbar",
5+
"@nativescript/camera": "file:../../dist/packages/camera",
66
"@nativescript/animated-circle": "file:../../dist/packages/animated-circle",
77
"@nativescript/appavailability": "file:../../dist/packages/appavailability",
88
"@nativescript/apple-sign-in": "file:../../dist/packages/apple-sign-in",
99
"@nativescript/auto-fit-text": "file:../../dist/packages/auto-fit-text",
1010
"@nativescript/background-http": "file:../../dist/packages/background-http",
1111
"@nativescript/biometrics": "file:../../dist/packages/biometrics",
1212
"@nativescript/brightness": "file:../../dist/packages/brightness",
13-
"@nativescript/camera": "file:../../dist/packages/camera",
1413
"@nativescript/contacts": "file:../../dist/packages/contacts",
1514
"@nativescript/datetimepicker": "file:../../dist/packages/datetimepicker",
1615
"@nativescript/debug-android": "file:../../dist/packages/debug-android",
@@ -27,6 +26,7 @@
2726
"@nativescript/imagepicker": "file:../../dist/packages/imagepicker",
2827
"@nativescript/ios-security": "file:../../dist/packages/ios-security",
2928
"@nativescript/iqkeyboardmanager": "file:../../dist/packages/iqkeyboardmanager",
29+
"@nativescript/keyboard-toolbar": "file:../../dist/packages/keyboard-toolbar",
3030
"@nativescript/local-notifications": "file:../../dist/packages/local-notifications",
3131
"@nativescript/localize": "file:../../dist/packages/localize",
3232
"@nativescript/pdf": "file:../../dist/packages/pdf",
@@ -39,7 +39,7 @@
3939
"@nativescript/zip": "file:../../dist/packages/zip"
4040
},
4141
"devDependencies": {
42-
"@nativescript/android": "~8.5.0",
43-
"@nativescript/ios": "~8.5.0"
42+
"@nativescript/android": "~8.6.0",
43+
"@nativescript/ios": "~8.6.0"
4444
}
4545
}

apps/demo-angular/project.json

+4-7
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
},
@@ -30,7 +30,7 @@
3030
"dependsOn": [
3131
{
3232
"target": "build.all",
33-
"projects": "dependencies"
33+
"dependencies": true
3434
}
3535
]
3636
},
@@ -43,7 +43,7 @@
4343
"dependsOn": [
4444
{
4545
"target": "build.all",
46-
"projects": "dependencies"
46+
"dependencies": true
4747
}
4848
]
4949
},
@@ -54,10 +54,7 @@
5454
}
5555
},
5656
"lint": {
57-
"executor": "@nrwl/linter:eslint",
58-
"options": {
59-
"lintFilePatterns": ["apps/demo-angular/**/*.ts"]
60-
}
57+
"executor": "@nx/eslint:lint"
6158
}
6259
}
6360
}

apps/demo-angular/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"@nativescript/apple-sign-in": ["packages/apple-sign-in/index.d.ts"],
4141
"@nativescript/google-maps": ["packages/google-maps/index.d.ts"],
4242
"@nativescript/google-maps/angular": ["packages/google-maps/angular/index.ts"],
43-
"@nativescript/contacts": ["packages/contacts/index.d.ts"]
43+
"@nativescript/contacts": ["packages/contacts/index.d.ts"],
44+
"@nativescript/*": ["../../dist/packages/*"]
4445
}
4546
},
4647
"files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"],

apps/demo/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
"repository": "<fill-your-repository-here>",
66
"dependencies": {
77
"@nativescript/core": "file:../../node_modules/@nativescript/core",
8-
"@nativescript/keyboard-toolbar": "file:../../packages/keyboard-toolbar",
8+
"@nativescript/camera": "file:../../packages/camera",
99
"@nativescript/animated-circle": "file:../../packages/animated-circle",
1010
"@nativescript/appavailability": "file:../../packages/appavailability",
1111
"@nativescript/apple-sign-in": "file:../../packages/apple-sign-in",
1212
"@nativescript/auto-fit-text": "file:../../packages/auto-fit-text",
1313
"@nativescript/background-http": "file:../../packages/background-http",
1414
"@nativescript/biometrics": "file:../../packages/biometrics",
1515
"@nativescript/brightness": "file:../../packages/brightness",
16-
"@nativescript/camera": "file:../../packages/camera",
1716
"@nativescript/contacts": "file:../../packages/contacts",
1817
"@nativescript/datetimepicker": "file:../../packages/datetimepicker",
1918
"@nativescript/debug-android": "file:../../packages/debug-android",
@@ -30,6 +29,7 @@
3029
"@nativescript/imagepicker": "file:../../packages/imagepicker",
3130
"@nativescript/ios-security": "file:../../packages/ios-security",
3231
"@nativescript/iqkeyboardmanager": "file:../../packages/iqkeyboardmanager",
32+
"@nativescript/keyboard-toolbar": "file:../../packages/keyboard-toolbar",
3333
"@nativescript/local-notifications": "file:../../packages/local-notifications",
3434
"@nativescript/localize": "file:../../packages/localize",
3535
"@nativescript/pdf": "file:../../packages/pdf",
@@ -42,7 +42,7 @@
4242
"@nativescript/zip": "file:../../packages/zip"
4343
},
4444
"devDependencies": {
45-
"@nativescript/android": "~8.5.0",
46-
"@nativescript/ios": "~8.5.0"
45+
"@nativescript/android": "~8.6.0",
46+
"@nativescript/ios": "~8.6.0"
4747
}
4848
}

apps/demo/project.json

+4-7
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
},
@@ -30,7 +30,7 @@
3030
"dependsOn": [
3131
{
3232
"target": "build.all",
33-
"projects": "dependencies"
33+
"dependencies": true
3434
}
3535
]
3636
},
@@ -43,7 +43,7 @@
4343
"dependsOn": [
4444
{
4545
"target": "build.all",
46-
"projects": "dependencies"
46+
"dependencies": true
4747
}
4848
]
4949
},
@@ -54,10 +54,7 @@
5454
}
5555
},
5656
"lint": {
57-
"executor": "@nrwl/linter:eslint",
58-
"options": {
59-
"lintFilePatterns": ["apps/demo/**/*.ts"]
60-
}
57+
"executor": "@nx/eslint:lint"
6158
}
6259
}
6360
}

apps/demo/tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"@nativescript/apple-sign-in": ["../../packages/apple-sign-in/index.d.ts"],
4343
"@nativescript/google-maps": ["../../packages/google-maps/index.d.ts"],
4444
"@nativescript/google-maps/angular": ["../../packages/google-maps/angular/index.ts"],
45-
"@nativescript/contacts": ["../../packages/contacts/index.d.ts"]
45+
"@nativescript/contacts": ["../../packages/contacts/index.d.ts"],
46+
"@nativescript/*": ["../../packages/*"]
4647
}
4748
}
4849
}

jest.config.ts

+1-1
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()] };

migrations.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"migrations": [
3+
{
4+
"cli": "nx",
5+
"version": "5.2.0",
6+
"description": "Migrate tools to 5.2.0",
7+
"implementation": "./src/migrations/update-5-2-0/update-5-2-0",
8+
"package": "@nativescript/plugin-tools",
9+
"name": "update-to-5.2.0"
10+
}
11+
]
12+
}

nx.json

+20-13
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,42 @@
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
},
3124
"lint": {
32-
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
25+
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
26+
"cache": true
27+
},
28+
"build.all": {
29+
"cache": true
30+
},
31+
"test": {
32+
"cache": true
33+
},
34+
"e2e": {
35+
"cache": true
3336
}
34-
}
37+
},
38+
"useDaemonProcess": false,
39+
"parallel": 1,
40+
"useInferencePlugins": false,
41+
"defaultBase": "master"
3542
}

0 commit comments

Comments
 (0)