Marvin Hagemeister
c11cf7b41a
feat: expose layouts and pages on App ( #3086 )
...
This PR extracts the functionality from the `fs_routes` plugin and
exposes it onto `App`. These are the new APIs:
- `app.layout(pattern, route)`
- `app.onError(pattern, route)`
- `app.notFound(pattern, route)`
- `app.route(pattern, route)`
This also removes the need for `.use(staticFiles())`. This line can be
safely removed.
Fixes https://github.com/denoland/fresh/issues/3040
Fixes https://github.com/denoland/fresh/issues/3033
Fixes https://github.com/denoland/fresh/issues/2591
Fixes https://github.com/denoland/fresh/issues/950
Fixes https://github.com/denoland/fresh/issues/1918
2025-07-14 19:27:48 +02:00
Marvin Hagemeister
6eeb20c7a3
Revert "feat: support overwriting default 404 handler ( #3081 )" ( #3093 )
...
This reverts commit 0b3546f201 .
Reverting this because it will be superseded by
https://github.com/denoland/fresh/pull/3086
2025-07-14 18:11:20 +02:00
Marvin Hagemeister
e2699923b0
chore: rename tests FreshApp -> App ( #3087 )
2025-07-10 10:24:39 +02:00
Marvin Hagemeister
0b3546f201
feat: support overwriting default 404 handler ( #3081 )
...
Fixes https://github.com/denoland/fresh/issues/1918
2025-07-09 00:40:12 +02:00
Christian Svensson
bc8cdb9c7b
fix: convert island filePath to valid variable name ( #2984 )
...
I only added a unit test, but maybe it's testing internals too much?
Should I add a more E2E test in `tests/` with real files?
Closes #2971
2025-05-21 11:06:16 +02:00
Marvin Hagemeister
24ad244a79
fix: error when no Response instance is returned ( #2924 )
...
Fixes https://github.com/denoland/fresh/issues/1494
2025-05-12 20:30:45 +02:00
Tim Reichen
1cfb4bc876
refactor: make App.prototype.handler() sync ( #2906 )
2025-05-12 10:12:50 +02:00
Marvin Hagemeister
fc820e8965
feat: add error messages for missing build cache ( #2551 )
2024-06-26 15:33:25 +02:00
Marvin Hagemeister
88c3671a09
fix: error handling in fs routes ( #2474 )
...
Ran into an issue where we weren't responding with the correct status
code and passed response headers. This was a bit of a rabbit hole and it
was caused by us wrapping to more error handling middlewares than
necessary.
2024-05-31 14:27:36 +02:00
Marvin Hagemeister
287929e4d2
major: import Fresh 2.0 code ( #2449 )
...
🎉
2024-05-24 09:40:08 +02:00