Skip to content

Commit

Permalink
fix(pnpm): uses slugified scope and name for hardlink package location
Browse files Browse the repository at this point in the history
  • Loading branch information
UpstartMPotnick committed Oct 3, 2024
1 parent 80052a0 commit 4502482
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .yarn/versions/bfefbea2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
releases:
"@yarnpkg/cli": patch
"@yarnpkg/plugin-pnpm": patch

declined:
- "@yarnpkg/plugin-compat"
- "@yarnpkg/plugin-constraints"
- "@yarnpkg/plugin-dlx"
- "@yarnpkg/plugin-essentials"
- "@yarnpkg/plugin-init"
- "@yarnpkg/plugin-interactive-tools"
- "@yarnpkg/plugin-nm"
- "@yarnpkg/plugin-npm-cli"
- "@yarnpkg/plugin-pack"
- "@yarnpkg/plugin-patch"
- "@yarnpkg/plugin-pnp"
- "@yarnpkg/plugin-stage"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/plugin-version"
- "@yarnpkg/plugin-workspace-tools"
- "@yarnpkg/builder"
- "@yarnpkg/core"
- "@yarnpkg/doctor"
3 changes: 2 additions & 1 deletion packages/plugin-pnpm/sources/PnpmLinker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,9 @@ function getStoreLocation(project: Project) {
function getPackagePaths(locator: Locator, {project}: {project: Project}) {
const pkgKey = structUtils.slugifyLocator(locator);
const storeLocation = getStoreLocation(project);
const pkgPath = structUtils.stringifyIdent(locator) as PortablePath;

const packageLocation = ppath.join(storeLocation, pkgKey, `package`);
const packageLocation = ppath.join(storeLocation, pkgKey, pkgPath);
const dependenciesLocation = ppath.join(storeLocation, pkgKey, Filename.nodeModules);

return {packageLocation, dependenciesLocation};
Expand Down

0 comments on commit 4502482

Please sign in to comment.