From 2237c9be4ffbc17fc73529e128935d21d47b4428 Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Sat, 25 Nov 2023 10:58:41 -0800 Subject: [PATCH] chore: Nx 17+ (#10449) --- .gitignore | 2 ++ .prettierignore | 2 ++ apps/automated/package.json | 4 +-- apps/toolbox/package.json | 6 ++-- apps/toolbox/src/pages/image-handling.ts | 7 ++-- apps/ui/package.json | 4 +-- nx.json | 44 +++++++++++++++++------ package.json | 38 ++++++++++---------- packages/core/platforms/android/core.aar | Bin 1298 -> 1198 bytes packages/core/project.json | 6 ---- tools/workspace-plugin/project.json | 9 +---- 11 files changed, 68 insertions(+), 54 deletions(-) diff --git a/.gitignore b/.gitignore index d9476c44e..4ba439ba4 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,5 @@ Thumbs.db # types ios-typings-prj + +.nx/cache \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index ef7542006..53ec77f95 100644 --- a/.prettierignore +++ b/.prettierignore @@ -25,3 +25,5 @@ package.json *.scss *.sh !packages/webpack/templates/*.js + +/.nx/cache \ No newline at end of file diff --git a/apps/automated/package.json b/apps/automated/package.json index f2d232f51..4811d7d33 100644 --- a/apps/automated/package.json +++ b/apps/automated/package.json @@ -11,8 +11,8 @@ "nativescript-theme-core": "file:../../node_modules/nativescript-theme-core" }, "devDependencies": { - "@nativescript/android": "~8.5.0", - "@nativescript/ios": "~8.5.0", + "@nativescript/android": "~8.6.0", + "@nativescript/ios": "~8.6.0", "@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz", "circular-dependency-plugin": "^5.2.2", "typescript": "~5.2.0" diff --git a/apps/toolbox/package.json b/apps/toolbox/package.json index da0403632..4951e5327 100644 --- a/apps/toolbox/package.json +++ b/apps/toolbox/package.json @@ -9,11 +9,11 @@ "dependencies": { "@nativescript/core": "file:../../packages/core", "nativescript-theme-core": "file:../../node_modules/nativescript-theme-core", - "@nativescript/imagepicker": "^1.0.6" + "@nativescript/imagepicker": "^3.0.0" }, "devDependencies": { - "@nativescript/android": "~8.5.0", - "@nativescript/ios": "~8.5.0", + "@nativescript/android": "~8.6.0", + "@nativescript/ios": "~8.6.0", "@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz", "typescript": "~5.2.0" } diff --git a/apps/toolbox/src/pages/image-handling.ts b/apps/toolbox/src/pages/image-handling.ts index 9a4c65c90..165461433 100644 --- a/apps/toolbox/src/pages/image-handling.ts +++ b/apps/toolbox/src/pages/image-handling.ts @@ -22,10 +22,11 @@ export class DemoModel extends Observable { .then(() => { return context.present(); }) - .then((selection) => { - const imageAsset = selection.length > 0 ? selection[0] : null; - if (imageAsset) { + .then((selections) => { + const selection = selections.length > 0 ? selections[0] : null; + if (selection) { this.addingPhoto = true; + const imageAsset = selection.asset; ImageSource.fromAsset(imageAsset).then( (savedImage) => { diff --git a/apps/ui/package.json b/apps/ui/package.json index 1287ebbda..b8bd994f4 100644 --- a/apps/ui/package.json +++ b/apps/ui/package.json @@ -11,8 +11,8 @@ "@nativescript/core": "file:../../packages/core" }, "devDependencies": { - "@nativescript/android": "~8.5.0", - "@nativescript/ios": "~8.5.0", + "@nativescript/android": "~8.6.0", + "@nativescript/ios": "~8.6.0", "@nativescript/webpack": "file:../../dist/packages/nativescript-webpack.tgz", "typescript": "~5.2.0" }, diff --git a/nx.json b/nx.json index f99103e97..529333068 100644 --- a/nx.json +++ b/nx.json @@ -1,19 +1,13 @@ { - "npmScope": "nativescript", "workspaceLayout": { "appsDir": "apps", "libsDir": "packages" }, "tasksRunnerOptions": { "default": { - "runner": "nx-cloud", "options": { - "useDaemonProcess": false, - "cacheableOperations": ["build", "lint", "test", "ios", "android", "e2e"], "canTrackAnalytics": false, - "showUsageWarnings": true, - "parallel": 1, - "accessToken": "NzRmNDM3NDgtZjlmNy00MTUwLWIxZDktYjJlZTRhMWM5ODY3fHJlYWQtd3JpdGU=" + "showUsageWarnings": true } } }, @@ -84,10 +78,40 @@ }, "targetDefaults": { "build": { - "inputs": ["production", "^production"] + "inputs": ["production", "^production"], + "cache": true }, "test": { - "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"] + "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"], + "cache": true + }, + "lint": { + "cache": true + }, + "ios": { + "cache": true + }, + "android": { + "cache": true + }, + "e2e": { + "cache": true + }, + "@nx/jest:jest": { + "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"], + "cache": true, + "options": { + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } } - } + }, + "useDaemonProcess": false, + "nxCloudAccessToken": "NzRmNDM3NDgtZjlmNy00MTUwLWIxZDktYjJlZTRhMWM5ODY3fHJlYWQtd3JpdGU=", + "parallel": 1 } diff --git a/package.json b/package.json index 20b18f4e4..d53e88223 100644 --- a/package.json +++ b/package.json @@ -18,26 +18,25 @@ "url": "https://github.com/NativeScript/NativeScript.git" }, "dependencies": { - "@nx/devkit": "16.9.1", - "@swc/helpers": "0.5.2", - "nativescript-theme-core": "^1.0.4", - "nx-cloud": "16.4.0" + "@nx/devkit": "17.1.3", + "@swc/helpers": "0.5.3", + "nativescript-theme-core": "^1.0.4" }, "devDependencies": { "@nativescript/hook": "^2.0.0", - "@nativescript/nx": "^16.5.0", - "@nstudio/focus": "^16.5.0", + "@nativescript/nx": "^17.0.1", + "@nstudio/focus": "^17.0.1", "@nstudio/nps-i": "~2.0.0", - "@nx/eslint-plugin": "16.9.1", - "@nx/jest": "16.9.1", - "@nx/js": "16.9.1", - "@nx/node": "16.9.1", - "@nx/plugin": "16.9.1", - "@nx/workspace": "16.9.1", + "@nx/eslint-plugin": "17.1.3", + "@nx/jest": "17.1.3", + "@nx/js": "17.1.3", + "@nx/node": "17.1.3", + "@nx/plugin": "17.1.3", + "@nx/workspace": "17.1.3", "@prettier/plugin-xml": "^2.2.0", - "@swc-node/register": "~1.4.2", + "@swc-node/register": "1.6.8", "@swc/cli": "~0.1.62", - "@swc/core": "1.3.90", + "@swc/core": "~1.3.99", "@types/jest": "~29.5.0", "@types/node": "^18.7.1", "@typescript-eslint/eslint-plugin": "^6.6.0", @@ -47,18 +46,18 @@ "css": "^3.0.0", "css-tree": "^1.1.2", "dotenv": "~16.3.1", - "emoji-regex": "^10.2.1", + "emoji-regex": "^10.3.0", "eslint": "~8.43.0", "eslint-config-prettier": "~8.8.0", "gonzales": "^1.0.7", "husky": "^8.0.1", "jest": "~29.6.0", "jest-environment-jsdom": "~29.6.0", - "lint-staged": "^14.0.0", + "lint-staged": "^15.1.0", "module-alias": "^2.2.2", "nativescript": "~8.6.0", "nativescript-typedoc-theme": "1.1.0", - "nx": "16.9.1", + "nx": "17.1.3", "parse-css": "git+https://github.com/tabatkins/parse-css.git", "parserlib": "^1.1.1", "prettier": "^2.6.2", @@ -72,12 +71,11 @@ "tslib": "^2.6.0", "typedoc": "^0.24.8", "typescript": "~5.2.0", - "zx": "^7.0.5" + "zx": "^7.2.0" }, "lint-staged": { "**/*.{js,ts,css,scss,json,html}": [ "npx prettier --write" ] } -} - +} \ No newline at end of file diff --git a/packages/core/platforms/android/core.aar b/packages/core/platforms/android/core.aar index 1986e77700ee74c63556aa7a3c9b0664ef3e9ee4..5d6459d89f49cc1d6f909b83ba2a1a105de147aa 100644 GIT binary patch delta 353 zcmbQlwT^Q_bp59pO2tc3j2 z70thGUZiO1obWA~Te0a$Hs8Gi*P>=lN!p&cNylF=*6)yAI;->k@}!N|w|=JCH! zpqnd!*pgv#4~zBWNlb>yE>CxdOL$T3rtUOGQsdz*;WcFB8uo9}*=luJ5##x97z*QU|I=welo ztxoD1{Q}uldKsUTiv*?p?qqGUth#+T#4BrRl5ye%oqqS2SrSwHHlI52>cj$}*^|sR zm)&qa<2OmK&eiPZ@=bG7SPVm~uj%&0Y@S>G{o2J#Z2sof_xCqH?ANfe*4ckyC*#6x z&-`ldNyKdyVANpb42-h5;{)_W!emFLLP?g7vY&&xJ{bq!=@tqu3Sutux@`P;LJ7my z$@YvgJnTSqWr;bZsm1!tldm$laKb}kvJ!I;qvGUJW(&rk$?KR68OtU=0J0ZOmSoY8 zhFbyDZVALNu%yv?atw=|CnJ*xGZzB`2M18X5iH3BRRXdQ0t6V|I^F{cL#+?+W@Q6O PZ~)