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

Method update

deps/npm/lib/commands/init.js:213–237  ·  view source on GitHub ↗
(workspacesPaths)

Source from the content-addressed store, hash-verified

211 }
212
213 async update (workspacesPaths) {
214 // translate workspaces paths into an array containing workspaces names
215 const workspaces = []
216 for (const path of workspacesPaths) {
217 const { content: { name } } = await PackageJson.normalize(path).catch(() => ({ content: {} }))
218
219 if (name) {
220 workspaces.push(name)
221 }
222 }
223
224 const {
225 config,
226 flatOptions,
227 localPrefix,
228 } = this.npm
229
230 await updateWorkspaces({
231 config,
232 flatOptions,
233 localPrefix,
234 npm: this.npm,
235 workspaces,
236 })
237 }
238}
239
240module.exports = Init

Callers 1

execWorkspacesMethod · 0.95

Calls 2

updateWorkspacesFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected