Commit Graph
33 Commits
Author SHA1 Message Date
Igor Brasileiro e7bf6aca62 fix: Prevent update doc title from partial if not present (#2244)
fixes #2243
2024-01-12 18:47:40 +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
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
Reed von Redwitz 35da45bff1 chore: update types in tests, init, update (#2122)
Of particular note is the change to
`tests/fixture_plugin/routes/test.tsx`. Note how I do this:
```diff
-  async GET(_req, ctx: HandlerContext<unknown, { test: string }>) {
+  async GET(_req, ctx: FreshContext<{ test: string }, unknown>) {
```

I find it strange and confusing that the order of the type parameters
has "changed". This makes it impossible to do a simple search and
replace, because people now have to change order as well.

Most of the types have been declared as `<T, S>`, i.e. data before
state:
* `PageProps<T = any, S = Record<string, unknown>>`
* `RouteContext<T = any, S = Record<string, unknown>>`
* `Handler<T = any, State = Record<string, unknown>>`
* `Handlers<T = any, State = Record<string, unknown>> `
* `AsyncRoute<T = any, S = Record<string, unknown>>`
* `PageComponent<T = any, S = Record<string, unknown>> `
* `AsyncLayout<T = any, S = Record<string, unknown>>`

And then `FreshContext` comes around like 
```
export interface FreshContext<
  State = Record<string, unknown>,
  // deno-lint-ignore no-explicit-any
  Data = any,
  NotFoundData = Data,
>
```
and switches it all up.

Not a huge issue, but just something to be aware of that others might
report.
2023-12-02 10:33:59 +01:00
Marvin Hagemeister 325850719a feat: reduce number of island bundles (#2082) 2023-11-28 17:23:27 +01:00
Marvin Hagemeister a56ea283c8 fix: Partials not working on error pages (#2072) 2023-11-27 16:56:46 +01:00
Marvin Hagemeister 27adeb7b14 fix: redirects with partials (#2053) 2023-11-21 11:35:08 +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 da90d92ebd chore: bump deps (#2000) 2023-11-03 16:52:54 +01:00
Reed von Redwitz 63ac1e6362 feat(server): add isPartial to context types (#1977) 2023-10-26 22:26:36 +02:00
Marvin Hagemeister 7896005329 fix: error on duplicate partial name (#1958) 2023-10-18 20:04:37 +02:00
Tiago Gimenes 84ff79beca feat: Nested partials support (#1955) 2023-10-18 18:26:46 +02:00
Marvin Hagemeister bfabb2ec98 feat: add support for partials on forms (#1930) 2023-10-16 22:45:11 +02:00
Marvin Hagemeister 0192316785 fix: unable to opt out of nested client nav (#1940) 2023-10-15 08:41:13 +02:00
Marvin Hagemeister 7d954584a6 fix: island marker parsed as key marker (#1922) 2023-10-12 13:40:23 +02:00
Marvin Hagemeister a1f0d4a5bd fix: don't scroll on fragment links in partials (#1906) 2023-10-11 10:30:31 +02:00
Tiago Gimenes 15f869715c fix: Partial state deserialization on simple islands (#1873) 2023-10-07 23:08:04 +02:00
Tiago Gimenes 2df5921b59 feat: Use href instead of origin on Partial (#1870) 2023-10-07 23:07:42 +02:00
Marvin Hagemeister e9717ed911 fix: meta charSet -> charset (#1875) 2023-10-06 15:59:13 +02:00
Marvin Hagemeister 6598eb39a0 feat: support f-partial on buttons (#1867) 2023-10-05 13:53:51 +02:00
Marvin Hagemeister 51d00d20e0 fix: duplicate partial head tags (#1864) 2023-10-05 12:23:44 +02:00
Marvin Hagemeister b3a3bd1069 feat: add support for partial <head> merging (#1863) 2023-10-05 12:04:38 +02:00
Marvin Hagemeister fd4a2b99ef feat: Add types for partial attributes (#1862) 2023-10-05 11:02:47 +02:00
Marvin Hagemeister fd235e877c feat: only enable partials when attribute is set (#1861) 2023-10-05 10:47:37 +02:00
Marvin Hagemeister add696faeb feat: support scroll restoration for partials (#1858) 2023-10-05 10:00:56 +02:00
Marvin Hagemeister 9018024b7e feat: collect partials deeply from response (#1860) 2023-10-04 22:33:27 +02:00
Marvin Hagemeister 3b73449a93 fix: only render keyed comments when needed (#1859) 2023-10-04 22:07:06 +02:00
Marvin Hagemeister be1c15f8f3 fix: throw error when no partials found (#1853) 2023-10-04 15:38:43 +02:00
Marvin Hagemeister ea91687ea3 fix: active links outside partials not updated (#1852) 2023-10-04 15:07:27 +02:00
Marvin Hagemeister f2467229cc fix: use consistent partial attribute naming (#1847) 2023-10-04 12:35:29 +02:00
Marvin Hagemeister 4295dbe85d feat: mark active or ancestor links (#1840) 2023-10-02 18:22:44 +02:00
Marvin Hagemeister d638c526f5 fix: partial hash navigation causing loop (#1838) 2023-10-02 16:24:09 +02:00
Marvin Hagemeister 665d35bbc2 Add Partials (#1824) 2023-09-27 13:34:30 +02:00