Skip to content

Commit

Permalink
chore: update nx to 16.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
tsangste committed Jul 4, 2023
1 parent ad8c158 commit f520d6c
Show file tree
Hide file tree
Showing 31 changed files with 9,149 additions and 19,444 deletions.
43 changes: 17 additions & 26 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx", "unicorn", "simple-import-sort"],
"plugins": ["@nx", "unicorn", "simple-import-sort"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -20,7 +20,8 @@
}
],
"max-len": [
"error", {
"error",
{
"code": 120,
"ignoreUrls": true,
"ignoreStrings": true
Expand All @@ -31,27 +32,19 @@
"error",
{
"groups": [
// Side effect imports.
["^\\u0000"],
// Native node packages.
["^node:"],
// Packages `nestjs` related packages come first.
["@nestjs/testing", "@nestjs/core", "@nestjs/common", "^(@nestjs)(/.*|$)"],
// External packages
["^@?\\w"],
// Internal packages.
["^(@tsangste)(/.*|$)"],
// Service alias.
["^(~)(/.*.module)", "^(~)(/.*.controller)", "^(~)(/.*.service)", "^(~)(/.*|$)"],
// Parent imports. Put `..` last.
[
"^\\.\\.(/.*.module)",
"^\\.\\.(/.*.controller)",
"^\\.\\.(/.*.service)",
"^\\.\\.(?!/?$)",
"^\\.\\./?$"
],
// Other relative imports. Put same-folder imports and `.` last.
[
"^.+\\.s?module",
"^.+\\.s?controller",
Expand All @@ -72,10 +65,8 @@
"project": "tsconfig.base.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint/eslint-plugin"
],
"extends": ["plugin:@nrwl/nx/typescript"],
"plugins": ["@typescript-eslint/eslint-plugin"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/no-empty-function": [
"error",
Expand All @@ -86,7 +77,8 @@
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "^_", "ignoreRestSiblings": true
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/no-misused-promises": "error",
Expand All @@ -99,22 +91,21 @@
"error",
{
"selector": "variable",
"modifiers": [
"const", "exported"
],
"types": [
"function"
],
"format": [
"camelCase", "PascalCase"
]
"modifiers": ["const", "exported"],
"types": ["function"],
"format": ["camelCase", "PascalCase"]
}
]
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
}
]
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"eslint.validate": ["json"]
}
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


# NxPackageTest

This project was generated using [Nx](https://nx.dev).
Expand All @@ -23,11 +21,11 @@ Below are our core plugins:
- [Angular](https://angular.io)
- `npm install --save-dev @nrwl/angular`
- [Nest](https://nestjs.com)
- `npm install --save-dev @nrwl/nest`
- `npm install --save-dev @nx/nest`
- [Express](https://expressjs.com)
- `npm install --save-dev @nrwl/express`
- [Node](https://nodejs.org)
- `npm install --save-dev @nrwl/node`
- `npm install --save-dev @nx/node`

There are also many [community plugins](https://nx.dev/community) you could add.

Expand Down
6 changes: 3 additions & 3 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}
},
"serve": {
"executor": "@nrwl/node:node",
"executor": "@nx/js:node",
"options": {
"buildTarget": "api:build"
},
Expand All @@ -35,14 +35,14 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/api/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/apps/api"],
"options": {
"jestConfig": "apps/api/jest.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion apps/api/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"module": "commonjs",
"types": ["node"],
"emitDecoratorMetadata": true,
"target": "es2015"
"target": "es2021"
},
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"],
"include": ["**/*.ts"]
Expand Down
4 changes: 2 additions & 2 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getJestProjects } from '@nrwl/jest';
import { getJestProjects } from '@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,4 +1,4 @@
const nxPreset = require('@nrwl/jest/preset').default
const nxPreset = require('@nx/jest/preset').default

module.exports = {
...nxPreset,
Expand Down
6 changes: 2 additions & 4 deletions libs/nestjs-auth/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,19 @@
},
"dependsOn": [
{
"projects": "self",
"target": "build"
}
]
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/nestjs-auth/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/libs/nestjs-auth"],
"options": {
"jestConfig": "libs/nestjs-auth/jest.config.ts",
Expand All @@ -51,7 +50,6 @@
},
"dependsOn": [
{
"projects": "self",
"target": "build"
}
]
Expand Down
2 changes: 1 addition & 1 deletion libs/nestjs-auth/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"],
"target": "es6"
"target": "es2021"
},
"include": ["**/*.ts"],
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
Expand Down
5 changes: 2 additions & 3 deletions libs/nestjs-logger/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"dependsOn": ["build"]
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/nestjs-logger/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/nestjs-logger/jest.config.ts",
Expand All @@ -46,7 +46,6 @@
},
"dependsOn": [
{
"projects": "self",
"target": "build"
}
]
Expand Down
2 changes: 1 addition & 1 deletion libs/nestjs-logger/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"],
"target": "es6"
"target": "es2021"
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
Expand Down
5 changes: 2 additions & 3 deletions libs/nestjs-storage/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"dependsOn": ["build"]
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/nestjs-storage/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "libs/nestjs-storage/jest.config.ts",
Expand All @@ -46,7 +46,6 @@
},
"dependsOn": [
{
"projects": "self",
"target": "build"
}
]
Expand Down
2 changes: 1 addition & 1 deletion libs/nestjs-storage/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"],
"target": "es6"
"target": "es2021"
},
"include": ["src/**/*.ts"],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"]
Expand Down
32 changes: 26 additions & 6 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,45 @@
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
"cacheableOperations": [
"build",
"lint",
"test",
"e2e"
]
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
"dependsOn": [
"^build"
],
"inputs": [
"production",
"^production"
]
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
"inputs": [
"default",
"^production",
"{workspaceRoot}/jest.preset.js"
]
},
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json"
]
}
},
"defaultProject": "api",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"default": [
"{projectRoot}/**/*",
"sharedGlobals"
],
"sharedGlobals": [],
"production": [
"default",
Expand Down
Loading

0 comments on commit f520d6c

Please sign in to comment.