Skip to content

Commit

Permalink
chore: upgrade nx to v17
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcdo29 committed Aug 20, 2024
1 parent 807cf87 commit de26121
Show file tree
Hide file tree
Showing 10 changed files with 5,929 additions and 4,693 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ testem.log
Thumbs.db

.env

.nx/cache
22 changes: 22 additions & 0 deletions .nx/workspace-data/d/daemon.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[NX Daemon Server] - 2024-08-20T16:50:48.999Z - Started listening on: /tmp/76fbdef4d19d6acefd72/d.sock
[NX Daemon Server] - 2024-08-20T16:50:49.000Z - [WATCHER]: Subscribed to changes within: /home/jay/Documents/code/projects/nest-lab (native)
[NX Daemon Server] - 2024-08-20T16:50:49.008Z - Established a connection. Number of open connections: 1
[NX Daemon Server] - 2024-08-20T16:50:49.008Z - Established a connection. Number of open connections: 2
[NX Daemon Server] - 2024-08-20T16:50:49.009Z - Closed a connection. Number of open connections: 1
[NX Daemon Server] - 2024-08-20T16:50:49.009Z - [REQUEST]: Responding to the client. Shutdown initiated
[NX Daemon Server] - 2024-08-20T16:50:49.010Z - Done responding to the client Shutdown initiated
[NX Daemon Server] - 2024-08-20T16:50:49.010Z - Handled FORCE_SHUTDOWN. Handling time: 0. Response time: 1.
[NX Daemon Server] - 2024-08-20T16:50:49.010Z - Closed a connection. Number of open connections: 0
[NX Daemon Server] - 2024-08-20T16:50:49.010Z - [WATCHER]: Stopping the watcher for /home/jay/Documents/code/projects/nest-lab (sources)
[NX Daemon Server] - 2024-08-20T16:50:49.010Z - [WATCHER]: Stopping the watcher for /home/jay/Documents/code/projects/nest-lab (outputs)
[NX Daemon Server] - 2024-08-20T16:51:48.546Z - Started listening on: /tmp/76fbdef4d19d6acefd72/d.sock
[NX Daemon Server] - 2024-08-20T16:51:48.548Z - [WATCHER]: Subscribed to changes within: /home/jay/Documents/code/projects/nest-lab (native)
[NX Daemon Server] - 2024-08-20T16:51:48.552Z - Established a connection. Number of open connections: 1
[NX Daemon Server] - 2024-08-20T16:51:48.553Z - Established a connection. Number of open connections: 2
[NX Daemon Server] - 2024-08-20T16:51:48.554Z - Closed a connection. Number of open connections: 1
[NX Daemon Server] - 2024-08-20T16:51:48.554Z - [REQUEST]: Responding to the client. Shutdown initiated
[NX Daemon Server] - 2024-08-20T16:51:48.555Z - Done responding to the client Shutdown initiated
[NX Daemon Server] - 2024-08-20T16:51:48.555Z - Handled FORCE_SHUTDOWN. Handling time: 0. Response time: 1.
[NX Daemon Server] - 2024-08-20T16:51:48.555Z - Closed a connection. Number of open connections: 0
[NX Daemon Server] - 2024-08-20T16:51:48.555Z - [WATCHER]: Stopping the watcher for /home/jay/Documents/code/projects/nest-lab (sources)
[NX Daemon Server] - 2024-08-20T16:51:48.555Z - [WATCHER]: Stopping the watcher for /home/jay/Documents/code/projects/nest-lab (outputs)
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@

/dist
/coverage

