Closed beyondkmp closed 2 months ago
Latest commit: f2c9989a4e97fbb36470f56ea2f90cfdb0e6637a
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
In this PR(https://github.com/develar/app-builder/pull/132), only the case of files with the same name has been fixed. If it's not a file but a folder, and there's a package.json inside, it will lead to obtaining the wrong package.
Therefore, FindParentWithFile is incorrect. It shouldn't directly search upwards, as searching upwards can result in finding packages outside of node_modules.
To implement the non-hoisted mode under pnpm, we just need to replace the dir in the dependency with the actual dir.
https://github.com/develar/app-builder/blob/82d3a963bed48f8eb623db0d805a72f0cd72396d/pkg/node-modules/nodeModuleCollector.go#L299
Combined with the hoisted conversion algorithm in this MR(https://github.com/develar/app-builder/pull/134), it can solve the issues mentioned below.
fix:
https://github.com/develar/app-builder/issues/84 https://github.com/develar/app-builder/issues/92 https://github.com/develar/app-builder/pull/93