Skip to content

Commit

Permalink
fix(core): mark package.json dependencies as static
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Mar 2, 2023
1 parent 7aac67c commit f3b77b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,19 @@ describe('explicit package json dependencies', () => {
sourceProjectName: 'proj',
targetProjectName: 'proj2',
sourceProjectFile: 'libs/proj/package.json',
type: 'static',
},
{
sourceProjectFile: 'libs/proj/package.json',
sourceProjectName: 'proj',
targetProjectName: 'npm:external',
type: 'static',
},
{
sourceProjectName: 'proj',
targetProjectName: 'proj3',
sourceProjectFile: 'libs/proj/package.json',
type: 'static',
},
]);
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { defaultFileRead } from '../file-utils';
import { join } from 'path';
import { ProjectFileMap, ProjectGraph } from '../../config/project-graph';
import {
DependencyType,
ProjectFileMap,
ProjectGraph,
} from '../../config/project-graph';
import { parseJson } from '../../utils/json';
import { getImportPath, joinPathFragments } from '../../utils/path';
import { ProjectsConfigurations } from '../../config/workspace-json-project-json';
Expand Down Expand Up @@ -88,12 +92,14 @@ function processPackageJson(
sourceProjectName: sourceProject,
targetProjectName: packageNameMap[d],
sourceProjectFile: fileName,
type: DependencyType.static,
});
} else if (graph.externalNodes[`npm:${d}`]) {
collectedDeps.push({
sourceProjectName: sourceProject,
targetProjectName: `npm:${d}`,
sourceProjectFile: fileName,
type: DependencyType.static,
});
}
});
Expand Down

0 comments on commit f3b77b3

Please sign in to comment.