Skip to content

chore(deps): bump chanfana from 2.8.3 to 3.3.0#322

Merged
leeguooooo merged 1 commit into
mainfrom
dependabot/bun/chanfana-3.3.0
Jul 11, 2026
Merged

chore(deps): bump chanfana from 2.8.3 to 3.3.0#322
leeguooooo merged 1 commit into
mainfrom
dependabot/bun/chanfana-3.3.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 11, 2026

Copy link
Copy Markdown
Contributor

Bumps chanfana from 2.8.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, a new releaser for chanfana since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [chanfana](https://github.com/cloudflare/chanfana) from 2.8.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.8.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 @github

dependabot Bot commented on behalf of github Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: dependencies. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@leeguooooo leeguooooo merged commit 026373f into main Jul 11, 2026
18 checks passed
@dependabot dependabot Bot deleted the dependabot/bun/chanfana-3.3.0 branch July 11, 2026 23:25
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.

1 participant