Hwy is a fullstack web framework for driving a (p)react frontend with a Go backend. Includes end-to-end typesafety, file-based nested UI routing, and much more.
Remove unnecessary key={something} code in components. Probably originated from co-pilot thinking these were React components and me not catching it π.
Update get-matching-path-data-internal.ts to fix a routing bug where in certain narrow situations, index files would incorrectly render when the ultimate catch should have rendered, plus another bug (caught by new tests π₯³) where sometimes a non-ultimate splat route would be discarded when it shouldn't be, which caused the ultimate splat to render when it didn't need to.
Simplify / shrink paths.js output and getMatchingPathData API.
Fix a couple instances of snake_case accidentally making its way into public API (loader_args and action_args are now loaderArgs and actionArgs).
Templates in create-hwy
Updates to create-hwy templates, including adding an example of some-page.client.ts usage (classic incrementing counter button), plus some necessary changes to the create-hwy scripts to facilitate that.
Add all potential third-party packages to create-hwy dev deps so their versions can be read at runtime.
Fix instances of charSet that should have been charset.
Remove a stray reference in templates to watchExclusions, which now belongs in hwy.config.{ts,js}.
Update generated README for Cloudflare Pages template to mention needing to set nodejs_compat compatibility flags in Cloudflare dashboard.
Add Node types to compiler options if your deploy target is Node or Vercel Lambda in create-hwy.
De-Tailwindify the preflight CSS reset file (basically just remove the Tailwind-specific theme function calls).
Docs
Begin refactoring docs to make updates and outside contributions easier. Work on this is ongoing.
General
Bump dependencies.
Add scripts to make it easier to bump deps across entire repo.
Add other time-saving, non-outward-facing helper scripts across repo.
Add bundle size badge to docs and READMEs.
Testing
Add new Hwy global test_dirname to make router more easily testable.
Add vitest and add tests for getMatchingPathData, the function that needs testing the most (a very good place to start).
Integrate vitest as appropriate into dev and publish scripts.
Update testers/routes code to catch more edge cases.
Replace changesets with custom scripts
Removed changesets CLI. Wasn't worth it. Replaced with a few custom scripts to make it easier to do intra-repo versioning and publishing without having to deal with the changesets CLI. Much nicer to work with. Might generalize and publish as its own package sometime, we'll see.
Core
runBuildTasks
.key={something}
code in components. Probably originated from co-pilot thinking these were React components and me not catching it π.get-matching-path-data-internal.ts
to fix a routing bug where in certain narrow situations, index files would incorrectly render when the ultimate catch should have rendered, plus another bug (caught by new tests π₯³) where sometimes a non-ultimate splat route would be discarded when it shouldn't be, which caused the ultimate splat to render when it didn't need to.paths.js
output andgetMatchingPathData
API.loader_args
andaction_args
are nowloaderArgs
andactionArgs
).Templates in create-hwy
create-hwy
templates, including adding an example ofsome-page.client.ts
usage (classic incrementing counter button), plus some necessary changes to thecreate-hwy
scripts to facilitate that.create-hwy
dev deps so their versions can be read at runtime.charSet
that should have beencharset
.watchExclusions
, which now belongs inhwy.config.{ts,js}
.nodejs_compat
compatibility flags in Cloudflare dashboard.create-hwy
.theme
function calls).Docs
General
Testing
test_dirname
to make router more easily testable.getMatchingPathData
, the function that needs testing the most (a very good place to start).testers/routes
code to catch more edge cases.Replace changesets with custom scripts