Skip to content

Commit

Permalink
fix: additional pnpm semver parsing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gabidobo committed Feb 28, 2023
1 parent 103af11 commit 3f4fa77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/graph/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ const processDependenciesForPackage = ({dependencies, newPackage, allPackages, p
Object.entries(dependencyObject || {}).forEach(
([originalDependencyName, originalSemverRule]) => {
const {name: dependencyName, semver: semverRule} = parseDependencyString(
`${originalDependencyName}@${originalSemverRule}`,
// In some cases, pnpm appends metadata to the version
// Ex: `/rollup-plugin-terser/7.0.2_rollup@2.79.1`
// Ex: `/workbox-webpack-plugin/6.1.5_fa2917c6d78243729a500a2a8fe6cdc5`
`${originalDependencyName}@${originalSemverRule.split('_')[0]}`,
);

const dependencyPackage = allPackages.find(
Expand Down

0 comments on commit 3f4fa77

Please sign in to comment.