Skip to content

Commit

Permalink
chore!: bump to nx 17
Browse files Browse the repository at this point in the history
  • Loading branch information
temarusanov committed Oct 28, 2023
1 parent 3b1d43d commit ccaf4c7
Show file tree
Hide file tree
Showing 20 changed files with 6,047 additions and 4,404 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,5 @@ Thumbs.db
.docusaurus/
.cache-loader/
.history

.nx/cache
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.18.0
v20.9.0
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
*.graphql
*.gql

*.md
*.md
/.nx/cache
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ Checkout documentation: https://temarusanov.github.io/dev-notes/workspace/gettin
- [ ] GraphQL format error
- [x] Disable any rule in eslint
- [ ] Add logger context
- [ ] forRootAsync() for sample modules
2 changes: 1 addition & 1 deletion apps/api-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/api-e2e/**/*.{js,ts}"]
Expand Down
20 changes: 1 addition & 19 deletions apps/api/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/api/**/*.ts"]
Expand All @@ -55,24 +55,6 @@
"jestConfig": "apps/api/jest.config.ts",
"passWithNoTests": true
}
},
"container": {
"executor": "@nx-tools/nx-container:build",
"dependsOn": ["build"],
"options": {
"engine": "docker",
"metadata": {
"images": ["nx/api"],
"load": true,
"tags": [
"type=schedule",
"type=ref,event=branch",
"type=ref,event=tag",
"type=ref,event=pr",
"type=sha,prefix=sha-"
]
}
}
}
},
"tags": []
Expand Down
20 changes: 1 addition & 19 deletions apps/gateway/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/gateway/**/*.ts"]
Expand All @@ -55,24 +55,6 @@
"jestConfig": "apps/gateway/jest.config.ts",
"passWithNoTests": true
}
},
"container": {
"executor": "@nx-tools/nx-container:build",
"dependsOn": ["build"],
"options": {
"engine": "docker",
"metadata": {
"images": ["nx/gateway"],
"load": true,
"tags": [
"type=schedule",
"type=ref,event=branch",
"type=ref,event=tag",
"type=ref,event=pr",
"type=sha,prefix=sha-"
]
}
}
}
},
"tags": []
Expand Down
4 changes: 2 additions & 2 deletions libs/external/health-checks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.1.1",
"dependencies": {
"@golevelup/nestjs-discovery": "4.0.0",
"@nestjs/common": "10.2.5",
"@nestjs/core": "10.2.5"
"@nestjs/common": "10.2.7",
"@nestjs/core": "10.2.7"
}
}
2 changes: 1 addition & 1 deletion libs/external/health-checks/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
Expand Down
2 changes: 1 addition & 1 deletion libs/external/logger/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
Expand Down
4 changes: 2 additions & 2 deletions libs/external/nats/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "1.1.1",
"dependencies": {
"@golevelup/nestjs-discovery": "4.0.0",
"@nestjs/common": "10.2.5",
"@nestjs/core": "10.2.5",
"@nestjs/common": "10.2.7",
"@nestjs/core": "10.2.7",
"@tematools/health-checks": "^2.0.0",
"lodash": "4.17.21",
"nats": "^2.16.0"
Expand Down
2 changes: 1 addition & 1 deletion libs/external/nats/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
Expand Down
8 changes: 4 additions & 4 deletions libs/external/schematics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"executors": "./executors.json",
"dependencies": {
"@actions/exec": "^1.1.1",
"@nx/devkit": "16.8.1",
"@nx/js": "16.8.1",
"typescript": "^5.1.6",
"@nx/linter": "16.8.1"
"@nx/devkit": "17.0.1",
"@nx/js": "17.0.1",
"typescript": "^5.2.2",
"@nx/eslint": "17.0.1"
}
}
2 changes: 1 addition & 1 deletion libs/external/schematics/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
},
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { extractLayoutDirectory, Tree } from '@nx/devkit'
import { getWorkspaceLayout, joinPathFragments, names } from '@nx/devkit'
import { Linter } from '@nx/eslint'
import type { LibraryGeneratorSchema as JsLibraryGeneratorSchema } from '@nx/js/src/utils/schema'
import { Linter } from '@nx/linter'

import type { LibraryGeneratorOptions, NormalizedOptions } from '../schema'

Expand All @@ -13,7 +13,7 @@ export function normalizeOptions(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
options.directory!,
)
const { libsDir: defaultLibsDir, npmScope } = getWorkspaceLayout(tree)
const { libsDir: defaultLibsDir } = getWorkspaceLayout(tree)
const libsDir = layoutDirectory ?? defaultLibsDir
const name = names(options.name).fileName
const fullProjectDirectory = projectDirectory
Expand All @@ -35,7 +35,7 @@ export function normalizeOptions(
global: options.global ?? false,
linter: options.linter ?? Linter.EsLint,
parsedTags,
prefix: npmScope, // we could also allow customizing this
prefix: '', // we could also allow customizing this
projectDirectory: fullProjectDirectory,
projectName,
projectRoot,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Linter } from '@nx/linter'
import { Linter } from '@nx/eslint'

import { UnitTestRunner } from '../utils/types'

Expand Down
2 changes: 1 addition & 1 deletion libs/sample/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "library",
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["libs/sample/**/*.ts"]
Expand Down
34 changes: 13 additions & 21 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"tasksRunnerOptions": {
"default": {
"runner": "nx-cloud",
"options": {
"cacheableOperations": [
"build",
"lint",
"test",
"e2e",
"prisma:generate",
"container"
],
"accessToken": "OWQ4ZDdhNjYtOTIwMi00MTU3LTkxZGEtMjY2ZDhlMTZiMGQxfHJlYWQtd3JpdGU="
}
}
},
"targetDefaults": {
"build": {
"dependsOn": ["^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": {
"dependsOn": ["^prisma:generate"],
"inputs": ["default", "{workspaceRoot}/eslint.config.js"]
"inputs": ["default", "{workspaceRoot}/eslint.config.js"],
"cache": true
},
"prisma:generate": {
"inputs": ["{projectRoot}/**/schema.prisma"]
"inputs": ["{projectRoot}/**/schema.prisma"],
"cache": true
},
"e2e": {
"cache": true
}
},
"namedInputs": {
Expand All @@ -45,5 +36,6 @@
],
"sharedGlobals": []
},
"defaultProject": "api"
"defaultProject": "api",
"nxCloudAccessToken": "OWQ4ZDdhNjYtOTIwMi00MTU3LTkxZGEtMjY2ZDhlMTZiMGQxfHJlYWQtd3JpdGU="
}
Loading

0 comments on commit ccaf4c7

Please sign in to comment.