Skip to content

Commit

Permalink
fix(core): fix pnpm lockfile parsing in v6.1 (#17407)
Browse files Browse the repository at this point in the history
  • Loading branch information
jojoa committed Jun 7, 2023
1 parent d5aca8b commit 05fb178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nx/src/plugins/js/lock-file/utils/pnpm-normalizer.ts
Expand Up @@ -458,7 +458,7 @@ function revertFromInlineSpecifiersFormat(

let revertedImporters = mapValues(importers, revertProjectSnapshot);
let packages = lockfile.packages;
if (originalVersion === 6) {
if (originalVersionStr.startsWith('6.')) {
revertedImporters = Object.fromEntries(
Object.entries(revertedImporters ?? {}).map(
([importerId, pkgSnapshot]: [string, ProjectSnapshot]) => {
Expand Down Expand Up @@ -514,7 +514,7 @@ function revertFromInlineSpecifiersFormat(
packages,
importers: revertedImporters,
};
if (originalVersion === 6 && newLockfile.time) {
if (originalVersionStr.startsWith('6.') && newLockfile.time) {
newLockfile.time = Object.fromEntries(
Object.entries(newLockfile.time).map(([depPath, time]) => [
convertNewDepPathToOldDepPath(depPath),
Expand Down

1 comment on commit 05fb178

@vercel
Copy link

@vercel vercel bot commented on 05fb178 Jun 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx.dev
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.