Skip to content

Nest 2/4: vendor @nestjs/platform-node 12.2.0 typed sources - #7

Draft
puskuruk wants to merge 9 commits into
nest/platform-node-shimsfrom
nest/platform-node-vendor
Draft

puskuruk wants to merge 9 commits into
nest/platform-node-shimsfrom
nest/platform-node-vendor

Conversation

@puskuruk

@puskuruk puskuruk commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Vendors the typed sources of @nestjs/platform-node at nest commit 0828b0d (head of PR nestjs/nest#18063 on 2026-10-24, packages at 12.2.0) under runtime/node/nest, with the type-level edits whole-program strict certification needs, each listed in UPSTREAM-DIFF.md; upstream's comments are kept. tools/nest/build-platform-node.mjs packs the three @nestjs tarballs from the pinned commit, and apps/nest-node-probe carries the Node oracle and two node-vs-compiled probes.

The first eight commits vendor 2b10fb2 (12.1.3); the last moves to 0828b0d. Upstream rewrote the router in between (one find-my-way tree, path-to-regexp variants for trailing slashes, literal-prefix skips, empty-segment fallbacks) and fixed the body parser's decoder. The new upstream needs four more edits under geatsc, each in UPSTREAM-DIFF.md: the METHODS import of http aliased to this target's httpMethods; the variant matcher's TokenData[] stated as Path[]; Object.assign onto the route parameters replaced by a key loop; a second as any matcher cast dropped. The public RouteTable surface the shims drive (add, lookup, PARAM_TOO_LONG) is unchanged.

  • 5fe7aa8 Vendor @nestjs/platform-node 2b10fb2 (12.1.3) typed sources under runtime/node/nest
  • dd5e917 Narrow body-parser's catch variable to Error for whole-program strict (UPSTREAM-DIFF)
  • 06f338e Type route-table's find-my-way store as RouteRecord and its methods as HTTPMethod (UPSTREAM-DIFF)
  • 295f89f Import content-type by name in the vendored body-parser (UPSTREAM-DIFF)
  • 9c8c1db Type the vendored route table and request for certification (UPSTREAM-DIFF)
  • d49e054 Type body-parser's errors, urlencoded decoder and poisoning scan for certification (UPSTREAM-DIFF)
  • 0a556d4 Add tools/nest/build-platform-node.mjs building the @nestjs tarballs from the pinned nest commit
  • 6dbe313 Add nest-node-probe with the PR's three routes, a Node oracle, and node-vs-compiled probes
  • 2c9b517 Match platform-node to upstream 0828b0d (12.2.0)

Verification on 2c9b517 with the published compiler 1.0.47: node tools/nest/build-platform-node.mjs --check → 3 tarballs at 0828b0d; tools/nest npm run check → 24 shim tables passed; all 33 scripts/test-*.mjs pass, including ERROR_SUBCLASS_PARITY_OK:8 and JSON_UNDEFINED_PARITY_OK:7.

Related

Stack: #6 (1/4, shims) → this PR → #8 (3/4, AOT) → #9 (4/4, benchmark). Shows only its own nine commits over nest/platform-node-shims.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@puskuruk

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from d5a4a03 to 042166f Compare October 20, 2026 04:33
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch 2 times, most recently from beb3f1d to aeb89ff Compare October 23, 2026 01:48
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from 042166f to 10329f6 Compare October 23, 2026 01:48
…pt source has no default export (UPSTREAM-DIFF)
…ams, ParsedQuery, a NodeApp class, no prototype-reassigned params object (UPSTREAM-DIFF)
…certification, with qs's Decoder and a ParsedQs scanQuery in secure-json-parse (UPSTREAM-DIFF)
…de-vs-compiled probes for JSON.stringify of undefined and instanceof over an Error subclass
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from 10329f6 to b9b72d5 Compare October 23, 2026 09:17
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from aeb89ff to 6dbe313 Compare October 23, 2026 09:17
Re-vendor the five platform-node files from nestjs/nest feat/platform-node
at 0828b0d (2026-10-24, packages at 12.2.0; pinned before: 2b10fb2, 12.1.3),
carrying the typing edits listed in UPSTREAM-DIFF.md onto the rewritten
router (one find-my-way tree, path-to-regexp variants for trailing slashes,
literal-prefix skips, empty-segment fallbacks) and the body parser.

New edits the new upstream needs under geatsc, each listed in UPSTREAM-DIFF:
the `METHODS` import of `http` aliased to this target's `httpMethods`; the
variant matcher's `TokenData[]` stated as `Path[]` (no conversion into the
`Path | Path[]` union otherwise); `Object.assign` onto the route parameters
replaced by a key loop; a second `as any` matcher cast dropped.

tools/nest/build-platform-node.mjs pins 0828b0d / 12.2.0 and nest-node-probe
depends on the 12.2.0 tarballs.
@puskuruk puskuruk changed the title Nest 2/4: vendor @nestjs/platform-node 12.1.3 typed sources Nest 2/4: vendor @nestjs/platform-node 12.2.0 typed sources Oct 25, 2026
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