Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: nx migrate @nativescript/plugin-tools #16

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
18 changes: 12 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -23,13 +23,19 @@
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nrwl/nx/typescript"],
"rules": {}
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier", "plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
"extends": ["plugin:@nx/javascript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["references.d.ts"],
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ packages/*/native-src/ios/build
# Xcode uneeded files
*.xcuserstate
xcuserdata/

.nx/cache
.nx/workspace-data
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
/coverage
native-src
packages/*/types

/.nx/cache
/.nx/workspace-data
4 changes: 2 additions & 2 deletions apps/demo-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@valor/nativescript-in-app-review": "file:../../dist/packages/nativescript-in-app-review"
},
"devDependencies": {
"@nativescript/android": "~8.4.0",
"@nativescript/ios": "~8.4.0"
"@nativescript/android": "~8.7.0",
"@nativescript/ios": "~8.7.0"
}
}
11 changes: 4 additions & 7 deletions apps/demo-angular/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -29,7 +29,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -41,7 +41,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -52,10 +52,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/demo-angular/**/*.ts"]
}
"executor": "@nx/eslint:lint"
}
}
}
3 changes: 2 additions & 1 deletion apps/demo-angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"@valor/nativescript-feedback": ["packages/nativescript-feedback"],
"@valor/nativescript-in-app-review": ["packages/nativescript-in-app-review"],
"@valor/nativescript-view-shot": ["packages/nativescript-view-shot"],
"@valor/nativescript-view-shot/angular": ["packages/nativescript-view-shot/angular"]
"@valor/nativescript-view-shot/angular": ["packages/nativescript-view-shot/angular"],
"@valor/*": ["../../dist/packages/*"]
}
},
"files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"],
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@valor/nativescript-in-app-review": "file:../../packages/nativescript-in-app-review"
},
"devDependencies": {
"@nativescript/android": "~8.4.0",
"@nativescript/ios": "~8.4.0"
"@nativescript/android": "~8.7.0",
"@nativescript/ios": "~8.7.0"
}
}
11 changes: 4 additions & 7 deletions apps/demo/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -30,7 +30,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -43,7 +43,7 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
}
]
},
Expand All @@ -54,10 +54,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": ["apps/demo/**/*.ts"]
}
"executor": "@nx/eslint:lint"
}
}
}
3 changes: 2 additions & 1 deletion apps/demo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"baseUrl": ".",
"paths": {
"~/*": ["src/*"],
"@demo/shared": ["../../tools/demo/index.ts"]
"@demo/shared": ["../../tools/demo/index.ts"],
"@valor/*": ["../../packages/*"]
}
}
}
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const { getJestProjects } = require('@nrwl/jest');
const { getJestProjects } = require('@nx/jest');

export default { projects: [...getJestProjects()] };
16 changes: 14 additions & 2 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;

