Commit Graph
1694 Commits
Author SHA1 Message Date
Hong Minhee (洪 民憙)andBartek Iwańczuk b11d1d98f2 fix: handle invalid date objects in jsonify stringify (#2851)
## 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>
2026-03-26 08:31:27 +00:00
j0siandBartek Iwańczuk 61eb5f625a Adding a small demo to showcase (#2970)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-26 08:27:10 +00:00
3822b4a21b test: add fresh_version_check test (#3029)
add a test file to auto check the fresh_version, based on deno.json
--version.

Close #3024 

---------

Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-26 08:20:01 +00:00
2fce869971 docs: update project setup commands in READMEs (#3334)
## 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>
2026-03-26 08:14:22 +00:00
Marvin HagemeisterandBartek Iwańczuk 882b7829fd feat: expose HttpError for clients (#3080)
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>
2026-03-26 09:10:21 +01:00
0fff2b04da chore: minor code cleanups (#3103)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:01:34 +01:00
9509b087ff docs: add contributing section (#3384)
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>
2026-03-26 07:39:20 +00:00
Wesley FrancesconandBartek Iwańczuk 1accb21b6e add boxdgrid project to showcase (#3236)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-25 19:01:39 +00:00
022835cce6 perf: make updater faster by streaming instead of reading into memory (#3630)
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>
2026-03-25 20:01:01 +01:00
c863097779 fix: handle paths with whitespaces in staticFiles (#3659)
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>
2026-03-25 20:00:48 +01:00
Brian SimoniandBartek Iwańczuk 4b4e495194 Add weewoo.study to the showcase (#3212)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-25 18:55:54 +00:00
Bartek IwańczukandClaude Opus 4.6 1a266ac987 chore: add AGENTS.md (#3699)
## 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>
2026-03-25 18:55:29 +00:00
8bf05a0127 docs: add clarification for assets/static (#3525)
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>
2026-03-25 19:54:04 +01:00
88bef6c2ef docs: add example for session management (#3594)
Resolves: #1216

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 19:49:01 +01:00
421e3394a2 fix(vite): use manifest entry filename for server entry import (#3595)
## 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>
2026-03-25 18:47:02 +00:00
cdc14a0c6e Do not assign named exports into existing default export (#3494)
Fixes: https://github.com/denoland/fresh/issues/3492

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 19:40:46 +01:00
Emil KrebsandBartek Iwańczuk 9c06f4aa8c Showcase: Add VailNote (#3248)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-25 18:15:30 +00:00
Charlie Garrison 979d0294fa Added Beyond Better to showcase (#3547) 2026-03-25 19:08:31 +01:00
Octo8080XandBartek Iwańczuk bac59c672b Add showcase Deno Sandbox API Test Game (#3640)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-25 18:07:58 +00:00
3530d212f2 Update Code of Conduct link in Footer component (#3679)
Current site has broken code of conduct link

Co-authored-by: Drew Hoffer <55151884+drewhoffer@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-25 18:04:05 +00:00
Gracjan ZiemiańskiandBartek Iwańczuk 770233d956 Add new showcase entry for TKD-Dzwirzyno (#3660)
I added taekwon-do club website made in Fresh - club name is
TKD-Dzwirzyno

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-25 18:00:09 +00:00
Douglas MouraandBartek Iwańczuk 76a9ca7d1e fix: typo in Subscribe page handler reference (#3669)
This PR removes an extra `s` on the type definition of the handler for
the page.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2026-03-25 17:59:21 +00:00
Jason McCallisterandBartek Iwańczuk 1c2b5f50b4 Updates the examples on the homepage (#3682)
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>
2026-03-25 17:54:15 +00:00
Bartek IwańczukandClaude Opus 4.6 689f1881e2 chore: update lockfile, fix CI integrity checks, remove deploy workflow (#3698)
## 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>
2026-03-25 18:47:56 +01:00
Muhaimin CS 44ef00deb3 Add new showcase: RockPaper (#3686) 2026-03-24 20:38:50 +01:00
Marvin Hagemeister 4cc76aefed chore: release 2.2.1 (#3678) 2026-02-11 14:38:24 +01:00
sck451 d27e20ce5e docs: fix spelling error in index.md (#3658)
Corrected the spelling of 'middelwares' to 'middlewares'.
2026-02-11 14:24:36 +01:00
madflow 9196656efb docs: fix typo in getting started documentation (#3675)
Corrected the typo 'span' to 'spawn' in the setup instructions.
2026-02-11 14:20:06 +01:00
Marvin Hagemeister 3d8091602c fix: .well-known static folder not working (#3676)
This folder is typically used for site metadata like `security.txt` and
other stuff.
2026-02-11 14:19:33 +01:00
Marvin Hagemeister 9f68496aa9 chore: update lockfile (#3677) 2026-02-11 14:13:35 +01:00
Marvin Hagemeister 89ddbc4f4b chore: update preact version (#3664) 2026-01-07 14:17:59 +01:00
Eli ab14d1044c refactor(vite): replace old environment APIs (#3634)
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?)
2025-12-09 13:00:36 +01:00
eryue0220 0acebce0bb fix: update type & imports (#3638)
This pr is small fixed that update type declaration and import from
codebase.
2025-11-25 09:43:51 +01:00
Freddy Alvarado R a1000cbb59 docs: Update daisyUI installation instructions and file path (#3592)
The directory where the stylesheet is located is updated.
2025-11-20 09:50:35 +01:00
a9bc1b7ecf docs: Remove the "beta" from the notification (#3373)
Removed the beta from the top notification to prevent confusion. 

Changed 

<img width="367" height="155" alt="image"
src="https://github.com/user-attachments/assets/95122d04-d2e8-4084-9e0d-544d68a8ebff"
/>


to

<img width="379" height="145" alt="image"
src="https://github.com/user-attachments/assets/8331ca15-dfd0-4612-9cec-083d24b484ad"
/>

---------

Co-authored-by: Marvin Hagemeister <marvinhagemeister50@gmail.com>
Co-authored-by: Eli <88557639+lishaduck@users.noreply.github.com>
2025-11-20 09:49:08 +01:00
David Sherret 18e47a86b0 fix(vite): force at least @deno/loader@0.3.10 (#3631)
Ref: https://github.com/denoland/deno-js-loader/pull/68
2025-11-19 23:05:45 +01:00
Marvin Hagemeister 2c36becff0 chore: release 2.2.0 (#3627)
- `@fresh/core@2.2.0`
- `@fresh/update@2.2.0`
- `@fresh/init@2.3.0`
- `@fresh/plugin-vite@1.0.8`
2025-11-18 14:09:19 +01:00
Marvin Hagemeister 5c2b04bc2b chore: try vendor + parallel (#3628) 2025-11-18 13:58:36 +01:00
Marvin Hagemeister 45538532e8 chore: revert vendor: true (#3626)
This change was accidentally included in:
https://github.com/denoland/fresh/pull/3624
2025-11-18 12:49:53 +01:00
Marvin Hagemeister f5c0f16878 fix(vite): source mapping locations (#3624)
Mappings were wrong for a few reasons:
- Missing source map generation in one babel transform
- setting `compact: false` causes vite to generate incorrect mappings in
`vite:import-analysis`
- stack traces need to be mapped by vite

Fixes https://github.com/denoland/fresh/issues/3609
2025-11-18 11:40:52 +01:00
时瑶andAyaka 399dde767b feat(init): use recommended vscode settings for tailwind (#3621)
The recommended way to configure custom directives from Tailwind is to
use `files.associations`.

Check recommended settings from Tailwind CSS IntelliSense Extension:
https://github.com/tailwindlabs/tailwindcss-intellisense#recommended-vs-code-settings

This allows us to stop maintaining future changes to custom directives
from TailwindCSS, instead letting the TailwindCSS extension decide how
to handle them.

Co-authored-by: Ayaka <KiritaniAyaka@users.noreply.github.com>
2025-11-17 10:46:10 +01:00
时瑶andAyaka 455b06e775 feat(docs): improve copy button appearance on light mode (#3620)
| Before| After |
| :---: | :---: |
|
![before](https://github.com/user-attachments/assets/6d485c89-79ec-485d-9897-de9db0a9b044)
|
![after](https://github.com/user-attachments/assets/5c134ea1-6dec-4da5-8a84-e7e7b7e062a7)
|

The appearance on dark mode doesn't change.

Co-authored-by: Ayaka <KiritaniAyaka@users.noreply.github.com>
2025-11-14 13:50:08 +01:00
Marvin Hagemeister 8de5b15799 feat: add .json()/.text()/.html()/.stream() context helpers (#3613)
Played around with Hono in the past days and the
`.text()/.json()/.html()` helpers are kinda neat, even if you can always
construct that yourself manually. Also added a `.stream()` helper to
create streams without having to deal with `ReadableStream` and
encodings yourself.
2025-11-11 17:25:02 +01:00
Christian Svensson fd7ecec5fa docs(core): add small usage & getting started example (#3598)
This PR just fills out the `README.md` with minimal usage example, such
that they can get a small taste of how the framework can be used. This
also helps improve the score in JSR.

Part of #3597
2025-11-11 15:34:22 +01:00
Christian Svensson 23734a00b2 docs(core): improve CORS example documentation on JSR (#3602)
Improves clarity of CORS JSDoc example for JSR:

<img width="1088" height="706" alt="image"
src="https://github.com/user-attachments/assets/8ea3b6f9-a5ee-41cc-9512-a3a0fb87a4c0"
/>

## Changes

- Split the example into two: Basic & Advances
- Uncomment "Advanced" example
2025-11-11 15:33:54 +01:00
Christian Svensson 6a1ce911d0 docs(examples): add module and public exports JSDoc for all entrypoints (#3603)
Addresses scoring of `@fresh/examples` of JSR for several metrics:

- ✅ Adds module doc for all entrypoints
- ✅ Adds descriptions to all public exports for `@fresh/examples` (0% ->
100%)

I could not find if `@fresh/examples` are part of any E2E tests to test
using JSR package as mounted app or Island, or if this is just a small
demo for users. So I just added small generic drescriptions.

Part of #3597
2025-11-11 15:33:28 +01:00
Christian Svensson 1dd8279075 docs(vite): add JSDoc and export public API (#3604)
Improves documentation of `@fresh/plugin-vite` related to public API,
and exports missing symbols/types that are part of public API
(`FreshViteConfig`).

- Adds `@module` JSDoc for the `@fresh/plugin-vite/client` entrypoint
  - Internal only, used for browser HMR
- Exports types `ImportCheck` & `ImportCheckDiagnostic`, as they are
part of the public API via `FreshViteConfig`
- Should make [`ImportCheck` link to correct
type](https://jsr.io/@fresh/plugin-vite/doc/~/FreshViteConfig#property_checkimports):
<img width="1053" height="285" alt="image"
src="https://github.com/user-attachments/assets/766c29f7-7f39-429e-bd81-234fed6b0820"
/>
- Adds JSDoc descriptions for all public exports; `fresh`,
`FreshViteConfig`, `ImportCheck` & `ImportCheckDiagnostic`
- Adds description for `FreshViteConfig.checkImports`

Part of #3597 & #3596
2025-11-11 15:33:03 +01:00
Christian Svensson ffa845ab0d docs(core): correct example code block formatting (#3601)
The example for the CSP middleware looks a bit broken currently on JSR,
due to the `@example` markdown is not wrapped in a code block.

<img width="1136" height="247" alt="image"
src="https://github.com/user-attachments/assets/57888033-aa9e-4701-87dc-4f4810365177"
/>

## Changes

- Improves formatting a bit, to be less compact
- Wraps the example in a code block ` ```ts `
- Adds a title to the `@example` - "Basic usage" - To avoid the example
being labeled as "Example1" on JSR
2025-11-04 16:03:51 +01:00
Christian Svensson a801686e9c docs(build-id): add code block example (#3600)
Adds a module doc and code block to help satisfy JSR's scoring.
Suggestions for alternatives or improvements very welcome.

Part of #3597
2025-11-04 16:02:53 +01:00
Marvin Hagemeister 42d7d9f23b chore: release 2.1.4 (#3586)
- @fresh/core@2.1.4
- @fresh/update@2.1.4
- @fresh/init@2.2.2
- @fresh/plugin-vite@1.0.7
2025-10-30 15:57:14 +01:00