Skip to content

Commit e17e110

Browse files
Bump the development-dependencies group across 1 directory with 18 updates (#559)
| Package | From | To | | --- | --- | --- | | [@eslint/css](https://github.com/eslint/css) | `0.14.1` | `1.1.0` | | [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.39.4` | `10.0.1` | | [@tailwindcss/vite](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-vite) | `4.2.2` | `4.2.4` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.5.0` | `25.6.0` | | [eslint](https://github.com/eslint/eslint) | `9.39.4` | `10.2.1` | | [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist) | `5.7.0` | `5.9.0` | | [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) | `7.0.1` | `7.1.1` | | [eslint-plugin-storybook](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/eslint-plugin) | `10.3.3` | `10.3.5` | | [globals](https://github.com/sindresorhus/globals) | `17.4.0` | `17.5.0` | | [jsdom](https://github.com/jsdom/jsdom) | `29.0.1` | `29.0.2` | | [prettier](https://github.com/prettier/prettier) | `3.8.1` | `3.8.3` | | [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) | `0.7.2` | `0.7.3` | | [tailwind-csstree](https://github.com/humanwhocodes/tailwind-csstree) | `0.1.4` | `0.3.1` | | [typescript](https://github.com/microsoft/TypeScript) | `5.9.3` | `6.0.3` | | [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.57.2` | `8.59.0` | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `7.3.2` | `8.0.10` | | [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `4.1.1` | `4.1.5` | * make tag input controlled The React Hooks lint upgrade reports synchronous state updates from effects. `TagInput` mirrored its `tags` prop into local state and then synchronized that mirror from an effect whenever the parent changed the value. Render from the `tags` prop directly and keep only the draft input text in local state. Add, remove, and Backspace handling now compute the next tag array from the controlled prop and notify the parent through `onChange`, so external prop changes still update the rendered tags without a syncing effect. * remove deprecated baseUrl TypeScript 6 reports `baseUrl` as deprecated and blocks compilation unless the deprecation is explicitly ignored. The project only used `baseUrl` to make the `@*` path alias point at source files. Drop `baseUrl` and make the alias target explicit relative to the config file. This preserves the existing import behavior while avoiding a temporary compiler deprecation override. * support Vite 8 manual chunks Vite 8 now validates `manualChunks` for the Rolldown build path, and the existing object form is rejected before production assets can be emitted. The chunk split was still useful for keeping the larger UI dependencies out of the main bundle. Convert the chunk configuration to the function form accepted by the newer bundler. The function matches normalized module IDs for the same dependency families, preserving the previous chunk names without changing application runtime behavior. * fix upgraded Vitest warnings The upgraded test toolchain surfaced warnings for deprecated path-resolution plugin wiring, a nested module mock, and JSDOM's missing scroll API. The path warning came from keeping `vite-tsconfig-paths` after Vite added native `resolve.tsconfigPaths` support, so the plugin was both noisy and redundant. Use Vite's native `resolve.tsconfigPaths` support in both Vite and Vitest config, and remove the now-unused `vite-tsconfig-paths` dependency. Move the job-search API mock to module scope so Vitest's hoisting behavior is explicit, and provide a minimal `scrollTo` test shim for code paths that expect browser scrolling APIs. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Blake Gentry <blakesgentry@gmail.com>
1 parent bf7f734 commit e17e110

8 files changed

Lines changed: 1349 additions & 1141 deletions

File tree

package-lock.json

Lines changed: 1253 additions & 1051 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,47 +26,46 @@
2626
},
2727
"devDependencies": {
2828
"@chromatic-com/storybook": "^5.1.2",
29-
"@eslint/css": "^0.14.1",
30-
"@eslint/js": "^9.39.2",
29+
"@eslint/css": "^1.1.0",
30+
"@eslint/js": "^10.0.1",
3131
"@faker-js/faker": "^10.4.0",
3232
"@storybook/addon-docs": "^10.3.5",
3333
"@storybook/addon-links": "^10.3.5",
3434
"@storybook/addon-onboarding": "^10.3.5",
3535
"@storybook/addon-themes": "^10.3.5",
3636
"@storybook/react-vite": "^10.3.5",
3737
"@tailwindcss/forms": "^0.5.11",
38-
"@tailwindcss/vite": "^4.2.2",
38+
"@tailwindcss/vite": "^4.2.4",
3939
"@tanstack/eslint-plugin-query": "^5.100.1",
4040
"@tanstack/react-query-devtools": "^5.100.1",
4141
"@tanstack/react-router-devtools": "^1.166.13",
4242
"@tanstack/router-vite-plugin": "^1.166.38",
4343
"@testing-library/jest-dom": "^6.9.1",
4444
"@testing-library/react": "^16.3.2",
4545
"@types/eslint__js": "^9.14.0",
46-
"@types/node": "^25.5.0",
46+
"@types/node": "^25.6.0",
4747
"@types/react": "^19.2.14",
4848
"@types/react-dom": "^19.2.3",
4949
"@vitejs/plugin-react-swc": "^4.3.0",
5050
"concurrently": "^9.2.1",
51-
"eslint": "^9.39.2",
51+
"eslint": "^10.2.1",
5252
"eslint-config-prettier": "^10.1.8",
53-
"eslint-plugin-perfectionist": "^5.7.0",
54-
"eslint-plugin-react-hooks": "^7.0.1",
53+
"eslint-plugin-perfectionist": "^5.9.0",
54+
"eslint-plugin-react-hooks": "^7.1.1",
5555
"eslint-plugin-react-refresh": "^0.5.2",
56-
"eslint-plugin-storybook": "^10.3.3",
56+
"eslint-plugin-storybook": "^10.3.5",
5757
"fishery": "^2.4.0",
58-
"globals": "^17.4.0",
59-
"jsdom": "^29.0.1",
60-
"prettier": "^3.8.1",
61-
"prettier-plugin-tailwindcss": "^0.7.2",
58+
"globals": "^17.5.0",
59+
"jsdom": "^29.0.2",
60+
"prettier": "^3.8.3",
61+
"prettier-plugin-tailwindcss": "^0.7.3",
6262
"storybook": "^10.3.5",
63-
"tailwind-csstree": "0.1.4",
63+
"tailwind-csstree": "0.3.1",
6464
"tailwindcss": "^4.1.8",
65-
"typescript": "^5.9.3",
66-
"typescript-eslint": "^8.57.2",
67-
"vite": "^7.3.2",
68-
"vite-tsconfig-paths": "^6.1.1",
69-
"vitest": "^4.1.1"
65+
"typescript": "^6.0.3",
66+
"typescript-eslint": "^8.59.0",
67+
"vite": "^8.0.10",
68+
"vitest": "^4.1.5"
7069
},
7170
"overrides": {
7271
"storybook": "$storybook"

src/components/TagInput.tsx

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { XMarkIcon } from "@heroicons/react/20/solid";
2-
import { KeyboardEvent, useEffect, useState } from "react";
2+
import { KeyboardEvent, useState } from "react";
33

44
import { Badge, type BadgeColor } from "./Badge";
55

@@ -28,42 +28,29 @@ const TagInput = ({
2828
tags = [],
2929
}: TagInputProps) => {
3030
const [inputValue, setInputValue] = useState("");
31-
const [internalTags, setInternalTags] = useState<string[]>(tags);
32-
33-
// Update internal tags when external tags change
34-
useEffect(() => {
35-
setInternalTags(tags);
36-
}, [tags]);
3731

3832
const addTag = (tag: string) => {
3933
const trimmedTag = tag.trim();
40-
if (trimmedTag && !internalTags.includes(trimmedTag)) {
41-
const newTags = [...internalTags, trimmedTag];
42-
setInternalTags(newTags);
34+
if (trimmedTag && !tags.includes(trimmedTag)) {
35+
const newTags = [...tags, trimmedTag];
4336
onChange(newTags);
4437
}
4538
setInputValue("");
4639
};
4740

4841
const removeTag = (tagToRemove: string) => {
49-
const newTags = internalTags.filter((tag) => tag !== tagToRemove);
50-
setInternalTags(newTags);
42+
const newTags = tags.filter((tag) => tag !== tagToRemove);
5143
onChange(newTags);
5244
};
5345

5446
const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {
5547
if (e.key === "Enter" && inputValue) {
5648
e.preventDefault();
5749
addTag(inputValue);
58-
} else if (
59-
e.key === "Backspace" &&
60-
!inputValue &&
61-
internalTags.length > 0
62-
) {
50+
} else if (e.key === "Backspace" && !inputValue && tags.length > 0) {
6351
// Remove the last tag when backspace is pressed and input is empty
64-
const newTags = [...internalTags];
52+
const newTags = [...tags];
6553
newTags.pop();
66-
setInternalTags(newTags);
6754
onChange(newTags);
6855
}
6956
};
@@ -76,7 +63,7 @@ const TagInput = ({
7663
} dark:border-slate-600 dark:bg-slate-700`}
7764
style={{ minHeight: "38px" }}
7865
>
79-
{internalTags.map((tag) => (
66+
{tags.map((tag) => (
8067
<div className="flex items-center" key={tag}>
8168
<Badge className="flex items-center gap-1" color={badgeColor}>
8269
<span className="py-0.5">{tag}</span>
@@ -100,7 +87,7 @@ const TagInput = ({
10087
name={name}
10188
onChange={(e) => setInputValue(e.target.value)}
10289
onKeyDown={handleKeyDown}
103-
placeholder={internalTags.length === 0 ? placeholder : ""}
90+
placeholder={tags.length === 0 ? placeholder : ""}
10491
type="text"
10592
value={inputValue}
10693
/>

src/components/job-search/JobSearch.test.tsx

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,47 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
1010

1111
import { Filter, FilterTypeId, JobSearch } from "./JobSearch";
1212

13+
vi.mock("./api", () => ({
14+
fetchSuggestions: async (
15+
filterTypeId: string,
16+
query: string,
17+
selectedValues: string[],
18+
) => {
19+
if (filterTypeId === "kind") {
20+
const mockKinds = [
21+
"batch",
22+
"stream",
23+
"scheduled",
24+
"one-time",
25+
"recurring",
26+
"Chaos",
27+
"AITrainingBatch",
28+
"UtilizeNewModel",
29+
];
30+
return mockKinds
31+
.filter((kind) => kind.toLowerCase().includes(query.toLowerCase()))
32+
.filter((kind) => !selectedValues.includes(kind));
33+
} else if (filterTypeId === "queue") {
34+
const mockQueues = [
35+
"default",
36+
"high-priority",
37+
"low-priority",
38+
"batch",
39+
"realtime",
40+
];
41+
return mockQueues
42+
.filter((queue) => queue.includes(query.toLowerCase()))
43+
.filter((queue) => !selectedValues.includes(queue));
44+
} else if (filterTypeId === "priority") {
45+
const priorities = ["1", "2", "3", "4"];
46+
return priorities
47+
.filter((priority) => priority.includes(query))
48+
.filter((priority) => !selectedValues.includes(priority));
49+
}
50+
return [];
51+
},
52+
}));
53+
1354
// Add type declarations for test functions
1455
declare module "vitest" {
1556
interface Assertion<T> {
@@ -20,46 +61,6 @@ declare module "vitest" {
2061
describe("JobSearch", () => {
2162
beforeEach(() => {
2263
vi.clearAllMocks();
23-
vi.mock("./api", () => ({
24-
fetchSuggestions: async (
25-
filterTypeId: string,
26-
query: string,
27-
selectedValues: string[],
28-
) => {
29-
if (filterTypeId === "kind") {
30-
const mockKinds = [
31-
"batch",
32-
"stream",
33-
"scheduled",
34-
"one-time",
35-
"recurring",
36-
"Chaos",
37-
"AITrainingBatch",
38-
"UtilizeNewModel",
39-
];
40-
return mockKinds
41-
.filter((kind) => kind.toLowerCase().includes(query.toLowerCase()))
42-
.filter((kind) => !selectedValues.includes(kind));
43-
} else if (filterTypeId === "queue") {
44-
const mockQueues = [
45-
"default",
46-
"high-priority",
47-
"low-priority",
48-
"batch",
49-
"realtime",
50-
];
51-
return mockQueues
52-
.filter((queue) => queue.includes(query.toLowerCase()))
53-
.filter((queue) => !selectedValues.includes(queue));
54-
} else if (filterTypeId === "priority") {
55-
const priorities = ["1", "2", "3", "4"];
56-
return priorities
57-
.filter((priority) => priority.includes(query))
58-
.filter((priority) => !selectedValues.includes(priority));
59-
}
60-
return [];
61-
},
62-
}));
6364
});
6465

6566
describe("Basic Rendering & Props", () => {

src/test/setup.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ class ResizeObserverMock {
1515

1616
global.ResizeObserver = ResizeObserverMock;
1717

18+
// JSDOM does not implement scrolling APIs used by router and focus helpers.
19+
Object.defineProperty(window, "scrollTo", {
20+
configurable: true,
21+
value: () => {},
22+
writable: true,
23+
});
24+
1825
// Headless UI relies on the Web Animations API for transitions. JSDOM doesn't
1926
// implement it, and Headless UI will polyfill with warnings (and may behave
2027
// differently across versions). Provide a minimal stable polyfill.

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
"noFallthroughCasesInSwitch": true,
2222

2323
// allow importing services by @services:
24-
"baseUrl": "./src",
2524
"paths": {
26-
"@*": ["./*"]
25+
"@*": ["./src/*"]
2726
},
2827
"typeRoots": ["../../node_modules/@heroicons/**/*.d.ts"]
2928
},

vite.config.ts

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { tanstackRouter } from "@tanstack/router-plugin/vite";
33
import react from "@vitejs/plugin-react-swc";
44
import path from "node:path";
55
import { defineConfig } from "vite";
6-
import tsconfigPaths from "vite-tsconfig-paths";
76

87
const dagreCjsPath = path.resolve(
98
process.cwd(),
@@ -18,12 +17,25 @@ export default defineConfig({
1817
rollupOptions: {
1918
input: "src/main.tsx",
2019
output: {
21-
manualChunks: {
20+
manualChunks(id) {
2221
// use vite-bundle-visualizer to find good candidates for manual chunks:
23-
dagrejs: ["@dagrejs/dagre"],
24-
headlessui: ["@headlessui/react"],
25-
"react-dom": ["react-dom"],
26-
reactflow: ["@xyflow/react"],
22+
const normalizedId = id.replaceAll("\\", "/");
23+
24+
if (normalizedId.includes("/node_modules/@dagrejs/dagre/")) {
25+
return "dagrejs";
26+
}
27+
28+
if (normalizedId.includes("/node_modules/@headlessui/react/")) {
29+
return "headlessui";
30+
}
31+
32+
if (normalizedId.includes("/node_modules/react-dom/")) {
33+
return "react-dom";
34+
}
35+
36+
if (normalizedId.includes("/node_modules/@xyflow/react/")) {
37+
return "reactflow";
38+
}
2739
},
2840
},
2941
},
@@ -36,11 +48,11 @@ export default defineConfig({
3648
tanstackRouter({
3749
routeFileIgnorePattern: ".(const|schema|test).(ts|tsx)",
3850
}),
39-
tsconfigPaths(),
4051
],
4152
resolve: {
4253
alias: {
4354
"@dagrejs/dagre": dagreCjsPath,
4455
},
56+
tsconfigPaths: true,
4557
},
4658
});

vitest.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import tsconfigPaths from "vite-tsconfig-paths";
21
import { defineConfig } from "vitest/config";
32

43
export default defineConfig({
5-
plugins: [tsconfigPaths()],
4+
resolve: {
5+
tsconfigPaths: true,
6+
},
67
test: {
78
environment: "jsdom",
89
globals: true,

0 commit comments

Comments
 (0)