Skip to content

Commit

Permalink
fix(core): ensure createPackageJson sorts dependencies consistently (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
skrtheboss committed May 27, 2022
1 parent 3bcaa18 commit 7ee93f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/workspace/src/utilities/create-package-json.ts
@@ -1,5 +1,6 @@
import type { ProjectGraph } from '@nrwl/devkit';
import { readJsonFile } from '@nrwl/devkit';
import { sortObjectByKeys } from 'nx/src/utils/object-sort';

/**
* Creates a package.json in the output directory for support to install dependencies within containers.
Expand Down Expand Up @@ -41,6 +42,9 @@ export function createPackageJson(
}
});

packageJson.devDependencies &&= sortObjectByKeys(packageJson.devDependencies);
packageJson.dependencies &&= sortObjectByKeys(packageJson.dependencies);

return packageJson;
}

Expand Down

1 comment on commit 7ee93f0

@vercel
Copy link

@vercel vercel bot commented on 7ee93f0 May 27, 2022

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-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.