Every existing test in endpoint-schema.test.ts passed rawInput explicitly, so the branch added to endpoint.ts's fix (GET/HEAD query parsing, JSON body parsing, malformed/absent body fallback) was exercised by nothing but a manual curl. Add coverage that calls the endpoint with only a context, matching the real router's calling convention: - GET with query parameters populates input from ctx.url.searchParams. - POST with a JSON body populates input from the parsed body. - POST with a malformed or absent body does not throw; the schema's own validation decides the outcome (asserted on the real response). - An explicit rawInput argument still wins and the request is never read (the body is drained first, so a second .json() call would reject if the endpoint tried to read it again) -- the regression guard for the branch intentionally left untouched. Confirmed the GET and POST-body tests fail against the pre-fix endpoint.ts (input resolves as undefined/null instead of the sent value); the malformed/absent-body test does not distinguish pre- and post-fix, because in that specific edge case both normalize to an effectively empty input -- noted in the report rather than forced. Added a CHANGELOG entry documenting the behavior change for downstream apps: a request that previously passed vacuous validation on a defineEndpoint route can now legitimately fail. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
4.5 KiB
4.5 KiB
Changelog
Unreleased
- Fixed
defineEndpoint(@wrnexus/core) so routes invoked through the real HTTP router (which calls handlers ashandler(ctx), with no second argument) actually receive their request input: it now parses query parameters for GET/HEAD and the JSON body otherwise when no input is passed explicitly. Previously such endpoints silently validatedundefined, so aninputschema with only optional fields passed vacuously regardless of what was sent. Behavior change for downstream apps: a request that previously passed vacuous validation on adefineEndpointroute can now legitimately fail (400VALIDATION_ERROR) if it does not actually satisfy the schema. Explicitly passing a second argument (e.g. from a unit test or an internal caller) is unaffected and still takes priority over reading the request.
0.8.8
- Added the framework request context to
.wrnlanguage-server type environments. - Kept workspace type declarations inside runnable apps during updates.
- Regenerated lint-safe application declarations before update verification.
All notable framework changes are recorded here. Every release must also include an idempotent entry in the CLI migration registry.
0.8.3 - 2026-08-03
- Bundled hydrated browser modules so package aliases and filesystem imports do not leak into browser-native modules.
- Fixed SSR computed values, Async branch aliases, typed object props in loops, reactive route state, loader invalidation, realtime identity isolation, and client-function hydration.
- Fixed template-literal parsing in the reactive fallback evaluator and removed the unsupported
default
unloadPermissions Policy directive. - Made official package components compatible with strict explicit imports and added regression coverage for the TeamSpace application failures.
- Fixed Bun 1.3.14 and TypeScript 5.9 release-gate compatibility in client bundling, alias resolution, and Happy DOM event tests.
- Fixed ESLint compatibility in Node release scripts by declaring Node globals and using explicit regex space quantifiers.
- Fixed package component import validation after workspace installation by excluding generated and
dependency directories such as nested
node_modulesfrom first-party source scans. - Made the VS Code embedded compiler freshness check deterministic across TypeScript patch versions, Windows/Linux line endings, and workspace environments by verifying normalized source and generator fingerprints while retaining exact-output checks for the same TypeScript version.
- Fixed the VS Code language-server bundle so it executes under Node instead of exiting after defining an uninvoked Bun CommonJS wrapper, and added request-level crash containment.
- Scoped HTML diagnostics to
viewblocks, ignored TypeScript generic syntax and WRN expressions, and preserved JavaScript-looking documentation inside<pre><code>examples. - Fixed formatter corruption of preformatted examples, balanced compact sibling markup, long bare tags, and repeated format-on-save indentation drift.
- Fixed component prop intelligence for dynamic boolean/union expressions, boolean string literals,
literal-union runtime types, and reserved prop names such as
class. - Prevented bundled editor type checking from publishing TypeScript standard-library path failures or unmapped synthetic virtual-document diagnostics.
- Fixed language-server virtual TypeScript inference for untyped dynamic handler parameters and indexed output dispatch, while retaining strict diagnostics for explicitly typed parameters.
- Made bundled editor type checking resolve TypeScript standard libraries from the active workspace, and added a regression test that proves semantic diagnostics are actually running.
- Fixed final release-gate lint failures by removing the obsolete editor
stripCommentshelper and importing NodeBufferexplicitly in the language-server bundle generator. - Reviewed the UI visual-contract change caused only by corrected
AuthForm.wrnindentation and regenerated the 0.8 baseline after confirming no rendered component behavior changed.
0.8.0 - 2026-08-02
- Added package-owned helper and component kits across all 39 framework packages.
- Added standalone realtime and package-aware auth, i18n, image, uploader, validation, JWT, encryption, database, and CAPTCHA improvements.
- Added whole-application WRN syntax, import, and formatting modernization to the CLI update.
- Added Windows/Linux CI, read-only package audits, governance documents, and security gates.