Skip to content

typings: wire up spawn_sync internal binding types - #65996

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
agape1225:typings-wire-up-spawn-sync-binding
Sep 27, 2026
Merged

nodejs-github-bot merged 2 commits into
nodejs:mainfrom
agape1225:typings-wire-up-spawn-sync-binding

Conversation

@agape1225

Copy link
Copy Markdown
Contributor

Add typings for the spawn_sync internal binding.

Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
@nodejs-github-bot nodejs-github-bot added the typings Issues and PRs related to internal TypeScript declarations. label Sep 12, 2026

@daeyeon daeyeon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some types don't seem to fully match the implementation. For example, uid also accepts null, and stdio[].input accepts any ArrayBufferView.

Address review feedback from daeyeon: several fields accept more than
what was typed.

- src/spawn_sync.cc checks uid, gid, timeout, maxBuffer, and killSignal
  with IsNullOrUndefined(), same as cwd/envPairs, so null is a valid
  "unset" value for all of them, not just undefined.
- stdio[].input is passed to Buffer::HasInstance(), whose actual
  definition (src/node_buffer.cc) is just val->IsArrayBufferView() -
  any ArrayBufferView is accepted, not only Uint8Array.

Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
@daeyeon daeyeon added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Sep 25, 2026
@nodejs-github-bot
nodejs-github-bot merged commit cf0434f into nodejs:main Sep 27, 2026
26 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in cf0434f

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 27, 2026
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
PR-URL: #65996
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
HoonDongKang pushed a commit to HoonDongKang/node that referenced this pull request Sep 28, 2026
Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
PR-URL: nodejs#65996
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 28, 2026
Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
PR-URL: #65996
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit. typings Issues and PRs related to internal TypeScript declarations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants