Fixes the resolution when a package has an invalid "main" but a valid…#6682
Merged
arcanis merged 4 commits intoyarnpkg:masterfrom Nov 14, 2018
Merged
Fixes the resolution when a package has an invalid "main" but a valid…#6682arcanis merged 4 commits intoyarnpkg:masterfrom
arcanis merged 4 commits intoyarnpkg:masterfrom
Conversation
…o invalid-main-resolution
netbsd-srcmastr
pushed a commit
to NetBSD/pkgsrc
that referenced
this pull request
Jan 17, 2019
## 1.13.0 - Implements a new `package.json` field: `peerDependenciesMeta` [6671](yarnpkg/yarn#6671) - [**Maël Nison**](https://twitter.com/arcanis) - Adds an `optional` settings to `peerDependenciesMeta` to silence missing peer dependency warnings [6671](yarnpkg/yarn#6671) - [**Maël Nison**](https://twitter.com/arcanis) - Implements `yarn policies set-version [range]`. Check [the documentation]() for usage & tips. [6673](yarnpkg/yarn#6673) - [**Maël Nison**](https://twitter.com/arcanis) - Fixes a resolution issue when a package had an invalid `main` entry [6682](yarnpkg/yarn#6682) - [**Maël Nison**](https://twitter.com/arcanis) - Decreases the size of the generated `$PATH` environment variable for a better Windows support [6683](yarnpkg/yarn#6683) - [**Rowan Lonsdale**](https://github.com/hWorblehat) - Fixes postinstall scripts for third-party packages when they were referencing a binary from their own dependencies [6712](yarnpkg/yarn#6712) - [**Maël Nison**](https://twitter.com/arcanis) - Fixes yarn audit exit code overflow [6748](yarnpkg/yarn#6748) - [**Andrey Vetlugin**](https://github.com/antrew) - Stops automatically unplugging packages with postinstall script when running under `--ignore-scripts` [6820](yarnpkg/yarn#6820) - [**Maël Nison**](https://twitter.com/arcanis) - Adds transparent support for the [`resolve`](https://github.com/browserify/resolve) package when using Plug'n'Play [6816](yarnpkg/yarn#6816) - [**Maël Nison**](https://twitter.com/arcanis) - Properly reports the error codes when the npm registry throws 500's [6817](yarnpkg/yarn#6817) - [**Maël Nison**](https://twitter.com/arcanis)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
relay-compileris a package with an invalidmainentry, but a validindex.jsfile. Node manages to resolve it properly, but PnP trips over it because it fails as soon as themainentry is detected as invalid.This diff fixes that by ensuring that we try both options when the
mainresolution fails.Test plan
Added a test.