Skip to content

Commit 30b4d91

Browse files
committed
NX Upgrade from 15 to 16.
1 parent 1db8dde commit 30b4d91

16 files changed

+1960
-1307
lines changed

Diff for: .eslintrc.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"root": true,
33
"ignorePatterns": ["**/*"],
4-
"plugins": ["@nrwl/nx"],
4+
"plugins": ["@nx"],
55
"overrides": [
66
{
77
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
88
"extends": ["plugin:prettier/recommended"],
99
"plugins": ["prettier"],
1010
"rules": {
1111
"@typescript-eslint/no-empty-function": "off",
12-
"@nrwl/nx/enforce-module-boundaries": [
12+
"@nx/enforce-module-boundaries": [
1313
"error",
1414
{
1515
"enforceBuildableLibDependency": true,
@@ -26,14 +26,14 @@
2626
},
2727
{
2828
"files": ["*.ts", "*.tsx"],
29-
"extends": ["plugin:@nrwl/nx/typescript"],
29+
"extends": ["plugin:@nx/typescript"],
3030
"rules": {
3131
"@typescript-eslint/no-explicit-any": "error"
3232
}
3333
},
3434
{
3535
"files": ["*.js", "*.jsx"],
36-
"extends": ["plugin:@nrwl/nx/javascript"],
36+
"extends": ["plugin:@nx/javascript"],
3737
"rules": {}
3838
}
3939
]

Diff for: apps/example-app/.babelrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"presets": [
33
[
4-
"@nrwl/react/babel",
4+
"@nx/react/babel",
55
{
66
"runtime": "automatic"
77
}

Diff for: apps/example-app/jest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export default {
33
preset: "../../jest.preset.js",
44
transform: {
5-
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nrwl/react/plugins/jest",
5+
"^(?!.*\\.(js|jsx|ts|tsx|css|json)$)": "@nx/react/plugins/jest",
66
"^.+\\.[tj]sx?$": ["ts-jest", { tsconfig: "<rootDir>/tsconfig.spec.json" }]
77
},
88
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "html"],

Diff for: apps/example-app/project.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"projectType": "application",
66
"targets": {
77
"build": {
8-
"executor": "@nrwl/webpack:webpack",
8+
"executor": "@nx/webpack:webpack",
99
"outputs": ["{options.outputPath}"],
1010
"defaultConfiguration": "production",
1111
"options": {
@@ -49,7 +49,7 @@
4949
}
5050
},
5151
"serve": {
52-
"executor": "@nrwl/webpack:dev-server",
52+
"executor": "@nx/webpack:dev-server",
5353
"defaultConfiguration": "development",
5454
"options": {
5555
"buildTarget": "example-app:build",
@@ -66,14 +66,14 @@
6666
}
6767
},
6868
"lint": {
69-
"executor": "@nrwl/linter:eslint",
69+
"executor": "@nx/linter:eslint",
7070
"outputs": ["{options.outputFile}"],
7171
"options": {
7272
"lintFilePatterns": ["apps/example-app/**/*.{ts,tsx,js,jsx}"]
7373
}
7474
},
7575
"test": {
76-
"executor": "@nrwl/jest:jest",
76+
"executor": "@nx/jest:jest",
7777
"outputs": ["{workspaceRoot}/coverage/apps/example-app"],
7878
"options": {
7979
"jestConfig": "apps/example-app/jest.config.ts",

Diff for: apps/example-app/tsconfig.app.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../../dist/out-tsc",
5-
"types": ["node"]
5+
"types": [
6+
"node",
7+
"@nx/react/typings/cssmodule.d.ts",
8+
"@nx/react/typings/image.d.ts"
9+
]
610
},
711
"exclude": [
812
"**/*.spec.ts",
@@ -13,7 +17,7 @@
1317
],
1418
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
1519
"files": [
16-
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
17-
"../../node_modules/@nrwl/react/typings/image.d.ts"
20+
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
21+
"../../node_modules/@nx/react/typings/image.d.ts"
1822
]
1923
}

Diff for: apps/example-app/tsconfig.spec.json

+8-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
"compilerOptions": {
44
"outDir": "../../dist/out-tsc",
55
"module": "commonjs",
6-
"types": ["jest", "node"]
6+
"types": [
7+
"jest",
8+
"node",
9+
"@nx/react/typings/cssmodule.d.ts",
10+
"@nx/react/typings/image.d.ts"
11+
]
712
},
813
"include": [
914
"**/*.spec.ts",
@@ -18,7 +23,7 @@
1823
"jest.config.ts"
1924
],
2025
"files": [
21-
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",
22-
"../../node_modules/@nrwl/react/typings/image.d.ts"
26+
"../../node_modules/@nx/react/typings/cssmodule.d.ts",
27+
"../../node_modules/@nx/react/typings/image.d.ts"
2328
]
2429
}

Diff for: apps/example-app/webpack.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const { composePlugins, withNx } = require("@nrwl/webpack");
2-
const { withReact } = require("@nrwl/react");
1+
const { composePlugins, withNx } = require("@nx/webpack");
2+
const { withReact } = require("@nx/react");
33

44
// Nx plugins for webpack.
55
module.exports = composePlugins(

Diff for: jest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
const { getJestProjects } = require("@nrwl/jest");
1+
const { getJestProjects } = require("@nx/jest");
22

33
export default { projects: getJestProjects() };

Diff for: jest.preset.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const nxPreset = require("@nrwl/jest/preset").default;
1+
const nxPreset = require("@nx/jest/preset").default;
22
module.exports = {
33
...nxPreset,
44
testMatch: ["**/+(*.)+(spec|test).+(ts|js)?(x)"],
55
transform: {
66
"^.+\\.(ts|js|html)$": "ts-jest"
77
},
8-
resolver: "@nrwl/jest/plugins/resolver",
8+
resolver: "@nx/jest/plugins/resolver",
99
moduleFileExtensions: ["ts", "js", "html"],
1010
coverageReporters: ["html"],
1111
/* TODO: Update to latest Jest snapshotFormat

Diff for: libs/reshape-state/.babelrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"presets": [
3-
"@nrwl/js/babel"
4-
]
2+
"presets": ["@nx/js/babel"]
53
}

Diff for: libs/reshape-state/project.json

+7-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"projectType": "library",
66
"targets": {
77
"build": {
8-
"executor": "@nrwl/rollup:rollup",
8+
"executor": "@nx/rollup:rollup",
99
"options": {
1010
"assets": [
1111
{
@@ -19,19 +19,21 @@
1919
"output": "."
2020
}
2121
],
22-
"babelConfig": "@nrwl/react/plugins/bundle-babel",
22+
"babelConfig": "@nx/react/plugins/bundle-babel",
2323
"buildableProjectDepsInPackageJsonType": "dependencies",
2424
"entryFile": "libs/reshape-state/src/index.ts",
2525
"format": ["esm"],
2626
"outputPath": "dist/libs/reshape-state",
2727
"project": "libs/reshape-state/package.json",
2828
"rollupConfig": "libs/reshape-state/rollup.config.js",
29-
"tsConfig": "libs/reshape-state/tsconfig.lib.json"
29+
"tsConfig": "libs/reshape-state/tsconfig.lib.json",
30+
"babelUpwardRootMode": true,
31+
"updateBuildableProjectDepsInPackageJson": true
3032
},
3133
"outputs": ["{options.outputPath}"]
3234
},
3335
"test": {
34-
"executor": "@nrwl/jest:jest",
36+
"executor": "@nx/jest:jest",
3537
"options": {
3638
"jestConfig": "libs/reshape-state/jest.config.ts",
3739
"passWithNoTests": true,
@@ -40,7 +42,7 @@
4042
"outputs": ["{workspaceRoot}/coverage/libs/reshape-state"]
4143
},
4244
"lint": {
43-
"executor": "@nrwl/linter:eslint",
45+
"executor": "@nx/linter:eslint",
4446
"options": {
4547
"lintFilePatterns": [
4648
"libs/reshape-state/**/*.js",

Diff for: libs/reshape-state/rollup.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const nrwlConfig = require("@nrwl/react/plugins/bundle-rollup");
1+
const nrwlConfig = require("@nx/react/plugins/bundle-rollup");
22

33
module.exports = config => {
44
console.log("Rollup[libs/reshape-state/rollup.config.js]: enter.");

Diff for: nx.json

+26-25
Original file line numberDiff line numberDiff line change
@@ -14,63 +14,63 @@
1414
},
1515
"defaultProject": "reshape-state",
1616
"generators": {
17-
"@nrwl/workspace": {
18-
"library": {
19-
"linter": "eslint"
20-
}
21-
},
22-
"@nrwl/cypress": {
23-
"cypress-project": {
17+
"@nrwl/next": {
18+
"application": {
2419
"linter": "eslint"
2520
}
2621
},
27-
"@nrwl/react": {
22+
"@nrwl/node": {
2823
"application": {
29-
"style": "css",
30-
"linter": "eslint",
31-
"babel": true
32-
},
33-
"component": {
34-
"style": "css"
24+
"linter": "eslint"
3525
},
3626
"library": {
37-
"style": "css",
3827
"linter": "eslint"
3928
}
4029
},
41-
"@nrwl/next": {
42-
"application": {
30+
"@nrwl/nx-plugin": {
31+
"plugin": {
4332
"linter": "eslint"
4433
}
4534
},
46-
"@nrwl/web": {
35+
"@nrwl/nest": {
4736
"application": {
4837
"linter": "eslint"
4938
}
5039
},
51-
"@nrwl/node": {
40+
"@nrwl/express": {
5241
"application": {
5342
"linter": "eslint"
5443
},
5544
"library": {
5645
"linter": "eslint"
5746
}
5847
},
59-
"@nrwl/nx-plugin": {
60-
"plugin": {
48+
"@nx/workspace": {
49+
"library": {
6150
"linter": "eslint"
6251
}
6352
},
64-
"@nrwl/nest": {
65-
"application": {
53+
"@nx/cypress": {
54+
"cypress-project": {
6655
"linter": "eslint"
6756
}
6857
},
69-
"@nrwl/express": {
58+
"@nx/web": {
7059
"application": {
7160
"linter": "eslint"
61+
}
62+
},
63+
"@nx/react": {
64+
"application": {
65+
"style": "css",
66+
"linter": "eslint",
67+
"babel": true
68+
},
69+
"component": {
70+
"style": "css"
7271
},
7372
"library": {
73+
"style": "css",
7474
"linter": "eslint"
7575
}
7676
}
@@ -98,7 +98,8 @@
9898
"default",
9999
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
100100
"!{projectRoot}/tsconfig.spec.json",
101-
"!{projectRoot}/jest.config.[jt]s"
101+
"!{projectRoot}/jest.config.[jt]s",
102+
"!{projectRoot}/src/test-setup.[jt]s"
102103
]
103104
}
104105
}

Diff for: package.json

+23-24
Original file line numberDiff line numberDiff line change
@@ -49,54 +49,53 @@
4949
"tslib": "^2.3.0"
5050
},
5151
"devDependencies": {
52+
"@babel/core": "^7.14.5",
5253
"@babel/preset-react": "^7.14.5",
53-
"@nrwl/cli": "15.9.4",
54-
"@nrwl/cypress": "15.9.4",
55-
"@nrwl/eslint-plugin-nx": "15.9.4",
56-
"@nrwl/jest": "15.9.4",
57-
"@nrwl/js": "15.9.4",
58-
"@nrwl/linter": "15.9.4",
59-
"@nrwl/react": "15.9.4",
60-
"@nrwl/rollup": "15.9.4",
61-
"@nrwl/web": "15.9.4",
62-
"@nrwl/webpack": "15.9.4",
63-
"@nrwl/workspace": "15.9.4",
54+
"@nx/cypress": "16.10.0",
55+
"@nx/eslint-plugin": "16.10.0",
56+
"@nx/jest": "16.10.0",
57+
"@nx/js": "16.10.0",
58+
"@nx/linter": "16.10.0",
59+
"@nx/react": "16.10.0",
60+
"@nx/rollup": "16.10.0",
61+
"@nx/web": "16.10.0",
62+
"@nx/webpack": "16.10.0",
63+
"@nx/workspace": "16.10.0",
6464
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
65-
"@svgr/webpack": "^6.1.2",
65+
"@svgr/webpack": "8.1.0",
6666
"@testing-library/dom": "^7.2.2",
6767
"@testing-library/react": "13.4.0",
6868
"@types/jest": "29.4.4",
6969
"@types/node": "18.11.9",
70-
"@types/react": "18.0.25",
71-
"@types/react-dom": "18.0.9",
72-
"@typescript-eslint/eslint-plugin": "4.31.2",
73-
"@typescript-eslint/parser": "4.31.2",
70+
"@types/react": "18.2.14",
71+
"@types/react-dom": "18.2.6",
72+
"@typescript-eslint/eslint-plugin": "5.62.0",
73+
"@typescript-eslint/parser": "5.62.0",
7474
"copyfiles": "^2.2.0",
7575
"css-loader": "^6.4.0",
7676
"cypress": "^4.1.0",
7777
"dotenv": "10.0.0",
78-
"eslint": "7.22.0",
78+
"eslint": "8.46.0",
7979
"eslint-config-prettier": "8.1.0",
80-
"eslint-plugin-cypress": "^2.10.3",
80+
"eslint-plugin-cypress": "2.15.2",
8181
"eslint-plugin-import": "2.26.0",
8282
"eslint-plugin-prettier": "^3.1.3",
8383
"jest": "29.4.3",
8484
"jest-environment-jsdom": "29.4.3",
85-
"nx": "15.9.4",
85+
"nx": "16.10.0",
8686
"prettier": "2.7.1",
8787
"react-refresh": "^0.10.0",
88-
"react-test-renderer": "18.2.0",
8988
"rimraf": "^3.0.2",
9089
"style-loader": "^3.3.0",
91-
"stylus": "^0.55.0",
90+
"stylus": "0.59.0",
9291
"stylus-loader": "^7.1.0",
93-
"ts-jest": "29.0.5",
92+
"ts-jest": "29.1.2",
9493
"ts-node": "10.9.1",
9594
"tslint": "6.1.3",
9695
"typedoc": "^0.22.11",
97-
"typescript": "4.9.5",
96+
"typescript": "5.1.6",
9897
"url-loader": "^4.1.1",
99-
"webpack": "^5.75.0",
98+
"webpack": "5.91.0",
10099
"webpack-merge": "^5.8.0"
101100
}
102101
}

Diff for: tools/generators/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)