## Summary
- Fixes#2610 — "Partial + redirect breaks islands"
- When a partial request (`?fresh-partial=true`) hits a server-side
redirect via `ctx.redirect()`, the `fresh-partial` search param is now
preserved in the redirect `Location` header
- Previously the param was lost, so the redirect target rendered as a
full page instead of a partial response, breaking island hydration
The fix is in `ctx.redirect()` in `packages/fresh/src/context.ts` — when
`this.isPartial` is true, the partial param is appended to the redirect
location (handling existing query params and hash fragments correctly).
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Add serialization/deserialization for all 8 Temporal types in the
jsonify module (used for island props): Instant, ZonedDateTime,
PlainDate, PlainTime, PlainDateTime, PlainYearMonth, PlainMonthDay,
Duration
- Stringify side guards with `typeof Temporal !== "undefined"` to avoid
ReferenceError when Temporal is unavailable
- Uses `.toString()` for serialization and `Type.from()` for
deserialization
Co-authored-by: Nano Miratus <nanomiratus@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Add a `./create` export to `@fresh/init` so users can scaffold
projects with `deno create @fresh/init` (Deno 2.7+)
- The old `deno run -Ar jsr:@fresh/init` continues to work but now shows
a deprecation warning
**New way (Deno 2.7+):**
```sh
deno create @fresh/init
```
**Old way (still works, with warning):**
```sh
deno run -Ar jsr:@fresh/init
```
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Inlined the `$ga4` module (from
`https://raw.githubusercontent.com/denoland/ga4/main/mod.ts`) into
`www/utils/ga4.ts`
- Replaced old `deno.land/std` URL imports with `@std/http`
(`getCookies`, `STATUS_TEXT`)
- Inlined the trivial `snakeCase` helper (was from `deno.land/x/case`)
- Removed `$ga4` import map entry from `deno.json`
The ga4 package was never published to jsr or npm, so inlining was the
cleanest way to eliminate the last raw URL-based dependency.
## Summary
- **docsearch**: Replaced `esm.sh` URL with `npm:@docsearch/js@^3.5.2`.
Added a type cast workaround in `SearchButton.tsx` since Deno's type
checker treats this npm package as CJS (missing `"type": "module"`).
- **imagescript**: Replaced `deno.land/x` URL with
`jsr:@matmen/imagescript@^1.3.0`. Clean swap, no code changes needed.
These were legacy URL-based imports from before Deno had native `npm:`
and `jsr:` support.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Rewrite `tools/check_links.ts` to be more robust (inspired by
denoland/docs' `better_link_checker.ts`)
- Add `deno task check:links` to `deno.json`
- Wire it into CI as a new step (Ubuntu + v2.x only, after `build-www`)
- Add missing `docs/latest/examples/index.md` to fix broken
`/docs/examples` link
- Crawl up to 10 pages concurrently for faster link checking
## What the link checker does
1. Builds the www site with Vite
2. Launches a production server
3. Crawls all internal links starting from the root (10 pages
concurrently)
4. Reports broken links (4xx/5xx) with referrer info
5. Detects empty `href` attributes
6. Prints a summary at the end instead of throwing on first failure
Improvements over the old `check_links.ts`:
- Doesn't throw on first 404 — collects all failures and reports at the
end
- Detects empty hrefs
- Skips non-HTML content, fragment-only links, external links, and
common static file extensions
- Shows referrer for each broken link so you know where to fix it
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Adds a `pr-title` CI job that validates PR titles start with `feat:`,
`fix:`, `test:`, `chore:`, or `showcase:` and are all lowercase
- Updates `.github/CONTRIBUTING.md` with the title format rules and a
link to the full contributing docs
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- The CI `check:docs` task imports from
`raw.githubusercontent.com/denoland/std/.../_tools/check_docs.ts` which
intermittently fails with **429 Too Many Requests**, breaking CI on
unrelated PRs
- Vendor the script locally as `tools/check_docs_lib.ts` (from
`denoland/std`'s `_tools/check_docs.ts` + inlined `resolve` from
`_tools/utils.ts`) to eliminate the external dependency
- Both `@deno/doc` and `@std/collections` were already in the import
map, so no new dependencies
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Remove the Showcase page route, data, component, and all 175 showcase
images
- Remove "Showcase" from the navigation bar
- Keep the fresh-badge SVGs (still linked from external READMEs)
Also closed 12 open showcase PRs: #2691, #2861, #2846, #2720, #2282,
#2667, #2585, #1842, #2784, #1697, #2260, #2841.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Handles the case when `Date.toISOString()` throws for invalid dates by
catching the error and serializing as `"Invalid Date"`
- Round-trips correctly: `new Date("Invalid Date")` serializes to
`["Date","Invalid Date"]` and deserializes back to an invalid `Date`
object
- Adds test case and snapshot for invalid `Date`
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
## Summary
- Update init command in `README.md` from `deno run -A -r
https://fresh.deno.dev` to `deno run -Ar jsr:@fresh/init` to match Fresh
2.x
- Fix `www/README.md` to use `deno task dev` (Vite dev server) instead
of `deno task start` (production server) for development workflow
---------
Co-authored-by: Marvin Hagemeister <marvinhagemeister50@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This PR exposes the `HttpError` class for clients.
To do that I needed to make the error message optional to avoid bloating
up the bundle with lots of status strings.
Fixes https://github.com/denoland/fresh/issues/2995
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Adds a Contributing section to the Fresh documentation covering:
- Repository structure and package layout
- Getting started (clone, `deno task ok`)
- Development workflow (docs site, vite demo, `links` for external
projects)
- Testing (commands, conventions, known local issues)
Single page at `docs/latest/contributing/index.md`.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix system crash (OOM) caused by updater spending time in folders like
docs/
- Skip hidden and vendor directories (node_modules, vendor, docs, etc.)
to avoid OOM
- free ASTs immediately
- ts-morph dependency bumped to ^27.0.2
Closes https://github.com/denoland/fresh/issues/3483
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix#3657
Static files with special characters in their names (spaces, `#`,
unicode, etc.) fail to load due to path encoding issues.
## Root cause
`prepareStaticFile()` uses `new URL(pathname, base)` to normalize paths,
but `new URL` doesn't properly encode characters that are already
percent-encoded in the filesystem path. For example, a file literally
named `test %20encodeUri` becomes `test%20%20encodeUri` (the space and
literal `%20` are indistinguishable), instead of the correct
`test%20%2520encodeUri`.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
- Add `AGENTS.md` with guidelines for AI-assisted development on this
repo
- Documents git workflow (use `gh pr checkout`, run `deno fmt`, avoid
lockfile noise)
- Documents dev practices (`deno task ok`, stale remote specifier
hashes)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This adds a short clarification how imported assets vs. static files get
handled now with Vite to the existing documentation for static files.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
## Summary
When `rollupOptions.output.entryFileNames` is customized in vite config
(e.g. `[hash].mjs`), the generated `server.js` was hardcoding
`server-entry.mjs` as the import path, causing the server to fail to
start.
This fix reads the actual entry filename from the Vite manifest and uses
it in the generated `server.js` import, falling back to
`server-entry.mjs` when no custom naming is configured.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The example island and partials are using the old import styles, this PR
updates those examples.
---------
Signed-off-by: Jason McCallister <jason@mccallister.dev>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
## Summary
- Refresh `deno.lock` to pick up latest dependency resolutions (notably
preact 10.28.2 → 10.29.0, new `@deno/graph` and `@std/json` entries)
- Fix stale integrity hashes for `raw.githubusercontent.com` remote
specifiers (`check_docs.ts`, `utils.ts`) that point to branch HEAD
- Run `deno fmt` on `www/static/docsearch.css` and
`www/static/markdown.css`
- Remove `deploy.yml` workflow — Deno Deploy now uses its built-in
GitHub integration
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
I was perusing the code whilst investigating #3606 and noticed that,
despite the release post claiming that Fresh had ["fully
embrace[d]"](https://deno.com/blog/fresh-and-vite#:~:text=fully%20embraces)
the Vite Environment API, it was still using `ssrLoadModule`. Once I
started looking, I noticed a bunch of other code that wasn't
future-proof (env-wise, not rolldown-wise, which'll bring it's own swath
of deprecations[^1]), so I updated them as well.
The newly added source map tests from #3624 currently fail again because
the ModuleRunner API at the heart of the Environment API relies on
[`process.setSourceMapsEnabled`](https://docs.deno.com/api/node/process/~/Process.setSourceMapsEnabled),
which is [currently set to
no-op](https://github.com/denoland/deno/pull/22993) in Deno.
[^1]: Separately tried to try out rolldown-vite but it seems that Deno
doesn't support aliasing dependencies whatsoever? (I know there's not
official support, but I was going to try to edit the lockfile to hack
around it; however, it seems that there's not alias support in there at
all?)