Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// waiting till the skipped packages are downloaded to the store
await Promise.all(
R.props(Array.from(ctx.skipped), resolvedPackagesByPackageId)
// skipped packages might have not been reanalized on a repeat install
// so lets just ignore those by excluding nulls
.filter(Boolean)
.map(({ fetchingFiles }) => fetchingFiles()),
)
// waiting till package requests are finished
await Promise.all(R.values(resolvedPackagesByPackageId).map(({ finishing }) => finishing()))
const lockfileOpts = { forceSharedFormat: opts.forceSharedLockfile }
if (opts.lockfileOnly) {
await writeWantedLockfile(ctx.lockfileDir, result.wantedLockfile, lockfileOpts)
} else {
await Promise.all([
opts.useLockfile
? writeLockfiles({
currentLockfile: result.currentLockfile,
currentLockfileDir: ctx.virtualStoreDir,
wantedLockfile: result.wantedLockfile,
wantedLockfileDir: ctx.lockfileDir,
...lockfileOpts,
})
: writeCurrentLockfile(ctx.virtualStoreDir, result.currentLockfile, lockfileOpts),
(() => {
if (result.currentLockfile.packages === undefined && result.removedDepPaths.size === 0) {
return Promise.resolve()
}
return writeModulesYaml(ctx.rootModulesDir, {