Skip to content

Version Packages - #748

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main
Open

Version Packages#748
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

eridu-tech@0.61.0

Minor Changes

  • 83d134e: ICacheAdapter.getOrAdd now always takes a lazy function that produces the value to cache, instead of accepting either a plain value or a function. The value producer is invoked only on a cache miss (when the key is missing or expired), so the value is never computed when a cached entry already exists.

    This also makes adapters easier to implement: they no longer need to branch between plain values and functions and can rely on a single, uniform lazy invocation for the value to add.

  • e77cc4f: Enhanced the event bus dispatch middlewares so you can return null from the payload invocable if you don't want to dispatch an event:

    • Return null from the payload of withDispatchBefore to skip dispatching and invoke the wrapped function directly.
    • Return null from the payload of withDispatchAfter to skip dispatching and return the wrapped function's result.
    • Return null from the payload of withDispatchOnError to skip dispatching and re-throw the original error.

    The payload type of the three middlewares is now TEventMap[TEventName] | void.

  • 37a4973: Simplified the HttpRouter component with a unified schema-aware request API.

    Breaking changes

    • Replaced the raw* request accessors (rawCookies, rawJson, rawFormData, rawParams, rawSearchParams, rawHeaders) with cookies(), json(), params(), searchParams(), headers(), fields(), and files().
    • Removed the withSchema() flow along with the IValidatedHttpReq, IHttpReqBase, IHttpReqValidation, HttpReqSchemas, and ReqInputs types. Each request accessor now accepts an optional Standard Schema directly and returns the validated result.
    • Removed the ValidatedHttpReq implementation.
    • IHttpFileCollection.count is now the size() method, and IHttpFileCollection.isEmpty is now the isEmpty() method.
    • IHttpFileCollection.getOrFail() and firstOrFail() now throw an HttpError with status 400 instead of the removed FileIndexOutOfBoundsError and EmptyFileCollectionError.
    • Removed the FileIndexOutOfBoundsError and EmptyFileCollectionError error classes.
    • StaticFileDef.name now accepts only a RegExp (previously string | RegExp).
    • DynamicFileDef now receives the uploaded IHttpFileCollection and returns an error message string | null (previously received an IHttpFile and returned a StaticFileDef).

    Additions

    • Added CoercibleStringInputs and CoercibleMultiStringInputs output types for schema-validated request data.
    • Added payload to HttpError (and HttpErrorSettings.payload), now used to carry validation issues.

    Validation behavior

    • Validation failures in HttpReq now throw an HttpError with status 400 and the validation issues attached as payload, instead of throwing ValidationError.
  • 42f4765: Removed the unused force-release methods from the shared-lock component to simplify its API.

    Breaking changes

    • Removed forceReleaseWriter from ISharedLockAdapter and IWriterLock.
    • Removed forceReleaseAllReaders from ISharedLockAdapter and IReaderSemaphore.

    These methods allowed bypassing ownership checks to release locks for emergency or administrative cleanup, but they were redundant with the existing ownership-based release methods and have been removed along with their implementations in KyselySharedLockAdapter, MemorySharedLockAdapter, MongodbSharedLockAdapter, NoOpSharedLockAdapter, RedisSharedLockAdapter, the derived SharedLock, and the withSharedLockPrefix plugin.

    Migration

    Use the forceRelease method instead.

Patch Changes

  • a9b309c: Fixed a bug in MongodbLockAdapter.refresh and MongodbSharedLockAdapter.refreshWriter where a caller that doesn't own the lock could still modify its expiration.

    Previously, both methods only filtered the MongoDB document by key and checked ownership after the update was applied. As a result, calling refresh (or refreshWriter) with a stale or foreign lockId, or after the lock had already expired, would still mutate the stored expiration even though the method ultimately returned false.

    The owner and unexpired-expiration checks are now part of the MongoDB query filter itself, making the refresh conditional and atomic:

    • MongodbLockAdapter.refresh only updates documents matching key, owner: lockId, and an unexpired expiration.
    • MongodbSharedLockAdapter.refreshWriter only updates documents matching key, writer.owner: lockId, and an unexpired writer.expiration.

    A refresh by a non-owner (or of an expired lock) now leaves the document untouched and returns false as expected.

@github-actions
github-actions Bot force-pushed the changeset-release/main branch 6 times, most recently from ba3a945 to 5cb5b94 Compare September 1, 2026 21:23
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 5cb5b94 to a89b302 Compare September 2, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants