Skip to content

docs: clarify os/cpu/libc accept string or array - #10047

Open
SatvikMishra08 wants to merge 1 commit into
npm:latestfrom
SatvikMishra08:docs/10002-os-cpu-libc-types
Open

SatvikMishra08 wants to merge 1 commit into
npm:latestfrom
SatvikMishra08:docs/10002-os-cpu-libc-types

Conversation

@SatvikMishra08

Copy link
Copy Markdown

Summary

Clarifies that os, cpu, and libc in package.json each accept a string or an array of strings, matching npm's runtime behavior in npm-install-checks (checkList coerces a string to a one-element array).

Previously the libc example used bare strings while os/cpu showed only arrays, with no note that both shapes are valid — which has confused authors and downstream tools (see #10002).

Changes:

  • Document string-or-array for all three fields
  • Show both array and string examples side-by-side
  • Align the libc section examples with os/cpu (array form + string shorthand)

Verified against node_modules/npm-install-checks/lib/index.js checkList on current latest. No maintainer comments on the still-Needs-Triage issue.

Fixes #10002

Test plan

  • Docs page sections for os / cpu / libc read consistently
  • Examples are valid JSON and match runtime acceptance of both shapes

@SatvikMishra08
SatvikMishra08 requested a review from a team as a code owner September 27, 2026 14:20
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.

[DOCS] Clarify whether os, cpu, and libc accept a string or must be an array

1 participant