Skip to content

Commit

Permalink
Fix: Reimplements part of the integrity check
Browse files Browse the repository at this point in the history
**Summary**

The integrity file doesn't currently support workspaces, which leads
to #3863 (removing a workspace node_modules folder and running yarn
doesn't do anything, because Yarn incorrectly assumes that everything
is already done).

This PR rewrites a good chunk of the integrity logic to support and
fix this behavior.

**Test plan**

Tests are passing, I still have to write an automated test before
merging this PR.
  • Loading branch information
Maël Nison committed Aug 9, 2017
1 parent 39d6fe2 commit 4978a20
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 88 deletions.
4 changes: 2 additions & 2 deletions src/cli/commands/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ export class Install {
if (!patterns.length && !match.integrityFileMissing) {
this.reporter.success(this.reporter.lang('nothingToInstall'));
await this.createEmptyManifestFolders();
await this.saveLockfileAndIntegrity(patterns);
await this.saveLockfileAndIntegrity(patterns, workspaceLayout);
return true;
}

Expand Down Expand Up @@ -674,7 +674,7 @@ export class Install {
patterns,
lockfileBasedOnResolver,
this.flags,
this.resolver.usedRegistries,
workspaceLayout,
this.scripts.getArtifacts(),
);

Expand Down
Loading

0 comments on commit 4978a20

Please sign in to comment.