MCPcopy Create free account
hub / github.com/nodejs/node / execWorkspaces

Method execWorkspaces

deps/npm/lib/commands/publish.js:54–72  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

52 }
53
54 async execWorkspaces (args) {
55 const useWorkspaces = args.length === 0 || args.includes('.')
56 if (!useWorkspaces) {
57 log.warn('Ignoring workspaces for specified package(s)')
58 return this.exec(args)
59 }
60 await this.setWorkspaces()
61
62 for (const [name, workspace] of this.workspaces.entries()) {
63 try {
64 await this.#publish([workspace], { workspace: name })
65 } catch (err) {
66 if (err.code !== 'EPRIVATE') {
67 throw err
68 }
69 log.warn(this.#command, `Skipping workspace ${this.npm.chalk.cyan(name)}, marked as ${this.npm.chalk.bold('private')}`)
70 }
71 }
72 }
73
74 get #command () {
75 return this.isStage ? 'stage' : 'publish'

Callers

nothing calls this directly

Calls 7

execMethod · 0.95
#publishMethod · 0.95
includesMethod · 0.80
warnMethod · 0.80
setWorkspacesMethod · 0.80
boldMethod · 0.80
entriesMethod · 0.45

Tested by

no test coverage detected