How to use the @pnpm/core-loggers.packageManifestLogger.debug function in @pnpm/core-loggers

To help you get started, we’ve selected a few @pnpm/core-loggers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pnpm / pnpm / packages / supi / src / install / index.ts View on Github external
const importersToLink = await Promise.all(importersToResolve.map(async (importer, index) => {
    const resolvedImporter = resolvedImporters[importer.id]
    let newPkg: ImporterManifest | undefined = importer.manifest
    if (importer.updatePackageManifest) {
      newPkg = await updateImporterManifest(importersToResolve[index], {
        directDependencies: resolvedImporter.directDependencies,
        preserveWorkspaceProtocol: opts.preserveWorkspaceProtocol,
        saveWorkspaceProtocol: opts.saveWorkspaceProtocol,
      })
    } else {
      packageManifestLogger.debug({
        prefix: importer.rootDir,
        updated: importer.manifest,
      })
    }

    if (newPkg) {
      const lockfileImporter = ctx.wantedLockfile.importers[importer.id]
      ctx.wantedLockfile.importers[importer.id] = addDirectDependenciesToLockfile(
        newPkg,
        lockfileImporter,
        resolvedImporter.linkedDependencies,
        resolvedImporter.directDependencies,
        ctx.registries,
      )
    }
github pnpm / pnpm / packages / get-context / src / index.ts View on Github external
rootModulesDir,
    shamefullyHoist: sHoist,
    skipped,
    storeDir,
    virtualStoreDir,
    ...await readLockfileFile({
      force: opts.force,
      forceSharedLockfile: opts.forceSharedLockfile,
      importers: [{ id: importerId, rootDir: opts.dir }],
      lockfileDir: opts.lockfileDir,
      registry: opts.registries.default,
      useLockfile: opts.useLockfile,
      virtualStoreDir,
    }),
  }
  packageManifestLogger.debug({
    initial: manifest,
    prefix: opts.dir,
  })

  return ctx
}
github pnpm / pnpm / packages / supi / src / save.ts View on Github external
delete packageManifest[deptype]![packageSpec.alias]
          }
        })
        if (packageSpec.peer === true) {
          packageManifest.peerDependencies = packageManifest.peerDependencies || {}
          packageManifest.peerDependencies[packageSpec.alias] = spec
        }
      }
    } else if (packageSpec.pref) {
      const usedDepType = guessDependencyType(packageSpec.alias, packageManifest as ImporterManifest) || 'dependencies'
      packageManifest[usedDepType] = packageManifest[usedDepType] || {}
      packageManifest[usedDepType]![packageSpec.alias] = packageSpec.pref
    }
  })

  packageManifestLogger.debug({
    prefix,
    updated: packageManifest,
  })
  return packageManifest as ImporterManifest
}
github pnpm / pnpm / packages / get-context / src / index.ts View on Github external
importers.forEach((importer) => {
    packageManifestLogger.debug({
      initial: importer.manifest,
      prefix: importer.rootDir,
    })
  })
  if (opts.hooks?.readPackage) {
github pnpm / pnpm / packages / supi / src / uninstall / removeDeps.ts View on Github external
} else {
    DEPENDENCIES_FIELDS
      .filter((depField) => packageManifest[depField])
      .forEach((depField) => {
        removedPackages.forEach((dependency) => {
          delete packageManifest[depField]![dependency]
        })
      })
  }
  if (packageManifest.peerDependencies) {
    for (const removedDependency of removedPackages) {
      delete packageManifest.peerDependencies[removedDependency]
    }
  }

  packageManifestLogger.debug({
    prefix: opts.prefix,
    updated: packageManifest,
  })
  return packageManifest
}