Skip to content

Commit

Permalink
Merge branch 'master' into pack-main
Browse files Browse the repository at this point in the history
  • Loading branch information
josephfrazier committed Apr 11, 2017
2 parents f86cd57 + fb40251 commit 38e6ea9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/package-fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,19 @@ export default class PackageFetcher {
}

async init(): Promise<void> {
const pkgs = this.resolver.getPackageReferences();
let pkgs = this.resolver.getPackageReferences();
const pkgsPerDest: Map<string, PackageReference> = new Map();
pkgs = pkgs.filter((ref) => {
const dest = this.config.generateHardModulePath(ref);
const otherPkg = pkgsPerDest.get(dest);
if (otherPkg) {
this.reporter.warn(this.reporter.lang('multiplePackagesCantUnpackInSameDestination',
ref.patterns, dest, otherPkg.patterns));
return false;
}
pkgsPerDest.set(dest, ref);
return true;
});
const tick = this.reporter.progress(pkgs.length);

await promise.queue(pkgs, async (ref) => {
Expand Down
1 change: 1 addition & 0 deletions src/reporters/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const messages = {
allDependenciesUpToDate: 'All of your dependencies are up to date.',
frozenLockfileError: 'Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`.',
fileWriteError: 'Could not write file $0: $1',
multiplePackagesCantUnpackInSameDestination: 'Pattern $0 is trying to unpack in the same destination $1 as pattern $2. This could result in a non deterministic behavior, skipping.',

yarnOutdated: "Your current version of Yarn is out of date. The latest version is $0 while you're on $1.",
yarnOutdatedInstaller: 'To upgrade, download the latest installer at $0.',
Expand Down

0 comments on commit 38e6ea9

Please sign in to comment.