Skip to content

Commit

Permalink
Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanis committed Sep 27, 2019
1 parent 431a9e9 commit 9322e76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,14 +517,12 @@ export default class Config {

if (pkg.uid && pkg.version !== pkg.uid) {
slug += `-${pkg.uid}`;
} else if (integrity != null) {
slug += `-${crypto.createHash('sha1').update(integrity.toString()).digest('hex')}`;

This comment has been minimized.

Copy link
@qzmfranklin

qzmfranklin Jan 20, 2020

Why this change?

Any explanations?

This comment has been minimized.

Copy link
@qzmfranklin

qzmfranklin Jan 20, 2020

Neither the git message nor the code, or any comments on this change.

This seems mysterious at best and is probably a hole for errors to be fair.

} else if (hash) {
slug += `-${hash}`;
}

if (integrity != null) {
slug += `-${crypto.createHash('sha1').update(integrity).digest('hex')}`;
}

return slug;
}

Expand Down
2 changes: 1 addition & 1 deletion src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const YARN_INSTALLER_MSI = 'https://yarnpkg.com/latest.msi';
export const SELF_UPDATE_VERSION_URL = 'https://yarnpkg.com/latest-version';

// cache version, bump whenever we make backwards incompatible changes
export const CACHE_VERSION = 4;
export const CACHE_VERSION = 5;

// lockfile version, bump whenever we make backwards incompatible changes
export const LOCKFILE_VERSION = 1;
Expand Down

0 comments on commit 9322e76

Please sign in to comment.