Skip to content

Commit 57ad8fe

Browse files
authored
chore: update deps and agent docs (#4366)
1 parent f366b25 commit 57ad8fe

5 files changed

Lines changed: 1304 additions & 1732 deletions

File tree

.agents/architecture.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ Route file conventions:
121121

122122
## Presets (`src/presets/`)
123123

124-
31 presets. Structure per preset:
124+
Several deployment-target presets (+ internal `_nitro`/`_static`); see `.agents/presets.md`. Structure per preset:
125+
125126
```
126127
presets/<name>/
127128
├── preset.ts # defineNitroPreset()

.agents/presets.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Nitro Presets Reference
22

3-
## All Presets (31)
3+
## All Presets
44

55
### Core
66
- `_nitro/` — Internal presets (dev, prerender, worker modes)
7+
- `_static/` — Internal static / prerender-only output
78
- `standard/` — Framework-agnostic standard server
89
- `node/` — Node.js (server, middleware, cluster)
910
- `bun/` — Bun runtime
@@ -14,18 +15,20 @@
1415
- `azure/` — Azure Static Web Apps
1516
- `cloudflare/` — Cloudflare Pages/Workers
1617
- `deno/` — Deno Deploy
17-
- `firebase/` — Firebase Hosting
18-
- `netlify/` — Netlify Functions/Edge
19-
- `vercel/` — Vercel Functions/Edge
2018
- `digitalocean/` — DigitalOcean App Platform
19+
- `edgeone/` — Tencent EdgeOne
20+
- `firebase/` — Firebase Hosting
21+
- `genezio/` — Genezio
2122
- `heroku/` — Heroku
2223
- `koyeb/` — Koyeb
23-
- `zeabur/`Zeabur
24+
- `netlify/`Netlify Functions/Edge
2425
- `render.com/` — Render
2526
- `stormkit/` — Stormkit
26-
- `genezio/`Genezio
27+
- `vercel/`Vercel Functions/Edge
2728
- `winterjs/` — WinterJS
29+
- `zeabur/` — Zeabur
2830
- `zephyr/` — Zephyr
31+
- `zerops/` — Zerops
2932
- `alwaysdata/`
3033
- `cleavr/`
3134
- `flightcontrol/`

AGENTS.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ Nitro is a framework-agnostic and deployment-agnostic server framework powered b
1010

1111
## Key Scripts
1212

13-
- `pnpm build --stub` — Fast stub build for development.
14-
- `pnpm lint` — Lint and format code.
15-
- `pnpm fmt` — Automatically fix lint and formatting issues.
16-
- `pnpm test` — Run all tests.
17-
- `pnpm typecheck` — Run type tests.
13+
- `pnpm build --stub` — Fast stub build (`obuild --stub`) for development.
14+
- `pnpm build` — Full build (`pnpm gen-presets && obuild`).
15+
- `pnpm lint` — Check lint and formatting (`oxlint` + `oxfmt --check`).
16+
- `pnpm fmt` — Auto-fix lint and formatting (`automd` + `oxlint --fix` + `oxfmt`).
17+
- `pnpm test` — Full pipeline: `lint && build && typecheck && test:rollup && test:rolldown` (runs vitest against both the rollup and rolldown builders).
18+
- `pnpm test:rollup` / `pnpm test:rolldown` — Run vitest against a single builder (`NITRO_BUILDER`).
19+
- `pnpm typecheck` — Type-check with the TypeScript native-preview compiler (`tsgo --noEmit --skipLibCheck`).
1820

1921
**Always run** `pnpm fmt` and `pnpm typecheck` after making changes.
2022

@@ -30,10 +32,10 @@ Nitro is a framework-agnostic and deployment-agnostic server framework powered b
3032

3133
Project source is centralized under `src/`:
3234

33-
- `src/build` — Build logic (Vite | Rolldown | Rollup config, virtual templates, plugins).
35+
- `src/build` — Build logic (Vite | Rolldown | Rollup config, virtual templates in `src/build/virtual/`, plugins in `src/build/plugins/`).
3436
- `src/cli``nitro` CLI subcommands (each file in `src/cli/commands` is a command).
3537
- `src/config/` — Config defaults (`src/config/defaults.ts`) and resolvers/normalizers (`src/config/resolvers`).
36-
- `src/dev` and `src/runner` — Development server logic.
38+
- `src/dev` — Development server logic (`app.ts`, `server.ts`, `vfs.ts`).
3739
- `src/prerender` — Prerender logic.
3840
- `src/presets` — Deployment presets and runtime entry.
3941
- `src/types` — Shared types.
@@ -96,11 +98,11 @@ Each preset in `src/presets/` defines deployment target behavior:
9698
### Making Changes
9799

98100
1. Make changes in `src/`.
99-
2. Run `pnpm build --stub` if you changed build logic.
101+
2. Run `pnpm stub` if you changed build logic.
100102
3. Test with `pnpm test`.
101103
4. Run `pnpm fmt`.
102104
5. Run `pnpm typecheck`.
103-
6. Run `pnpm vitest run`.
105+
6. Run `pnpm test:rollup` and/or `pnpm test:rolldown` to run vitest against a specific builder.
104106

105107
## Contribution Principles
106108

@@ -115,7 +117,7 @@ Each preset in `src/presets/` defines deployment target behavior:
115117
## Common Gotchas
116118

117119
- **Don't use Node.js-specific APIs in `src/runtime/`** — Code runs in multiple runtimes (Node, workers, edge).
118-
- **Virtual modules must be registered** in `src/build/virtual.ts`.
120+
- **Virtual modules must be registered** in `src/build/virtual/_all.ts` (one template per file under `src/build/virtual/`).
119121
- **CLI commands** are in `src/cli/commands/` — Each file exports a command definition.
120122
- **Runtime size matters** — Check bundle impact with `pnpm build`.
121123
- **Use `pathe` not `node:path`** — Ensures cross-platform compatibility.
@@ -160,7 +162,7 @@ Each preset in `src/presets/` defines deployment target behavior:
160162
For deeper context, see `.agents/`:
161163

162164
- [`.agents/architecture.md`](.agents/architecture.md) — Full architecture: core instance, build system, config resolution, virtual modules, runtime internals, dev server, routing, key libraries.
163-
- [`.agents/presets.md`](.agents/presets.md) — All 31 presets, preset structure, how to create presets, resolution logic.
165+
- [`.agents/presets.md`](.agents/presets.md) — All presets (multiple deployment targets + internal `_nitro`/`_static`), preset structure, how to create presets, resolution logic.
164166
- [`.agents/testing.md`](.agents/testing.md) — Test structure, how tests work, adding regression tests, running tests.
165167
- [`.agents/vite.md`](.agents/vite.md) — Vite build system: plugin architecture (6 sub-plugins), environments API, dev server integration, production build stages, bundler config, HMR, runtime worker.
166168
- [`.agents/docs.md`](.agents/docs.md) — Documentation conventions: structure, preset naming (underscore), H3 v2 API patterns, import paths, common mistakes.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"@azure/functions": "^3.5.1",
8989
"@azure/static-web-apps-cli": "^2.0.9",
9090
"@cloudflare/workers-types": "^4.20260615.1",
91-
"@cloudflare/workers-utils": "^0.23.0",
91+
"@cloudflare/workers-utils": "^0.24.0",
9292
"@deno/types": "^0.0.1",
9393
"@hiogawa/vite-plugin-fullstack": "^0.0.11",
9494
"@netlify/edge-functions": "^3.0.8",
@@ -105,7 +105,7 @@
105105
"@types/estree": "^1.0.9",
106106
"@types/etag": "^1.8.4",
107107
"@types/http-proxy": "^1.17.17",
108-
"@types/node": "^25.9.3",
108+
"@types/node": "^26.0.0",
109109
"@types/node-fetch": "^2.6.13",
110110
"@types/semver": "^7.7.1",
111111
"@types/xml2js": "^0.4.14",
@@ -141,9 +141,9 @@
141141
"miniflare": "^4.20260611.0",
142142
"mlly": "^1.8.2",
143143
"nypm": "^0.6.7",
144-
"obuild": "^0.4.36",
144+
"obuild": "^0.4.37",
145145
"oxc-parser": "link:shims/oxc-parser",
146-
"oxfmt": "^0.54.0",
146+
"oxfmt": "^0.55.0",
147147
"oxlint": "^1.69.0",
148148
"pathe": "^2.0.3",
149149
"perfect-debounce": "^2.1.0",
@@ -175,7 +175,7 @@
175175
"xml2js": "^0.6.2",
176176
"youch": "^4.1.1",
177177
"youch-core": "^0.3.3",
178-
"zephyr-agent": "^0.2.0"
178+
"zephyr-agent": "^1.1.2"
179179
},
180180
"peerDependencies": {
181181
"@vercel/queue": "^0.3.1",

0 commit comments

Comments
 (0)