MCPcopy Index your code
hub / github.com/nodejs/node / pendingSummary

Method pendingSummary

deps/npm/lib/utils/allow-scripts-cmd.js:139–152  ·  view source on GitHub ↗
(unreviewed)

Source from the content-addressed store, hash-verified

137 // but tag every entry as `pending` since nothing is written. Names and
138 // versions are derived exactly like the text listing above.
139 pendingSummary (unreviewed) {
140 const groups = new Map()
141 for (const { node } of unreviewed) {
142 const { name, version } = trustedDisplay(node)
143 /* istanbul ignore next: every test node has a name */
144 const display = name || '<unknown>'
145 const key = version ? `${display}@${version}` : display
146 if (!groups.has(display)) {
147 groups.set(display, [])
148 }
149 groups.get(display).push({ key, change: 'pending' })
150 }
151 return [...groups].map(([name, changes]) => ({ name, changes }))
152 }
153
154 async runAll (unreviewed) {
155 if (unreviewed.length === 0) {

Callers 1

runPendingMethod · 0.95

Calls 5

hasMethod · 0.65
getMethod · 0.65
mapMethod · 0.65
setMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected