You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package.json has become the control-room for everything—from scripts and workspaces to publishing metadata.
The problem? It has no room for little notes. Any time we want to leave a hint like “why this version is pinned” or “please don’t touch this field,” we’re forced to open a separate doc (that nobody reads) or add a fake field that breaks tooling.
It would be wonderful if Yarn could read the file as JSONC—plain JSON plus:
// single-line comments
/* block comments */
trailing commas that don’t trip us up
Tooling such as VS Code and TypeScript already speak JSONC, and it stays valid JSON after stripping comments, so the publishing story remains safe.
Benefits at a glance:
Self-documenting configs – future teammates understand choices without hunting docs.
Cleaner PR reviews – no need for workaround fields or README edits just to explain a line.
Zero impact on the registry – Yarn could strip comments before packing, so nothing changes downstream.
Thanks for considering! I’d love to hear thoughts or pitfalls I might have missed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Yarn team 👋,
package.json
has become the control-room for everything—from scripts and workspaces to publishing metadata.The problem? It has no room for little notes. Any time we want to leave a hint like “why this version is pinned” or “please don’t touch this field,” we’re forced to open a separate doc (that nobody reads) or add a fake field that breaks tooling.
It would be wonderful if Yarn could read the file as JSONC—plain JSON plus:
// single-line comments
/* block comments */
Tooling such as VS Code and TypeScript already speak JSONC, and it stays valid JSON after stripping comments, so the publishing story remains safe.
Benefits at a glance:
Thanks for considering! I’d love to hear thoughts or pitfalls I might have missed.
Beta Was this translation helpful? Give feedback.
All reactions