Skip to content

Releases: rossrobino/domco

domco@2.0.0

21 Sep 16:57
ff04766
Compare
Choose a tag to compare

Major Changes

  • 371d3f7: Renames +app to +func

    If you are using a UI framework with domco it's nice to have an app directory that can be imported on the server and client that holds the components of your application. Having the server entry point named +app made the function of the module less clear. This change renames the +app entry point to +func. There are no other breaking changes.

create-domco@2.0.1

21 Sep 17:00
a0f81dd
Compare
Choose a tag to compare

Patch Changes

create-domco@2.0.0

21 Sep 16:57
ff04766
Compare
Choose a tag to compare

Major Changes

  • 371d3f7: Renames +app to +func

    If you are using a UI framework with domco it's nice to have an app directory that can be imported on the server and client that holds the components of your application. Having the server entry point named +app made the function of the module less clear. This change renames the +app entry point to +func. There are no other breaking changes.

Patch Changes

  • e679eed: fix: prettier config formatting

domco@1.0.0

19 Sep 19:49
0ded81b
Compare
Choose a tag to compare

Major Changes

  • 344d88a: v1.0.0

    Stable API

    Settled on an API and scope for the project.

    domco follows semantic versioning, so there will no longer be breaking changes between minor versions now that the project is v1.

    Breaking changes

    None from v0.13, if upgrading from a lower version see the changelog or consult the documentation for details.

domco@0.13.3

19 Sep 15:36
0b730d3
Compare
Choose a tag to compare

Patch Changes

  • f498a79: fix: tags import chunks not found error

    • Preloads modules that are imported into entry points in case of manual chunks are used.

create-domco@1.0.0

19 Sep 19:49
0ded81b
Compare
Choose a tag to compare

Major Changes

  • 344d88a: v1.0.0

    Stable API

    Settled on an API and scope for the project.

    domco follows semantic versioning, so there will no longer be breaking changes between minor versions now that the project is v1.

    Breaking changes

    None from v0.13, if upgrading from a lower version see the changelog or consult the documentation for details.

create-domco@0.2.1

19 Sep 15:36
0b730d3
Compare
Choose a tag to compare

Patch Changes

  • 8a99276: use project name for title and header

domco@0.13.2

18 Sep 21:53
e0075d9
Compare
Choose a tag to compare

Patch Changes

  • 74f1827: fix: windows entry point paths

domco@0.13.1

18 Sep 14:51
43e54e9
Compare
Choose a tag to compare

Patch Changes

  • f915105: fix: reference on DomcoConfig and export MaybePromise

domco@0.13.0

18 Sep 10:54
d13e1b7
Compare
Choose a tag to compare

Minor Changes

  • d50685c: Server framework agnostic

    This project had a lot of overlap with HonoX, HonoX should be the default if you are wanting all of the features Hono provides like client components. This update removes the dependency on Hono and making the library framework agnostic. Hono can still be easily used with domco (see below).

    This makes domco have no dependencies other than Vite. You can now build your app with vanilla JS without any external libraries. You can now use any server framework like Hono that provides a function that handles a web Request and returns a Response. This update also simplifies domco's API and refactors much of the codebase to make it smaller and builds faster.

    Overview of Changes

    • +server renamed to +app
    • +client renamed to +script
    • Instead of exporting the app as the default export, you now must export app.fetch as a named handler export.
    • Removes page, client, and server context variables.
    • page is replaced with the client:page virtual module.
    • script is replaced with the client:script virtual module.
    • The server context variable is removed. This is better handled by the user - perhaps with libraries like ofetch.
    • The tags imported from client:script are now just strings, so you'll need to pass them through hono/html - raw function to pass them into a JSX template if you were using them directly in Hono.
    • Multiple +server entry points are removed in favor of just one src/server/+app entry. Note this is located within src/server/ now instead of directly in src/.
    • Removes +setup - since domco no longer mounts routes, user can control the entire lifecycle through the handler.
    • Removes default immutable headers - leave to adapters instead.
    • Import handler from dist/server/app.js instead of the createApp export.
    • Script entry points are no longer automatically injected into pages in the same directory.
    • Static pages must be prerendered, nothing from src/client/ is included in the app if not imported into the server entry.
    • d.ts changes - instead of adding the context variable map, you now just need to add types for the virtual modules from domco/env.
    /// <reference types="vite/client" />
    /// <reference types="domco/env" />

    Examples

    Vanilla

    import { html } from "client:page";
    import type { Handler } from "domco";
    
    export const handler: Handler = (req) => {
    	const { pathname } = new URL(req.url);
    
    	if (pathname === "/") {
    		return new Response(html, {
    			headers: {
    				"Content-Type": "text/html",
    			},
    		});
    	}
    
    	return new Response("Not found", { status: 404 });
    };

    Hono - Migrate from 0.12

    // src/server/+app.ts
    import { html } from "client:page";
    import { Hono } from "hono";
    
    const app = new Hono();
    
    app.use((c) => c.html(html));
    
    export const handler = app.fetch;