Skip to content

[rush] Don't include package.json version field when calculating packageJsonInjectedDependenciesHash #4806

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

Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@microsoft/rush",
"comment": "Don't include package.json version field when calculating packageJsonInjectedDependenciesHash",
"type": "none"
}
],
"packageName": "@microsoft/rush"
}
6 changes: 3 additions & 3 deletions libraries/rush-lib/src/api/Subspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ interface ISubspaceDetail {
tempShrinkwrapPreinstallFilename: string;
}

interface IPackageJsonLite extends Omit<IPackageJson, 'version'> {}

/**
* This represents the subspace configurations for a repository, based on the "subspaces.json"
* configuration file.
Expand Down Expand Up @@ -331,7 +333,7 @@ export class Subspace {
* @beta
*/
public getPackageJsonInjectedDependenciesHash(): string | undefined {
const allPackageJson: IPackageJson[] = [];
const allPackageJson: IPackageJsonLite[] = [];

const relatedProjects: RushConfigurationProject[] = [];
const subspacePnpmfileShimSettings: ISubspacePnpmfileShimSettings =
Expand Down Expand Up @@ -364,7 +366,6 @@ export class Subspace {
// collect fields that could update the `pnpm-lock.yaml`
const {
name,
version,
bin,
dependencies,
devDependencies,
Expand All @@ -377,7 +378,6 @@ export class Subspace {

allPackageJson.push({
name,
version,
bin,
dependencies,
devDependencies,
Expand Down
Loading