Marvin Hagemeister
f8b60ddd15
fix: wrong url after partial form submission ( #2495 )
...
Fixes https://github.com/denoland/fresh/issues/2409
2024-06-05 08:30:28 +02:00
Marvin Hagemeister
0928ecbe11
chore: release alpha 14 ( #2493 )
2024-06-04 18:27:43 +02:00
Marvin Hagemeister
bcfb4e34c1
fix: wrong type in init files ( #2492 )
2024-06-04 18:26:44 +02:00
Marvin Hagemeister
339ee98ea3
chore: release alpha ( #2491 )
2024-06-04 18:09:49 +02:00
Marvin Hagemeister
b0b4bf1efd
chore: add release script ( #2490 )
2024-06-04 18:01:32 +02:00
Marvin Hagemeister
049bb49c07
chore: fix type error ( #2486 )
...
We only checking types in CI in `src/` + `tests/`. This PR adds the
other folders.
2024-06-03 17:46:42 +02:00
Marvin Hagemeister
cbbcca63f6
chore: release another alpha ( #2485 )
2024-06-03 17:31:47 +02:00
Marvin Hagemeister
848834e6a7
chore: add test for island updater ( #2484 )
2024-06-03 17:25:41 +02:00
Marvin Hagemeister
e007597ff3
feat: remove MODE global ( #2483 )
2024-06-03 16:54:37 +02:00
Marvin Hagemeister
2fb8606e9e
fix: path handling inconsistencies ( #2482 )
2024-06-03 15:03:48 +02:00
Marvin Hagemeister
9347b84cba
feat: inject process.env.NODE_ENV for third party libs ( #2481 )
2024-05-31 15:18:23 +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
bd60444f7c
fix: only generate stack on HttpError if status >= 500 ( #2470 )
2024-05-27 14:34:36 +02:00
Marvin Hagemeister
8865d290ce
www: switch to precompile jsx ( #2469 )
2024-05-25 13:31:12 +02:00
Marvin Hagemeister
5dd854341c
www: add back trailing slash handling ( #2467 )
...
In Fresh 2 trailing slash handling isn't applied automatically anymore
and I forgot to do that when merging the Fresh 2 code base.
While we're at it, I've added a section for that to our migration guide.
2024-05-25 12:11:13 +02:00
Marvin Hagemeister
da858d0b34
www: improve error page design ( #2463 )
...
<img width="978" alt="Screenshot 2024-05-24 at 23 46 38"
src="https://github.com/denoland/fresh/assets/1062408/3ec2bdc5-e5fb-41f3-827e-7fd791569673 ">
2024-05-25 08:14:17 +02:00
Marvin Hagemeister
7e6f5d55b7
chore: release 2.0.0-alpha.11 ( #2464 )
2024-05-25 00:33:46 +02:00
Marvin Hagemeister
f9545c3d63
fix: don't show error overlay on HttpError < 500 ( #2462 )
2024-05-24 23:46:21 +02:00
Marvin Hagemeister and Luca Casonato
2b1de48ff1
docs: add Fresh 2 migration guide ( #2459 )
...
Co-authored-by: Luca Casonato <hello@lcas.dev >
2024-05-24 21:09:51 +02:00
Marvin Hagemeister
9a7399a769
chore: disable sanitizers in esbuild tests ( #2461 )
2024-05-24 20:39:54 +02:00
Marvin Hagemeister
77dc77826e
fix: only load error overlay in development ( #2460 )
2024-05-24 20:29:59 +02:00
Marvin Hagemeister
82d027cbcd
www: fix fragment links hidden under sticky header ( #2457 )
2024-05-24 18:01:57 +02:00
Marvin Hagemeister
484d918307
www: port error pages to Fresh 2 ( #2456 )
...
Forgot to port the `_500.tsx` and `_400.tsx` error pages to Fresh 2
2024-05-24 17:31:52 +02:00
Marvin Hagemeister
c57d0ccb2f
chore: another v2 alpha release ( #2452 )
2024-05-24 09:59:01 +02:00
Marvin Hagemeister
287929e4d2
major: import Fresh 2.0 code ( #2449 )
...
🎉
2024-05-24 09:40:08 +02:00
Marvin Hagemeister
baac482cf0
chore: remove .DS_Store ( #2448 )
2024-05-22 21:34:33 +02:00
Marvin Hagemeister
cda9bdec6f
chore: remove unused demo app ( #2442 )
2024-05-21 17:48:05 +02:00
Marvin Hagemeister
e4981d30ad
www: rework docs layout ( #2429 )
...
- Re-enable partials
- clean up layout a bit
2024-05-21 17:38:32 +02:00
Marvin Hagemeister
46f6c280ed
www: social meta tag bot detection ( #2441 )
2024-05-21 17:14:05 +02:00
Marvin Hagemeister
ec10ad59a4
www: fix home partial changing doc title ( #2432 )
...
Fixes https://github.com/denoland/fresh/issues/2431
2024-05-17 20:18:42 +02:00
Marvin Hagemeister
25d4d16a8f
www: fully remove component gallery ( #2430 )
2024-05-17 18:39:32 +02:00
Marvin Hagemeister
40181142d2
fix: ServerhandlerInfo type for newer Deno versions ( #2419 )
...
Newer Deno versions have an additional `completed` property in there.
This PR allows Fresh to be used with both old and newer Deno versions
without getting type errors.
2024-05-02 20:41:33 +02:00
Marvin Hagemeister
0e5962ce37
www: remov no build step from marketing ( #2407 )
...
We've been moving away from that for a couple of months now, so
featuring the "no build step" prominently in our marketing feels wrong.
2024-04-18 17:29:27 +02:00
Marvin Hagemeister
93fb4bd200
chore: release 1.6.8 ( #2382 )
...
🎉
2024-03-22 22:25:00 +01:00
Marvin Hagemeister
13d514dab8
chore: release 1.6.7 ( #2380 )
2024-03-21 22:49:39 +01:00
Marvin Hagemeister
9e5ea1f5e4
chore: release 1.6.6 ( #2373 )
2024-03-21 11:00:19 +01:00
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
Marvin Hagemeister
b7281792a0
chore: update deno_esbuild_loader to 0.9.0 ( #2337 )
...
Fixes https://github.com/denoland/fresh/issues/2332
2024-02-23 13:31:00 +01:00
Marvin Hagemeister
a2be1abc6b
chore: update Preact to 10.19.6 ( #2331 )
2024-02-22 10:46:41 +01:00
Marvin Hagemeister
4a175dc680
docs: disable partial nav temporarily ( #2330 )
...
We can re-enable once https://github.com/preactjs/preact/pull/4287 is
fixed.
Fixes https://github.com/denoland/fresh/issues/2322
2024-02-22 08:28:15 +01:00
Marvin Hagemeister
46eaef0181
docs: fix potential null errors ( #2324 )
2024-02-20 01:19:08 +01:00
Marvin Hagemeister
f1c17bc67e
fix: invalid quote around partial script data ( #2323 )
...
This is a little emberassing 👀
2024-02-20 01:07:51 +01:00
Marvin Hagemeister
bf0e33eda1
fix: update versions ( #2316 )
2024-02-14 22:42:33 +01:00
Marvin Hagemeister
b26a0d6c6e
fix: improve init choice design ( #2314 )
...
Before:
<img width="528" alt="Screenshot 2024-02-14 at 15 33 41"
src="https://github.com/denoland/fresh/assets/1062408/1c7093db-a509-4d42-998c-3b5282cd88d5 ">
After:
<img width="530" alt="Screenshot 2024-02-14 at 15 33 09"
src="https://github.com/denoland/fresh/assets/1062408/99e2bdeb-e0f5-4926-91e1-f972df1149c1 ">
2024-02-14 15:39:47 +01:00
Marvin Hagemeister
aeca15eeb9
fix: open redirect issue with trailing slash detection ( #2313 )
...
Passing a path like `/foo/bar` as the location header is interpreted as
a relative path. But when it contains two leading slashes like
`//evil.com/` it is interpreted as a port relative url. This has the
consequence that the origin of a URL can essentially be replaced:
```ts
new URL("//evil.com", "https://example.com/ ");
// -> 'https://evil.com/ '
```
Our trailing slash detection logic didn't guard against this case. By
normalizing the pathname of the URL and stripping sibling forward
slashes we sidestep this problem.
2024-02-14 15:25:16 +01:00
Marvin Hagemeister
5268aaa6a5
chore: simplify deno check:types command ( #2259 )
2024-01-16 15:41:20 +01:00
Marvin Hagemeister
3d30930d73
chore: release 1.6.3 ( #2257 )
2024-01-15 19:43:28 +01:00
Marvin Hagemeister
9f81806c6e
fix: __FRSH_STATE potentially being overwritten by user code ( #2256 )
...
As outlined in https://github.com/denoland/fresh/issues/2254 it was
possible to overwrite the script tag that is used by Fresh to pass
island props from the server to the client. This could be done by
injecting raw HTML via `dangerouslySetInnerHTML` and simply using the
same id that Fresh was using.
With this PR we generate a unique id per render that cannot be guessed
anymore. It's composed of `__FRSH_STATE_<uuid>`
2024-01-15 19:41:12 +01:00
Marvin Hagemeister
3bc43a1327
chore: release 1.6.2 ( #2252 )
...
🎉
2024-01-15 12:43:11 +01:00
Marvin Hagemeister
d2e9ee99a2
fix: browser url not updated with form partials ( #2236 )
...
Fixes https://github.com/denoland/fresh/issues/2173
2024-01-10 15:36:30 +01:00
Marvin Hagemeister
6f6f551248
docs: add hints to AOT page ( #2232 )
2024-01-10 10:50:01 +01:00
Marvin Hagemeister
912f3782a3
feat: improve tailwind deployment flow ( #2227 )
...
By moving folks from `twind` over to the `tailwind` plugin we have
traded support questions about "how to get twind autocompletion
working?" with "my styles are not showing up in automatic mode". The
tailwind plugin has a hard requirement on having a build step. We have
documented this at various places and have a guide on how to set
everything up, but it's much better if we float those steps from Fresh
itself when we detect this.
With this PR we will prepare a `.github/workflows/deploy.yml` file
already where the user only needs to swap out the project name.
When Fresh is started in production mode, the tailwind plugin is active
and no snapshot files were loaded, then we print a helpful hint to the
console:
```sh
No pre-compiled tailwind styles found.
Did you forget to run "deno task build" prior to starting the production server?
```
When we are running inside Deno Deploy this PR goes one step further.
Since it is the first time many users might use Deno Deploy we'll also
show a simple page that shows how to finish the tailwind setup. I've
intentionally tried to not present this as a warning but rather as a
"finishing" step to avoid scaring users off. It's not the prettiest
page, but it's good enough for now.
<img width="892" alt="Screenshot 2024-01-09 at 23 41 27"
src="https://github.com/denoland/fresh/assets/1062408/9bf2a61b-5551-4d8e-bdf8-b498072f8e98 ">
Fixes https://github.com/denoland/fresh/issues/2223
2024-01-10 10:35:26 +01:00
Marvin Hagemeister
f63752062a
chore: change assert to with for import attributes ( #2231 )
2024-01-10 10:25:07 +01:00
Marvin Hagemeister
598237d5dd
fix: json import attribute error in island ( #2228 )
...
Fixes https://github.com/denoland/fresh/issues/2214
2024-01-10 00:33:38 +01:00
Marvin Hagemeister
8c4385043c
Revert "refactor: use --env CLI arg" ( #2212 )
...
Reverts denoland/fresh#2204
The `--env` flag cannot be used by default because it fails when no
`.env` file is present. Therefore this PR accidentally introduced a
breaking change.
2024-01-04 11:53:15 +01:00
Marvin Hagemeister
f95df1d7b7
showcase: fix missing screenshots ( #2211 )
2024-01-04 11:07:06 +01:00
Marvin Hagemeister
74481007f3
docs: Move aot step in tailwind guide to start ( #2176 )
2023-12-15 16:42:42 +01:00
Marvin Hagemeister
56df310263
chore: release 1.6.1 ( #2158 )
2023-12-07 12:50:40 +01:00
Marvin Hagemeister
498aa8c463
fix: don't fallthrough static files in dev ( #2156 )
2023-12-07 12:23:23 +01:00
Marvin Hagemeister
90b0642bdd
fix: init app use same width numbers ( #2155 )
2023-12-07 11:30:14 +01:00
Marvin Hagemeister
3410470d5e
fix: ensure previous ws connection is closed in dev ( #2154 )
2023-12-07 11:17:23 +01:00
Marvin Hagemeister
2caf798016
fix: tailwind bg-clip-text not working ( #2152 )
2023-12-07 09:54:32 +01:00
Marvin Hagemeister
9af63be308
fix: switch back to URLPattern for correctness ( #2151 )
2023-12-07 09:40:07 +01:00
Marvin Hagemeister
8bf9f2df58
fix: revert marking ctx.data as deprecated ( #2148 )
2023-12-06 13:43:13 +01:00
Marvin Hagemeister
c72f534369
fix: route param fallback not empty string ( #2146 )
2023-12-06 09:33:36 +01:00
Marvin Hagemeister
c05a6b1496
fix: tailwind build not creating subfolders ( #2145 )
2023-12-06 08:57:31 +01:00
Marvin Hagemeister
80d35223d3
fix: route pattern parsing ( #2142 )
2023-12-05 13:11:34 +01:00
Marvin Hagemeister
993f1020b6
docs: add note for aria + data with Tailwind CSS ( #2137 )
...
Fixes https://github.com/denoland/fresh/issues/2123
2023-12-04 12:31:52 +01:00
Marvin Hagemeister
6eccdcf1a1
fix: ensure tailwind is loaded lazily ( #2124 )
2023-12-02 10:34:12 +01:00
Marvin Hagemeister
8fecfb940c
fix: make prompt a question to hint at user input ( #2119 )
2023-12-01 23:41:26 +01:00
Marvin Hagemeister
2acf72d512
fix: tailwind failing on non-existant files ( #2118 )
2023-12-01 23:38:22 +01:00
Marvin Hagemeister
8fecb589ba
docs: fix release post link ( #2114 )
2023-12-01 16:38:38 +01:00
Marvin Hagemeister
dace008611
chore: release 1.6.0 ( #2113 )
2023-12-01 16:20:40 +01:00
Marvin Hagemeister
bd372b9535
fix: errors in plugin fixture + improve island docs ( #2109 )
2023-12-01 12:21:10 +01:00
Marvin Hagemeister
054ffbb44a
fix: dots in island + route name not working ( #2105 )
2023-11-30 18:14:59 +01:00
Marvin Hagemeister
9e11c5c56b
feat: expose config in context + simplify page props ( #2102 )
2023-11-30 16:11:31 +01:00
Marvin Hagemeister
aafe048243
feat: make ready message one line ( #2104 )
2023-11-30 16:07:34 +01:00
Marvin Hagemeister
3b3e8fa497
feat: print more concise logs on Deploy ( #2103 )
2023-11-30 16:00:25 +01:00
Marvin Hagemeister
8ddc21eb90
Router cleanup ( #2099 )
2023-11-30 14:08:05 +01:00
Marvin Hagemeister
a0a756a1ec
fix: island module type in manifest ( #2101 )
2023-11-30 13:50:32 +01:00
Marvin Hagemeister
daf8ca19d2
chore: fix twind test ( #2100 )
2023-11-30 13:18:19 +01:00
Marvin Hagemeister
d12ad2fc5f
docs: fix encoded text in TOC ( #2098 )
2023-11-30 03:21:54 +01:00
Marvin Hagemeister
de55d80dee
docs: improve design ( #2097 )
2023-11-29 22:50:51 +01:00
Marvin Hagemeister
fe792455ab
fix: add missing -h/--help to init ( #2096 )
2023-11-29 16:57:39 +01:00
Marvin Hagemeister
a0ede4fe67
fix: incorrect path matching in tailwind plugin ( #2094 )
2023-11-29 16:37:54 +01:00
Marvin Hagemeister
d62d22a4fc
docs: fix link ( #2087 )
2023-11-28 22:50:48 +01:00
Marvin Hagemeister
dd76addb9f
docs: minor code cleanup ( #2084 )
2023-11-28 18:37:57 +01:00
Marvin Hagemeister
e99804ac01
docs: update deno version ( #2086 )
2023-11-28 18:35:26 +01:00
Marvin Hagemeister
325850719a
feat: reduce number of island bundles ( #2082 )
2023-11-28 17:23:27 +01:00
Marvin Hagemeister
ef26451dc6
fix: update tailwind init script ( #2078 )
2023-11-28 13:58:57 +01:00
Marvin Hagemeister
79fd85ef93
docs: Add migrating to Tailwind CSS page ( #2077 )
2023-11-28 13:39:05 +01:00
Marvin Hagemeister
9ee6ab72e0
fix: show original error page in dev ( #2074 )
2023-11-28 11:58:50 +01:00
Marvin Hagemeister
a8dfdd0b91
fix: Tailwind CSS intellisense not working ( #2073 )
2023-11-28 11:22:41 +01:00
Marvin Hagemeister
a56ea283c8
fix: Partials not working on error pages ( #2072 )
2023-11-27 16:56:46 +01:00
Marvin Hagemeister
1294d455bc
fix: client script source map returning 404 ( #2071 )
2023-11-27 16:10:36 +01:00
Marvin Hagemeister
9d5e916e4c
fix: invalid identifier in manifest ( #2070 )
2023-11-27 11:20:40 +01:00
Marvin Hagemeister
bb035ae8da
docs: port over to TailwindCSS ( #2058 )
2023-11-22 11:12:21 +01:00
Marvin Hagemeister
f105f19005
fix: tailwind don't magically add content regex ( #2060 )
2023-11-21 20:59:02 +01:00
Marvin Hagemeister
1f8f9b7ec7
feat: minify tailwind css in prod + other enhancements ( #2059 )
2023-11-21 18:57:24 +01:00