/.nx/cache
133 changes: 133 additions & 0 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"migrations": [
{
"cli": "nx",
"version": "16.6.0-beta.6",
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
"package": "nx",
"name": "16.6.0-prefix-outputs"
},
{
"cli": "nx",
"version": "16.8.0-beta.3",
"description": "Escape $ in env variables",
"implementation": "./src/migrations/update-16-8-0/escape-dollar-sign-env-variables",
"package": "nx",
"name": "16.8.0-escape-dollar-sign-env"
},
{
"cli": "nx",
"version": "17.0.0-beta.1",
"description": "Updates the default cache directory to .nx/cache",
"implementation": "./src/migrations/update-17-0-0/move-cache-directory",
"package": "nx",
"name": "17.0.0-move-cache-directory"
},
{
"cli": "nx",
"version": "17.0.0-beta.3",
"description": "Use minimal config for tasksRunnerOptions",
"implementation": "./src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options",
"package": "nx",
"name": "17.0.0-use-minimal-config-for-tasks-runner-options"
},
{
"version": "17.0.0-rc.1",
"description": "Migration for v17.0.0-rc.1",
"implementation": "./src/migrations/update-17-0-0/rm-default-collection-npm-scope",
"package": "nx",
"name": "rm-default-collection-npm-scope"
},
{
"cli": "nx",
"version": "17.3.0-beta.6",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-17-3-0/update-nxw",
"package": "nx",
"name": "17.3.0-update-nx-wrapper"
},
{
"cli": "nx",
"version": "16.6.0-beta.0",
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
"package": "@nx/js",
"name": "explicitly-set-projects-to-update-buildable-deps"
},
{
"cli": "nx",
"version": "16.8.2-beta.0",
"description": "Remove invalid options (strict, noInterop) for ES6 type modules.",
"factory": "./src/migrations/update-16-8-2/update-swcrc",
"package": "@nx/js",
"name": "16-8-2-update-swcrc"
},
{
"cli": "nx",
"version": "17.0.2",
"description": "Remove deprecated build options",
"implementation": "./src/migrations/update-17-0-0/remove-deprecated-build-options",
"package": "@nx/js",
"name": "update-17-0-0-remove-deprecated-build-options"
},
{
"cli": "nx",
"version": "17-2-6-beta.1",
"description": "Rename workspace rules from @nx/workspace/name to @nx/workspace-name",
"implementation": "./src/migrations/update-17-2-6-rename-workspace-rules/rename-workspace-rules",
"package": "@nx/eslint-plugin",
"name": "update-17-2-6-rename-workspace-rules"
},
{
"version": "16.8.0",
"description": "update-16-8-0-add-ignored-files",
"implementation": "./src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files",
"package": "@nx/eslint",
"name": "update-16-8-0-add-ignored-files"
},
{
"version": "17.0.0-beta.7",
"description": "update-17-0-0-rename-to-eslint",
"implementation": "./src/migrations/update-17-0-0-rename-to-eslint/update-17-0-0-rename-to-eslint",
"package": "@nx/eslint",
"name": "update-17-0-0-rename-to-eslint"
},
{
"version": "17.1.0-beta.1",
"description": "Updates for @typescript-utils/utils v6.9.1+",
"implementation": "./src/migrations/update-17-1-0/update-typescript-eslint",
"package": "@nx/eslint",
"name": "update-typescript-eslint"
},
{
"version": "17.2.0-beta.0",
"description": "Simplify eslintFilePatterns",
"implementation": "./src/migrations/update-17-2-0/simplify-eslint-patterns",
"package": "@nx/eslint",
"name": "simplify-eslint-patterns"
},
{
"version": "17.2.9",
"description": "Move executor options to target defaults",
"implementation": "./src/migrations/update-17-2-9/move-options-to-target-defaults",
"package": "@nx/eslint",
"name": "move-options-to-target-defaults"
},
{
"cli": "nx",
"version": "16.5.0-beta.2",
"description": "Add test-setup.ts to ignored files in production input",
"implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore",
"package": "@nx/jest",
"name": "add-test-setup-to-inputs-ignore"
},
{
"version": "17.1.0-beta.2",
"description": "Move jest executor options to nx.json targetDefaults",
"implementation": "./src/migrations/update-17-1-0/move-options-to-target-defaults",
"package": "@nx/jest",
"name": "move-options-to-target-defaults"
}
]
}
39 changes: 25 additions & 14 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"npmScope": "nest-lab",
"affected": {
"defaultBase": "main"
},
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"accessToken": "",
"canTrackAnalytics": false,
"showUsageWarnings": true
}
Expand All @@ -26,9 +22,6 @@
"appsDir": "apps",
"libsDir": "packages"
},
"cli": {
"defaultCollection": "@nx/workspace"
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [],
Expand All @@ -37,18 +30,36 @@
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s"
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/src/test-setup.[jt]s"
]
},
"targetDefaults": {
"build": {
"inputs": ["production", "^production"]
},
"lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"]
"inputs": ["production", "^production"],
"cache": true
},
"test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"]
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true
},
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"cache": true
},
"@nx/jest:jest": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true,
"options": {
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
}
}
}
},
"nxCloudAccessToken": ""
}
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,33 @@
"@nestjs/platform-fastify": "10.0.3",
"@nestjs/schematics": "10.0.1",
"@nestjs/testing": "10.0.3",
"@nrwl/tao": "16.4.0",
"@nx/eslint-plugin": "16.4.0",
"@nx/jest": "16.4.0",
"@nx/js": "16.4.0",
"@nx/linter": "16.4.0",
"@nx/nest": "16.4.0",
"@nx/workspace": "16.4.0",
"@nrwl/tao": "17.3.2",
"@nx/eslint-plugin": "17.3.2",
"@nx/jest": "17.3.2",
"@nx/js": "17.3.2",
"@nx/nest": "17.3.2",
"@nx/workspace": "17.3.2",
"@sinclair/typebox": "^0.31.14",
"@swc/core": "^1.2.218",
"@swc/core": "1.3.99",
"@swc/register": "^0.1.10",
"@types/jest": "29.4.4",
"@types/node": "18.7.1",
"@types/node": "18.19.9",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "5.60.1",
"@typescript-eslint/parser": "5.60.1",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"ajv": "^8.12.0",
"arktype": "1.0.21-alpha",
"dotenv": "8.2.0",
"eslint": "8.20.0",
"eslint-config-prettier": "8.1.0",
"eslint": "8.48.0",
"eslint-config-prettier": "9.1.0",
"fastify": "^4.18.0",
"fastify-multer": "^2.0.3",
"io-ts": "^2.2.20",
"jest": "29.4.3",
"jest-environment-jsdom": "28.1.3",
"jest-environment-node": "^29.4.1",
"joi": "^17.10.1",
"nx": "16.4.0",
"nx-cloud": "16.5.2",
"nx": "17.3.2",
"ow": "^0.28.2",
"pactum": "^3.1.13",
"prettier": "^2.7.1",
Expand All @@ -75,9 +73,10 @@
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"tslib": "^2.4.0",
"typescript": "5.1.5",
"typescript": "5.3.3",
"valibot": "^0.15.0",
"yup": "^1.2.0",
"zod": "^3.22.2"
"zod": "^3.22.2",
"@nx/eslint": "17.3.2"
}
}
7 changes: 2 additions & 5 deletions packages/fastify-multer/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@
]
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/fastify-multer/**/*.ts"]
}
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "nx:run-commands",
Expand Down
11 changes: 4 additions & 7 deletions packages/or-guard/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
"projectType": "library",
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
"options": {
"lintFilePatterns": ["packages/or-guard/**/*.ts"]
}
"executor": "@nx/eslint:lint"
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/packages/or-guard"],
"options": {
"jestConfig": "packages/or-guard/jest.config.ts",
"passWithNoTests": true
"jestConfig": "packages/or-guard/jest.config.ts"
}
},
"build": {
Expand All @@ -26,7 +22,8 @@
"tsConfig": "packages/or-guard/tsconfig.lib.json",
"packageJson": "packages/or-guard/package.json",
"main": "packages/or-guard/src/index.ts",
"assets": ["packages/or-guard/*.md"]
"assets": ["packages/or-guard/*.md"],
"updateBuildableProjectDepsInPackageJson": true
}
},
"publish": {
Expand Down
16 changes: 3 additions & 13 deletions packages/typeschema/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,14 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/typeschema/**/*.ts"]
}
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "packages/typeschema/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
}
"jestConfig": "packages/typeschema/jest.config.ts"
}
},
"publish": {
Expand Down
Loading

0 comments on commit de26121

Please sign in to comment.