(workspacesPaths)
| 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 | |
| 240 | module.exports = Init |
no test coverage detected