Skip to content

Commit

Permalink
fix(core): don't error if lock file not present when precomputing js …
Browse files Browse the repository at this point in the history
…dependencies (#16094)
  • Loading branch information
AgentEnder committed Apr 4, 2023
1 parent 9e12953 commit 18c016b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

1 comment on commit 18c016b

@vercel
Copy link

@vercel vercel bot commented on 18c016b Apr 4, 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-five.vercel.app
nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx.dev

Please sign in to comment.