Skip to content

v26 is for Lia Smith#2939

Merged
RobinTail merged 60 commits intomasterfrom
make-v26
Dec 1, 2025
Merged

v26 is for Lia Smith#2939
RobinTail merged 60 commits intomasterfrom
make-v26

Conversation

@RobinTail
Copy link
Copy Markdown
Owner

@RobinTail RobinTail commented Sep 15, 2025

image

Lia Smith was a 21 years young transgender woman.

She attended Middlebury College in Middlebury, Vermont, majoring in computer science and statistics. She was a member of the college's chess club, bridge club, LGBTQ+ club, and Japanese club. She was a diver on the Middlebury Panthers women's swimming and diving team.

In February 2025 Middlebury College had removed Lia Smith diving profile from their website, following President Donald Trump's executive order, which attempts to ban transgender women and girls from competing in women's sports.

On October 18, 2025 Lia Smith committed suicide.

The tragedy of Lia Smith highlights that the push for exclusion of transgender women from public women's spaces and sports is not an issue of theoretical fairness, but one with devastating consequences for the dignity, safety, and lives of trans individuals. Smith, who was an openly transgender student athlete, described the immense difficulty and feeling of being unwelcome in locker rooms, emphasizing the lack of a clear, safe space for her. Her plea that transgender people are "not trying to get into women's spaces to be perverts... we're just being ourselves" underscores that inclusion is a matter of allowing trans women to exist and access necessary public facilities with basic dignity, rather than an invasion of privacy or a threat. Denying access to these spaces does not eliminate their need for them, but instead subjects them to alienation and heightened psychological distress.

Furthermore, Lia's experience as a diver, where she was reportedly targeted by anti-trans websites and ultimately left her team citing difficulties, demonstrates the severe emotional and social toll of exclusion in sports. Critics of anti-trans policies explicitly linked her death by suicide to the hostile climate and constant public scrutiny and harassment directed at trans athletes. Allowing trans women to participate in women's sports and access women's facilities is therefore a vital component of protecting the mental health and physical safety of transgender people. When a society creates systems that reject a person’s identity and deny them opportunities for community, activity, and belonging—all essential parts of a functioning life—it creates an environment of intense hostility and vulnerability. Inclusion, in contrast, affirms the full humanity of trans women and is a necessary measure against the systemic discrimination that contributed to her anguish.


Summary by CodeRabbit

  • New Features

    • Config-driven routing behavior; Integration instances accept per-instance config.
    • Zod plugin adds CJS compatibility and new schema metadata helpers.
    • Release bumped to v26 (beta).
  • Bug Fixes

    • Restored Zod examples/metadata in CommonJS environments.
  • Breaking Changes

    • Handler/middleware parameter renamed: options → ctx.
    • Removed DependsOnMethod; use inline per-route objects.
    • EndpointsFactory.addOptions() renamed to addContext().
  • Docs

    • README and CHANGELOG updated for v26 migration and examples.
  • Tests

    • Added CJS runtime tests and updated tests to use ctx.

✏️ Tip: You can customize this high-level summary in your review settings.

@RobinTail RobinTail added this to the v26 milestone Sep 15, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 15, 2025

Walkthrough

Rename runtime/middleware parameter from options to ctx across core APIs and tests; remove DependsOnMethod/Routable in favor of inline method-keyed routing and add CommonConfig.methodLikeRouteBehavior; thread config into routing/integration; update zod-plugin to patch both ESM and CJS; bump to v26/beta and adjust CI triggers.

Changes

