Skip to content

Commit 62bd007

Browse files
authored
chore: update nx to 14.0.5 (#199)
1 parent 432b895 commit 62bd007

Some content is hidden

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

43 files changed

+918
-872
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module.exports = {
2-
preset: '../../jest.preset.js',
32
transform: {
43
'^.+\\.[tj]sx?$': 'ts-jest',
54
},
@@ -8,4 +7,5 @@ module.exports = {
87
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
98
globals: { 'ts-jest': { tsconfig: '<rootDir>/tsconfig.spec.json' } },
109
displayName: 'cart',
10+
preset: '../../jest.preset.ts',
1111
};

apps/cart/project.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,16 @@
5757
"maximumError": "5mb"
5858
}
5959
]
60+
},
61+
"development": {
62+
"extractLicenses": false,
63+
"optimization": false,
64+
"sourceMap": true,
65+
"vendorChunk": true
6066
}
6167
},
62-
"outputs": ["{options.outputPath}"]
68+
"outputs": ["{options.outputPath}"],
69+
"defaultConfiguration": "production"
6370
},
6471
"serve": {
6572
"executor": "@nrwl/web:dev-server",
@@ -69,8 +76,12 @@
6976
"configurations": {
7077
"production": {
7178
"buildTarget": "cart:build:production"
79+
},
80+
"development": {
81+
"buildTarget": "cart:build:development"
7282
}
73-
}
83+
},
84+
"defaultConfiguration": "development"
7485
},
7586
"lint": {
7687
"executor": "@nrwl/linter:eslint",
@@ -82,7 +93,7 @@
8293
"test": {
8394
"executor": "@nrwl/jest:jest",
8495
"options": {
85-
"jestConfig": "apps/cart/jest.config.js",
96+
"jestConfig": "apps/cart/jest.config.ts",
8697
"passWithNoTests": true
8798
},
8899
"outputs": ["coverage/apps/cart"]

apps/cart/src/app/app.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Route } from 'react-router-dom';
1+
import { Route, Routes } from 'react-router-dom';
22

33
import '@nx-example/shared/header';
44

@@ -8,7 +8,9 @@ export const App = () => {
88
return (
99
<>
1010
<nx-example-header />
11-
<Route path="/cart" exact component={CartCartPage} />
11+
<Routes>
12+
<Route path="/cart" element={<CartCartPage />} />
13+
</Routes>
1214
</>
1315
);
1416
};

apps/cart/src/main.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import ReactDOM from 'react-dom';
1+
import ReactDOM from 'react-dom/client';
22
import { BrowserRouter as Router } from 'react-router-dom';
33

44
import App from './app/app';
55

6-
ReactDOM.render(
6+
const root = ReactDOM.createRoot(
7+
document.getElementById('root') as HTMLElement
8+
);
9+
root.render(
710
<Router>
811
<App />
9-
</Router>,
10-
document.getElementById('root')
12+
</Router>
1113
);

apps/cart/tsconfig.app.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
"outDir": "../../dist/out-tsc",
55
"types": []
66
},
7-
"exclude": ["**/*.spec.ts", "**/*.test.ts", "**/*.spec.tsx", "**/*.test.tsx"],
7+
"exclude": [
8+
"**/*.spec.ts",
9+
"**/*.test.ts",
10+
"**/*.spec.tsx",
11+
"**/*.test.tsx",
12+
"jest.config.ts"
13+
],
814
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
915
"files": [
1016
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",

apps/cart/tsconfig.spec.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"**/*.test.js",
1515
"**/*.spec.jsx",
1616
"**/*.test.jsx",
17-
"**/*.d.ts"
17+
"**/*.d.ts",
18+
"jest.config.ts"
1819
],
1920
"files": [
2021
"../../node_modules/@nrwl/react/typings/cssmodule.d.ts",

apps/products/jest.config.js renamed to apps/products/jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module.exports = {
2-
preset: '../../jest.preset.js',
32
coverageDirectory: '../../coverage/apps/products',
43

54
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
@@ -20,4 +19,5 @@ module.exports = {
2019
'jest-preset-angular/build/serializers/html-comment',
2120
],
2221
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
22+
preset: '../../jest.preset.ts',
2323
};

apps/products/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"test": {
100100
"executor": "@nrwl/jest:jest",
101101
"options": {
102-
"jestConfig": "apps/products/jest.config.js",
102+
"jestConfig": "apps/products/jest.config.ts",
103103
"passWithNoTests": true
104104
},
105105
"outputs": ["coverage/apps/products"]

apps/products/tsconfig.app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@
99
"**/*.d.ts",
1010
"../../libs/products/home-page/src/index.ts",
1111
"../../libs/products/product-detail-page/src/index.ts"
12-
]
12+
],
13+
"exclude": ["jest.config.ts"]
1314
}

apps/products/tsconfig.editor.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"include": ["**/*.ts"],
44
"compilerOptions": {
55
"types": ["jest", "node"]
6-
}
6+
},
7+
"exclude": ["jest.config.ts"]
78
}

0 commit comments

Comments
 (0)