From 13a525ddd9d5cde66f9b7d26bdbf924ea57dd27f Mon Sep 17 00:00:00 2001 From: Nathan Walker Date: Tue, 2 Mar 2021 20:21:33 -0800 Subject: [PATCH] chore: Nx 11.4 --- .eslintrc.json | 89 ++++++----- migrations.json | 109 ------------- package.json | 147 +++++++++--------- packages/core/.eslintrc.json | 6 +- tools/{schematics => generators}/.gitkeep | 0 tools/{schematics => generators}/app/index.ts | 0 tools/generators/app/schema.json | 16 ++ tools/schematics/app/schema.json | 16 -- workspace.json | 3 +- 9 files changed, 143 insertions(+), 243 deletions(-) delete mode 100644 migrations.json rename tools/{schematics => generators}/.gitkeep (100%) rename tools/{schematics => generators}/app/index.ts (100%) create mode 100644 tools/generators/app/schema.json delete mode 100644 tools/schematics/app/schema.json diff --git a/.eslintrc.json b/.eslintrc.json index 1dee0b3ba..6921290df 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,54 +1,57 @@ { "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - "project": ["packages/core/tsconfig.json", "packages/webpack/tsconfig.json"] - }, "ignorePatterns": ["**/*"], - "plugins": ["prettier", "@typescript-eslint", "@nrwl/nx"], - "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint", "plugin:prettier/recommended"], - "rules": { - "prettier/prettier": "warn", - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-parameter-properties": "off", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-namespace": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/triple-slash-reference": "off", - "no-prototype-builtins": "off", - "no-inner-declarations": "off", - "no-constant-condition": "off", - "no-useless-escape": "off", - "@nrwl/nx/enforce-module-boundaries": [ - "error", - { - "enforceBuildableLibDependency": true, - "allow": [], - "depConstraints": [ + "plugins": ["@nrwl/nx"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "extends": ["plugin:prettier/recommended"], + "parserOptions": { + "project": ["packages/core/tsconfig.json", "packages/webpack/tsconfig.json"] + }, + "plugins": ["prettier"], + "rules": { + "prettier/prettier": "warn", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-this-alias": "off", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/triple-slash-reference": "off", + "no-prototype-builtins": "off", + "no-inner-declarations": "off", + "no-constant-condition": "off", + "no-useless-escape": "off", + "@nrwl/nx/enforce-module-boundaries": [ + "error", { - "sourceTag": "*", - "onlyDependOnLibsWithTags": ["*"] + "enforceBuildableLibDependency": true, + "allow": [], + "depConstraints": [ + { + "sourceTag": "*", + "onlyDependOnLibsWithTags": ["*"] + } + ] } ] } - ], - "@typescript-eslint/explicit-module-boundary-types": "off" - }, - "overrides": [ + }, { - "files": ["*.tsx"], - "rules": { - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-any": "off" - } + "files": ["*.ts", "*.tsx"], + "extends": ["plugin:@nrwl/nx/typescript"], + "parserOptions": { + "project": "./tsconfig.*?.json" + }, + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "extends": ["plugin:@nrwl/nx/javascript"], + "rules": {} } ] } diff --git a/migrations.json b/migrations.json deleted file mode 100644 index d393949d2..000000000 --- a/migrations.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "migrations": [ - { - "version": "10.1.0-beta.0", - "description": "Migrate .eslintrc files to use tsconfig with a wildcard", - "factory": "./src/migrations/update-10-1-0/migrate-eslintrc-tsconfig-wildcard", - "package": "@nrwl/workspace", - "name": "migrate-eslintrc-tsconfig-wildcard" - }, - { - "version": "10.3.0-beta.0", - "description": "Add @nrwl/cli as dependency", - "factory": "./src/migrations/update-10-3-0/add-cli-dependency", - "package": "@nrwl/workspace", - "name": "add-cli-dependency" - }, - { - "version": "10.3.0-beta.0", - "description": "Update typescript to v4", - "factory": "./src/migrations/update-10-3-0/update-typescript", - "package": "@nrwl/workspace", - "name": "update-10-3-0" - }, - { - "version": "10.3.0-beta.1", - "description": "Adds .vscode/extensions.json to a workspace", - "factory": "./src/migrations/update-10-3-0/add-vscode-extensions", - "package": "@nrwl/workspace", - "name": "add-vscode-extensions" - }, - { - "version": "10.3.0-beta.0", - "description": "Adds `buildableProjectDepsInPackageJsonType` for web and angular package builders", - "factory": "./src/migrations/update-10-3-0/add-buildable-project-deps-in-package-json-type", - "package": "@nrwl/workspace", - "name": "add-buildable-project-deps-in-package-json-type" - }, - { - "version": "10.1.0-beta.4", - "description": "Update jest to v26", - "factory": "./src/migrations/update-10-1-0/update-10-1-0", - "package": "@nrwl/jest", - "name": "update-10.1.0" - }, - { - "version": "10.2.0", - "description": "Remove deprecated jest builder options", - "factory": "./src/migrations/update-10-2-0/update-10-2-0", - "package": "@nrwl/jest", - "name": "update-10.2.0" - }, - { - "version": "10.3.0-beta.1", - "description": "Adds all jest projects into the root jest config", - "factory": "./src/migrations/update-10-3-0/update-projects-property", - "package": "@nrwl/jest", - "name": "update-projects-property" - }, - { - "version": "10.3.0-beta.1", - "description": "Update ts-jest to v26.4", - "factory": "./src/migrations/update-10-3-0/update-ts-jest", - "package": "@nrwl/jest", - "name": "update-ts-jest" - }, - { - "version": "10.3.0-beta.1", - "description": "Adds a jest extension to the recommended extensions for vscode", - "factory": "./src/migrations/update-10-3-0/add-jest-extension", - "package": "@nrwl/jest", - "name": "add-jest-extension" - }, - { - "version": "10.3.0-beta.1", - "description": "Update @typescript-eslint to v4.3", - "factory": "./src/migrations/update-10-3-0/update-10-3-0", - "package": "@nrwl/linter", - "name": "update-10.3.0" - }, - { - "version": "10.3.0-beta.0", - "description": "Migrate to the new ESLint builder and ESLint config style", - "factory": "./src/migrations/update-10-3-0/update-eslint-builder-and-config", - "package": "@nrwl/linter", - "name": "update-eslint-builder-and-config" - }, - { - "version": "10.3.0-beta.2", - "description": "Add explicit .json file extension to .eslintrc files, not using an extension is deprecated", - "factory": "./src/migrations/update-10-3-0/add-json-ext-to-eslintrc", - "package": "@nrwl/linter", - "name": "add-json-ext-to-eslintrc" - }, - { - "version": "10.3.0-beta.3", - "description": "Update implicitDependencies within nx.json to include root .eslintrc.json", - "factory": "./src/migrations/update-10-3-0/add-root-eslintrc-json-to-workspace-implicit-deps", - "package": "@nrwl/linter", - "name": "add-root-eslintrc-json-to-workspace-implicit-deps" - }, - { - "version": "10.1.0-beta.1", - "description": "Removes rootDir from node libs' tsconfig", - "factory": "./src/migrations/update-10-1-0/remove-root-dir", - "package": "@nrwl/node", - "name": "remove-root-dir" - } - ] -} diff --git a/package.json b/package.json index 2f1c59390..114d2c345 100644 --- a/package.json +++ b/package.json @@ -1,75 +1,76 @@ { - "name": "nativescript", - "version": "7.3.0", - "license": "MIT", - "scripts": { - "clean": "git clean -f -X -d", - "setup": "npm run clean && npm install", - "setup:yarn": "yarn run clean && yarn", - "setup:pnpm": "pnpm run clean && pnpm install", - "postinstall": "ts-patch install && husky install && nx run core:setup", - "start": "nps", - "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" - }, - "private": true, - "repository": { - "type": "git", - "url": "https://github.com/NativeScript/NativeScript.git" - }, - "dependencies": { - "nativescript-theme-core": "^1.0.4" - }, - "devDependencies": { - "@nativescript/hook": "^2.0.0", - "@nrwl/cli": "~10.3.1", - "@nrwl/eslint-plugin-nx": "~10.3.0", - "@nrwl/jest": "~10.3.0", - "@nrwl/node": "~10.3.0", - "@nrwl/workspace": "~10.3.0", - "@nstudio/focus": "~10.3.0", - "@nstudio/nps-i": "~1.1.0", - "@types/chai": "^4.2.11", - "@types/jest": "~26.0.8", - "@types/mocha": "^7.0.2", - "@types/node": "~14.0.22", - "@typescript-eslint/eslint-plugin": "~4.3.0", - "@typescript-eslint/parser": "~4.3.0", - "chai": "^4.2.0", - "conventional-changelog-cli": "^2.0.34", - "copyfiles": "^2.4.0", - "css": "^3.0.0", - "css-tree": "^1.0.0-alpha.39", - "dotenv": "~8.2.0", - "eslint": "~7.10.0", - "eslint-config-prettier": "~6.11.0", - "eslint-plugin-prettier": "^3.3.1", - "gonzales": "^1.0.7", - "husky": "^5.1.3", - "jest": "~26.2.2", - "lint-staged": "^10.5.0", - "mocha": "^8.0.1", - "mocha-typescript": "^1.1.17", - "module-alias": "^2.2.2", - "nativescript": "~7.2.0", - "node-sass": "~4.14.1", - "parse-css": "git+https://github.com/tabatkins/parse-css.git", - "parserlib": "^1.1.1", - "prettier": "~2.0.5", - "reduce-css-calc": "~2.1.7", - "shady-css-parser": "^0.1.0", - "terser-webpack-plugin": "~3.0.6", - "tree-kill": "^1.2.2", - "ts-jest": "26.4.0", - "ts-node": "~8.10.2", - "ts-patch": "^1.2.5", - "tslint": "~6.1.2", - "typescript": "~4.0.3", - "webpack": "~4.44.1", - "webpack-cli": "~3.3.12" - }, - "lint-staged": { - "**/*": [ - "nx format:write --files" - ] - } + "name": "nativescript", + "version": "7.3.0", + "license": "MIT", + "scripts": { + "clean": "git clean -f -X -d", + "setup": "npm run clean && npm install", + "setup:yarn": "yarn run clean && yarn", + "setup:pnpm": "pnpm run clean && pnpm install", + "postinstall": "ts-patch install && husky install && nx run core:setup", + "start": "nps", + "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s" + }, + "private": true, + "repository": { + "type": "git", + "url": "https://github.com/NativeScript/NativeScript.git" + }, + "dependencies": { + "nativescript-theme-core": "^1.0.4" + }, + "devDependencies": { + "@nativescript/hook": "^2.0.0", + "@nrwl/cli": "11.4.0", + "@nrwl/eslint-plugin-nx": "11.4.0", + "@nrwl/jest": "11.4.0", + "@nrwl/node": "11.4.0", + "@nrwl/tao": "11.4.0", + "@nrwl/workspace": "11.4.0", + "@nstudio/focus": "~11.1.0", + "@nstudio/nps-i": "~1.1.0", + "@types/chai": "^4.2.11", + "@types/jest": "~26.0.8", + "@types/mocha": "^7.0.2", + "@types/node": "12.12.38", + "@typescript-eslint/eslint-plugin": "~4.16.0", + "@typescript-eslint/parser": "~4.16.0", + "chai": "^4.2.0", + "conventional-changelog-cli": "^2.1.1", + "copyfiles": "^2.4.0", + "css": "^3.0.0", + "css-tree": "^1.0.0-alpha.39", + "dotenv": "~8.2.0", + "eslint": "~7.21.0", + "eslint-config-prettier": "~8.1.0", + "eslint-plugin-prettier": "^3.3.1", + "gonzales": "^1.0.7", + "husky": "^5.1.3", + "jest": "~26.2.2", + "lint-staged": "^10.5.0", + "mocha": "^8.0.1", + "mocha-typescript": "^1.1.17", + "module-alias": "^2.2.2", + "nativescript": "~7.2.0", + "parse-css": "git+https://github.com/tabatkins/parse-css.git", + "parserlib": "^1.1.1", + "prettier": "~2.2.1", + "reduce-css-calc": "~2.1.7", + "sass": "~1.32.8", + "shady-css-parser": "^0.1.0", + "terser-webpack-plugin": "~3.0.6", + "tree-kill": "^1.2.2", + "ts-jest": "26.4.0", + "ts-node": "9.1.1", + "ts-patch": "^1.3.0", + "tslint": "6.1.3", + "typescript": "~4.0.3", + "webpack": "~4.44.1", + "webpack-cli": "~3.3.12" + }, + "lint-staged": { + "**/*": [ + "nx format:write --files" + ] + } } diff --git a/packages/core/.eslintrc.json b/packages/core/.eslintrc.json index ab8f38339..ffd3c2927 100644 --- a/packages/core/.eslintrc.json +++ b/packages/core/.eslintrc.json @@ -1 +1,5 @@ -{ "extends": "../../.eslintrc", "rules": {}, "ignorePatterns": ["!**/*"] } +{ + "extends": "../../.eslintrc", + "rules": {}, + "ignorePatterns": ["!**/*"] +} diff --git a/tools/schematics/.gitkeep b/tools/generators/.gitkeep similarity index 100% rename from tools/schematics/.gitkeep rename to tools/generators/.gitkeep diff --git a/tools/schematics/app/index.ts b/tools/generators/app/index.ts similarity index 100% rename from tools/schematics/app/index.ts rename to tools/generators/app/index.ts diff --git a/tools/generators/app/schema.json b/tools/generators/app/schema.json new file mode 100644 index 000000000..889c5b1c3 --- /dev/null +++ b/tools/generators/app/schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "http://json-schema.org/schema", + "id": "app", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Library name", + "$default": { + "$source": "argv", + "index": 0 + } + } + }, + "required": ["name"] +} diff --git a/tools/schematics/app/schema.json b/tools/schematics/app/schema.json deleted file mode 100644 index ec3c91734..000000000 --- a/tools/schematics/app/schema.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "id": "app", - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Library name", - "$default": { - "$source": "argv", - "index": 0 - } - } - }, - "required": ["name"] -} diff --git a/workspace.json b/workspace.json index 418719bf4..232a842a2 100644 --- a/workspace.json +++ b/workspace.json @@ -114,7 +114,8 @@ "options": { "jestConfig": "packages/core/jest.config.js", "passWithNoTests": true - } + }, + "outputs": ["coverage/packages/core"] }, "setup": { "builder": "@nrwl/workspace:run-commands",