Skip to content

Commit 8de3cca

Browse files
authored
chore: nx v21 migration (#1095)
* chore: nx v21 migration * fix(component-tests): lint target
1 parent e8209aa commit 8de3cca

File tree

9 files changed

+1358
-1285
lines changed

9 files changed

+1358
-1285
lines changed

apps/component-tests/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858
},
5959
"lint": {
60-
"executor": "@nx/linter:eslint",
60+
"executor": "@nx/eslint:lint",
6161
"outputs": ["{options.outputFile}"],
6262
"options": {
6363
"lintFilePatterns": ["apps/component-tests/**/*.{ts,tsx,js,jsx}"]

apps/website/src/routes/docs/headless/collapsible/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Note } from '~/components/note/note';
44
import { AnatomyTable } from '~/components/anatomy-table/anatomy-table';
55

66
import { ShowcaseHero, ShowcaseOpen, ShowcaseBindOpen, ShowcaseProgrammatic, ShowcaseOpenChange, ShowcaseDisabled, ShowcaseAnimation, ShowcaseCsr } from './showcase-components';
7-
import { CodeSnippetCollapsibleCss, CodeSnippetAnimationCss } from './code-snippets';
7+
import { CodeSnippetCollapsibleCss, CodeSnippetAnimationCss, CodeSnippetBuildingBlocks } from './code-snippets';
88

99
<StatusBanner status={statusByComponent.headless.Collapsible} />
1010

apps/website/src/routes/docs/headless/tooltip/index.mdx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ A text label that appears when a user hovers, focuses, or touches an element.
2121
`Opens on hover or focus`,
2222
'Closes on trigger activation or Escape key press',
2323
'Customizable open/close delays',
24-
{/* 'Optional arrow component', */}
2524
'Always portaled content',
2625
'Accessibility with ARIA roles and keyboard interactions',
2726
'Flipping to avoid overflow',
@@ -67,10 +66,6 @@ export default component$(() => {
6766
name: 'Tooltip.Panel',
6867
description: `An HTML element that contains the tooltip content.`,
6968
},
70-
{/* {
71-
name: 'Tooltip.Arrow',
72-
description: `An optional arrow component to point to the trigger element.`,
73-
}, */}
7469
]}
7570
/>
7671

@@ -275,10 +270,6 @@ To read more about tooltips you can check it out on:
275270
name: 'Tooltip.Panel',
276271
description: 'The container for the tooltip content.',
277272
},
278-
{/* {
279-
name: 'Tooltip.Arrow',
280-
description: 'An optional arrow component for the tooltip.',
281-
}, */}
282273
]}
283274
/>
284275

