This commit adds support for passing signals to islands in component
props. This is useful for passing around mutable state between islands.
The signal's value needs to be serializable for this to work.
This commit adds support for an advanced (de)serializer that is used
for page state (island props and plugin state). This new serializer
supports maintaining references (thus supporting circular objects,
and multi-referenced objects).
This is a pre-requisite for allowing to pass signals, JSX, Uint8Arrays,
Date, and many other "advanced" values.
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.
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.
This commit adds support for suspending during JIT SSR rendering.
Additionally this PR adds `useData` support. This hook is triggered
during JIT render and can be used to fetch data. This data is sent to
the client and returned there from calls to useData too.
This commit adds API routes. These routes are located in the
./pages/api/ directory. Each file in there will have it's default
export invoked for HTTP calls to the corresponding route.
This commit changes how bundling works, by bundling all routes at once.
Static JS assets are now cached immutably.
Additionally this PR completly refactors how the router works to make it
more modular. This allows users to opt out of the default oak server,
and instead create their own.