Commit Graph
1107 Commits
Author SHA1 Message Date
Luca Casonato 4bd556970a chore: update esbuild deno loader (#2270)
This fixes a bunch of bugs related to `npm:` imports.
2024-01-22 13:01:42 +00:00
Reed von Redwitz 099aa051be Revert "chore: simplify deno check:types command" (#2262)
Reverts denoland/fresh#2259
Windows is failing with this change:
* my PR
https://github.com/denoland/fresh/actions/runs/7556810357/job/20574665605?pr=2261
* your PR
https://github.com/denoland/fresh/actions/runs/7543217433/job/20533721591
* the commit from merging your PR
https://github.com/denoland/fresh/actions/runs/7543221780/job/20533736560

```
Run deno task check:types
Task check:types deno check **/*.ts **/*.tsx
Error launching 'deno': The filename or extension is too long. (os error 206)
Error: Process completed with exit code 1.
```
2024-01-17 16:35:12 +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
Luca Casonato 8583394481 fix: prototype pollution in deserializer (#2255)
This is not exploitable in practice unless a user maliciously crafts
serialized values in __FRSH_STATE, because `serializer()` never outputs
serialized representation that would be vulnerable to prototype
pollution. But hey, defense in depth.
2024-01-15 18:03:59 +00:00
Marvin Hagemeister 3bc43a1327 chore: release 1.6.2 (#2252)
🎉
2024-01-15 12:43:11 +01:00
Greg Zometa e059a46ea5 docs: getting started - running locally (#2245)
Removes description of changing the port number with the deprecated
`port` property and updates with `server.port`.

![Screenshot 2024-01-12
190452](https://github.com/denoland/fresh/assets/138949169/84ac96b2-6c55-438d-8be1-22184f309a22)
2024-01-13 08:43:33 +01:00
Igor Brasileiro e7bf6aca62 fix: Prevent update doc title from partial if not present (#2244)
fixes #2243
2024-01-12 18:47:40 +01:00
Reed von Redwitz ca8338e04d chore: bump std to 0.211.0 and loader to 0.8.3 (#2241) 2024-01-11 15:54:41 +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
David Luis 8d01051b5b docs: fix carousel not working properly (#2222)
Currently, the [Carousel component](https://fresh.deno.dev/components)
only shows "slide four" without moving to other slides.
This PR will fix that issue.
2024-01-10 10:31:06 +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
Reed von Redwitz 15929d37bd docs: fix navigating to components from docs with small screen (#2198)
closes https://github.com/denoland/fresh/issues/2190

Marvin, I noticed that adding the fix
[here](https://github.com/denoland/fresh/blob/a8a43ff0d4ed7ae9958a09f37ce8dadf219f76e1/www/components/Header.tsx#L41)
did not resolve the issue. I see the docs say `Partials are enabled by
adding a f-client-nav attribute to an HTML element` -- is it expected
that adding `f-client-nav={false}` to a component does not automatically
apply it to html element children?
2024-01-09 11:48:24 +01:00
Adam Zerner 8ffe3d32aa showcase: add rfui.deno.dev (#2205)
Add RFUI (https://rfui.deno.dev/)
2024-01-08 11:03:16 +01:00
Reed von Redwitz e12e08f146 docs: fix import_map link in creating-a-project (#2218)
closes https://github.com/denoland/fresh/issues/2208
2024-01-08 09:53:36 +00: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
Asher Gomez 99eb5435bb refactor: use --env CLI arg (#2204)
This change replaces the use of the Standard Library's `dotenv.load()`
with the native `--env` CLI flag.

The benefits include:
* One less dependency
* More obvious consumption of the `.env` file in the CLI output
2023-12-29 10:47:15 +01:00
Josh Simmons 1016e7f9a1 docs: fix deprecated type usage in example code (#2203)
Fixes deprecated example in docs.

<img width="760" alt="image"
src="https://github.com/denoland/fresh/assets/6600962/1e239f0f-0798-4ca0-b84d-d4266b6dfc31">
2023-12-28 22:24:38 +00:00
Ian James a8a43ff0d4 docs: fix typo in active links introduction (#2192)
Fixes an "<a>" in the active link markdown from being interpreted as an
actual link, rather than part of the text.

Before:


![](https://github.com/denoland/fresh/assets/1732331/fa5665f8-deed-439f-b6de-4589b494edd7)

Before with rogue anchor element in hover state:


![](https://github.com/denoland/fresh/assets/1732331/e6b286d6-e76a-4def-8446-ec0f8752967a)


After:

![](https://github.com/denoland/fresh/assets/1732331/1f441b30-871e-4076-837e-1cf5e64a82b0)
2023-12-22 12:54:16 +00:00
Nicolò Ribaudo df35a063fd fix: .vscode/tailwind.json generation (#2185)
Fixes #2184

Is there any reason for this not being `JSON.stringify({ ... that object
... })` and avoid a lat of escaping?
2023-12-19 21:45:05 +00:00
iain maitland 7af80da802 docs: add missing import (#2183)
fix undefined var error.
2023-12-18 21:45:31 +01:00
iain maitland 8d321b6049 docs: fix typo in upload example (#2182) 2023-12-18 18:12:10 +01:00
Marvin Hagemeister 74481007f3 docs: Move aot step in tailwind guide to start (#2176) 2023-12-15 16:42:42 +01:00
dependabot[bot] 12760973e0 chore(deps): bump google-github-actions/setup-gcloud from 1 to 2 (#2170)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 22:41:20 +01:00
Casey Ydenberg 579709159d showcase: add Living Pixel (#2165) 2023-12-11 18:14:29 +01:00
Arno KleinandMarvin Hagemeister 78061e9198 docs: fix link to data-fetching (#2162)
Just a fixed link

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-12-11 08:48:39 +00: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
Casey YdenbergandMarvin Hagemeister 25afcae943 docs: Merge data fetching pages (#1974) (#2107)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-12-07 10:50:50 +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
Reed von Redwitz 7465dbd978 feat(init): task to generate manifest file (#1422) 2023-12-05 15:03:37 +01:00
Reed von Redwitz 60b2198d13 fix: tailwind now respects basepath (#2138) 2023-12-05 13:13:33 +01:00
Marvin Hagemeister 80d35223d3 fix: route pattern parsing (#2142) 2023-12-05 13:11:34 +01:00
迷渡 04c62173fe fix: Unknown at rule @apply css(unknownAtRules) (#2141) 2023-12-05 11:28:21 +01:00
dependabot[bot] 508366e9d6 chore(deps): bump google-github-actions/auth from 1 to 2 (#2140)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:55:52 +01:00
Reed von Redwitz c8844ad98c fix: PluginRoute supports AsyncRoute and AsyncLayout (#2139) 2023-12-04 16:56:00 +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
Christian SvenssonandMarvin Hagemeister 96644f5e22 fix: remove error frame HTML for non-dev mode (#2133)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-12-04 11:14:11 +00:00
Christian SvenssonandMarvin Hagemeister c4e09d1cef fix: use real 500 error page in dev mode (#2134)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-12-04 12:06:06 +01:00