Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const _toResolveImporter = toResolveImporter.bind(null, {
defaultUpdateDepth,
lockfileOnly: opts.lockfileOnly,
preferredVersions,
storeDir: ctx.storeDir,
virtualStoreDir: ctx.virtualStoreDir,
workspacePackages: opts.workspacePackages,
})
const importersToResolve = await Promise.all(importers.map((importer) => _toResolveImporter(importer)))
const {
dependenciesTree,
outdatedDependencies,
resolvedImporters,
resolvedPackagesByPackageId,
wantedToBeSkippedPackageIds,
} = await resolveDependencies(
importersToResolve,
{
alwaysTryWorkspacePackages: opts.linkWorkspacePackages,
currentLockfile: ctx.currentLockfile,
dryRun: opts.lockfileOnly,
engineStrict: opts.engineStrict,
force: opts.force,
hooks: opts.hooks,
lockfileDir: opts.lockfileDir,
nodeVersion: opts.nodeVersion,
pnpmVersion: opts.packageManager.name === 'pnpm' ? opts.packageManager.version : '',
registries: opts.registries,
resolutionStrategy: opts.resolutionStrategy,
sideEffectsCache: opts.sideEffectsCacheRead,
storeController: opts.storeController,
tag: opts.tag,