Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'

- run: npm ci
Expand All @@ -58,8 +58,7 @@ jobs:

- run: npx nx format:check

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

- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -87,9 +86,9 @@ jobs:
path: coverage

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
uses: SonarSource/sonarqube-scan-action@v4.2.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged --concurrent false --relative
5 changes: 3 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ module.exports = [
.map((config) => ({
...config,
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
ignores: ['**/node_modules/**', '**/dist/**'],
rules: {
...config.rules,
'@nx/enforce-module-boundaries': [
Expand Down Expand Up @@ -50,15 +51,15 @@ module.exports = [
})),
...compat.config({ extends: ['plugin:@nx/typescript'] }).map((config) => ({
...config,
files: ['**/*.ts', '**/*.tsx'],
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
rules: {
...config.rules,
'no-extra-semi': 'off',
},
})),
...compat.config({ extends: ['plugin:@nx/javascript'] }).map((config) => ({
...config,
files: ['**/*.js', '**/*.jsx'],
files: ['**/*.js', '**/*.jsx', '**/*.cjs', '**/*.mjs'],
rules: {
...config.rules,
'no-extra-semi': 'off',
Expand Down
11 changes: 11 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
'packages/**/*.{ts,tsx}': (files) => {
return `nx affected -t typecheck --files=${files.join(',')}`;
},
'packages/**/*.{js,ts,jsx,tsx,json}': (files) => {
return `npx nx affected -t lint --files=${files.join(',')}`;
},
'**/*.{js,ts,jsx,tsx,json}': [
(files) => `npx nx format:write --files=${files.join(',')}`,
],
};
51 changes: 0 additions & 51 deletions migrations.json

This file was deleted.

107 changes: 88 additions & 19 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"production": [
"default",
"!{workspaceRoot}/**/*.md",
"!{workspaceRoot}/sonar-project.properties",
"!{workspaceRoot}/lint-staged.config.js",
"!{workspaceRoot}/eslint.config.js",
"!{workspaceRoot}/jest.config.ts",
"!{workspaceRoot}/jest.preset.js",
"!{workspaceRoot}/.gitignore",
"!{workspaceRoot}/.prettierignore",
"!{workspaceRoot}/.prettierrc",
"!{projectRoot}/*.md",
"!{projectRoot}/test/**",
"!{projectRoot}/**/*.{spec,test}.ts",
"!{projectRoot}/node_modules/**",
"!{projectRoot}/eslint.config.js"
"!{projectRoot}/eslint.config.js",
"!{projectRoot}/jest.config.ts"
]
},
"release": {
Expand All @@ -37,18 +49,50 @@
"build": {
"cache": true,
"inputs": ["production", "^production"],
"dependsOn": ["^build"]
"outputs": ["{options.outputPath}"],
"dependsOn": ["^build"],
"options": {
"outputPath": "dist/{projectRoot}",
"tsConfig": "{projectRoot}/tsconfig.lib.json",
"packageJson": "{projectRoot}/package.json",
"main": "{projectRoot}/src/index.ts",
"assets": ["{projectRoot}/*.md"]
}
},
"lint": {
"cache": true,
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/.eslintignore",
"{workspaceRoot}/eslint.config.js",
"{projectRoot}/eslint.config.js",
{
"externalDependencies": ["eslint"]
}
],
"options": {
"args": ["**/*.ts", "**/package.json", "**/project.json"]
}
},
"@nx/jest:jest": {
"test": {
"cache": true,
"inputs": ["default", "^default", "{workspaceRoot}/jest.preset.js"],
"inputs": [
"default",
"^default",
"{workspaceRoot}/jest.preset.js",
{
"externalDependencies": ["jest"]
}
],
"options": {
"passWithNoTests": true
"passWithNoTests": true,
"coverage": true
},
"configurations": {
"ci": {
"ci": true,
"codeCoverage": true
"coverage": true
}
}
},
Expand All @@ -63,22 +107,47 @@
"params": "forward"
}
]
}
},
"plugins": [
{
"plugin": "@nx/js/typescript",
"options": {
"typecheck": {
"targetName": "typecheck"
},
"build": {
"targetName": "build",
"configName": "tsconfig.lib.json",
"buildDepsName": "build-deps",
"watchDepsName": "watch-deps"
}
}
},
"@nx/eslint:lint": {
"cache": true,
"inputs": [
"default",
"{workspaceRoot}/.eslintrc.json",
"{workspaceRoot}/.eslintignore",
"{workspaceRoot}/eslint.config.js"
]
{
"plugin": "@nx/eslint/plugin",
"options": {
"targetName": "lint"
}
},
"@nx/js:tsc": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["production", "^production"]
{
"plugin": "@nx/jest/plugin",
"options": {
"targetName": "test"
}
}
],
"sync": {
"applyChanges": true,
"globalGenerators": ["@nx/js:typescript-sync"],
"generatorOptions": {
"@nx/js:typescript-sync": {
"verbose": true
}
},
"disabledTaskSyncGenerators": []
},
"nxCloudAccessToken": "ODFiNmMyMzAtODQ1OS00NGQzLWJjYmYtNzA2MmNlMTc2NTc5fHJlYWQtd3JpdGU=",
"useInferencePlugins": false
"useInferencePlugins": true,
"useLegacyCache": false
}
Loading