Skip to content

Commit

Permalink
chore: migrate to latest plugin tools
Browse files Browse the repository at this point in the history
  • Loading branch information
edusperoni committed Jul 3, 2024
1 parent e877705 commit 02b264f
Show file tree
Hide file tree
Showing 24 changed files with 5,769 additions and 4,752 deletions.
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: 2 additions & 1 deletion .nxignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
apps/**/*_off
apps/**/*_off
.nx/cache/**
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"
}
}
}
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"
}
}
}
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()] };
2 changes: 1 addition & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const nxPreset = require('@nrwl/jest/preset').default;
const nxPreset = require('@nx/jest/preset').default;

module.exports = { ...nxPreset };
28 changes: 28 additions & 0 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"migrations": [
{
"cli": "nx",
"version": "5.1.0",
"description": "Migrate tools to 5.1.0",
"implementation": "./src/migrations/update-5-1-0/update-5-1-0",
"package": "@nativescript/plugin-tools",
"name": "update-to-5.1.0"
},
{
"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"
}
52 changes: 26 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"license": "MIT",
"scripts": {
"postinstall": "husky install && npx ts-patch install && ngcc --properties es2015 browser module main",
"postinstall": "husky install && npx ts-patch install",
"setup": "npx rimraf node_modules package-lock.json dist tmp yarn.lock && yarn config set ignore-engines true && ns package-manager set npm && yarn",
"start": "nps",
"add": "nx g @nativescript/plugin-tools:add-package",
Expand All @@ -16,51 +16,51 @@
},
"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",
"@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",
"husky": "~9.0.0",
"jest": "27.2.3",
"jest-environment-jsdom": "28.1.1",
"jest-preset-angular": "11.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",
"rxjs": "~7.8.0",
"socketcluster-client": "^14.3.2",
"ts-node": "10.9.1",
"typescript": "~4.8.0",
"zone.js": "~0.11.5"
"typescript": "~5.4.0",
"zone.js": "~0.14.0"
},
"lint-staged": {
"**/*.{js,ts,scss,json,html}": [
Expand Down
14 changes: 6 additions & 8 deletions packages/nativescript-barcodescanner/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "packages/nativescript-barcodescanner",
"tags": [],
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"executor": "@nx/js:tsc",
"options": {
"outputPath": "dist/packages/nativescript-barcodescanner",
"tsConfig": "packages/nativescript-barcodescanner/tsconfig.json",
Expand Down Expand Up @@ -44,15 +45,13 @@
"dependsOn": [
{
"target": "build.all",
"projects": "dependencies"
"dependencies": true
},
{
"target": "build.native",
"projects": "self"
"target": "build.native"
},
{
"target": "build",
"projects": "self"
"target": "build"
}
]
},
Expand All @@ -72,6 +71,5 @@
"parallel": false
}
}
},
"tags": []
}
}
Loading

0 comments on commit 02b264f

Please sign in to comment.