Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Please add one entry in this file for each change in Yarn's behavior. Use the sa

[#6878](https://github.com/yarnpkg/yarn/pull/6878) - [**Maël Nison**](https://twitter.com/arcanis)

- Fixes an issue where `resolve` would forward an incomplete basedir to the PnP hook

[#6882](https://github.com/yarnpkg/yarn/pull/6882) - [**Zoran Regvart**](https://github.com/zregvart)

## 1.13.0

- Implements a new `package.json` field: `peerDependenciesMeta`
Expand Down
4 changes: 4 additions & 0 deletions src/util/generate-pnp-map-api.tpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,10 @@ exports.setupCompatibilityLayer = () => {
// Extract the name of the package being requested (1=full name, 2=scope name, 3=local name)
const parts = request.match(/^((?:(@[^\/]+)\/)?([^\/]+))/);

// make sure that basedir ends with a slash
if (basedir.charAt(basedir.length - 1) !== '/') {
basedir = path.join(basedir, '/');
}
// This is guaranteed to return the path to the "package.json" file from the given package
const manifestPath = exports.resolveToUnqualified(`${parts[1]}/package.json`, basedir);

Expand Down