Skip to content

Commit

Permalink
feat(qwik-nx): nx 19 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-stepanenko committed May 22, 2024
1 parent 425230e commit bb55d7a
Show file tree
Hide file tree
Showing 10 changed files with 547 additions and 421 deletions.
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,11 @@ This plugin supports Nx migrations and provides necessary version and code updat

## qwik-nx & Nx Compatibility Chart

| qwik-nx version | Nx version |
| ------------------ | ---------------- |
| ^2.0.0 | ^17.0.0, ^18.0.0 |
| ^1.1.0 | ^16.8.0 |
| ^1.0.0 | ^16.0.0 |
| ^0.16.0 | ^16.0.0 |
| >= 0.12.0 < 0.16.0 | ^15.8.0 |
| ~0.10.0, ~0.11.0 | ~15.7.2 |
| >= 0.6.0 < 0.10.0 | ~15.6.0 |
| ~0.5.0 | ~15.5.0 |
| ~0.4.0 | ~15.4.0 |
| <=0.4.0 | ^15.0.0 |

We will provide support for Nx 15 with critical bug fixes and minor features for a while. If you're using nx@15.8 or higher, you can stick to qwik-nx@0.15.
| qwik-nx version | Nx version |
| --------------- | ------------------------- |
| ^2.0.0 | ^17.0.0, ^18.0.0, ^19.0.0 |
| ^1.1.0 | ^16.8.0 |
| ^1.0.0 | ^16.0.0 |

## ROADMAP:

