Skip to content

fix(deps): bump chanfana from 2.6.3 to 3.3.0 in /cloudflare/apelsin-api#12

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/cloudflare/apelsin-api/chanfana-3.3.0
Open

fix(deps): bump chanfana from 2.6.3 to 3.3.0 in /cloudflare/apelsin-api#12
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/cloudflare/apelsin-api/chanfana-3.3.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Apr 16, 2026

Bumps chanfana from 2.6.3 to 3.3.0.

Release notes

Sourced from chanfana's releases.

v3.3.0

Minor Changes

  • #316 d30cc36 Thanks @​G4brym! - Add customizable pagination and ordering parameter names to ListEndpoint via pageFieldName, perPageFieldName, orderByFieldName, and orderByDirectionFieldName class properties.

    Breaking change for subclasses overriding optionFields: optionFields is now a computed getter derived from the four *FieldName properties. Subclasses that previously overrode optionFields directly should instead override the individual field name properties.

  • #317 39c89d2 Thanks @​G4brym! - Add validateResponse router option to validate and sanitize response bodies against their Zod schemas at runtime.

    When enabled, responses are parsed through z.object().parseAsync(), which strips unknown fields and validates required fields/types. This prevents accidental data leaks (e.g., internal fields like passwordHash reaching the client) and catches handler bugs where the response doesn't match the declared schema.

    const router = fromHono(app, { validateResponse: true });

    Behavior:

    • Plain object responses are validated against the 200 response schema
    • Response objects with application/json content are cloned, validated, and reconstructed with corrected headers
    • Non-JSON responses and responses without a matching Zod schema are passed through unchanged
    • Validation failures return 500 Internal Server Error (code 7013) and log the full error via console.error

    New exports:

    • ResponseValidationException — thrown when a handler's response doesn't match its declared schema (status 500, code 7013, isVisible: false)
  • #315 47d304a Thanks @​G4brym! - Add SerializerContext parameter to auto endpoint serializer function, providing access to filters and options for context-aware serialization.

    The serializer signature changes from (obj: object) => object to (obj: object, context?: SerializerContext) => object. The SerializerContext type contains:

    • filtersArray<FilterCondition>: the active filter conditions for the current request
    • options — pagination and ordering options (page, per_page, order_by, order_by_direction)

    Context passed per endpoint type:

    Endpoint Context
    ListEndpoint / ReadEndpoint { filters, options }
    UpdateEndpoint / DeleteEndpoint { filters }
    CreateEndpoint { filters: [] }
    const meta = {
      model: {
        schema: UserSchema,
        primaryKeys: ["id"],
        tableName: "users",
        serializer: (obj: any, context?: SerializerContext) => {
          const hasRoleFilter = context?.filters?.some((f) => f.field === "role");
          // Conditionally include fields based on active filters

... (truncated)

Changelog

Sourced from chanfana's changelog.

3.3.0

Minor Changes

  • #316 d30cc36 Thanks @​G4brym! - Add customizable pagination and ordering parameter names to ListEndpoint via pageFieldName, perPageFieldName, orderByFieldName, and orderByDirectionFieldName class properties.

    Breaking change for subclasses overriding optionFields: optionFields is now a computed getter derived from the four *FieldName properties. Subclasses that previously overrode optionFields directly should instead override the individual field name properties.

  • #317 39c89d2 Thanks @​G4brym! - Add validateResponse router option to validate and sanitize response bodies against their Zod schemas at runtime.

    When enabled, responses are parsed through z.object().parseAsync(), which strips unknown fields and validates required fields/types. This prevents accidental data leaks (e.g., internal fields like passwordHash reaching the client) and catches handler bugs where the response doesn't match the declared schema.

    const router = fromHono(app, { validateResponse: true });

    Behavior:

    • Plain object responses are validated against the 200 response schema
    • Response objects with application/json content are cloned, validated, and reconstructed with corrected headers
    • Non-JSON responses and responses without a matching Zod schema are passed through unchanged
    • Validation failures return 500 Internal Server Error (code 7013) and log the full error via console.error

    New exports:

    • ResponseValidationException — thrown when a handler's response doesn't match its declared schema (status 500, code 7013, isVisible: false)
  • #315 47d304a Thanks @​G4brym! - Add SerializerContext parameter to auto endpoint serializer function, providing access to filters and options for context-aware serialization.

    The serializer signature changes from (obj: object) => object to (obj: object, context?: SerializerContext) => object. The SerializerContext type contains:

    • filtersArray<FilterCondition>: the active filter conditions for the current request
    • options — pagination and ordering options (page, per_page, order_by, order_by_direction)

    Context passed per endpoint type:

    Endpoint Context
    ListEndpoint / ReadEndpoint { filters, options }
    UpdateEndpoint / DeleteEndpoint { filters }
    CreateEndpoint { filters: [] }
    const meta = {
      model: {
        schema: UserSchema,
        primaryKeys: ["id"],
        tableName: "users",
        serializer: (obj: any, context?: SerializerContext) => {
          const hasRoleFilter = context?.filters?.some((f) => f.field === "role");

... (truncated)

Commits
  • c305d32 Version Packages (#327)
  • 028c256 Change case of Hono in build command (#335)
  • 15932ca fix: correct dead link in docs advanced-topics-patterns (#329)
  • 662ff72 feat: include CHANGELOG.md in npm package and add docs changelog page (#328)
  • d30cc36 feat: add customizable pagination and ordering parameter names (#316)
  • 47d304a feat: add serializer context + validateResponse option (#315)
  • 39c89d2 feat: add response body validation via validateResponse option (#317)
  • ae7b3ee Version Packages (#326)
  • c182e59 feat: export OrderByDirection type alias (#325)
  • 8353f7e fix: resolve VitePress dead link build error (#324)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by [GitHub Actions](https://www.npmjs.com/~GitHub Actions), a new releaser for chanfana since your current version.


@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Apr 16, 2026
omuryildirim pushed a commit that referenced this pull request Apr 18, 2026
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.15.21 to 25.6.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.6.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [chanfana](https://github.com/cloudflare/chanfana) from 2.6.3 to 3.3.0.
- [Release notes](https://github.com/cloudflare/chanfana/releases)
- [Changelog](https://github.com/cloudflare/chanfana/blob/main/CHANGELOG.md)
- [Commits](cloudflare/chanfana@v2.6.3...v3.3.0)

---
updated-dependencies:
- dependency-name: chanfana
  dependency-version: 3.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/cloudflare/apelsin-api/chanfana-3.3.0 branch from 955d974 to 12c08f3 Compare April 18, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants