Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions express-zod-api/src/method.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { IRouter } from "express";

export type SomeMethod = Lowercase<string>;

type FamiliarMethod =
| Exclude<keyof IRouter, "param" | "use" | "route" | "stack" | "all">
/** @todo remove when merged: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/75187 */
| "query";
type FamiliarMethod = Exclude<
keyof IRouter,
"param" | "use" | "route" | "stack" | "all"
>;
Comment thread
coderabbitai[bot] marked this conversation as resolved.

export const methods = [
"get",
Expand Down
7 changes: 2 additions & 5 deletions express-zod-api/src/routing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IRouter, RequestHandler, IRouterMatcher } from "express";
import type { IRouter, RequestHandler } from "express";
import createHttpError from "http-errors";
import { isProduction } from "./common-helpers";
import type { CommonConfig } from "./config-type";
Expand Down Expand Up @@ -81,10 +81,7 @@ export const initRouting = ({ app, config, getLogger, ...rest }: InitProps) => {
const logger = getLogger(request);
return endpoint.execute({ request, response, logger, config });
});
/** @todo remove type assertion when merged: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/75187 */
const register: (path: string, ...handlers: RequestHandler[]) => IRouter =
(app as IRouter & { query: IRouterMatcher<IRouter> })[method];
register.call(app, path, ...handlers);
app[method]?.(path, ...handlers);
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
if (config.hintAllowedMethods === false) continue;
deprioritized.set(path, createWrongMethodHandler(accessMethods));
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ engineStrict: true
autoInstallPeers: false
dedupePeers: true
minimumReleaseAge: 10080
minimumReleaseAgeExclude:
- "@types/express-serve-static-core@5.1.2" # todo remove 15.07.2026
publicHoistPattern:
- "@typescript-eslint/*" # used as an assumed transitive in migration
- "@vitest/*" # used by vitest.setup.ts and vitest.config.ts
Expand Down