Cohort / File(s) Summary
Workflows
​.github/workflows/codeql-analysis.yml, ​.github/workflows/node.js.yml
Update CI branch triggers to include v25 → v26 (make-v26) / adjust branch lists.
Version & deps
express-zod-api/package.json, migration/package.json, zod-plugin/package.json, pnpm-workspace.yaml
Bump packages to v26/beta and update zod → ^4.1.13 and http-errors → ^2.0.1.
Core context refactor
express-zod-api/src/endpoint.ts, express-zod-api/src/middleware.ts, express-zod-api/src/result-handler.ts, express-zod-api/src/testing.ts
Replace generics OPT/OUTCTX/RET; rename optionsctx and propagate ctx through middleware, endpoint execution, and result handling.
EndpointsFactory changes
express-zod-api/src/endpoints-factory.ts, express-zod-api/tests/endpoints-factory.spec.ts
Switch generics to CTX; rename addOptions()addContext() and update middleware typings and tests.
Routing model & config
express-zod-api/src/routing.ts, express-zod-api/src/routing-walker.ts, express-zod-api/src/config-type.ts
Remove DependsOnMethod from Routing union; add `methodLikeRouteBehavior?: "method"
Removed entities & exports
express-zod-api/src/depends-on-method.ts, express-zod-api/src/routable.ts, express-zod-api/src/index.ts, express-zod-api/tests/depends-on-method.spec.ts, express-zod-api/tests/routable.spec.ts
Delete DependsOnMethod and Routable implementations/tests; remove export of DependsOnMethod.
Integration & docs
express-zod-api/src/integration.ts, express-zod-api/src/documentation.ts, README.md, CHANGELOG.md
Integration now accepts config: CommonConfig and passes it to routing walker; docs/changelog updated for v26 and ctx/addContext terminology.
Server helpers & examples
express-zod-api/src/server-helpers.ts, example/*, example/routing.ts, example/generate-client.ts
Error handler calls and examples use ctx; routing examples converted to inline method-keyed objects; Integration example accepts config.
Zod plugin — runtime & helpers
zod-plugin/src/runtime.ts, zod-plugin/src/meta.ts, zod-plugin/src/packages.ts, zod-plugin/tests/runtime.spec.ts, cjs-test/zod-plugin.spec.ts
Move to package-scoped augmentation supporting ESM + CJS; add meta setters and package/class discovery; add CJS-targeted tests.
Migration tooling & compat tests
migration/index.ts, migration/index.spec.ts, migration/README.md, compat-test/*
ESLint/migration transforms updated for v26: rewrite DependsOnMethod → inline method-objects, optionsctx, and addOptionsaddContext; tests/configs updated.
Tests — alignment
express-zod-api/tests/**, compat-test/*, cjs-test/*
Update tests to use ctx instead of options; remove DependsOnMethod/Routable tests; adapt routing/factory tests to inline method-object syntax and addContext.
Changelogs & READMEs
zod-plugin/CHANGELOG.md, zod-plugin/README.md, CHANGELOG.md, README.md
Document Zod bump, CJS patching, and v26/v3 changelog entries; README examples changed to ctx/addContext/inline routing.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant ExpressMiddleware as Middleware
    participant Endpoint
    participant ResultHandler

    rect rgba(200,230,200,0.06)
    Note over Client,ResultHandler: v26 flow — aggregated `ctx` flows through middlewares → endpoint → result handler
    end

    Client->>ExpressMiddleware: request (provider runs)
    ExpressMiddleware-->>ExpressMiddleware: handler returns partial ctx
    ExpressMiddleware->>Endpoint: invoke handler({ input, ctx, logger })
    Endpoint-->>Endpoint: merge/augment ctx, run business logic
    Endpoint->>ResultHandler: handle result with ctx
    ResultHandler->>Client: send response
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Areas requiring extra attention:

  • express-zod-api/src/endpoints-factory.ts — pervasive generic/type refactors and rename addContext.
  • migration/index.ts — AST transformation correctness for complex fixes.
  • zod-plugin/src/runtime.ts, src/meta.ts, src/packages.ts — ESM/CJS augmentation safety and side-effect scoping.
  • express-zod-api/src/routing-walker.ts + src/integration.ts — verify methodLikeRouteBehavior semantics and nested routing edge cases.
  • Tests — widespread renames/deletions (DependsOnMethod/Routable) and adapted expectations.

Possibly related PRs

Suggested labels

dependencies

Poem

🐇 I swapped options for a cozy ctx bed,
Routes shed their wrappers and hopped straight ahead.
Zod learned two tongues — ESM and CJS too,
CI nudged a branch and docs sang anew.
A cheerful rabbit hops — v26, here we stew!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'v26 is for Lia Smith' directly relates to the main changes in the changeset, which involve bumping the package version to v26.0.0-beta.2 and dedicating this version to Lia Smith, as documented in CHANGELOG.md, SECURITY.md, and startup-logo.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch make-v26

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7741c13 and e48a945.

📒 Files selected for processing (2)
  • .github/workflows/codeql-analysis.yml (1 hunks)
  • .github/workflows/node.js.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/node.js.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

It can now be replaced with `${method} /` syntax

## todo

- [x] rename tests
- [x] fate of `Routable`
- [x] migration

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- Breaking Changes
  - Removed DependsOnMethod from the public API.
- Routing now uses flat, path-scoped objects with explicit "METHOD /"
keys (e.g., "get /").
  - Deprecation is applied per Endpoint; Endpoint now provides nest().

- New Features
- Added an automatic migration rule to convert DependsOnMethod usages to
the new routing syntax.

- Documentation
- README and CHANGELOG updated with new routing examples and deprecation
guidance.

- Examples
  - Updated example routing to the new flat object mapping.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@coveralls-official
Copy link
Copy Markdown

coveralls-official Bot commented Sep 19, 2025

Coverage Status

coverage: 100.0%. remained the same
when pulling 0cf8641 on make-v26
into d7f9f3e on master.

I realized that context is more clear naming for that entity, which is
also the same in hono and trpc. It should also reduce the potential
confusion with "config options" and `OPTIONS` request method.

However, it might not be possible to rename in without breaking changes,
since it's present in public interfaces.

## todo
- [x] diagram
- [x] migration
- [x] changelog

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- Breaking Changes
- Standardized context naming: replace options with ctx across handlers,
middleware, and factory APIs. Renamed addOptions to addContext. This
affects handler signatures and how context is accessed.
- Documentation
  - Updated README and examples to reflect ctx-based usage and patterns.
- Tooling/Migration
- Added automated migration rules to rename options→ctx and
addOptions→addContext.
- Tests
  - Updated test suites to align with ctx terminology and behavior.
- Chores
  - CHANGELOG updated to document the API rename and guidance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@RobinTail RobinTail added breaking Backward incompatible changes documentation Improvements or additions to documentation refactoring The better way to achieve the same result labels Sep 26, 2025
Comment thread compat-test/package.json Outdated
Comment thread compat-test/migration.spec.ts Outdated
It unblocks further fixes to subdependencies.

<img width="357" height="102" alt="Screenshot 2025-11-25 at 19 12 22"
src="https://github.com/user-attachments/assets/40db7967-35d7-4fef-98f4-35b8fa6aa69d"
/>
Comment thread .github/workflows/codeql-analysis.yml Outdated
Comment thread express-zod-api/src/documentation.ts Outdated
Comment thread express-zod-api/src/middleware.ts
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
SECURITY.md (1)

7-7: Update release date once v26 is officially released.

Line 7 lists the release date as "12.2025" (December 2025), which is in the future. This appears to be a placeholder target date. Once the actual release is published, update this field to reflect the final release date.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between edaf176 and c7e761c.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • SECURITY.md (1 hunks)
  • pnpm-workspace.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pnpm-workspace.yaml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 0
File: :0-0
Timestamp: 2025-10-02T17:42:48.840Z
Learning: In express-zod-api v25 (ESM-only), the `.example()` method error occurs when user code runs as CommonJS. Express Zod API patches Zod's ESM bundle with `.example()`, but CommonJS code requires a separate CJS bundle instance that lacks this patch. Users must run their code as ESM by: (1) setting `"type": "module"` in package.json, (2) using `.mts` or `.mjs` file extensions, or (3) using tools like `tsx` or `vite-node` that provide their own ESM-compatible compilation.
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 2904
File: express-zod-api/src/routing.ts:74-79
Timestamp: 2025-08-25T17:43:34.491Z
Learning: In express-zod-api, OPTIONS (CORS preflight) requests intentionally go through the same middleware and parser chain as other HTTP methods. This was specifically implemented to fix Issue #514 where middlewares were not running for OPTIONS requests. The framework seeds "options" with the same [parsers, endpoint] pair as other methods to ensure consistent middleware execution for CORS preflight requests.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: build (22.x)
  • GitHub Check: build (20.19.0)
  • GitHub Check: build (20.x)
  • GitHub Check: build (24.0.0)
  • GitHub Check: build (24.x)
  • GitHub Check: build (22.12.0)
  • GitHub Check: build (24.x)
  • GitHub Check: build (22.12.0)
  • GitHub Check: build (20.x)

Comment thread express-zod-api/src/routing-walker.ts Outdated
Comment thread SECURITY.md
Comment thread CHANGELOG.md
Copy link
Copy Markdown
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
CHANGELOG.md (2)

15-20: Clarify default behavior of methodLikeRouteBehavior: "method".

Line 19 states the key is treated as "an HTTP method of its parent path" when using the "method" option (default). The explanation could be more explicit about the precedence and what happens if a key is both a valid HTTP method name and could be a path segment. Consider adding:

  • Example of how get: is interpreted as GET method vs. nested path
  • Clarification that .nest() can still be used alongside inline methods for additional nesting

This matches the learnings about simplified routing but the explanation at lines 18-20 is fairly condensed.


27-27: Add example for Integration::constructor() config requirement.

Line 27 states "The Integration::constructor() argument object now requires config property, similar to Documentation;" but provides no code example showing the change pattern. Previous v22 and v25 changelogs include before/after examples (see lines 932-945 for v22 example).

Add a brief migration example showing:

- new Integration({ routing, /* ... */ })
+ new Integration({ routing, config, /* ... */ })
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0cf8641 and 00bd0e3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 0
File: :0-0
Timestamp: 2025-10-02T17:42:48.840Z
Learning: In express-zod-api v25 (ESM-only), the `.example()` method error occurs when user code runs as CommonJS. Express Zod API patches Zod's ESM bundle with `.example()`, but CommonJS code requires a separate CJS bundle instance that lacks this patch. Users must run their code as ESM by: (1) setting `"type": "module"` in package.json, (2) using `.mts` or `.mjs` file extensions, or (3) using tools like `tsx` or `vite-node` that provide their own ESM-compatible compilation.
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 2904
File: express-zod-api/src/routing.ts:74-79
Timestamp: 2025-08-25T17:43:34.491Z
Learning: In express-zod-api, OPTIONS (CORS preflight) requests intentionally go through the same middleware and parser chain as other HTTP methods. This was specifically implemented to fix Issue #514 where middlewares were not running for OPTIONS requests. The framework seeds "options" with the same [parsers, endpoint] pair as other methods to ensure consistent middleware execution for CORS preflight requests.
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 2546
File: express-zod-api/src/documentation-helpers.ts:508-512
Timestamp: 2025-05-28T07:58:09.853Z
Learning: In express-zod-api, when working with Zod's JSON schema override callbacks, using `delete` to mutate `ctx.jsonSchema` is the recommended approach per Zod's official documentation, even if it triggers performance linting warnings. This is preferable to creating copies with `undefined` values, especially for snapshot testing.
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 2736
File: express-zod-api/tsup.config.ts:12-26
Timestamp: 2025-06-14T16:42:52.972Z
Learning: In express-zod-api tsup configurations, the direct mutation of `options.supported` in the `esbuildOptions` callback is intentional behavior and should not be flagged as a side effect issue.
📚 Learning: 2025-05-27T19:27:13.492Z
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 2546
File: express-zod-api/tests/form-schema.spec.ts:31-31
Timestamp: 2025-05-27T19:27:13.492Z
Learning: Zod version 3.25.0 and later expose the Zod v4 API through the special import paths "zod/v4" and "zod/v4/core", allowing v4 features like .loose() to be used even when the package.json dependency shows a 3.x version.

Applied to files:

  • CHANGELOG.md
📚 Learning: 2025-08-05T14:43:24.702Z
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 2869
File: zod-plugin/package.json:42-44
Timestamp: 2025-08-05T14:43:24.702Z
Learning: Zod version 4 has been officially released and is stable. As of August 2025, the latest published version is 4.0.14 (published July 30, 2025). Zod v4 is available on npm and can be used in peer dependencies with version constraints like "^4.0.0".

Applied to files:

  • CHANGELOG.md
📚 Learning: 2025-10-02T17:42:48.840Z
Learnt from: RobinTail
Repo: RobinTail/express-zod-api PR: 0
File: :0-0
Timestamp: 2025-10-02T17:42:48.840Z
Learning: In express-zod-api v25 (ESM-only), the `.example()` method error occurs when user code runs as CommonJS. Express Zod API patches Zod's ESM bundle with `.example()`, but CommonJS code requires a separate CJS bundle instance that lacks this patch. Users must run their code as ESM by: (1) setting `"type": "module"` in package.json, (2) using `.mts` or `.mjs` file extensions, or (3) using tools like `tsx` or `vite-node` that provide their own ESM-compatible compilation.

Applied to files:

  • CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: report
  • GitHub Check: report
🔇 Additional comments (3)
CHANGELOG.md (3)

21-27: Provide complete migration scope for optionsctx rename.

The list on lines 22-25 identifies four handler/method locations where options becomes ctx:

  • Middleware::handler()
  • ResultHandler::handler()
  • EndpointsFactory::build() handler argument
  • testMiddleware()

Confirm this list is exhaustive. Consider whether this impacts:

  • EventStreamFactory::build() handler (mentioned in v21.5.0 at line 1070)
  • Any test utilities or helper functions with options parameters

The brevity is acceptable for a changelog, but ensure no locations are missed.


29-39: Patch example line 35 appears incomplete.

The before/after patch example shows:

  • Removal of DependsOnMethod wrapper
  • Replacement of .nest() with a nested object assignment
  • Line 35 in "after" shows create: makeUserEndpoint at same nesting level as get

Verify this is the intended final syntax. If makeUserEndpoint should be nested deeper or accessed differently (e.g., via nested path keys), clarify in the example. The indentation in the patch suggests they are siblings under /v1/users, which should be explicit if that is the case.


7-14: No action required. Zod version 4.1.13 has been released (November 24, 2025) and is properly referenced. PR #5452 in the Zod repository correctly addresses the dual package hazard for globalRegistry in CJS/ESM bundles, matching the changelog's description. The version constraint and fix reference are accurate.

Comment thread .github/workflows/codeql-analysis.yml Outdated
Comment thread .github/workflows/node.js.yml Outdated
Comment thread .github/workflows/node.js.yml Outdated
Copy link
Copy Markdown
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏁 ready

@RobinTail RobinTail merged commit 9e3f213 into master Dec 1, 2025
13 checks passed
@RobinTail RobinTail deleted the make-v26 branch December 1, 2025 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Backward incompatible changes CI/CD dedication documentation Improvements or additions to documentation enhancement New feature or request external bug it's a bug, but in a dependency prevention refactoring The better way to achieve the same result

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant