Skip to content

Commit aaa949f

Browse files
feat(qwik-nx): migrate to [email protected] (#96)
1 parent 4ec60e3 commit aaa949f

File tree

21 files changed

+1218
-616
lines changed

21 files changed

+1218
-616
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ npm-debug.log
3333
yarn-error.log
3434
testem.log
3535
/typings
36+
migrations.json
3637

3738
# System Files
3839
.DS_Store

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ nx generate qwik-nx:setup-tailwind
6969

7070
## qwik-nx & Nx Compatibility Chart
7171

72-
| qwik-nx version | Nx version |
73-
| --------------- | ---------- |
74-
| ~0.6.0 | >=15.6.0 |
75-
| ~0.5.0 | ~15.5.0 |
76-
| ~0.4.0 | ~15.4.0 |
77-
| <=0.4.0 | ^15.0.0 |
72+
| qwik-nx version | Nx version |
73+
| ---------------- | ---------- |
74+
| ~0.12.0 | ^15.8.0 |
75+
| ~0.10.0, ~0.11.0 | ~15.7.2 |
76+
| ~0.6.0 | ~15.6.0 |
77+
| ~0.5.0 | ~15.5.0 |
78+
| ~0.4.0 | ~15.4.0 |
79+
| <=0.4.0 | ^15.0.0 |
7880

7981
## ROADMAP:
8082

e2e/qwik-nx-e2e/jest.config.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
export default {
33
displayName: 'qwik-nx-e2e',
44
preset: '../../jest.preset.js',
5-
globals: {
6-
'ts-jest': {
7-
tsconfig: '<rootDir>/tsconfig.spec.json',
8-
},
9-
},
5+
globals: {},
106
transform: {
11-
'^.+\\.[tj]s$': 'ts-jest',
7+
'^.+\\.[tj]s$': [
8+
'ts-jest',
9+
{
10+
tsconfig: '<rootDir>/tsconfig.spec.json',
11+
},
12+
],
1213
},
1314
moduleFileExtensions: ['ts', 'js', 'html'],
1415
coverageDirectory: '../../coverage/e2e/qwik-nx-e2e',

e2e/qwik-nx-e2e/tests/application-basic-behavior.suite.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export function testApplicationBasicBehavior(generator: 'app' | 'preset') {
3939
await runNxCommandAsync('reset');
4040
});
4141

42+
it('should contain tsconfig.base.json', () => {
43+
expect(() => checkFilesExist(`tsconfig.base.json`)).not.toThrow();
44+
});
45+
4246
it('should create qwik-nx', async () => {
4347
const result = await runNxCommandAsync(`build ${project}`);
4448
expect(stripConsoleColors(result.stdout.replace(/\n|\s/g, ''))).toContain(

e2e/qwik-nx-e2e/tests/chore.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('appGenerator e2e', () => {
2727

2828
expect(packageJson.dependencies).toBeUndefined();
2929
expect(packageJson.peerDependencies).toEqual({
30-
'@nrwl/vite': '~15.7.2',
30+
'@nrwl/vite': '^15.8.0',
3131
'@builder.io/qwik': '^0.17.0',
3232
'@playwright/test': '^1.30.0',
3333
undici: '^5.18.0',

jest.preset.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
const nxPreset = require('@nrwl/jest/preset').default;
22

3-
module.exports = { ...nxPreset };
3+
module.exports = {
4+
...nxPreset,
5+
/* TODO: Update to latest Jest snapshotFormat
6+
* By default Nx has kept the older style of Jest Snapshot formats
7+
* to prevent breaking of any existing tests with snapshots.
8+
* It's recommend you update to the latest format.
9+
* You can do this by removing snapshotFormat property
10+
* and running tests with --update-snapshot flag.
11+
* Example: "nx affected --targets=test --update-snapshot"
12+
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
13+
*/
14+
snapshotFormat: { escapeString: true, printBasicPrototype: true },
15+
};

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@
1818
"@commitlint/config-angular": "^17.3.0",
1919
"@commitlint/config-conventional": "^17.3.0",
2020
"@jscutlery/semver": "^2.29.0",
21-
"@nrwl/cli": "15.7.2",
22-
"@nrwl/cypress": "15.7.2",
23-
"@nrwl/devkit": "15.7.2",
24-
"@nrwl/eslint-plugin-nx": "15.7.2",
25-
"@nrwl/jest": "15.7.2",
26-
"@nrwl/js": "15.7.2",
27-
"@nrwl/linter": "15.7.2",
28-
"@nrwl/nx-plugin": "15.7.2",
29-
"@nrwl/vite": "15.7.2",
30-
"@nrwl/workspace": "15.7.2",
31-
"@nxkit/playwright": "^2.1.1",
21+
"@nrwl/cli": "15.8.2",
22+
"@nrwl/cypress": "15.8.2",
23+
"@nrwl/devkit": "15.8.2",
24+
"@nrwl/eslint-plugin-nx": "15.8.2",
25+
"@nrwl/jest": "15.8.2",
26+
"@nrwl/js": "15.8.2",
27+
"@nrwl/linter": "15.8.2",
28+
"@nrwl/nx-plugin": "15.8.2",
29+
"@nrwl/vite": "15.8.2",
30+
"@nrwl/workspace": "15.8.2",
31+
"@nxkit/playwright": "^2.1.2",
3232
"@swc-node/register": "^1.4.2",
3333
"@swc/cli": "~0.1.55",
3434
"@swc/core": "^1.2.173",
3535
"@types/fs-extra": "11.0.1",
36-
"@types/jest": "28.1.1",
36+
"@types/jest": "29.4.0",
3737
"@types/node": "16.11.7",
3838
"@types/tcp-port-used": "1.0.1",
3939
"@typescript-eslint/eslint-plugin": "^5.36.1",
@@ -49,19 +49,19 @@
4949
"fs-extra": "11.1.0",
5050
"husky": "^8.0.1",
5151
"is-windows": "1.0.2",
52-
"jest": "28.1.1",
53-
"jest-environment-jsdom": "28.1.1",
52+
"jest": "29.4.3",
53+
"jest-environment-jsdom": "29.4.3",
5454
"jsonc-eslint-parser": "^2.1.0",
5555
"kill-port": "2.0.1",
5656
"ngx-deploy-npm": "^5.2.0",
57-
"nx": "15.7.2",
57+
"nx": "15.8.2",
5858
"prettier": "^2.8.0",
5959
"pretty-quick": "^3.1.3",
6060
"tcp-port-used": "1.0.2",
6161
"tree-kill": "1.2.2",
62-
"ts-jest": "28.0.5",
62+
"ts-jest": "29.0.5",
6363
"ts-node": "10.9.1",
64-
"typescript": "~4.8.2",
64+
"typescript": "4.9.5",
6565
"verdaccio": "5.21.1",
6666
"vite": "4.1.1"
6767
},

packages/add-nx-to-qwik/jest.config.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
export default {
33
displayName: 'add-nx-to-qwik',
44

5-
globals: {
6-
'ts-jest': {
7-
tsConfig: '<rootDir>/tsconfig.spec.json',
8-
},
9-
},
5+
globals: {},
106
transform: {
11-
'^.+\\.[tj]sx?$': 'ts-jest',
7+
'^.+\\.[tj]sx?$': [
8+
'ts-jest',
9+
{
10+
tsConfig: '<rootDir>/tsconfig.spec.json',
11+
},
12+
],
1213
},
1314
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
1415
coverageDirectory: '../../coverage/projects/add-nx-to-qwik',

packages/qwik-nx/jest.config.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
export default {
33
displayName: 'qwik-nx',
44
preset: '../../jest.preset.js',
5-
globals: {
6-
'ts-jest': {
7-
tsconfig: '<rootDir>/tsconfig.spec.json',
8-
},
9-
},
5+
globals: {},
106
transform: {
11-
'^.+\\.[tj]s$': 'ts-jest',
7+
'^.+\\.[tj]s$': [
8+
'ts-jest',
9+
{
10+
tsconfig: '<rootDir>/tsconfig.spec.json',
11+
},
12+
],
1213
},
1314
testEnvironment: 'node',
1415
moduleFileExtensions: ['ts', 'js', 'html'],

packages/qwik-nx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"generators": "./generators.json",
2323
"executors": "./executors.json",
2424
"peerDependencies": {
25-
"@nrwl/vite": "~15.7.2",
25+
"@nrwl/vite": "^15.8.0",
2626
"@builder.io/qwik": "^0.17.0",
2727
"vite": "^4.0.0",
2828
"vitest": "^0.25.0",

0 commit comments

Comments
 (0)