Skip to content

Commit

Permalink
fix(core): mark package.json dependencies as static (#15381)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Mar 2, 2023
1 parent 65aac8e commit aaed63b
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

1 comment on commit aaed63b

@vercel
Copy link

@vercel vercel bot commented on aaed63b Mar 2, 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-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev

Please sign in to comment.