- Added CSS vars for dark/light colors.
- Added dark/light theme toggle as Island
Fixes#2648
---------
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
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.
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.
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.
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.
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.
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 😄
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
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.
Hi everyone
Fresh seemed like a really interesting framework, so I wanted to
contribute in some way.
So, i created this mini-game to showcase the capabilities of Deno and
Fresh.
Although it's currently just a beta but i'm considering increasing the
complexity of the game in the future.
I hope you'll give me the opportunity to set an example and maybe even
inspire someone to create something even bigger.
Thx!