PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /proc/self/root/opt/alt/alt-nodejs22/root/lib/node_modules/npm/lib/utils/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : //proc/self/root/opt/alt/alt-nodejs22/root/lib/node_modules/npm/lib/utils/update-workspaces.js

'use strict'

const reifyFinish = require('../utils/reify-finish.js')

async function updateWorkspaces ({
  config,
  flatOptions,
  localPrefix,
  npm,
  workspaces,
}) {
  if (!flatOptions.workspacesUpdate || !workspaces.length) {
    return
  }

  // default behavior is to not save by default in order to avoid
  // race condition problems when publishing multiple workspaces
  // that have dependencies on one another, it might still be useful
  // in some cases, which then need to set --save
  const save = config.isDefault('save')
    ? false
    : config.get('save')

  // runs a minimalistic reify update, targeting only the workspaces
  // that had version updates and skipping fund/audit/save
  const opts = {
    ...flatOptions,
    audit: false,
    fund: false,
    path: localPrefix,
    save,
  }
  const Arborist = require('@npmcli/arborist')
  const arb = new Arborist(opts)

  await arb.reify({ ...opts, update: workspaces })
  await reifyFinish(npm, arb)
}

module.exports = updateWorkspaces