pin vite-plus versions to 0.1.19

This commit is contained in:
Amruth Pillai
2026-04-25 10:53:19 +02:00
parent 6ff754d125
commit 847d69b621
13 changed files with 1282 additions and 4012 deletions
+36 -40
View File
@@ -38,13 +38,13 @@
"@ai-sdk/anthropic": "^3.0.71",
"@ai-sdk/google": "^3.0.64",
"@ai-sdk/openai": "^3.0.53",
"@aws-sdk/client-s3": "^3.1034.0",
"@aws-sdk/client-s3": "^3.1037.0",
"@base-ui/react": "^1.4.1",
"@better-auth/api-key": "^1.6.7",
"@better-auth/drizzle-adapter": "^1.6.7",
"@better-auth/api-key": "^1.6.9",
"@better-auth/drizzle-adapter": "^1.6.9",
"@better-auth/infra": "^0.2.5",
"@better-auth/oauth-provider": "^1.6.7",
"@better-auth/passkey": "^1.6.7",
"@better-auth/oauth-provider": "^1.6.9",
"@better-auth/passkey": "^1.6.9",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
@@ -54,20 +54,20 @@
"@lingui/react": "^6.0.0",
"@modelcontextprotocol/sdk": "^1.29.0",
"@monaco-editor/react": "4.8.0-rc.3",
"@orpc/client": "^1.13.14",
"@orpc/json-schema": "^1.13.14",
"@orpc/openapi": "^1.13.14",
"@orpc/server": "^1.13.14",
"@orpc/tanstack-query": "^1.13.14",
"@orpc/zod": "^1.13.14",
"@orpc/client": "^1.14.0",
"@orpc/json-schema": "^1.14.0",
"@orpc/openapi": "^1.14.0",
"@orpc/server": "^1.14.0",
"@orpc/tanstack-query": "^1.14.0",
"@orpc/zod": "^1.14.0",
"@phosphor-icons/react": "^2.1.10",
"@phosphor-icons/web": "^2.1.2",
"@sindresorhus/slugify": "^3.0.0",
"@t3-oss/env-core": "^0.13.11",
"@tanstack/react-query": "^5.99.2",
"@tanstack/react-router": "^1.168.23",
"@tanstack/react-query": "^5.100.1",
"@tanstack/react-router": "^1.168.24",
"@tanstack/react-router-ssr-query": "^1.166.11",
"@tanstack/react-start": "^1.167.42",
"@tanstack/react-start": "^1.167.48",
"@tanstack/zod-adapter": "^1.166.9",
"@tiptap/extension-highlight": "^3.22.4",
"@tiptap/extension-table": "^3.22.4",
@@ -80,13 +80,13 @@
"ai": "^6.0.168",
"ai-sdk-ollama": "^3.8.3",
"bcrypt": "^6.0.0",
"better-auth": "^1.6.7",
"better-auth": "^1.6.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"docx": "^9.6.1",
"dompurify": "^3.4.1",
"drizzle-orm": "1.0.0-beta.23",
"drizzle-orm": "1.0.0-beta.22",
"drizzle-zod": "1.0.0-beta.14-a36c63d",
"es-toolkit": "^1.46.0",
"fast-deep-equal": "^3.1.3",
@@ -97,7 +97,7 @@
"jsonrepair": "^3.14.0",
"monaco-editor": "^0.55.1",
"motion": "^12.38.0",
"nodemailer": "^8.0.5",
"nodemailer": "^8.0.6",
"pg": "^8.20.0",
"puppeteer-core": "^24.42.0",
"qrcode.react": "^4.2.0",
@@ -140,46 +140,42 @@
"@types/pg": "^8.20.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@typescript/native-preview": "7.0.0-dev.20260422.1",
"@typescript/native-preview": "7.0.0-dev.20260425.1",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/coverage-v8": "^4.1.5",
"babel-plugin-macros": "^3.1.0",
"drizzle-kit": "1.0.0-beta.23",
"happy-dom": "^20.9.0",
"jose": "^6.2.2",
"knip": "^6.6.1",
"knip": "^6.6.3",
"nitro": "3.0.260415-beta",
"node-addon-api": "^8.7.0",
"node-gyp": "^12.3.0",
"npm-check-updates": "^21.0.3",
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
"vite": "npm:@voidzero-dev/vite-plus-core@^0.1.19",
"vite-plugin-pwa": "^1.2.0",
"vite-plus": "latest",
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
"vite-plus": "^0.1.19",
"vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.19"
},
"packageManager": "pnpm@10.33.1",
"packageManager": "pnpm@10.33.2",
"pnpm": {
"overrides": {
"@isaacs/brace-expansion": "^5.0.1",
"@hono/node-server": "^1.19.14",
"ajv": "^8.18.0",
"basic-ftp": "^5.3.0",
"dompurify": "^3.4.1",
"effect": "^3.20.0",
"fast-xml-parser": "^5.3.8",
"hono": "^4.12.14",
"lodash": "^4.17.23",
"markdown-it": "^14.1.1",
"minimatch": "^10.2.3",
"qs": "^6.14.2",
"serialize-javascript": "^7.0.4"
},
"onlyBuiltDependencies": [
"bcrypt",
"esbuild",
"msw",
"prisma",
"sharp"
]
],
"overrides": {
"dompurify@<3.3.2": ">=3.3.2",
"serialize-javascript@<=7.0.2": ">=7.0.3",
"dompurify@>=3.1.3 <=3.3.1": ">=3.3.2",
"serialize-javascript@<7.0.5": ">=7.0.5",
"dompurify@<=3.3.1": ">=3.3.2",
"dompurify@<=3.3.3": ">=3.4.0",
"dompurify@<3.4.0": ">=3.4.0",
"dompurify@>=1.0.10 <3.4.0": ">=3.4.0",
"dompurify@>=3.0.1 <3.4.0": ">=3.4.0",
"uuid@<14.0.0": ">=14.0.0"
}
}
}
+1177 -3921
View File
File diff suppressed because it is too large Load Diff
+23 -20
View File
@@ -1,26 +1,31 @@
import type * as DndKitCore from "@dnd-kit/core";
import type * as DndKitSortable from "@dnd-kit/sortable";
import { cleanup, fireEvent, render, screen } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vite-plus/test";
import { ChipInput } from "./chip-input";
afterEach(cleanup);
// Mock dnd-kit
vi.mock("@dnd-kit/core", () => ({
DndContext: ({ children }: { children: React.ReactNode }) => <>{children}</>,
closestCenter: vi.fn(),
KeyboardSensor: vi.fn(),
PointerSensor: vi.fn(),
useSensor: vi.fn(() => ({})),
useSensors: vi.fn(() => []),
closestCenter: vi.fn<typeof DndKitCore.closestCenter>(),
KeyboardSensor: vi.fn<typeof DndKitCore.KeyboardSensor>(),
PointerSensor: vi.fn<typeof DndKitCore.PointerSensor>(),
useSensor: vi.fn<typeof DndKitCore.useSensor>(),
useSensors: vi.fn<typeof DndKitCore.useSensors>(),
}));
vi.mock("@dnd-kit/sortable", () => ({
SortableContext: ({ children }: { children: React.ReactNode }) => <>{children}</>,
horizontalListSortingStrategy: vi.fn(),
sortableKeyboardCoordinates: vi.fn(),
horizontalListSortingStrategy: vi.fn<typeof DndKitSortable.horizontalListSortingStrategy>(),
sortableKeyboardCoordinates: vi.fn<typeof DndKitSortable.sortableKeyboardCoordinates>(),
useSortable: () => ({
attributes: {},
listeners: {},
setNodeRef: vi.fn(),
setNodeRef: vi.fn<(node: HTMLElement | null) => void>(),
transform: null,
transition: null,
isDragging: false,
@@ -49,8 +54,6 @@ vi.mock("@phosphor-icons/react", () => ({
XIcon: ({ className }: any) => <span data-testid="remove-icon" className={className} />,
}));
import { ChipInput } from "./chip-input";
describe("ChipInput", () => {
describe("rendering", () => {
it("renders the input field", () => {
@@ -85,7 +88,7 @@ describe("ChipInput", () => {
describe("adding chips via Enter key", () => {
it("adds a chip when Enter is pressed", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={[]} onChange={onChange} />);
const input = screen.getByRole("textbox");
@@ -96,7 +99,7 @@ describe("ChipInput", () => {
});
it("does not add empty chips", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={[]} onChange={onChange} />);
const input = screen.getByRole("textbox");
@@ -107,7 +110,7 @@ describe("ChipInput", () => {
});
it("trims whitespace from chips", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={[]} onChange={onChange} />);
const input = screen.getByRole("textbox");
@@ -118,7 +121,7 @@ describe("ChipInput", () => {
});
it("prevents duplicate chips", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={["React"]} onChange={onChange} />);
const input = screen.getByRole("textbox");
@@ -132,7 +135,7 @@ describe("ChipInput", () => {
describe("adding chips via comma", () => {
it("adds a chip when comma is typed in the input", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={[]} onChange={onChange} />);
const input = screen.getByRole("textbox");
@@ -142,7 +145,7 @@ describe("ChipInput", () => {
});
it("handles multiple comma-separated values", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={[]} onChange={onChange} />);
const input = screen.getByRole("textbox");
@@ -155,7 +158,7 @@ describe("ChipInput", () => {
describe("removing chips", () => {
it("calls onChange without the removed chip when remove button is clicked", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={["React", "Vue", "Angular"]} onChange={onChange} />);
// Find all remove buttons
@@ -166,7 +169,7 @@ describe("ChipInput", () => {
});
it("removes the first chip correctly", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={["A", "B", "C"]} onChange={onChange} />);
const removeButtons = screen.getAllByLabelText(/Remove/);
@@ -176,7 +179,7 @@ describe("ChipInput", () => {
});
it("removes the last chip correctly", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={["A", "B", "C"]} onChange={onChange} />);
const removeButtons = screen.getAllByLabelText(/Remove/);
@@ -212,7 +215,7 @@ describe("ChipInput", () => {
});
it("saves edit when Enter is pressed", () => {
const onChange = vi.fn();
const onChange = vi.fn<NonNullable<React.ComponentProps<typeof ChipInput>["onChange"]>>();
render(<ChipInput value={["React"]} onChange={onChange} />);
const editButton = screen.getByLabelText("Edit React");
+11 -9
View File
@@ -16,12 +16,14 @@ vi.mock("@phosphor-icons/react", () => ({
TagIcon: () => <span data-testid="tag-icon" />,
}));
import React from "react";
import { URLInput } from "./url-input";
describe("URLInput", () => {
describe("URL prefix handling", () => {
it("displays URL without https:// prefix", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "https://example.com", label: "" }} onChange={onChange} />);
const input = screen.getByDisplayValue("example.com");
@@ -29,7 +31,7 @@ describe("URLInput", () => {
});
it("displays empty string when URL is empty", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "", label: "" }} onChange={onChange} />);
const inputs = screen.getAllByRole("textbox");
@@ -38,7 +40,7 @@ describe("URLInput", () => {
});
it("adds https:// prefix when user types", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "", label: "" }} onChange={onChange} />);
const inputs = screen.getAllByRole("textbox");
@@ -51,7 +53,7 @@ describe("URLInput", () => {
});
it("does not double-prefix when user types https://", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "", label: "" }} onChange={onChange} />);
const inputs = screen.getAllByRole("textbox");
@@ -64,7 +66,7 @@ describe("URLInput", () => {
});
it("sends empty URL when input is cleared", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "https://example.com", label: "" }} onChange={onChange} />);
const inputs = screen.getAllByRole("textbox");
@@ -79,7 +81,7 @@ describe("URLInput", () => {
describe("label preservation", () => {
it("preserves label when URL changes", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "https://old.com", label: "My Site" }} onChange={onChange} />);
const inputs = screen.getAllByRole("textbox");
@@ -94,14 +96,14 @@ describe("URLInput", () => {
describe("hideLabelButton prop", () => {
it("hides the label button when hideLabelButton is true", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "", label: "" }} onChange={onChange} hideLabelButton={true} />);
expect(screen.queryByTestId("tag-icon")).toBeNull();
});
it("shows the label button by default", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "", label: "" }} onChange={onChange} />);
expect(screen.getByTestId("tag-icon")).toBeDefined();
@@ -110,7 +112,7 @@ describe("URLInput", () => {
describe("displays the https:// prefix text", () => {
it("shows https:// as static text", () => {
const onChange = vi.fn();
const onChange = vi.fn<React.ComponentProps<typeof URLInput>["onChange"]>();
render(<URLInput value={{ url: "", label: "" }} onChange={onChange} />);
expect(screen.getByText("https://")).toBeDefined();
+16 -11
View File
@@ -1,5 +1,11 @@
import type { toast } from "sonner";
import { afterEach, describe, expect, it, vi } from "vite-plus/test";
import { defaultResumeData } from "@/schema/resume/data";
import { useResumeStore } from "./resume";
// Mock dependencies before importing the store
vi.mock("@lingui/core/macro", () => ({
t: (strings: TemplateStringsArray) => strings[0],
@@ -7,8 +13,8 @@ vi.mock("@lingui/core/macro", () => ({
vi.mock("sonner", () => ({
toast: {
error: vi.fn(() => "toast-id"),
dismiss: vi.fn(),
error: vi.fn<typeof toast.error>(() => "toast-id"),
dismiss: vi.fn<typeof toast.dismiss>(),
},
}));
@@ -16,16 +22,12 @@ vi.mock("@/integrations/orpc/client", () => ({
orpc: {
resume: {
update: {
call: vi.fn(() => Promise.resolve()),
call: vi.fn<() => Promise<void>>(() => Promise.resolve()),
},
},
},
}));
import { defaultResumeData } from "@/schema/resume/data";
import { useResumeStore } from "./resume";
// ---------------------------------------------------------------------------
// Helpers
// ---------------------------------------------------------------------------
@@ -128,10 +130,13 @@ describe("useResumeStore — updateResumeData", () => {
// Store starts with null resume
useResumeStore.getState().initialize(null);
// Should not throw
useResumeStore.getState().updateResumeData((draft) => {
draft.basics.name = "Should not apply";
});
expect(() =>
useResumeStore.getState().updateResumeData((draft) => {
draft.basics.name = "Should not apply";
}),
).not.toThrow();
expect(useResumeStore.getState().isReady).toBe(false);
});
it("blocks updates when resume is locked", async () => {
+1 -1
View File
@@ -11,7 +11,7 @@ interface FontDisplayProps {
const loadedFonts = new Set<string>();
export function FontDisplay({ name, url, type = "web" }: FontDisplayProps) {
export function FontDisplay({ name, url, type }: FontDisplayProps) {
const previewName = type === "local" ? name : `${name} Preview`;
const containerRef = useRef<HTMLDivElement>(null);
+1 -1
View File
@@ -4,7 +4,7 @@ import { Toaster as Sonner, type ToasterProps } from "sonner";
import { useTheme } from "../theme/provider";
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme();
const { theme } = useTheme();
return (
<Sonner
+3 -3
View File
@@ -21,7 +21,7 @@ describe("useControlledState", () => {
});
it("calls onChange when setter is called", () => {
const onChange = vi.fn();
const onChange = vi.fn<(value: string) => void>();
const { result } = renderHook(() => useControlledState({ defaultValue: "a", onChange }));
act(() => {
@@ -32,7 +32,7 @@ describe("useControlledState", () => {
});
it("passes extra args to onChange", () => {
const onChange = vi.fn();
const onChange = vi.fn<(value: string, arg: number) => void>();
const { result } = renderHook(() => useControlledState<string, [number]>({ defaultValue: "a", onChange }));
act(() => {
@@ -62,7 +62,7 @@ describe("useControlledState", () => {
});
it("still calls onChange when setter is called in controlled mode", () => {
const onChange = vi.fn();
const onChange = vi.fn<(value: string) => void>();
const { result } = renderHook(() => useControlledState({ value: "x", onChange }));
act(() => {
+1 -1
View File
@@ -5,7 +5,7 @@ interface CommonControlledStateProps<T> {
defaultValue?: T;
}
type UseControlledStateProps<T, Rest extends any[] = []> = CommonControlledStateProps<T> & {
export type UseControlledStateProps<T, Rest extends any[] = []> = CommonControlledStateProps<T> & {
onChange?: (value: T, ...args: Rest) => void;
};
@@ -4,7 +4,7 @@ import { JSearchProvider } from "./jsearch";
// --- Mock fetch globally ---
const mockFetch = vi.fn();
const mockFetch = vi.fn<(url: string, init?: RequestInit) => Promise<unknown>>();
global.fetch = mockFetch as never;
// --- Mock helpers ---
+3 -3
View File
@@ -1,12 +1,12 @@
import { beforeEach, describe, expect, it, vi } from "vite-plus/test";
import type { JobResult, PostFilterOptions, RapidApiQuota } from "@/schema/jobs";
import type { JobResult, PostFilterOptions, RapidApiQuota, SearchResponse } from "@/schema/jobs";
// --- Mock factory ---
const mockProvider = {
search: vi.fn(),
testConnection: vi.fn(),
search: vi.fn<() => Promise<SearchResponse>>(),
testConnection: vi.fn<() => Promise<{ success: boolean; rapidApiQuota?: RapidApiQuota }>>(),
};
vi.mock("@/integrations/jobs/factory", () => ({
+8 -1
View File
@@ -27,7 +27,14 @@ function RouteComponent() {
return (
<div className="fixed inset-0">
<TransformWrapper centerOnInit limitToBounds={false} minScale={0.3} initialScale={0.6} maxScale={6} wheel={{ step: 0.001 }}>
<TransformWrapper
centerOnInit
limitToBounds={false}
minScale={0.3}
initialScale={0.6}
maxScale={6}
wheel={{ step: 0.001 }}
>
<TransformComponent wrapperClass="h-full! w-full!">
<ResumePreview
showPageNumbers
+1
View File
@@ -234,6 +234,7 @@ const config = defineConfig({
],
rules: {
"react/exhaustive-deps": "off",
"jest/no-conditional-expect": "off",
"jest/require-to-throw-message": "off",
"typescript/consistent-type-imports": "error",
},