chore: Nx 17+ (#10449)

This commit is contained in:
Nathan Walker
2023-11-25 10:58:41 -08:00
committed by GitHub
parent 40b2a6a6db
commit 2237c9be4f
11 changed files with 68 additions and 54 deletions

2
.gitignore vendored
View File

@ -55,3 +55,5 @@ Thumbs.db
# types
ios-typings-prj
.nx/cache

View File

@ -25,3 +25,5 @@ package.json
*.scss
*.sh
!packages/webpack/templates/*.js
/.nx/cache

View File

@ -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"

View File

@ -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"
}

View File

@ -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) => {

View File

@ -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"
},

44
nx.json
View File

@ -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
}

View File

@ -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"
]
}
}
}

View File

@ -21,13 +21,7 @@
"outputs": ["{workspaceRoot}/dist/out-tsc"],
"options": {
"jestConfig": "packages/core/jest.config.ts",
"passWithNoTests": true,
"verbose": true
},
"configurations": {
"ci": {
"ci": true
}
}
},
"build": {

View File

@ -46,14 +46,7 @@
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "tools/workspace-plugin/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
"jestConfig": "tools/workspace-plugin/jest.config.ts"
}
}
},