Commit Graph
1224 Commits
Author SHA1 Message Date
Luca Casonato b4fd717c6c fix: reset span name and http.route in static file middleware (#2856) 2025-04-23 14:35:39 +02:00
Asher Gomez 149509995e fix(init): define working directory in check task for init script (#2852)
~~This fixes CI for current PRs until
https://github.com/denoland/deno/pull/28655 is added to Deno 2.3.0.~~

This fixes CI until https://github.com/denoland/deno/issues/28923 is
fixed. Then, we can use `Deno.makeTempDir()` and not have to use
`tmp_*/`.
2025-04-22 13:17:05 +02:00
Tim Reichen d87e47d15f chore: remove test tmp files (#2837)
Seems like `tmp` folders were not ignored by git.
2025-03-07 14:37:11 +01:00
Tim Reichen 4e6bed87a1 fix: wrong button type in submit test cases (#2836)
https://github.com/denoland/fresh/pull/2833 breaks some tests where the
button must be of type `submit` rather than `button`. This PR fixes
this.
2025-03-05 23:27:29 +01:00
Tim Reichen bbfea7538b fix: b64encode param type (#2832) 2025-03-05 12:32:24 +01:00
Tim Reichen 0a634bd2d2 chore: fix lint errors (#2833)
This PR fixes current lint errors thrown by `deno lint`.
2025-03-05 12:31:25 +01:00
Marvin Hagemeister f49a3f1d99 docs: fix main dark bg (#2826) 2025-02-17 11:12:55 +01:00
Marvin Hagemeister d7c9ce9bc5 docs: fix dark mode background flash (#2825)
Fixes
https://github.com/denoland/fresh/issues/2823#issuecomment-2661711235
2025-02-17 10:43:59 +01:00
David MonaghanandMarvin Hagemeister b1f2a989a5 www: docs: feat: add dark mode (#2820)
- Added CSS vars for dark/light colors.
- Added dark/light theme toggle as Island

Fixes #2648

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2025-02-04 11:58:05 +01:00
Tugrul Ates adf8b87a03 docs: fix spelling in README (#2814) 2025-01-20 00:13:46 +01:00
Marvin Hagemeister 65c05b2127 2.0.0-alpha.29 (#2812) 2025-01-16 22:43:40 +01:00
Marvin Hagemeister f245471ddf fix: route middleware order with groups (#2811)
This is a follow-up fix to https://github.com/denoland/fresh/pull/2792

The original fix skipped over route groups which lead to them being
mixed with non-grouped routes. This in turn confused the middleware
processing part when building the final routes.
2025-01-16 21:57:42 +01:00
Marvin Hagemeister c7c341b695 2.0.0-alpha.28 (#2810) 2025-01-16 14:24:07 +01:00
Paul Carduner 2baf6dc7a0 fix: middlewares not being used with default GET handlers (#2807)
I noticed a small bug with the default GET handlers where middlewares
were not being run. This pull requests fixes the bug and adds some unit
tests for this behavior.
2025-01-09 00:09:26 +01:00
Marvin Hagemeister 70d6cbd1e5 fix(router): exclude route groups in scoring for sorting (#2792)
This PR fixes an issue in the route sorting logic when comparing a route
segment with a group vs a segment without one.

- `/(app)/[org]/[app]/index.ts`
- `/auth/login.ts`

When determing the order of these two routes we need to skip over the
`(app)` group to the next non-group segment. This ensures that we are
only scoring actual segments with each other and non-existing ones.
2024-12-16 14:14:52 +01:00
Luca Casonato 0864559562 2.0.0-alpha.27 (#2791) 2024-12-12 14:08:25 +01:00
Luca Casonato ae9c675384 fix: correctly serialize negative numbers (#2790)
This commit fixes a bug where negative numbers were not correctly
serialized, because the value parser confused "references" (which is
where special negative tokens for special values exist), and "values"
(where negative numbers are just negative numbers). The parser now
correctly distinguishes between the two.
2024-12-11 20:13:22 +01:00
Luca Casonato 03847e9a33 2.0.0-alpha.26 2024-12-10 16:05:22 +01:00
Luca Casonato 65d61bd1d5 feat: add open telemetry instrumentation (#2786)
This commit adds some useful automatic instrumentation for when users
are using `--unstable-otel`:

- Fresh renames the span for incoming HTTP requests to `$METHOD $ROUTE`
and the `http.route` attribute is added.
- Fresh creates a span around FS route handlers, showing whether they
returned a response or data.
- Fresh creates a span around async components, showing how long they
took to execute.
- Fresh adds a span around preact rendering, showing how long rendering
takes.
- Fresh adds a span around static file serving, showing how long it took
and whether there were requests without a cache bust key.

We can improve this in the future with more telemetry, such as metrics.
2024-12-10 15:03:50 +01:00
Luca Casonato 4a25ac385f refactor: make this repo a Deno workspace (#2719) 2024-12-10 13:41:18 +01:00
Ian Bull f1b6b4c401 doc: add information about deno compile (#2783) 2024-12-05 14:04:41 +01:00
Brian Buchholz d86dcd6d2f fix: tests broken on Deno 2.1 (#2776)
Resolves https://github.com/denoland/fresh/issues/2771

Specifically the `init` test fails:
```
deno test -A ./init
```
Output:
```
error: No target files found.
----- output end -----
init - fmt, lint, and type check project ... FAILED (157ms)
init with tailwind - fmt, lint, and type check project ...
------- output -------
Task check deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx
error: No target files found.
----- output end -----
init with tailwind - fmt, lint, and type check project ... FAILED (136ms)
```

Seems to be a gitignore issue, and _probably_ relates to the new
features that ["lint an fmt respect
gitignore"](https://github.com/denoland/deno/pull/26897):
- the gitignore file in the fresh project has `tmp-*`
- the tmp directory created by the init test matches that pattern:
`tmp-${hash}`
- changing the tmp directory to `tmp_${hash}` resolves the issue 😄
2024-12-04 10:44:45 -08:00
Luca Casonato 6ee4551df1 2.0.0-alpha.25 2024-11-08 12:08:56 +01:00
Luca Casonato 6b685dde9f fix: serve internal JS from path containing build ID (#2753)
Previously imported chunks were not cached at all. They are now cached
properly with immutable cache headers.
2024-11-08 11:44:15 +01:00
Luca Casonato 96e520a352 chore: release alpha.24 (#2745) 2024-10-31 11:31:51 +01:00
Luca Casonato 8ced083267 fix: serialization of signals containing null and undefined values (#2744) 2024-10-31 11:22:03 +01:00
Efe 22af15279d www: Fix block quotes not rendering links (#2712)
- Fixes a bug where block quotes were not able to properly render URLs
in docs (e.g. Info section at
https://fresh.deno.dev/docs/getting-started/create-a-route)
- Replaces existing JSX docs url with the suggested, up-to-date docs url

<img width="775" alt="image"
src="https://github.com/user-attachments/assets/e2e83456-697b-47d5-b074-66e4f287f17a">
2024-10-24 11:13:13 +02:00
Marvin Hagemeister bf45e8652a chore: release alpha.23 (#2728) 2024-10-22 14:01:21 +02:00
Luca CasonatoandMarvin Hagemeister 407987589f feat: support fresh projects that are part of a workspace (#2716)
Also a performance improvement & bug fix in the tailwind plugin.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2024-10-17 17:08:24 +02:00
Felix bf43a0e90c chore: update 1.x versions (#2717)
Documentation and update script are both still at 1.7.2 even tho
[1.7.3](https://github.com/denoland/fresh/releases/tag/1.7.3) has been
released to make fresh compatible with deno v2
2024-10-17 16:01:46 +02:00
Kyle Loveless e651ea514c docs: fix typo in islands/other-island.tsx (#2706)
very minor typo, but should still be fixed
2024-10-15 11:31:01 +02:00
Per Guth 4181ef3263 docs: fix formatting (#2707) 2024-10-15 11:30:29 +02:00
Christian Svensson 628832af0f fix: ensure file paths in snapshot.json uses / (#2704)
Avoids `\\\\` paths ending up in `snapshot.json` when using `deno task
build` on Windows. Backslashes do not which pathnames in URLs, so these
assets are not returned.

Closes #2703
2024-10-15 11:29:35 +02:00
Mackie Burgess dd555580e1 docs: fix admonition regular expression (#2702)
From #2699, Co-authored by @monooleate

Added `margin-bottom` to better visually align icon with title.
2024-10-10 20:23:08 +02:00
Mackie Burgess 8752dba3cf docs: fix blockquote text not parsed as markdown (#2700)
See issue #2699.

Blockquote text now renders correctly as markdown.

<img width="718" alt="Screenshot 2024-10-10 at 13 42 26"
src="https://github.com/user-attachments/assets/d39dc04e-a408-4f34-a632-881578856896">

<img width="729" alt="Screenshot 2024-10-10 at 13 42 47"
src="https://github.com/user-attachments/assets/e2686cd0-b39c-402d-b460-6f680d5e6d04">
2024-10-10 14:58:46 +02:00
Marvin Hagemeister e303b873a6 chore: release 2.0.0-alpha.22 (#2685) 2024-10-04 10:32:02 +02:00
Marvin Hagemeister 21c6152185 chore: update 1.x versions (#2684) 2024-10-04 08:30:34 +02:00
Marvin Hagemeister a596a04258 fix: SVG in links breaking partials (#2681)
Fixes https://github.com/denoland/fresh/issues/2239
2024-10-04 08:08:18 +02:00
Marvin Hagemeister 5f657478aa fix: middleware default export ignored (#2680)
Fixes https://github.com/denoland/fresh/issues/2657
2024-10-04 06:56:52 +02:00
Marvin Hagemeister 73b0398d24 fix: f-client-nav={false} not working inside island (#2677)
See https://github.com/denoland/fresh/issues/2658
2024-10-04 05:44:19 +02:00
Marvin Hagemeister ea3df041c1 Fix: prepare URLPattern spec change (#2676)
Fixes https://github.com/denoland/fresh/issues/2627
2024-10-04 05:15:43 +02:00
Marvin Hagemeister bc55b36d3c chore: remove lighhouse CI step (#2675)
Never used this and it's easier to just check the lighthouse scores in
the browser.
2024-10-04 05:06:39 +02:00
Marvin Hagemeister 75b5854810 fix: nested children slots erroring (#2674)
Fixes https://github.com/denoland/fresh/issues/2624
2024-10-04 05:05:27 +02:00
Marvin Hagemeister ad8291447a chore: update versions (#2672)
Fixes
https://github.com/denoland/fresh/issues/2633#issuecomment-2349454555
2024-10-02 17:32:00 +02:00
Marvin Hagemeister 1081aa2eb9 fix: docs markdown smartypants (#2671)
This was a regression introduced in
https://github.com/denoland/fresh/pull/2655

Fixes https://github.com/denoland/fresh/issues/2670
2024-10-02 11:43:47 +02:00
Tim Reichen 182bda5b7f fix(init): add dom.iterable to template compilerOptions.lib (#2656)
Ref: https://github.com/denoland/deno/issues/25741
2024-10-02 01:28:50 +02:00
Marvin Hagemeister e0f65319cd chore: add license fields (#2666) 2024-09-30 18:45:51 +02:00
Marvin Hagemeister 39dbee5497 chore: release 2.0.0-alpha.21 (#2665) 2024-09-30 18:38:41 +02:00
Marvin HagemeisterandLuca Casonato de8f1b0c59 feat: update for Deno 2 (#2655)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-09-30 18:30:30 +02:00
Ryan Blake b5389f69a3 showcase: add wtfiscongressdoingnow.us (#2651)
Just adding in my Deno Fresh project. "WTF Is Congress Doing Now?" is a
non-partisan up-to-date source of bills introduced congress. Information
includes bill metadata, sponsors, links to affected codes and links to
PDF copies of bills.
2024-09-18 17:37:56 +02:00