Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump nx #726

Merged
merged 1 commit into from
Oct 30, 2024
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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

57 changes: 0 additions & 57 deletions .eslintrc.json

This file was deleted.

71 changes: 71 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
const { FlatCompat } = require('@eslint/eslintrc')
const js = require('@eslint/js')
const nxEslintPlugin = require('@nx/eslint-plugin')
const eslintPluginImport = require('eslint-plugin-import')

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
})

module.exports = [
{
plugins: {
'@nx': nxEslintPlugin,
import: eslintPluginImport,
},
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: {
'@nx/enforce-module-boundaries': [
'error',
{
enforceBuildableLibDependency: true,
allow: [],
depConstraints: [
{
sourceTag: '*',
onlyDependOnLibsWithTags: ['*'],
},
],
},
],
},
},
...compat.config({ extends: ['plugin:@nx/typescript', 'plugin:import/typescript'] }).map((config) => ({
...config,
files: ['**/*.ts', '**/*.tsx'],
rules: {
...config.rules,
'no-multiple-empty-lines': 'error',
'no-else-return': 'error',
'no-unneeded-ternary': 'error',
'no-return-await': 'error',
'no-trailing-spaces': 'error',
'prefer-const': 'error',
'template-curly-spacing': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']],
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
'newlines-between': 'always',
},
],
'no-extra-semi': 'error',
},
})),
...compat.config({ extends: ['plugin:@nx/javascript'] }).map((config) => ({
...config,
files: ['**/*.js', '**/*.jsx'],
rules: {
...config.rules,
'no-extra-semi': 'error',
},
})),
{ ignores: ['**/dist', '**/node_modules', 'node_modules/'] },
]
8 changes: 4 additions & 4 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getJestProjects } from '@nx/jest'
import { getJestProjectsAsync } from '@nx/jest'

export default {
projects: getJestProjects(),
}
export default async () => ({
projects: await getJestProjectsAsync(),
});
68 changes: 14 additions & 54 deletions migrations.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,27 @@
{
"migrations": [
{
"cli": "nx",
"version": "17.3.0-beta.6",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-17-3-0/update-nxw",
"version": "20.0.0-beta.7",
"description": "Migration for v20.0.0-beta.7",
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process",
"package": "nx",
"name": "17.3.0-update-nx-wrapper"
"name": "move-use-daemon-process"
},
{
"cli": "nx",
"version": "18.0.0-beta.2",
"description": "Updates nx.json to disabled adding plugins when generating projects in an existing Nx workspace",
"implementation": "./src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces",
"version": "20.0.1",
"description": "Set `useLegacyCache` to true for migrating workspaces",
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
"x-repair-skip": true,
"package": "nx",
"name": "18.0.0-disable-adding-plugins-for-existing-workspaces"
},
{
"version": "18.1.0-beta.3",
"description": "Moves affected.defaultBase to defaultBase in `nx.json`",
"implementation": "./src/migrations/update-17-2-0/move-default-base",
"package": "nx",
"name": "move-default-base-to-nx-json-root"
"name": "use-legacy-cache"
},
{
"cli": "nx",
"version": "19.2.0-beta.2",
"description": "Updates the default workspace data directory to .nx/workspace-data",
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
"package": "nx",
"name": "19-2-0-move-graph-cache-directory"
},
{
"cli": "nx",
"version": "19.2.2-beta.0",
"description": "Updates the nx wrapper.",
"implementation": "./src/migrations/update-17-3-0/update-nxw",
"package": "nx",
"name": "19-2-2-update-nx-wrapper"
},
{
"version": "19.2.4-beta.0",
"description": "Set project name in nx.json explicitly",
"implementation": "./src/migrations/update-19-2-4/set-project-name",
"x-repair-skip": true,
"package": "nx",
"name": "19-2-4-set-project-name"
},
{
"cli": "nx",
"version": "19.1.0-beta.6",
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
"package": "@nx/eslint-plugin",
"name": "update-19-1-0-rename-no-extra-semi"
},
{
"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"
"version": "20.0.0-beta.5",
"description": "replace getJestProjects with getJestProjectsAsync",
"implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync",
"package": "@nx/jest",
"name": "replace-getJestProjects-with-getJestProjectsAsync"
}
]
}
}
5 changes: 3 additions & 2 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
},
"@nx/eslint:lint": {
"inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
"inputs": ["default", "{workspaceRoot}/.eslintrc.json", "{workspaceRoot}/eslint.config.js"],
"cache": true
}
},
Expand All @@ -37,7 +37,8 @@
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/src/test-setup.[jt]s"
"!{projectRoot}/src/test-setup.[jt]s",
"!{projectRoot}/eslint.config.js"
]
},
"nxCloudAccessToken": "ZjVhZDI4NDktYjgwOC00ZjI5LWI3ZmItNDRjY2M5YTlmNWQ3fHJlYWQtd3JpdGU=",
Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
},
"dependencies": {
"ioredis": "^5.4.1",
"mongodb": "^6.8.0"
"mongodb": "^6.10.0"
},
"devDependencies": {
"@changesets/cli": "2.27.9",
"@nx/eslint": "19.4.0",
"@nx/eslint-plugin": "19.4.0",
"@nx/jest": "19.4.0",
"@nx/js": "19.4.0",
"@nx/workspace": "19.4.0",
"@svitejs/changesets-changelog-github-compact": "1.1.0",
"@eslint/eslintrc": "^3.1.0",
"@nx/eslint": "20.0.6",
"@nx/eslint-plugin": "20.0.6",
"@nx/jest": "20.0.6",
"@nx/js": "20.0.6",
"@nx/workspace": "20.0.6",
"@svitejs/changesets-changelog-github-compact": "1.2.0",
"@swc/cli": "0.5.0",
"@swc/core": "1.7.40",
"@swc/jest": "0.2.37",
Expand All @@ -27,15 +28,16 @@
"@typescript-eslint/eslint-plugin": "8.12.2",
"@typescript-eslint/parser": "8.12.2",
"cache-manager": "5.7.6",
"eslint": "8.57.1",
"eslint": "9.13.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-import": "2.31.0",
"jest": "29.7.0",
"nx": "19.4.0",
"nx": "20.0.6",
"prettier": "3.3.3",
"ts-node": "10.9.2",
"tsup": "8.3.5",
"typescript": "5.6.2",
"typescript": "5.6.3",
"typescript-eslint": "^8.0.0",
"zx": "8.1.9"
}
}
20 changes: 0 additions & 20 deletions packages/node-cache-manager-ioredis/.eslintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions packages/node-cache-manager-ioredis/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const baseConfig = require('../../eslint.config.js')

module.exports = [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: { '@typescript-eslint/no-explicit-any': 0 },
},
{
files: ['**/*.ts', '**/*.tsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
]
20 changes: 0 additions & 20 deletions packages/node-cache-manager-mongodb/.eslintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions packages/node-cache-manager-mongodb/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const baseConfig = require('../../eslint.config.js')

module.exports = [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
rules: { '@typescript-eslint/no-explicit-any': 0 },
},
{
files: ['**/*.ts', '**/*.tsx'],
// Override or add rules here
rules: {},
},
{
files: ['**/*.js', '**/*.jsx'],
// Override or add rules here
rules: {},
},
]
2 changes: 1 addition & 1 deletion packages/node-cache-manager-mongodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"provenance": true
},
"dependencies": {
"mongodb": "^6.8.0"
"mongodb": "^6.10.0"
}
}
Loading