Skip to content

Commit

Permalink
fix(core): clean versions read from package.json when resolving depen…
Browse files Browse the repository at this point in the history
…dencies
  • Loading branch information
FrozenPandaz committed Jun 7, 2024
1 parent 28b3d80 commit 8a71844
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { existsSync } from 'node:fs';
import { builtinModules } from 'node:module';
import { dirname, join, parse, posix, relative } from 'node:path';
import { clean } from 'semver';
import {
ProjectGraphExternalNode,
ProjectGraphProjectNode,
Expand Down Expand Up @@ -186,7 +186,8 @@ export class TargetProjectLocator {
return externalNodeName;
}

const npmProjectKey = `npm:${externalPackageJson.name}@${externalPackageJson.version}`;
const version = clean(externalPackageJson.version);
const npmProjectKey = `npm:${externalPackageJson.name}@${version}`;
const matchingExternalNode = this.npmProjects[npmProjectKey];
if (!matchingExternalNode) {
return null;
Expand Down

0 comments on commit 8a71844

Please sign in to comment.