Skip to content

Commit 6105fc6

Browse files
authored
Merge pull request #114 from getlarge/112-chore-add-support-for-nestjs-v11
chore: add support for nestjs v11
2 parents 63cb8de + 1a79a20 commit 6105fc6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3441
-1853
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- uses: actions/setup-node@v4
4444
with:
45-
node-version: 20
45+
node-version: 22
4646
cache: 'npm'
4747

4848
- run: npm ci
@@ -58,8 +58,7 @@ jobs:
5858

5959
- run: npx nx format:check
6060

61-
# requires kratos and keto to be running
62-
- run: npx nx affected -t lint,test,build --parallel=3
61+
- run: npx nx affected -t lint,typecheck,test,build --parallel=2
6362

6463
- uses: actions/upload-artifact@v4
6564
with:
@@ -87,9 +86,9 @@ jobs:
8786
path: coverage
8887

8988
- name: SonarCloud Scan
90-
uses: SonarSource/sonarcloud-github-action@master
89+
uses: SonarSource/sonarqube-scan-action@v4.2.1
9190
env:
92-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
SONAR_HOST_URL: https://sonarcloud.io
9392
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
9493
with:
9594
args: >

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged --concurrent false --relative

eslint.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = [
1414
.map((config) => ({
1515
...config,
1616
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
17+
ignores: ['**/node_modules/**', '**/dist/**'],
1718
rules: {
1819
...config.rules,
1920
'@nx/enforce-module-boundaries': [
@@ -50,15 +51,15 @@ module.exports = [
5051
})),
5152
...compat.config({ extends: ['plugin:@nx/typescript'] }).map((config) => ({
5253
...config,
53-
files: ['**/*.ts', '**/*.tsx'],
54+
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
5455
rules: {
5556
...config.rules,
5657
'no-extra-semi': 'off',
5758
},
5859
})),
5960
...compat.config({ extends: ['plugin:@nx/javascript'] }).map((config) => ({
6061
...config,
61-
files: ['**/*.js', '**/*.jsx'],
62+
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
6263
rules: {
6364
...config.rules,
6465
'no-extra-semi': 'off',

lint-staged.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
'packages/**/*.{ts,tsx}': (files) => {
3+
return `nx affected -t typecheck --files=${files.join(',')}`;
4+
},
5+
'packages/**/*.{js,ts,jsx,tsx,json}': (files) => {
6+
return `npx nx affected -t lint --files=${files.join(',')}`;
7+
},
8+
'**/*.{js,ts,jsx,tsx,json}': [
9+
(files) => `npx nx format:write --files=${files.join(',')}`,
10+
],
11+
};

migrations.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

nx.json

Lines changed: 88 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,22 @@
88
"$schema": "./node_modules/nx/schemas/nx-schema.json",
99
"namedInputs": {
1010
"production": [
11+
"default",
12+
"!{workspaceRoot}/**/*.md",
13+
"!{workspaceRoot}/sonar-project.properties",
14+
"!{workspaceRoot}/lint-staged.config.js",
15+
"!{workspaceRoot}/eslint.config.js",
16+
"!{workspaceRoot}/jest.config.ts",
17+
"!{workspaceRoot}/jest.preset.js",
18+
"!{workspaceRoot}/.gitignore",
19+
"!{workspaceRoot}/.prettierignore",
20+
"!{workspaceRoot}/.prettierrc",
21+
"!{projectRoot}/*.md",
1122
"!{projectRoot}/test/**",
1223
"!{projectRoot}/**/*.{spec,test}.ts",
1324
"!{projectRoot}/node_modules/**",
14-
"!{projectRoot}/eslint.config.js"
25+
"!{projectRoot}/eslint.config.js",
26+
"!{projectRoot}/jest.config.ts"
1527
]
1628
},
1729
"release": {
@@ -37,18 +49,50 @@
3749
"build": {
3850
"cache": true,
3951
"inputs": ["production", "^production"],
40-
"dependsOn": ["^build"]
52+
"outputs": ["{options.outputPath}"],
53+
"dependsOn": ["^build"],
54+
"options": {
55+
"outputPath": "dist/{projectRoot}",
56+
"tsConfig": "{projectRoot}/tsconfig.lib.json",
57+
"packageJson": "{projectRoot}/package.json",
58+
"main": "{projectRoot}/src/index.ts",
59+
"assets": ["{projectRoot}/*.md"]
60+
}
61+
},
62+
"lint": {
63+
"cache": true,
64+
"inputs": [
65+
"default",
66+
"{workspaceRoot}/.eslintrc.json",
67+
"{workspaceRoot}/.eslintignore",
68+
"{workspaceRoot}/eslint.config.js",
69+
"{projectRoot}/eslint.config.js",
70+
{
71+
"externalDependencies": ["eslint"]
72+
}
73+
],
74+
"options": {
75+
"args": ["**/*.ts", "**/package.json", "**/project.json"]
76+
}
4177
},
42-
"@nx/jest:jest": {
78+
"test": {
4379
"cache": true,
44-
"inputs": ["default", "^default", "{workspaceRoot}/jest.preset.js"],
80+
"inputs": [
81+
"default",
82+
"^default",
83+
"{workspaceRoot}/jest.preset.js",
84+
{
85+
"externalDependencies": ["jest"]
86+
}
87+
],
4588
"options": {
46-
"passWithNoTests": true
89+
"passWithNoTests": true,
90+
"coverage": true
4791
},
4892
"configurations": {
4993
"ci": {
5094
"ci": true,
51-
"codeCoverage": true
95+
"coverage": true
5296
}
5397
}
5498
},
@@ -63,22 +107,47 @@
63107
"params": "forward"
64108
}
65109
]
110+
}
111+
},
112+
"plugins": [
113+
{
114+
"plugin": "@nx/js/typescript",
115+
"options": {
116+
"typecheck": {
117+
"targetName": "typecheck"
118+
},
119+
"build": {
120+
"targetName": "build",
121+
"configName": "tsconfig.lib.json",
122+
"buildDepsName": "build-deps",
123+
"watchDepsName": "watch-deps"
124+
}
125+
}
66126
},
67-
"@nx/eslint:lint": {
68-
"cache": true,
69-
"inputs": [
70-
"default",
71-
"{workspaceRoot}/.eslintrc.json",
72-
"{workspaceRoot}/.eslintignore",
73-
"{workspaceRoot}/eslint.config.js"
74-
]
127+
{
128+
"plugin": "@nx/eslint/plugin",
129+
"options": {
130+
"targetName": "lint"
131+
}
75132
},
76-
"@nx/js:tsc": {
77-
"cache": true,
78-
"dependsOn": ["^build"],
79-
"inputs": ["production", "^production"]
133+
{
134+
"plugin": "@nx/jest/plugin",
135+
"options": {
136+
"targetName": "test"
137+
}
80138
}
139+
],
140+
"sync": {
141+
"applyChanges": true,
142+
"globalGenerators": ["@nx/js:typescript-sync"],
143+
"generatorOptions": {
144+
"@nx/js:typescript-sync": {
145+
"verbose": true
146+
}
147+
},
148+
"disabledTaskSyncGenerators": []
81149
},
82150
"nxCloudAccessToken": "ODFiNmMyMzAtODQ1OS00NGQzLWJjYmYtNzA2MmNlMTc2NTc5fHJlYWQtd3JpdGU=",
83-
"useInferencePlugins": false
151+
"useInferencePlugins": true,
152+
"useLegacyCache": false
84153
}

0 commit comments

Comments
 (0)