Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): don't error if lock file not present when precomputing js dependencies #16094

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/nx/src/plugins/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export const processProjectGraph: ProjectGraphProcessor = async (
) => {
const builder = new ProjectGraphBuilder(graph);

const lockHash = lockFileHash() ?? 'n/a';
// during the create-nx-workspace lock file might not exists yet
if (lockFileExists()) {
const lockHash = lockFileHash() ?? 'n/a';
if (lockFileNeedsReprocessing(lockHash)) {
removeNpmNodes(graph, builder);
parseLockFile(builder);
Expand Down
4 changes: 2 additions & 2 deletions packages/nx/src/utils/nx-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export function loadNxPluginsSync(
// Temporarily load js as if it were a plugin which is built into nx
// In the future, this will be optional and need to be specified in nx.json
const jsPlugin: any = require('../plugins/js');
jsPlugin.name = 'index';
jsPlugin.name = 'nx-js-graph-plugin';
result.push(jsPlugin as NxPlugin);

plugins ??= [];
Expand Down Expand Up @@ -163,7 +163,7 @@ export async function loadNxPlugins(
// Temporarily load js as if it were a plugin which is built into nx
// In the future, this will be optional and need to be specified in nx.json
const jsPlugin: any = await import('../plugins/js');
jsPlugin.name = 'index';
jsPlugin.name = 'nx-js-graph-plugin';
result.push(jsPlugin as NxPlugin);

plugins ??= [];
Expand Down