Marvin Hagemeister
240252fdb4
Revert "feat: add ctx.redirect() helper ( #2358 )" ( #2372 )
...
Mostly so that it's easier to cut the next patch release for Fresh.
This reverts commit e3508c3054 .
2024-03-21 10:27:53 +01:00
Marvin Hagemeister
e3508c3054
feat: add ctx.redirect() helper ( #2358 )
...
This PR adds a `ctx.redirect(path, status)` helper that aims to reduce
the verbosity of having to manually create a `Response` obejct for a
mere redirect.
```ts
// Before
new Response(null, {
status: 307,
headers: {
Location: "/foo/bar"
},
})
// After
ctx.redirect("/foo/bar", 307)
```
If the second parameter is not passed, it will default to `302`.
2024-03-12 17:36:34 +01:00
Reed von Redwitz
a83765efaa
fix: no-window lint error ( #2272 )
...
Latest PR runs are failing with linting errors, e.g.
https://github.com/denoland/fresh/actions/runs/7625625084/job/20770308634?pr=2266
Maybe this shouldn't be happening like this right now, but we'll still
need to clean these up eventually.
2024-01-23 21:51:38 +01:00
Marvin Hagemeister
9e11c5c56b
feat: expose config in context + simplify page props ( #2102 )
2023-11-30 16:11:31 +01:00
Marvin Hagemeister
8ddc21eb90
Router cleanup ( #2099 )
2023-11-30 14:08:05 +01:00
Reed von Redwitz and Marvin Hagemeister
b902205feb
chore: bump std to 208 and deal with deprecations ( #2081 )
...
Co-authored-by: Marvin Hagemeister <marvin@deno.com >
2023-11-28 16:35:26 +00:00
Reed von Redwitz
63ac1e6362
feat(server): add isPartial to context types ( #1977 )
2023-10-26 22:26:36 +02:00
Martin Rempel
0a0d86e3a5
fix: remoteAddr hardcoded to localhost:1234 ( #1839 )
2023-10-02 16:30:13 +00:00
Marvin Hagemeister
665d35bbc2
Add Partials ( #1824 )
2023-09-27 13:34:30 +02:00
Marvin Hagemeister
3850131063
chore: speed up tests ( #1791 )
...
This PR speeds up tests by handling custom created `Requests` object
directly instead of binding a socket and making a real HTTP request. For
most tests this is fine, and for those that aren't the existing testing
methods are all preserved.
2023-09-18 18:44:22 +02:00
Luca Casonato
795836ed29
tests: de-flake tests and re-enable sanitizers ( #1786 )
2023-09-18 11:09:24 +02:00
Marvin Hagemeister
726740ed39
feat: add helpers to make Fresh less TypeScripty ( #1627 )
2023-08-14 22:45:13 +02:00
Marvin Hagemeister and Asher Gomez
ba67d895ce
feat: support async app template ( #1626 )
...
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com >
2023-08-14 14:52:48 +02:00
Marvin Hagemeister
d8211dad28
chore: speed up server component tests ( #1596 )
2023-08-07 14:49:07 +02:00
Marvin Hagemeister
62a5613a46
feat: support async route components ( #1388 )
2023-07-12 21:09:56 +02:00