Skip to content

Commit

Permalink
fix(core): add pnpm normalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Mar 29, 2023
1 parent 62f1a8d commit f508f3d
Show file tree
Hide file tree
Showing 5 changed files with 472 additions and 44 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions packages/nx/src/plugins/js/lock-file/pnpm-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,10 @@ export function stringifyPnpmLockfile(
packageJson: NormalizedPackageJson
): string {
const data = parseAndNormalizePnpmLockfile(rootLockFileContent);
const lockfileVersion: string =
typeof data.lockfileVersion === 'number'
? data.lockfileVersion.toFixed(1)
: data.lockfileVersion;
const hasV5Separator = lockfileVersion.startsWith('5');
const hasV5Separator = data.lockfileVersion.toString().startsWith('5');

const output: Lockfile | LockfileV6 = {
lockfileVersion,
lockfileVersion: data.lockfileVersion,
importers: {
'.': mapRootSnapshot(
packageJson,
Expand Down
Loading

0 comments on commit f508f3d

Please sign in to comment.