Skip to content

Commit 6b2c229

Browse files
feat(qwik-nx): bump qwik deps and exclude qwik package from peer dependencies (#107)
1 parent edb1780 commit 6b2c229

File tree

7 files changed

+27
-17
lines changed

7 files changed

+27
-17
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ it can be useful to publish to a local registry.
147147
- Run `npm adduser --registry http://localhost:4873` in Terminal 2 (real credentials are not required, you just need to
148148
be logged in. You can use test/test/[email protected].)
149149
- Run `pnpm run local-registry enable` in Terminal 2
150-
- Run `pnpm run nx run qwik-nx:publish:local` in Terminal 2. You can set the version you want to publish in the package's package.json file.
150+
- Run `pnpm exec nx run qwik-nx:publish:local` in Terminal 2. You can set the version you want to publish in the package's package.json file.
151151

152-
If you have problems publishing, make sure you use Node 18 and NPM 8. Alternatively to running the project's "publish" target you can build and publish manually by running `pnpm run nx build:qwik-nx && cd dist/projects/qwik-nx && npm publish --registry=http://localhost:4873`
152+
If you have problems publishing, make sure you use Node 18 and NPM 8. Alternatively to running the project's "publish" target you can build and publish manually by running `pnpm exec nx build:qwik-nx && cd dist/projects/qwik-nx && npm publish --registry=http://localhost:4873`
153153

154154
**NOTE:** After you finish with local testing don't forget to stop the local registry (e.g. closing the Terminal 1) and disabling the local registry using `pnpm run local-registry disable`. Keeping local registry enabled will change your lock file resolutions to `localhost:4873` on the next `pnpm install`. You can also run `pnpm run local-registry clear` to clean all packages in that local registry.
155155

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ nx generate qwik-nx:route
6767
nx generate qwik-nx:setup-tailwind
6868
```
6969

70+
## Migrations
71+
72+
This plugin supports Nx migrations and provides necessary version and code updates for Qwik. So instead of bumping plugin version manually in package.json it's recommended to run `nx migrate qwik-nx` command, that includes bumping the version of the qwik-nx plugin, related dependencies and running code migrations.
73+
7074
## qwik-nx & Nx Compatibility Chart
7175

7276
| qwik-nx version | Nx version |

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ describe('appGenerator e2e', () => {
2828
expect(packageJson.dependencies).toBeUndefined();
2929
expect(packageJson.peerDependencies).toEqual({
3030
'@nrwl/vite': '^15.8.0',
31-
'@builder.io/qwik': '^0.17.0',
32-
'@playwright/test': '^1.30.0',
33-
undici: '^5.18.0',
34-
vite: '^4.0.0',
35-
vitest: '^0.25.0',
3631
tslib: '^2.3.0',
3732
});
3833
}, 200000);

packages/qwik-nx/migrations.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,17 @@
6666
"version": "^3.20.6"
6767
}
6868
}
69+
},
70+
"0.13.2": {
71+
"version": "0.13.2",
72+
"packages": {
73+
"@builder.io/qwik": {
74+
"version": "~0.21.0"
75+
},
76+
"eslint-plugin-qwik": {
77+
"version": "~0.21.0"
78+
}
79+
}
6980
}
7081
}
7182
}

packages/qwik-nx/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@
2222
"generators": "./generators.json",
2323
"executors": "./executors.json",
2424
"peerDependencies": {
25-
"@nrwl/vite": "^15.8.0",
26-
"@builder.io/qwik": "^0.17.0",
27-
"vite": "^4.0.0",
28-
"vitest": "^0.25.0",
29-
"@playwright/test": "^1.30.0",
30-
"undici": "^5.18.0"
25+
"@nrwl/vite": "^15.8.0"
3126
},
3227
"nx-migrations": {
3328
"migrations": "./migrations.json"

packages/qwik-nx/src/plugins/qwik-nx-vite.plugin.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
import { type QwikVitePlugin } from '@builder.io/qwik/optimizer';
21
import { type Plugin } from 'vite';
32
import { join } from 'path';
43
import { readWorkspaceConfig } from 'nx/src/project-graph/file-utils';
54
import { ProjectConfiguration, workspaceRoot } from '@nrwl/devkit';
65
import { readFileSync } from 'fs';
76

7+
interface QwikVitePluginStub {
8+
api: {
9+
getOptions: () => { vendorRoots: string[] };
10+
};
11+
}
12+
813
export interface ProjectFilter {
914
name?: string[] | RegExp;
1015
path?: RegExp;
@@ -35,7 +40,7 @@ export function qwikNxVite(options?: QwikNxVitePluginOptions): Plugin {
3540
async configResolved(config) {
3641
const qwikPlugin = config.plugins.find(
3742
(p) => p.name === 'vite-plugin-qwik'
38-
) as QwikVitePlugin;
43+
) as QwikVitePluginStub;
3944
if (!qwikPlugin) {
4045
throw new Error('Missing vite-plugin-qwik');
4146
}

packages/qwik-nx/src/utils/versions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// qwik packages
2-
export const qwikVersion = '~0.20.0';
2+
export const qwikVersion = '~0.21.0';
33
export const qwikCityVersion = '~0.5.0';
4-
export const qwikEslintPluginVersion = '~0.20.0';
4+
export const qwikEslintPluginVersion = '~0.21.0';
55

66
// css preprocessors
77
export const sassVersion = '~1.56.1';

0 commit comments

Comments
 (0)