apps/website/src/routes/docs/styled/tooltip/examples/hero.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ export default component$(() => {
55
return (
66
<Tooltip.Root flip={false} gutter={8}>
77
<Tooltip.Trigger class={badgeVariants({ look: 'outline' })}>
8-
Hover over me.
8+
Hover over me 👀
99
</Tooltip.Trigger>
1010
<Tooltip.Panel>
11-
<p>Add to library</p>
11+
<p>I'm a tooltip</p>
1212
</Tooltip.Panel>
1313
</Tooltip.Root>
1414
);

migrations.json

Lines changed: 148 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,156 @@
11
{
22
"migrations": [
33
{
4-
"version": "19.2.4-beta.0",
5-
"description": "Set project name in nx.json explicitly",
6-
"implementation": "./src/migrations/update-19-2-4/set-project-name",
4+
"version": "20.0.0-beta.7",
5+
"description": "Migration for v20.0.0-beta.7",
6+
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process",
7+
"package": "nx",
8+
"name": "move-use-daemon-process"
9+
},
10+
{
11+
"version": "20.0.1",
12+
"description": "Set `useLegacyCache` to true for migrating workspaces",
13+
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
714
"x-repair-skip": true,
815
"package": "nx",
9-
"name": "19-2-4-set-project-name"
16+
"name": "use-legacy-cache"
17+
},
18+
{
19+
"version": "21.0.0-beta.8",
20+
"description": "Removes the legacy cache configuration from nx.json",
21+
"implementation": "./src/migrations/update-21-0-0/remove-legacy-cache",
22+
"package": "nx",
23+
"name": "remove-legacy-cache"
24+
},
25+
{
26+
"version": "21.0.0-beta.8",
27+
"description": "Removes the legacy cache configuration from nx.json",
28+
"implementation": "./src/migrations/update-21-0-0/remove-custom-tasks-runner",
29+
"package": "nx",
30+
"name": "remove-custom-tasks-runner"
31+
},
32+
{
33+
"version": "21.0.0-beta.11",
34+
"description": "Updates release version config based on the breaking changes in Nx v21",
35+
"implementation": "./src/migrations/update-21-0-0/release-version-config-changes",
36+
"package": "nx",
37+
"name": "release-version-config-changes"
38+
},
39+
{
40+
"version": "21.0.0-beta.11",
41+
"description": "Updates release changelog config based on the breaking changes in Nx v21",
42+
"implementation": "./src/migrations/update-21-0-0/release-changelog-config-changes",
43+
"package": "nx",
44+
"name": "release-changelog-config-changes"
45+
},
46+
{
47+
"version": "21.1.0-beta.2",
48+
"description": "Adds **/nx-rules.mdc and **/nx.instructions.md to .gitignore if not present",
49+
"implementation": "./src/migrations/update-21-1-0/add-gitignore-entry",
50+
"package": "nx",
51+
"name": "21-1-0-add-ignore-entries-for-nx-rule-files"
52+
},
53+
{
54+
"version": "19.6.0-beta.0",
55+
"description": "Add dependsOn: [build] to preview targets using preview-server",
56+
"implementation": "./src/migrations/update-19-6-0/add-depends-on-for-preview",
57+
"package": "@nx/vite",
58+
"name": "update-19-6-0-add-depends-on-for-preview-server"
59+
},
60+
{
61+
"version": "20.0.4-beta.0",
62+
"description": "Add gitignore entry for temporary vite config files.",
63+
"implementation": "./src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore",
64+
"package": "@nx/vite",
65+
"name": "update-20-0-4"
66+
},
67+
{
68+
"version": "20.0.6-beta.0",
69+
"description": "Add gitignore entry for temporary vite config files and remove previous incorrect glob.",
70+
"implementation": "./src/migrations/update-20-0-4/add-vite-temp-files-to-git-ignore",
71+
"package": "@nx/vite",
72+
"name": "update-20-0-6"
73+
},
74+
{
75+
"version": "20.3.0-beta.2",
76+
"description": "Add gitignore entry for temporary vitest config files.",
77+
"implementation": "./src/migrations/update-20-3-0/add-vitest-temp-files-to-git-ignore",
78+
"package": "@nx/vite",
79+
"name": "update-20-3-0"
80+
},
81+
{
82+
"version": "20.5.0-beta.2",
83+
"description": "Install jiti as a devDependency to allow vite to parse TS postcss files.",
84+
"implementation": "./src/migrations/update-20-5-0/install-jiti",
85+
"package": "@nx/vite",
86+
"name": "update-20-5-0-install-jiti"
87+
},
88+
{
89+
"version": "20.5.0-beta.3",
90+
"description": "Update resolve.conditions to include defaults that are no longer provided by Vite.",
91+
"implementation": "./src/migrations/update-20-5-0/update-resolve-conditions",
92+
"package": "@nx/vite",
93+
"name": "update-20-5-0-update-resolve-conditions"
94+
},
95+
{
96+
"version": "20.5.0-beta.3",
97+
"description": "Add vite config temporary files to the ESLint configuration ignore patterns if ESLint is used.",
98+
"implementation": "./src/migrations/update-20-5-0/eslint-ignore-vite-temp-files",
99+
"package": "@nx/vite",
100+
"name": "eslint-ignore-vite-temp-files"
101+
},
102+
{
103+
"cli": "nx",
104+
"version": "19.6.0-beta.0",
105+
"description": "Use serve-static or preview for webServerCommand.",
106+
"implementation": "./src/migrations/update-19-6-0/use-serve-static-preview-for-command",
107+
"package": "@nx/playwright",
108+
"name": "19-6-0-use-serve-static-preview-for-command"
109+
},
110+
{
111+
"cli": "nx",
112+
"version": "19.6.0-beta.1",
113+
"description": "Add inferred ciTargetNames to targetDefaults with dependsOn to ensure dependent application builds are scheduled before atomized tasks.",
114+
"implementation": "./src/migrations/update-19-6-0/add-e2e-ci-target-defaults",
115+
"package": "@nx/playwright",
116+
"name": "update-19-6-0-add-e2e-ci-target-defaults"
117+
},
118+
{
119+
"version": "20.2.0-beta.5",
120+
"description": "Update TypeScript ESLint packages to v8.13.0 if they are already on v8",
121+
"implementation": "./src/migrations/update-20-2-0/update-typescript-eslint-v8-13-0",
122+
"package": "@nx/eslint",
123+
"name": "update-typescript-eslint-v8.13.0"
124+
},
125+
{
126+
"version": "20.3.0-beta.1",
127+
"description": "Update ESLint flat config to include .cjs, .mjs, .cts, and .mts files in overrides (if needed)",
128+
"implementation": "./src/migrations/update-20-3-0/add-file-extensions-to-overrides",
129+
"package": "@nx/eslint",
130+
"name": "add-file-extensions-to-overrides"
131+
},
132+
{
133+
"cli": "nx",
134+
"version": "20.0.0-beta.5",
135+
"description": "Replace usage of `getJestProjects` with `getJestProjectsAsync`.",
136+
"implementation": "./src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync",
137+
"package": "@nx/jest",
138+
"name": "replace-getJestProjects-with-getJestProjectsAsync"
139+
},
140+
{
141+
"cli": "nx",
142+
"version": "21.0.0-beta.9",
143+
"description": "Replace usage of `getJestProjects` with `getJestProjectsAsync`.",
144+
"implementation": "./src/migrations/update-21-0-0/replace-getJestProjects-with-getJestProjectsAsync",
145+
"package": "@nx/jest",
146+
"name": "replace-getJestProjects-with-getJestProjectsAsync-v21"
147+
},
148+
{
149+
"version": "21.0.0-beta.10",
150+
"description": "Remove the previously deprecated and unused `tsConfig` option from the `@nx/jest:jest` executor.",
151+
"implementation": "./src/migrations/update-21-0-0/remove-tsconfig-option-from-jest-executor",
152+
"package": "@nx/jest",
153+
"name": "remove-tsconfig-option-from-jest-executor"
10154
}
11155
]
12156
}

package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@
5858
"@floating-ui/core": "^1.6.2",
5959
"@floating-ui/dom": "^1.6.5",
6060
"@img/sharp-linux-x64": "^0.33.4",
61-
"@k11r/nx-cloudflare-wrangler": "3.0.0-feat-sst-upgrade.1",
61+
"@k11r/nx-cloudflare-wrangler": "3.5.0",
6262
"@modular-forms/qwik": "^0.24.0",
63-
"@nx/devkit": "19.4.2",
64-
"@nx/eslint": "19.4.2",
65-
"@nx/eslint-plugin": "19.4.2",
66-
"@nx/jest": "19.4.2",
67-
"@nx/js": "19.4.2",
68-
"@nx/playwright": "19.4.2",
69-
"@nx/plugin": "19.4.2",
70-
"@nx/vite": "19.4.2",
71-
"@nx/workspace": "19.4.2",
63+
"@nx/devkit": "21.1.2",
64+
"@nx/eslint": "21.1.2",
65+
"@nx/eslint-plugin": "21.1.2",
66+
"@nx/jest": "21.1.2",
67+
"@nx/js": "21.1.2",
68+
"@nx/playwright": "21.1.2",
69+
"@nx/plugin": "21.1.2",
70+
"@nx/vite": "21.1.2",
71+
"@nx/workspace": "21.1.2",
7272
"@oddbird/popover-polyfill": "0.4.3",
7373
"@playwright/test": "^1.44.1",
7474
"@qwikest/icons": "^0.0.13",
@@ -79,10 +79,10 @@
7979
"@types/decompress": "4.2.7",
8080
"@types/eslint": "8.56.10",
8181
"@types/estree-jsx": "1.0.5",
82-
"@types/jest": "29.5.12",
82+
"@types/jest": "29.5.14",
8383
"@types/node": "20.12.12",
84-
"@typescript-eslint/eslint-plugin": "7.9.0",
85-
"@typescript-eslint/parser": "7.9.0",
84+
"@typescript-eslint/eslint-plugin": "7.18.0",
85+
"@typescript-eslint/parser": "7.18.0",
8686
"@vitejs/plugin-basic-ssl": "2.0.0",
8787
"@vitest/coverage-v8": "^1.6.0",
8888
"@vitest/ui": "^1.6.0",
@@ -98,24 +98,24 @@
9898
"decompress": "4.2.1",
9999
"dotenv": "16.4.5",
100100
"eslint": "^8.57.0",
101-
"eslint-config-prettier": "^9.1.0",
101+
"eslint-config-prettier": "10.1.5",
102102
"eslint-plugin-playwright": "^1.6.2",
103103
"eslint-plugin-qwik": "1.14.1",
104104
"focus-trap": "7.5.4",
105-
"jest": "^29.7.0",
106-
"jest-environment-jsdom": "^29.7.0",
105+
"jest": "29.7.0",
106+
"jest-environment-jsdom": "29.7.0",
107107
"jsdom": "24.0.0",
108108
"kleur": "^4.1.5",
109109
"match-sorter": "6.3.4",
110110
"node-fetch": "3.3.2",
111111
"np": "^10.0.5",
112-
"nx": "19.4.2",
112+
"nx": "21.1.2",
113113
"pagefind": "1.2.0",
114114
"postcss": "^8.4.38",
115115
"prettier": "^3.2.5",
116116
"prettier-plugin-tailwindcss": "^0.5.14",
117117
"pretty-quick": "^4.0.0",
118-
"qwik-nx": "^2.3.0",
118+
"qwik-nx": "^3.2.0",
119119
"sass": "^1.77.2",
120120
"shiki": "^3.4.2",
121121
"simple-git-hooks": "2.11.1",
@@ -127,12 +127,12 @@
127127
"tree-sitter-typescript": "0.23.0",
128128
"ts-jest": "^29.1.3",
129129
"tslib": "^2.6.2",
130-
"typescript": "5.4.5",
130+
"typescript": "5.7.3",
131131
"undici": "5.28.4",
132132
"unified": "^11.0.4",
133-
"verdaccio": "^5.31.0",
134-
"vite": "5.2.11",
135-
"vite-plugin-dts": "^3.9.1",
133+
"verdaccio": "6.1.2",
134+
"vite": "6.3.5",
135+
"vite-plugin-dts": "4.5.4",
136136
"vite-plugin-eslint": "^1.8.1",
137137
"vite-plugin-inspect": "^0.8.4",
138138
"vite-plugin-static-copy": "1.0.4",

packages/kit-headless/src/components/carousel/title.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { component$, Slot, useContext } from '@builder.io/qwik';
1+
import { component$, PropsOf, Slot, useContext } from '@builder.io/qwik';
22
import { carouselContextId } from './context';
33

44
/** Used to distinguish accessible label from other carousels */
5-
export const CarouselTitle = component$(() => {
5+
export const CarouselTitle = component$<PropsOf<'div'>>(() => {
66
const context = useContext(carouselContextId);
77
const titleId = `${context.localId}-title`;
88

packages/kit-styled/src/components/carousel/carousel.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const Next = component$<
157157
);
158158
});
159159

160-
const Pagination = component$(({ ...props }: PropsOf<typeof HCarousel.Pagination>) => {
160+
const Pagination = component$<PropsOf<typeof HCarousel.Pagination>>(({ ...props }) => {
161161
return (
162162
<HCarousel.Pagination
163163
{...props}
@@ -168,7 +168,7 @@ const Pagination = component$(({ ...props }: PropsOf<typeof HCarousel.Pagination
168168
);
169169
});
170170

171-
const Bullet = component$((props: PropsOf<typeof HCarousel.Bullet>) => {
171+
const Bullet = component$<PropsOf<typeof HCarousel.Bullet>>((props) => {
172172
return (
173173
<HCarousel.Bullet
174174
{...props}
@@ -181,7 +181,7 @@ const Bullet = component$((props: PropsOf<typeof HCarousel.Bullet>) => {
181181
);
182182
});
183183

184-
const Title = component$((props: PropsOf<typeof HCarousel.Title>) => {
184+
const Title = component$<PropsOf<typeof HCarousel.Title>>((props) => {
185185
return (
186186
<HCarousel.Title {...props}>
187187
<Slot />
@@ -200,7 +200,7 @@ const Stepper = (props: PropsOf<typeof HCarousel.Stepper>) => {
200200
);
201201
};
202202

203-
const Step = component$((props: PropsOf<typeof HCarousel.Step>) => {
203+
const Step = component$<PropsOf<typeof HCarousel.Step>>((props) => {
204204
return (
205205
<HCarousel.Step
206206
{...props}

0 commit comments

Comments
 (0)