Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,17 @@ This project is using Vite+, a unified toolchain built on top of Vite, Rolldown,

Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.

## Built-in Commands vs Scripts

`vp <name>` runs a built-in command. `vp run <name>` runs a `package.json` script or a `vite.config.ts` task. Scripts cannot overwrite built-ins, so `vp dev` and `vp run dev` may do different things. Check `package.json` and `vite.config.ts` first, and run `vp run <name>` when the project defines a script or task with that name.

## Tool Versions

Run `vp toolchain` to show versions and relationships in the active Vite+
release. Add a tool name to select part of the graph. For example, run
`vp toolchain vite`. Use `--global` to ignore the local `vite-plus` package. Use
`vp why <package>` to show the package-manager dependency graph.

## Review Checklist

- [ ] Run `vp install` after pulling remote changes and before getting started.
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudflare/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineConfig({
entry: ["src/**/*.ts", "src/**/*.tsx", "!src/**/*.d.ts"],
clean: true,
deps: {
skipNodeModulesBundle: true,
neverBundle: true,
},
dts: {
tsgo: { path: getTscPath() },
Expand Down
4 changes: 2 additions & 2 deletions packages/vinext/src/shims/document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function Html(
return <html {...props} />;
}

// oxlint-disable-next-line typescript/consistent-type-definitions, typescript/no-unsafe-declaration-merging -- type-only class augmentation avoids emitting a Babel-incompatible declare field
// oxlint-disable-next-line eslint/no-redeclare, typescript/consistent-type-definitions, typescript/no-unsafe-declaration-merging -- type-only class augmentation avoids emitting a Babel-incompatible declare field
export interface Head {
context: HtmlProps;
}
Expand Down Expand Up @@ -102,7 +102,7 @@ export function Main(): React.ReactElement {
return <div id="__next" dangerouslySetInnerHTML={{ __html: "__NEXT_MAIN__" }} />;
}

// oxlint-disable-next-line typescript/consistent-type-definitions, typescript/no-unsafe-declaration-merging -- type-only class augmentation avoids emitting a Babel-incompatible declare field
// oxlint-disable-next-line eslint/no-redeclare, typescript/consistent-type-definitions, typescript/no-unsafe-declaration-merging -- type-only class augmentation avoids emitting a Babel-incompatible declare field
export interface NextScript {
context: HtmlProps;
}
Expand Down
1,484 changes: 806 additions & 678 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ preferFrozenLockfile: true
saveExact: true
blockExoticSubdeps: true
minimumReleaseAge: 1440
minimumReleaseAgeExclude:
- "@voidzero-dev/vite-plus-core@0.3.2"
- "@voidzero-dev/vite-plus-darwin-arm64@0.3.2"
- "@voidzero-dev/vite-plus-darwin-x64@0.3.2"
- "@voidzero-dev/vite-plus-linux-arm64-gnu@0.3.2"
- "@voidzero-dev/vite-plus-linux-arm64-musl@0.3.2"
- "@voidzero-dev/vite-plus-linux-x64-gnu@0.3.2"
- "@voidzero-dev/vite-plus-linux-x64-musl@0.3.2"
- "@voidzero-dev/vite-plus-win32-arm64-msvc@0.3.2"
- "@voidzero-dev/vite-plus-win32-x64-msvc@0.3.2"
- vite-plus@0.3.2

packages:
- apps/*
Expand Down Expand Up @@ -89,9 +100,9 @@ catalog:
typescript: ^7.0.0
use-count-up: 3.0.1
validator: ^13.15.26
vite: npm:@voidzero-dev/vite-plus-core@0.2.6
vite: npm:@voidzero-dev/vite-plus-core@0.3.2
vite-plugin-commonjs: ^0.10.4
vite-plus: 0.2.6
vite-plus: 0.3.2
vitest: 4.1.10

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should update vitest to 4.1.11 too.

web-vitals: ^4.2.4
wrangler: ^4.118.0
Expand Down
2 changes: 1 addition & 1 deletion tests/app-route-handler-trailing-slash.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Regression coverage for issue #1827 — `trailingSlash` not applied to App
* Router route handlers (`app/**​/route.ts`).
* Router route handlers (`app/[...]/route.ts`).
*
* Mirrors Next.js test/e2e/app-dir/app-routes-trailing-slash:
* - With `trailingSlash: true`, a request to `/runtime/edge` returns
Expand Down
1 change: 1 addition & 0 deletions tests/app-rsc-handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5095,6 +5095,7 @@ describe("createAppRscHandler", () => {
// test/e2e/app-dir/navigation/middleware.js
// https://github.com/vercel/next.js/blob/v16.2.6/test/e2e/app-dir/navigation/middleware.js
const middleware = vi.fn(
// oxlint-disable-next-line eslint/no-unused-vars -- the typed argument is inspected through the mock call below
(_: { nextUrl: URL }) => new Response(null, { headers: { "x-middleware-next": "1" } }),
);
const dispatchMatchedPage = vi.fn(async () => new Response("page", { status: 200 }));
Expand Down
8 changes: 4 additions & 4 deletions tests/pages-page-data.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1309,8 +1309,8 @@ describe("pages page data", () => {
let regenPromise: Promise<void> | null = null;
const applyRequestContexts = vi.fn();
const isrSet = vi.fn<ResolvePagesPageDataOptions["isrSet"]>(async () => {});
const runInFreshUnifiedContext = vi.fn(
async <T>(callback: () => Promise<T>): Promise<T> => callback(),
const runInFreshUnifiedContext = vi.fn(async <T>(callback: () => Promise<T>): Promise<T> =>
callback(),
) as ResolvePagesPageDataOptions["runInFreshUnifiedContext"];
const triggerBackgroundRegeneration = vi.fn((_key: string, renderFn: () => Promise<void>) => {
regenPromise = renderFn();
Expand Down Expand Up @@ -1939,8 +1939,8 @@ describe("pages page data", () => {
it("passes revalidateReason: 'stale' to getStaticProps during stale-while-revalidate regeneration", async () => {
let received: unknown = "untouched";
let regenPromise: Promise<void> | null = null;
const runInFreshUnifiedContext = vi.fn(
async <T>(callback: () => Promise<T>): Promise<T> => callback(),
const runInFreshUnifiedContext = vi.fn(async <T>(callback: () => Promise<T>): Promise<T> =>
callback(),
) as ResolvePagesPageDataOptions["runInFreshUnifiedContext"];
const triggerBackgroundRegeneration = vi.fn((_key: string, renderFn: () => Promise<void>) => {
regenPromise = renderFn();
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ export default defineConfig({
"arrow-body-style": ["error", "as-needed"],

"react/exhaustive-deps": "error",
"react/globals": "off",
"react/no-array-index-key": "error",
"react/refs": "off",
"react/rules-of-hooks": "error",
"react/self-closing-comp": "error",
"react/set-state-in-effect": "off",
"vinext-utils/prefer-shared-utils": "error",
},
overrides: [
Expand Down
Loading