Expand Down
8 changes: 4 additions & 4 deletions e2e/qwik-nx-e2e/tests/chore.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ describe('misc checks', () => {
expect(packageJson.dependencies).toBeUndefined();
expect(packageJson.devDependencies).toBeUndefined();
expect(packageJson.peerDependencies).toEqual({
'@nx/devkit': '^17.0.0 || ^18.0.0',
'@nx/js': '^17.0.0 || ^18.0.0',
'@nx/eslint': '^17.0.0 || ^18.0.0',
'@nx/vite': '^17.0.0 || ^18.0.0',
'@nx/devkit': '^17.0.0 || ^18.0.0 || ^19.0.0',
'@nx/js': '^17.0.0 || ^18.0.0 || ^19.0.0',
'@nx/eslint': '^17.0.0 || ^18.0.0 || ^19.0.0',
'@nx/vite': '^17.0.0 || ^18.0.0 || ^19.0.0',
});
},
DEFAULT_E2E_TIMEOUT
Expand Down
3 changes: 2 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@
"appsDir": "e2e",
"libsDir": "packages"
},
"nxCloudAccessToken": "MmI5MzJhMDctNGYwMi00OTI1LWJiZjUtNWIwNTQ4NmY2ZjhjfHJlYWQtd3JpdGU="
"nxCloudAccessToken": "MmI5MzJhMDctNGYwMi00OTI1LWJiZjUtNWIwNTQ4NmY2ZjhjfHJlYWQtd3JpdGU=",
"useInferencePlugins": false
}
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,36 @@
"@commitlint/config-angular": "^17.8.1",
"@commitlint/config-conventional": "^17.8.1",
"@jscutlery/semver": "^4.2.0",
"@nx/cypress": "17.3.0",
"@nx/devkit": "17.3.0",
"@nx/eslint": "17.3.0",
"@nx/eslint-plugin": "17.3.0",
"@nx/jest": "17.3.0",
"@nx/js": "17.3.0",
"@nx/playwright": "17.3.0",
"@nx/plugin": "17.3.0",
"@nx/storybook": "17.3.0",
"@nx/vite": "17.3.0",
"@nx/workspace": "17.3.0",
"@swc-node/register": "1.6.8",
"@swc/cli": "0.1.62",
"@nx/cypress": "19.0.6",
"@nx/devkit": "19.0.6",
"@nx/eslint": "19.0.6",
"@nx/eslint-plugin": "19.0.6",
"@nx/jest": "19.0.6",
"@nx/js": "19.0.6",
"@nx/playwright": "19.0.6",
"@nx/plugin": "19.0.6",
"@nx/storybook": "19.0.6",
"@nx/vite": "19.0.6",
"@nx/workspace": "19.0.6",
"@swc-node/register": "1.8.0",
"@swc/cli": "0.3.12",
"@swc/core": "^1.4.1",
"@types/fs-extra": "11.0.1",
"@types/jest": "29.4.0",
"@types/node": "18.19.15",
"@types/semver": "7.5.6",
"@types/tcp-port-used": "1.0.1",
"@types/yargs": "17.0.24",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"@typescript-eslint/eslint-plugin": "7.9.0",
"@typescript-eslint/parser": "7.9.0",
"all-contributors-cli": "^6.26.1",
"chalk": "^4.1.2",
"commitizen": "^4.3.0",
"commitlint": "^17.8.1",
"create-nx-workspace": "17.0.3",
"cz-conventional-changelog": "^3.3.0",
"enquirer": "2.3.6",
"eslint": "8.48.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-unused-imports": "2.0.0",
"fs-extra": "11.1.0",
Expand All @@ -65,7 +65,7 @@
"jsonc-eslint-parser": "^2.4.0",
"kill-port": "2.0.1",
"ngx-deploy-npm": "8.0.1",
"nx": "17.3.0",
"nx": "19.0.6",
"prettier": "^2.8.8",
"pretty-quick": "^3.3.1",
"semver": "7.6.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/qwik-nx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"generators": "./generators.json",
"executors": "./executors.json",
"peerDependencies": {
"@nx/devkit": "^17.0.0 || ^18.0.0",
"@nx/js": "^17.0.0 || ^18.0.0",
"@nx/vite": "^17.0.0 || ^18.0.0",
"@nx/eslint": "^17.0.0 || ^18.0.0"
"@nx/devkit": "^17.0.0 || ^18.0.0 || ^19.0.0",
"@nx/js": "^17.0.0 || ^18.0.0 || ^19.0.0",
"@nx/vite": "^17.0.0 || ^18.0.0 || ^19.0.0",
"@nx/eslint": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"nx-migrations": {
"migrations": "./migrations.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ export async function appGeneratorInternal(
);

if (normalizedOptions.linter === Linter.EsLint) {
tasks.push(configureEslint(tree, normalizedOptions.projectName, true));
tasks.push(
await configureEslint(tree, normalizedOptions.projectName, true)
);
}

if (normalizedOptions.styleExtension) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,7 @@ exports[`host generator should run successfully 3`] = `
\\"$schema\\": \\"../../node_modules/nx/schemas/project-schema.json\\",
\\"projectType\\": \\"application\\",
\\"sourceRoot\\": \\"apps/myhostapp/src\\",
\\"tags\\": [],
\\"targets\\": {
\\"build\\": {
\\"executor\\": \\"qwik-nx:build\\",
Expand Down Expand Up @@ -1097,8 +1098,7 @@ exports[`host generator should run successfully 3`] = `
\\"cwd\\": \\"apps/myhostapp\\"
}
}
},
\\"tags\\": []
}
}
"
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export async function libraryGeneratorInternal(
tasks.push(await configureVite(tree, options));

if (options.linter === Linter.EsLint) {
tasks.push(configureEslint(tree, options.projectName, true));
tasks.push(await configureEslint(tree, options.projectName, true));
}

tasks.push(addCommonQwikDependencies(tree));
Expand Down
6 changes: 3 additions & 3 deletions packages/qwik-nx/src/utils/configure-eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
import { lintProjectGenerator, Linter } from '@nx/eslint';
import { qwikEslintPluginVersion } from './versions';

export function configureEslint(
export async function configureEslint(
tree: Tree,
project: string,
skipLibsEslintConfig = false
): GeneratorCallback {
): Promise<GeneratorCallback> {
const cfg = readProjectConfiguration(tree, project);

const existingLibEslintConfigPath = joinPathFragments(
Expand All @@ -26,7 +26,7 @@ export function configureEslint(
existingLibEslintConfig = tree.read(existingLibEslintConfigPath);
}

lintProjectGenerator(tree, {
await lintProjectGenerator(tree, {
project: project,
linter: Linter.EsLint,
skipFormat: true,
Expand Down
Loading

0 comments on commit bb55d7a

Please sign in to comment.