module.exports = { ...nxPreset };
module.exports = {
...nxPreset,
/* TODO: Update to latest Jest snapshotFormat
* By default Nx has kept the older style of Jest Snapshot formats
* to prevent breaking of any existing tests with snapshots.
* It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag.
* Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
};
20 changes: 20 additions & 0 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"migrations": [
{
"cli": "nx",
"version": "5.2.0",
"description": "Migrate tools to 5.2.0",
"implementation": "./src/migrations/update-5-2-0/update-5-2-0",
"package": "@nativescript/plugin-tools",
"name": "update-to-5.2.0"
},
{
"cli": "nx",
"version": "5.3.0",
"description": "Migrate tools to 5.3.0",
"implementation": "./src/migrations/update-5-3-0/update-5-3-0",
"package": "@nativescript/plugin-tools",
"name": "update-to-5.3.0"
}
]
}
36 changes: 22 additions & 14 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,46 @@
{
"npmScope": "valor",
"affected": {
"defaultBase": "master"
},
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "packages"
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/nx-cloud",
"options": {
"cacheableOperations": ["build", "build.all", "build.native", "lint", "test", "e2e"],
"runtimeCacheInputs": ["node -v"],
"accessToken": "M2YzM2ViYzctZWNiMC00Y2MyLWI3ZmYtMDMwZTAxZjUwZGUwfHJlYWQ=",
"useDaemonProcess": false
"runtimeCacheInputs": ["node -v"]
}
}
},
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": ["{workspaceRoot}/workspace.json", "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/tslint.json", "{workspaceRoot}/nx.json"],
"production": ["default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/.eslintrc.json"]
"production": ["default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/.eslintrc.json", "!{projectRoot}/src/test-setup.[jt]s"]
},
"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": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
},
"build.all": {
"cache": true
},
"build.native": {
"cache": true
},
"e2e": {
"cache": true
}
}
},
"useDaemonProcess": false,
"nxCloudAccessToken": "M2YzM2ViYzctZWNiMC00Y2MyLWI3ZmYtMDMwZTAxZjUwZGUwfHJlYWQ=",
"useInferencePlugins": false,
"defaultBase": "master"
}
71 changes: 35 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"postinstall": "husky install && npx ts-patch install && ngcc --properties es2015 browser module main",
"setup": "npx rimraf node_modules package-lock.json dist tmp yarn.lock && yarn config set ignore-engines true && ns package-manager set npm && yarn",
"postinstall": "husky install && npx ts-patch install",
"setup": "npx rimraf node_modules package-lock.json dist tmp yarn.lock && yarn",
"start": "nps",
"add": "nx g @nativescript/plugin-tools:add-package",
"add-angular": "nx g @nativescript/plugin-tools:add-angular",
Expand All @@ -16,51 +16,50 @@
},
"private": true,
"devDependencies": {
"@angular-devkit/build-angular": "^15.0.0",
"@angular-eslint/eslint-plugin": "^15.1.0",
"@angular-eslint/eslint-plugin-template": "^15.1.0",
"@angular-eslint/template-parser": "^15.1.0",
"@angular/animations": "^15.0.0",
"@angular/cli": "^15.0.0",
"@angular/common": "^15.0.0",
"@angular/compiler": "^15.0.0",
"@angular/compiler-cli": "^15.0.0",
"@angular/core": "^15.0.0",
"@angular/forms": "^15.0.0",
"@angular/language-service": "^15.0.0",
"@angular/platform-browser": "^15.0.0",
"@angular/platform-browser-dynamic": "^15.0.0",
"@angular/router": "^15.0.0",
"@nativescript/angular": "^15.0.0",
"@nativescript/core": "~8.4.0",
"@nativescript/plugin-tools": "5.0.2",
"@nativescript/types": "~8.4.0",
"@angular-devkit/build-angular": "^18.0.0",
"@angular-eslint/eslint-plugin": "^18.0.0",
"@angular-eslint/eslint-plugin-template": "^18.0.0",
"@angular-eslint/template-parser": "^18.0.0",
"@angular/animations": "^18.0.0",
"@angular/cli": "^18.0.0",
"@angular/common": "^18.0.0",
"@angular/compiler": "^18.0.0",
"@angular/compiler-cli": "^18.0.0",
"@angular/core": "^18.0.0",
"@angular/forms": "^18.0.0",
"@angular/language-service": "^18.0.0",
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"@nativescript/angular": "^18.0.0",
"@nativescript/core": "~8.7.0",
"@nativescript/plugin-tools": "5.3.0",
"@nativescript/types": "~8.7.0",
"@nativescript/webpack": "~5.0.12",
"@ngrx/effects": "^15.1.0",
"@ngrx/store": "^15.1.0",
"@ngrx/store-devtools": "^15.1.0",
"@ngtools/webpack": "^15.0.0",
"@ngrx/effects": "^18.0.0",
"@ngrx/store": "^18.0.0",
"@ngrx/store-devtools": "^18.0.0",
"@ngtools/webpack": "^18.0.0",
"@types/jest": "27.0.2",
"@types/jsan": "^3.1.2",
"@types/socketcluster-client": "^13.0.0",
"husky": "^8.0.0",
"jest": "27.2.3",
"jest-environment-jsdom": "28.1.1",
"jest-preset-angular": "11.1.1",
"husky": "~9.0.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-preset-angular": "14.1.1",
"jsan": "^3.1.14",
"nativescript-permissions": "1.3.11",
"nativescript-vue": "~2.9.0",
"nativescript-vue-template-compiler": "~2.9.0",
"ng-packagr": "^15.0.0",
"ng-packagr": "^18.0.0",
"postcss": "^8.4.5",
"postcss-import": "^14.0.2",
"postcss-preset-env": "^6.7.0",
"postcss-url": "^10.1.1",
"rxjs": "~7.5.0",
"socketcluster-client": "^14.3.2",
"ts-node": "10.9.1",
"typescript": "~4.8.0",
"zone.js": "~0.11.5"
"rxjs": "~7.8.0",
"socketcluster-client": "^19.2.0",
"ts-node": "10.9.2",
"typescript": "~5.4.0",
"zone.js": "~0.14.0"
},
"lint-staged": {
"**/*.{js,ts,scss,json,html}": [
Expand Down
Loading
Loading