Skip to content

Releases: linked-fw/server-utils

v1.1.1

Choose a tag to compare

@linked-cm-release linked-cm-release released this 31 Aug 08:08
1366ea2

Patch Changes

  • #19 db0e6b9 Thanks @flyon! - Pin AppContext on globalThis so module re-evaluation cannot fork it.

    The dev server loads this module on two different lifecycles: LinkedServer
    imports AppContextProvider statically and is instantiated once at boot, while
    the consumers below it (AppRoot, Html) arrive via
    vite.ssrLoadModule('/src/App.tsx'), which is re-evaluated on every full SSR
    invalidation. Because server-utils is bundled into the SSR graph, a bare
    createContext call then handed the consumers a NEW context object while the
    provider still held the boot-time one. useAppContext() found no matching
    provider, returned null, and every SSR render threw "Cannot destructure property
    'isNativeApp' of useAppContext()".

    The stale provider is pinned inside the long-lived server object, so this never
    recovered on its own: a single HMR page reload could flip a working dev server
    into serving 500s on every request until the process was restarted. It also
    presented as a bare "SSR timed out" rather than the real error, because
    onShellError did not answer the request (fixed separately in @_linked/server).

    Pinning the context object on globalThis keeps provider and consumer on one
    context across re-evaluations.

v1.1.0

Choose a tag to compare

@linked-cm-release linked-cm-release released this 12 Jul 07:55
bd98676

Minor Changes

  • #17 41db1b2 Thanks @flyon! - - Server.call now retries transient failures (connection-level rejections and 502/503/504) with exponential backoff, so a dropped socket / gateway blip under load no longer fails the request hard. 4xx and plain 500 are not retried (the server already processed the request).
    • Published ESM-only (dropped the CJS build). No CJS require consumers remained; this matches the rest of the @_linked/* fleet and lets the build resolve @_linked/core's exports map.

v1.0.10

Choose a tag to compare

@linked-cm-release linked-cm-release released this 09 Jul 16:31
2cdb6af

Patch Changes

  • #15 66ff3b0 Thanks @flyon! - Server.removeDefaultHeaders(...names) / LincdServerProxy.removeDefaultHeaders(...names) — remove default headers previously set via addDefaultHeaders (used by scoped request contexts like CN's DataRouting to tear down routing headers on unmount).

v1.0.9

Choose a tag to compare

@linked-cm-release linked-cm-release released this 07 Jul 07:27
8787986

Patch Changes

  • #12 ce41a57 Thanks @flyon! - BackendProvider gains registerRoute(method, path, ...handlers) + disposeRoutes() — register express routes/middleware that are tracked and torn down on HMR reload (so backend source changes don't stack duplicate middleware). Used by @_linked/auth's dispose(). Fixes this.registerRoute is not a function on boot.

    Also: Server.ts re-exports CallConfig with export type (it's an interface) — fixes the runtime ESM error "does not provide an export named 'CallConfig'".

v1.0.8

Choose a tag to compare

@linked-cm-release linked-cm-release released this 06 Jul 20:26
8acd671

Patch Changes

  • #8 9dcc606 Thanks @flyon! - loadData: ESM-only JSON import — drop the dead CJS branch, add the { with: { type: 'json' } } import attribute.

v1.0.7

Choose a tag to compare

@linked-cm-release linked-cm-release released this 06 Jul 16:59
07bc387

Patch Changes

  • #9 5967596 Thanks @flyon! - Serialization: replace removed CoreMap with native Map (core dropped CoreMap in b2de3ad). Fixes Cannot find module @_linked/core/collections/CoreMap on a clean install.

v1.0.6

Choose a tag to compare

@github-actions github-actions released this 07 Jun 11:59
e7e2412

Patch Changes

  • #5 88cb730 Thanks @flyon! - Rebuild + republish. The 1.0.5 tarball was missing all .js files (only .d.ts shipped) because yarn linked build was silently failing inside CI at the dual-package step. Switch to the explicit per-step build pattern that @_linked/cli itself uses (rimraf && build-esm && build-cjs && copy-to-lib && dual-package), which fails loudly per step and produces complete lib/esm/ + lib/cjs/ output with their dual-package package.json markers.

v1.0.5

Choose a tag to compare

@github-actions github-actions released this 07 Jun 11:19
fcf1182

Patch Changes

  • #4 620ff0f Thanks @flyon! - initFrontend now returns Promise<void> (was Promise<unknown>), so callers can await it without an explicit cast.

    Also: the build script now requires lib/esm and lib/cjs to exist after compile, so a silently-failing build no longer produces an empty published tarball.

  • 6965162 - LincdServerProxy.parseShape: prefer the packageName stored on the shape constructor (set by @_linked/core during linkedPackage() registration) instead of extracting it from the URI. The URI form passes through URI.sanitize which is lossy (@_linked/server → -_linked-server), so the sanitized segment can't round-trip as a Node module specifier. Falls back to URI parsing for shapes predating the packageName property.

    Also: restore previously-deleted src/types.d.ts (CSS module declarations) needed by tsconfig.

v1.0.4

Choose a tag to compare

@github-actions github-actions released this 22 Apr 17:53
a36ef6f

Patch Changes

  • 887c3cc - Initial release under the new publishing setup.