Skip to content

Commit 1eebff7

Browse files
fix(qwik-nx): preset and peer dependencies fixes (#68)
1 parent 52596bd commit 1eebff7

File tree

3 files changed

+56
-6
lines changed

3 files changed

+56
-6
lines changed

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import {
2+
checkFilesExist,
3+
ensureNxProject,
4+
readJson,
5+
runNxCommandAsync,
6+
uniq,
7+
} from '@nrwl/nx-plugin/testing';
8+
9+
import {
10+
runCommandUntil,
11+
promisifiedTreeKill,
12+
killPort,
13+
} from '@qwikifiers/e2e/utils';
14+
15+
describe('appGenerator e2e', () => {
16+
// Setting up individual workspaces per
17+
// test can cause e2e runs to take a long time.
18+
// For this reason, we recommend each suite only
19+
// consumes 1 workspace. The tests should each operate
20+
// on a unique project in the workspace, such that they
21+
// are not dependant on one another.
22+
beforeAll(() => {
23+
ensureNxProject('qwik-nx', 'dist/packages/qwik-nx');
24+
});
25+
26+
afterAll(async () => {
27+
// `nx reset` kills the daemon, and performs
28+
// some work which can help clean up e2e leftovers
29+
await runNxCommandAsync('reset');
30+
});
31+
32+
describe("qwik-nx's compiled package.json", () => {
33+
let project: string;
34+
35+
it("qwik-nx's package.json should contain only expected dependencies", async () => {
36+
const packageJson = readJson('node_modules/qwik-nx/package.json');
37+
38+
expect(packageJson.dependencies).toEqual({
39+
'@nrwl/vite': '15.6.1',
40+
});
41+
expect(packageJson.peerDependencies).toEqual({
42+
'@builder.io/qwik': '^0.16.0',
43+
'@playwright/test': '^1.30.0',
44+
undici: '^5.18.0',
45+
vite: '^4.0.0',
46+
vitest: '^0.25.0',
47+
tslib: '2.4.1',
48+
});
49+
}, 200000);
50+
});
51+
});

packages/qwik-nx/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@
2222
"generators": "./generators.json",
2323
"executors": "./executors.json",
2424
"dependencies": {
25-
"@nrwl/vite": "~15.6.0"
25+
"@nrwl/vite": "^15.6.0"
2626
},
2727
"peerDependencies": {
2828
"@builder.io/qwik": "^0.16.0",
29-
"vite": "~4.1.1"
29+
"vite": "^4.0.0",
30+
"vitest": "^0.25.0",
31+
"@playwright/test": "^1.30.0",
32+
"undici": "^5.18.0"
3033
}
3134
}

packages/qwik-nx/src/generators/preset/schema.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
"qwikAppName": {
99
"type": "string",
1010
"description": "",
11-
"$default": {
12-
"$source": "argv",
13-
"index": 0
14-
},
1511
"x-prompt": "App Name"
1612
},
1713
"tags": {

0 commit comments

Comments
 (0)