Skip to content

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

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

puskuruk wants to merge 12 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 nestjs/nest master 085f83a16 (v12.5.1) under runtime/node/nest, with the type-level edits whole-program strict certification needs, each listed in UPSTREAM-DIFF.md with the upstream lines it changes; upstream's comments are kept. apps/nest-node-probe carries the Node oracle and the node-vs-compiled probes, and installs @nestjs/{common,core,platform-node} 12.5.1 from npm.

The first six commits vendor 2b10fb2 (12.1.3) and its edits; 0828b0d (12.2.0) and 085f83a16 (12.5.1) follow. 12.5.1 adds adapters/utils/hostname.util.ts and on-response-close.util.ts and reaches more of node:http, so one commit adds those Node surfaces first: validateHeaderName, validateHeaderValue, ServerResponse.shouldKeepAlive, the three-argument writeHead, a getHeader returning undefined, a string or the array of values, async_hooks.AsyncResource, and Buffer.byteLength with an encoding. Every earlier edit carries over unchanged.

The packages are on npm since 12.5.0, so the last commit removes the tarball builder tools/nest/build-platform-node.mjs that 39ca9cf added; nothing needs a nest checkout.

  • 6a4f6c4 Vendor @nestjs/platform-node 2b10fb2 (12.1.3) typed sources under runtime/node/nest
  • 22c4d7e Narrow body-parser's catch variable to Error for whole-program strict (UPSTREAM-DIFF)
  • fe7c770 Type route-table's find-my-way store as RouteRecord and its methods as HTTPMethod (UPSTREAM-DIFF)
  • f043e0e Import content-type by name in the vendored body-parser: its TypeScript source has no default export (UPSTREAM-DIFF)
  • ba62730 Type the vendored route table and request for certification: RouteParams, ParsedQuery, a NodeApp class, no prototype-reassigned params object (UPSTREAM-DIFF)
  • 898b66b Type body-parser's errors, urlencoded decoder and poisoning scan for certification, with qs's Decoder and a ParsedQs scanQuery in secure-json-parse (UPSTREAM-DIFF)
  • 39ca9cf Add tools/nest/build-platform-node.mjs building the @nestjs tarballs from the pinned nest commit
  • 3cae5fc Add nest-node-probe with the PR's three routes, a Node oracle, and node-vs-compiled probes for JSON.stringify of undefined and instanceof over an Error subclass
  • ba69339 Match platform-node to upstream 0828b0d (12.2.0)
  • cb053ab Add the Node surfaces platform-node 12.5.1 reaches
  • c9d8b85 Re-vendor platform-node to nestjs/nest master 085f83a16 (v12.5.1)
  • 49225bc Install nest-node-probe's @nestjs packages from npm 12.5.1 and drop the tarball builder

Builds only with compiler fixes no release carries yet: geastack/compiler#21, geastack/compiler#28, geastack/compiler#29, geastack/compiler#30, geastack/compiler#31 and geastack/compiler#33 (on main 1ae87837 / 1.0.61). Main alone refuses hello-nest at instanceof Date (#28) and does not compile apps/hono-hello (#33, a regression since 1.0.47). The package.json floor moves on #4 once they are released.

Verification on 49225bc with main + those PRs, macOS arm64: all 11 scripts/test-*.mjs parity probes pass (DICTIONARY_MISSING_PARITY_OK:22, ERROR_SUBCLASS_PARITY_OK:8, FS_STAT_PARITY_OK:15, HTTP_SERVER_OPTIONS_PARITY_OK:5, JSON_UNDEFINED_PARITY_OK:7, MISSING_REQUEST_HEADER_PARITY_OK, NATIVE_BROTLI_OK:8, SET_IMMEDIATE_PARITY_OK:15, STREAM_LIFECYCLE_PARITY_OK:27, URL_CAN_PARSE_PARITY_OK:170, ZLIB_STREAMS_PARITY_OK:65); tools/nest check 24 tables; node --test scripts/test-package.mjs 6 pass.

Related

Stack: #6 (1/4, shims) → this PR → #8 (3/4, AOT) → #9 (4/4, benchmark). Shows only its own twelve 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

@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 2 times, most recently 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
@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
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from b9b72d5 to 6e0734e Compare November 10, 2026 10:57
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 2c9b517 to 73f5599 Compare November 10, 2026 10:57
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from 6e0734e to ad478fd Compare November 12, 2026 08:50
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch 2 times, most recently from 233a8e7 to 8c7c7a7 Compare November 12, 2026 09:17
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from ad478fd to 72811b7 Compare November 12, 2026 09:17
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 8c7c7a7 to c33d325 Compare November 20, 2026 22:26
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from 72811b7 to 987f885 Compare November 20, 2026 22:26
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from c33d325 to 49225bc Compare November 21, 2026 03:29
@puskuruk puskuruk changed the title Nest 2/4: vendor @nestjs/platform-node 12.2.0 typed sources Nest 2/4: vendor @nestjs/platform-node 12.5.1 typed sources Nov 21, 2026
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from 4f1d62a to f9f9e3e Compare November 21, 2026 10:18
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 49225bc to a683a2d Compare November 21, 2026 10:18
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from f9f9e3e to d9b5aa0 Compare November 21, 2026 11:09
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from a683a2d to c8f3bb9 Compare November 21, 2026 11:09
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from d9b5aa0 to a646bda Compare November 21, 2026 11:50
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from c8f3bb9 to 04c8eeb Compare November 21, 2026 11:50
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from a646bda to 6841fa2 Compare November 21, 2026 12:57
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch 2 times, most recently from e30d2a2 to 79691c6 Compare November 21, 2026 13:54
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from 6841fa2 to fe43a2a Compare November 21, 2026 13:54
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 79691c6 to 90fa814 Compare November 21, 2026 14:34
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch 2 times, most recently from e86ce40 to f5111f7 Compare November 21, 2026 17:30
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 90fa814 to 08c6c80 Compare November 21, 2026 17:30
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from f5111f7 to 308699f Compare November 21, 2026 19:00
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 08c6c80 to 2f08506 Compare November 21, 2026 19:00
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from 308699f to 666b6c1 Compare November 21, 2026 19:55
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 2f08506 to 67cac29 Compare November 21, 2026 19:55
…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
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.
http gains validateHeaderName, validateHeaderValue, ServerResponse.shouldKeepAlive, the three-argument writeHead and a getHeader that returns undefined, a string or the array of values. async_hooks exports AsyncResource, NodeJS.WritableStream names the stream Writable, and Buffer.byteLength accepts an encoding for binary input as Node does.
Adds adapters/utils/hostname.util.ts and adapters/utils/on-response-close.util.ts, which the vendored adapter now imports. UPSTREAM-DIFF.md cites the 085f83a16 lines; every edit carries over unchanged.
…he tarball builder

@nestjs/platform-node is published since 12.5.0, so the probe pins @nestjs/{common,core,platform-node} 12.5.1 from the registry and tools/nest/build-platform-node.mjs, which packed them from a nest checkout, is removed.
@puskuruk
puskuruk force-pushed the nest/platform-node-shims branch from 666b6c1 to 633e50d Compare November 21, 2026 20:33
@puskuruk
puskuruk force-pushed the nest/platform-node-vendor branch from 67cac29 to 23cb6ce Compare November 21, 2026 20:33
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