Skip to content

Releases: Pyra-js/Pyra

v0.18.4

23 Feb 03:26

Choose a tag to compare

Added

  • Module resolution and path alias support via ResolveConfig is now wired to esbuild in both dev and production builds
    • bundler.ts: new buildEsbuildResolveOptions() helper translates ResolveConfig to esbuild alias, resolveExtensions, and mainFields options; alias values are resolved to absolute paths automatically
    • dev-server.ts: all four bundleFile() call sites now pass config.resolve
    • build.ts: buildEsbuildResolveOptions() spread into both client and server esbuild.build() calls
  • RequestTracer.setDetail(detail) method - annotates the most recently closed stage with a detail string without opening a new span; used to attach the matched route ID to the route-match stage after the router returns
  • MetricsStore.isActiveBuild() method - returns true when startBuild() has been called without a matching finishBuild(); used to coordinate build lifecycle across the file watcher and request handler
  • Build metrics now fully wired in dev server
    • startBuild() called in the change and add watcher handlers when a source file is saved
    • Orphaned builds (two rapid saves with no intervening request) are closed before the next startBuild() via isActiveBuild()
    • finishBuild() called after the response is sent for the first routed request following a file change; totalDuration spans the full file-save-to-response cycle
  • Dashboard "Recent Requests" section - live table polling /_pyra/api/traces every 2 seconds
    • Color-coded method badges (GET, POST, PUT, PATCH, DELETE)
    • Color-coded status badges by class (2xx, 3xx, 4xx, 5xx)
    • Per-request pipeline stage breakdown with slow-stage highlighting (yellow above 50% of total, red above 80%)
    • Relative timestamps ("3s ago", "1m ago")
    • Matched route ID shown below the URL when the pattern differs from the path
  • Docs: docs/dashboard.md, docs/request-context.md, docs/cookies.md, docs/plugins.mdx

Fixed

  • Double route-match entry in request traces - the dev server was opening two separate spans for route matching; the second (zero-duration) span is now replaced with tracer.setDetail(), attaching the route ID to the first span and keeping extractRouteId() correct
  • Dashboard empty state messages used em dashes; replaced with commas for consistency

Changed

  • Dashboard stat cards show -- instead of 0 when no build data exists yet, avoiding misleading zeros on initial load
  • Build history rows now include a file count column
  • Dashboard "Recent Requests" and "Build History" empty states distinguish between the two conditions with separate messages

v0.16.1

20 Feb 08:25

Choose a tag to compare

Added

  • CSS pipeline fix in dev server - import './style.css' in layout/page files now works without Flash of Unstyled Content

    • bundler.ts: new cssOutputCache stores CSS extracted by esbuild separately from the JS bundle; removed the old document.createElement('style') injection that caused FOUC
    • New getCSSOutput(filePath) export returns cached CSS for a given entry file
    • dev-server.ts: new /__pyra/styles/* endpoint serves extracted CSS as proper text/css responses
    • handlePageRouteInner eagerly calls bundleFile() for each layout + page before assembly, then injects <link rel="stylesheet" href="/__pyra/styles/..."> tags into <head> via <!--pyra-head-->
    • style.css moved back to src/routes/ (co-located with the layout) in all full-stack templates; import './style.css' restored as a standard ES module import
  • Package READMEs: packages/adapter-react/README.md, packages/core/README.md, packages/shared/README.md - each tailored to its audience (end-user, internal/contributor, type reference)

  • .vscode/settings.json - excludes packages/cli/templates/** from Tailwind CSS extension scanning, preventing false "unable to load config" errors caused by the extension attempting CommonJS require() on ESM-only template config files

Changed

  • create-pyra rendering mode prompt labels updated from "SSR / SPA" to "Full-stack / Frontend (SPA)" - value fields ("ssr" / "spa") are unchanged so template selection is unaffected
  • packages/cli dev:link script changed from pnpm link -g to npm link - now consistent with create-pyra's dev:link, making npm link pyrajs-cli work correctly in generated test projects
  • Full-stack template CSS redesigned across all six templates (create-pyra React/Preact TS/JS and pyrajs-cli React TS/JS fullstack) to match the Pyra visual identity

Fixed

  • vitest.workspace.ts: removed defineWorkspace import that broke TypeScript in Vitest 4 (the export was removed in Vitest 4; workspace files now export the array directly)

Pyra v0.15.2

19 Feb 19:37

Choose a tag to compare

Pyra v0.15.2 Pre-release
Pre-release

Full details: CHANGELOG.md

Pyra v0.13.4

18 Feb 08:35

Choose a tag to compare

Pyra v0.13.4 Pre-release
Pre-release

Full details: CHANGELOG.md

Pyra v0.13.0

18 Feb 06:57

Choose a tag to compare

Pyra v0.13.0 Pre-release
Pre-release

This release introduces improvements to the CLI scaffolding flow and Windows command normalization.

Full details: CHANGELOG.md