Skip to content

doc: allow null in SourceMap sources and sourcesContent - #67804

Merged
nodejs-github-bot merged 2 commits into
nodejs:mainfrom
DaveyEke:doc-sourcemap-null-sources
Nov 28, 2026
Merged

nodejs-github-bot merged 2 commits into
nodejs:mainfrom
DaveyEke:doc-sourcemap-null-sources

Conversation

@DaveyEke

@DaveyEke DaveyEke commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Assisted-by: a closed-source coding agent

Currently in Node, the new SourceMap(payload) docs notes sources and sourcesContent as {string[]}, but the source map format allows null entries in both.

Node already accepts them. The SourceMapV3 type in lib/internal/source_map/source_map.js declares both as Array<string|null>, and findEntry() returns originalSource: null for a mapping into a null source. This changes both entries in the docs to {string[]|null[]}. The matching @types/node change is DefinitelyTyped/DefinitelyTyped#76226.

I used a coding agent to find the mismatch and draft this change. I checked the spec text, the SourceMapV3 type and the findEntry() result with a null source myself, and ran tools/lint-md on doc/api/module.md

Assisted-by: a closed-source coding agent
Signed-off-by: Dave Mkpa-Eke <daveydenco@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to Node.js documentation. module Issues and PRs related to the module subsystem. labels Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Node.js, and thank you for your first contribution!

Before review, please take a moment to read:

Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal.

Comment thread doc/api/module.md Resolved
Assisted-by: a closed-source coding agent
Signed-off-by: Dave Mkpa-Eke <daveydenco@gmail.com>
@Renegade334 Renegade334 added 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 Nov 26, 2026
@MikeMcC399 MikeMcC399 added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 27, 2026
@nodejs-github-bot
nodejs-github-bot merged commit ef91691 into nodejs:main Nov 28, 2026
26 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in ef91691

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 28, 2026
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. doc Issues and PRs related to Node.js documentation. module Issues and PRs related to the module subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants