Commit Graph
103 Commits
Author SHA1 Message Date
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
Luca Casonato 8d85945da6 fix: remove Data from FreshContext (#2473)
This is now only on `PageProps`.
2024-05-31 13:50:28 +02:00
Luca Casonato dc283a137b fix: remove @fresh/core/client export (#2477)
These files are now referenced with https URLs.
2024-05-29 12:20:57 +02:00
Luca Casonato 4fab47357f tests: wait for esbuild to shut down (#2476) 2024-05-27 20:03:48 +02:00
Luca CasonatoandMarvin Hagemeister d06dad5be6 tests: don't disable all the sanitizers (#2472)
The tests also pass with them enabled for me.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2024-05-27 15:00:40 +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 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 287929e4d2 major: import Fresh 2.0 code (#2449)
🎉
2024-05-24 09:40:08 +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
Bedis Nbiba 1d69f167ee chore: satisfy use-import-type lint (biomejs) (#2389)
https://biomejs.dev/linter/rules/use-import-type/

From that page the argument is 

>The rule ensures that all imports used only as a type use a type-only
import. It also groups inline type imports into a grouped import type.
2024-03-27 08:00:14 +01:00
Luca CasonatoandMarvin Hagemeister 29d582c987 chore: update ahead-of-time build docs for Deno Deploy (#2381)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2024-03-22 22:19:17 +01:00
Marvin Hagemeister a2be1abc6b chore: update Preact to 10.19.6 (#2331) 2024-02-22 10:46:41 +01:00
Reed von Redwitz 82c75f85e9 fix: update dependency recommendations (#2320)
closes https://github.com/denoland/fresh/issues/2319

The issue is because `imports.ts` wasn't changed before releasing. I
thought I would go through and bump some other versions as well. This
handles everything except the esbuild stuff and `tests/`.
2024-02-19 10:33:04 +01:00
Roj [roːʒ] d19c22d592 feat: add back twind in init wizard (#2290) 2024-01-30 12:34:38 +01:00
Benjamin Jesuiter 2652b85532 fix: GH actions warning by upgrading to v4 #2285 (#2286)
I tested the change in my own repo, the warning on github disapears for
the "actions/checkout" action.
It is still there for the denoland/setup-deno action, but an upgrade PR
is already ongoing for this action, see:
https://github.com/denoland/setup-deno/pull/56
2024-01-29 14:13:32 +01:00
Reed von Redwitz 3f28cc8977 chore: upgrade tailwind to 3.4.1 (#2287) 2024-01-29 14:10:28 +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 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
Reed von Redwitz 7465dbd978 feat(init): task to generate manifest file (#1422) 2023-12-05 15:03:37 +01:00
Marvin Hagemeister 054ffbb44a fix: dots in island + route name not working (#2105) 2023-11-30 18:14:59 +01:00
Reed von Redwitz a0483bc357 chore: create manifest generation task (#2088) 2023-11-30 17:07:00 +01:00
Reed von RedwitzandMarvin Hagemeister 9ab8651018 feat(server): Add basePath config to host from a directory (#2092)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-29 16:44:25 +00:00
Reed von RedwitzandMarvin Hagemeister ad33501692 chore: remove $fresh from import statements (#2079)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-28 16:43:50 +00:00
Reed von RedwitzandMarvin 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
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 9d5e916e4c fix: invalid identifier in manifest (#2070) 2023-11-27 11:20:40 +01:00
Reed von Redwitz ad2341dada chore: switch init to use tailwind (#2061) 2023-11-22 11:17:42 +01:00
Marvin Hagemeister daf15aee6f feat: add plugin configResolved (#2055) 2023-11-21 15:39:17 +01:00
Marvin Hagemeister 6618ac6b6b chore: update Preact (#2038) 2023-11-15 11:12:58 +01:00
Marvin Hagemeister 0961e775db feat: add support for jsx precompile (#2035) 2023-11-13 12:06:55 +01:00
Reed von RedwitzandMarvin Hagemeister 536463775c feat(dev): reduce manifest merge conflict potential (#2020)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-08 09:59:27 +01:00
Reed von Redwitz 8b846816a6 fix(server): support non-function exports from island files (#1986) 2023-11-06 11:55:16 +01:00
Adam GregoryandMarvin Hagemeister 264f3073bd Support AOT-built static assets (#1999)
Creates a static folder under `config.build.outDir` during AOT build.
Serves any static files that are found there.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-04 14:01:21 +01:00
Reed von Redwitz da90d92ebd chore: bump deps (#2000) 2023-11-03 16:52:54 +01:00
Reed von Redwitz 781247b180 chore: explicitly version rts in deps.ts (#1684) 2023-10-30 17:59:22 +01:00
Marvin Hagemeister cbd5b842b0 feat: pass resolved config to plugin.buildStart() (#1961) 2023-10-19 17:25:16 +02:00
Marvin Hagemeister c3938dc703 chore: remove ServerContext from start server (#1942) 2023-10-15 08:53:53 +02:00
Asher Gomez 6ddef91d95 refactor: replace references of options with config (#1903) 2023-10-11 09:25:03 +02:00
Marvin Hagemeister 32eb61c95d fix: allow setting server config from fresh config (#1889) 2023-10-09 13:59:30 +02:00
Marvin Hagemeister e9717ed911 fix: meta charSet -> charset (#1875) 2023-10-06 15:59:13 +02:00
Marvin Hagemeister 77ed10078c fix: remove another bare type import (#1872) 2023-10-05 21:39:42 +02:00
Marvin Hagemeister f8fb61e943 feat: ask for project arg if missing on update (#1821) 2023-09-26 20:48:47 +02:00
Marvin Hagemeister 3fd8fe89d3 feat: add build.outDir option (#1797) 2023-09-20 10:40:09 +02:00
Marvin Hagemeister c76f15479f feat: add plugin buildStart and buildEnd hooks (#1770) 2023-09-18 17:46:34 +02:00