Skip to content
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

Fix: Revert "Fix: unbound transitive dependency optimization" #4559

Closed
wants to merge 1 commit into from

Conversation

BYK
Copy link
Member

@BYK BYK commented Sep 27, 2017

Summary

Fixes #4547, unfixes #3780 by reverting #4488 (commit 4020ccd).

Test plan

Existing unit tests.

… with top level dependency (#4488)"

**Summary**

Fixes #4547, unfixes #3780 by reverting #4488 (commit 4020ccd).

**Test plan**

Existing unit tests.
@buildsize
Copy link

buildsize bot commented Sep 27, 2017

This change will decrease the build size from 9.83 MB to 9.82 MB, a decrease of 4.23 KB (0%)

File name Previous Size New Size Change
yarn-[version].noarch.rpm 848.08 KB 847.71 KB -381 bytes (0%)
yarn-[version].js 3.74 MB 3.74 MB -1.57 KB (0%)
yarn-legacy-[version].js 3.79 MB 3.79 MB -1.57 KB (0%)
yarn-v[version].tar.gz 853.73 KB 853.38 KB -357 bytes (0%)
yarn_[version]all.deb 645.13 KB 644.75 KB -390 bytes (0%)

}

const availableVersions = this.getAllInfoForPatterns(collapsablePatterns).map(manifest => manifest.version);
const combinedRange = collapsablePatterns.map(pattern => normalizePattern(pattern).range).join(' ');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could #4547 also be fixed by removing this semver range munging (patterns.join(' ')), and testing each version against every pattern in turn? This seems to be basically what semver.maxSatisfying is doing, but would do the correct thing with ranges containing "||".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really. My initial approach was to do a proper intersection and I have the code locally. The problem is range can be exotic too like file:./a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Yarn 1.1.0 optimizeResolutions fails if package pattern has || in the range
3 participants