Commit Graph
77 Commits
Author SHA1 Message Date
Reed von Redwitz 0db3a0911a feat: pass middleware state in props (#1264) 2023-06-28 14:53:42 +02:00
Aushwin 851f8d60aa refactor: changed Handlers type to MultiHandler (#1360) 2023-06-28 12:52:48 +00:00
Kamil Ogórek d5a8692b78 feat: Allow passing props to renderNotFound method (#1310) 2023-06-16 17:12:01 +02:00
Marvin Hagemeister 5724b73e71 fix(ssr): invalid HTML comment tags (#1260) 2023-06-09 11:21:36 +02:00
Asher GomezandLuca Casonato 1b6678951a feat: support embedded import map in deno.json (#1188)
One can now inline the `imports` and `scopes` from the import map directly into deno.json.

For new projects, `import_map.json` is not generated anymore.

Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-06-03 10:46:40 +02:00
Lino Le VanandAsher Gomez 736c5524d5 chore: upgrade preact to 10.15.1 and std to 0.190.0 (#1237)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-06-03 10:04:23 +10:00
Asher Gomez 02dec2f483 chore: upgrade preact-render-to-string to 6.0.3 (#1236) 2023-06-02 16:24:14 +02:00
Asher Gomez 8fa4141e06 refactor: replace useState() with useSignal() (#1234) 2023-06-02 06:43:01 +10:00
Leo Kettmeir 060e2bb50d feat: add status and headers overwrite for HandlerContext.render (#725) 2023-05-31 10:09:53 +02:00
Asher Gomez b5532aeb69 feat: island sub-directories (#1185) 2023-05-31 05:29:56 +10:00
7f3fd51cca Optimise images size (#1101)
Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
Co-authored-by: Jheyson Saavedra <hello@jheysaav.me>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-05-25 19:45:01 +10:00
azerum 1a456444e4 add test case covering islands that return null (#1203)
Just a small addition to my previous PR. It wasn't obvious for me that
PR #1172 also fixed #1129. I guess that issue should be covered by a
separate test
2023-05-25 09:40:49 +10:00
Kamil OgórekandAsher Gomez e86a126c0a feat(server): Allow for custom HEAD method implementations (#1175)
Fixes https://github.com/denoland/fresh/issues/1115
Fixes https://github.com/denoland/fresh/issues/1165

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-05-25 08:55:09 +10:00
azerumandAsher Gomez 7d23ed5984 fix: conditionally rendered element under fragment in island does not render (#1172)
This might be fixing #502, but I am not sure. All tests pass. I've added
additional test cases for comments from #502

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-05-23 12:24:05 +10:00
Asher Gomez 8db73e0485 refactor: disable lock (#1186) 2023-05-18 21:20:48 +10:00
Marvin HagemeisterandLuca Casonato c224db7cb7 chore: update for deno 1.33.x (#1139)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-04-30 10:30:30 +02:00
Leo Kettmeir 9dd026e0f5 feat: add middleware destination (#1123)
Closes #521
2023-04-20 13:14:12 +02:00
hashrock 673c161aee test: island with wasm-esbuild (#1082) 2023-03-21 19:55:59 +09:00
Lino Le Van 7b036f0af8 chore: bump deps and update copyright year (#1069) 2023-03-21 18:56:30 +09:00
OkadaGenya 9d13f6ff26 fix: sanitize <script> in __FRSH_STATE state (#739)
This commit escapes `<` `>` and related characters in the serialized state that is encoded into the `<script id=__FRSH_STATE>` tag. This prevents XSS attack occuring through injection of a `</script>` string in island props.
2022-09-12 17:33:02 +02:00
Luca Casonato 7a08b73afe chore: update preact + preact-render-to-string (#762)
preact: 10.11.0
preact-render-to-string: 5.2.4
2022-09-12 14:53:32 +02:00
Mark BennettandLuca Casonato ba7c78bcc2 feat: experimental support for Deno.serve (#681)
The experimental support can be enabled through the
`experimentalDenoServe` option for `start()`.

Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-07 23:04:45 +00:00
Luca Casonato 01052b31aa chore: update preact-render-to-string (#707) 2022-09-07 15:06:24 +02:00
Sourav Singh Rawat 08d43803f7 feat: add support for custom static folder in FreshOptions (#626)
Support custom (user provided) static assets folder or fallback to default behavior.
2022-09-05 12:00:47 +00:00
Luca Casonato b12867a582 feat: support JSX automatic mode (#610)
This commit adds support for JSX automatic mode instead of the default
mode that requires the presence of the JSX pragma in each file.

This commit also adds the config file to the `fresh.gen.ts` manifest,
which is used to determine if the client emit should use automatic mode.

The minimum Deno version has also been bumped to 1.25.0.
2022-08-26 11:03:00 +02:00
Luca Casonato 3d682d98cb chore: update preact & preact-render-to-string (#651)
preact@10.10.6 & preact-render-to-string@5.2.2
2022-08-23 22:09:06 +00:00
ahuigo a00b97bac9 feat: support multiple middlewares with the same matcher (#553) 2022-08-23 23:50:57 +02:00
Roj 67b82d538b fix: add reference to dom.iterable (#641)
This fixes TypeScript errors with things like `URLSearchParams.entries`.
2022-08-23 13:26:21 +00:00
Steven YungandLuca Casonato 49092ed83a feat: add ctx.renderNotFound() to explicitly render 404 template (#481)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-08-09 19:23:17 +00:00
Kid 5b9ce720d0 chore: remove deno.unstable references (#600) 2022-08-08 23:19:26 +02:00
Luca Casonato ba20756c17 chore: update deps (#561)
Update std, esbuild, and preact.
2022-07-30 17:29:29 +02:00
X 85687b6c78 chore: update preact-render-to-string import to use esm.sh ?external query (#499) 2022-07-12 15:32:36 +02:00
Stephen Delaney a7b198fdf4 feat: support kebab-case filenames for islands (#404) 2022-07-06 12:42:25 +02:00
Luca Casonato 87da68b8a7 chore: update preact + twind (#410) 2022-07-04 15:25:32 +00:00
Luca Casonato aab8ceb78b fix: layered middleware not working for index page (#407)
This commit fixes layered middleware not being invoked for the the index
page of the layer.

For example: routes/api/_middleware.ts was not being invoked for /api,
only /api/foobar
2022-07-04 15:13:49 +00:00
Luca Casonato 1b3d1319bd chore: update default preact version (#272) 2022-06-22 14:40:37 +02:00
Sylvain Cau 6bca35be0f tests: ensure asset mapping works correctly in islands client side (#245) 2022-06-22 12:02:51 +02:00
Luca Casonato da340daeb2 BREAKING: move a bunch of types into server/ (#263)
Moved some server only types like `RouteConfig` into server/. They were
previously in runtime/.
2022-06-21 15:21:07 +02:00
Luca Casonato 70d1838cad BREAKING: make render fn an option on start (#260)
This commit removes the `_render.{tj}s{x}?` file in favor of a `render` option on the `start` call in `main.ts`.
2022-06-20 13:40:23 +02:00
Luca Casonato de6c3f6ed5 chore: remove --no-check flags (#259)
Since Deno 1.23.0, `--no-check` has become the default type checking
mode for `deno run`. As such, we don't need to specify this flag
anymore.
2022-06-20 12:45:48 +02:00
Luca Casonato cbbf616a74 chore: version preact explicitly in import map (#258)
This allows users to control the `preact` version independently of fresh
itself.
2022-06-20 12:37:24 +02:00
Luca Casonato 836cc24bdd feat: remove fresh cli, do manifest generation in process (#223)
This commit removes the `fresh` cli, replacing it with a small bootstrap script,
and JIT generation of the manifest that happens in process during development.
2022-06-14 09:39:38 +02:00
Sylvain CauandLuca Casonato afafb7c938 fix: reviving multiple islands on one page (#197)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-06-07 15:02:48 +02:00
Luca Casonato 80598d07fd feat: use import maps instead of deps files (#209)
This commit updates fresh to use import maps instead of deps files in generated projects.
2022-05-23 19:35:15 +02:00
Luca Casonato fd6724c050 chore: rename *_deps.ts -> deps.*.ts (#206)
As per David's suggestion.
2022-05-23 16:05:33 +02:00
Luca Casonato f9f0125282 chore: rename PageConfig to RouteConfig (#202) 2022-05-23 15:52:29 +02:00
Sylvain Cau e8b1e229b3 feat: automatically apply asset caching to img src and srcset (#184) 2022-05-19 19:19:59 +02:00
Sylvain CauandLuca Casonato 8d4e77f4ac feat: layered and scoped middleware and context state (#139)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-04-23 22:07:40 +02:00
ʀᴀʏ bb9fa4a09f feat: allow render function to be asynchronous (#142) 2022-04-23 15:17:00 +02:00
Sylvain Cau 6cbcc27646 feat: add support for static asset caching (#133) 2022-03-16 16:49:47 +01:00