rushstack icon indicating copy to clipboard operation
rushstack copied to clipboard

[rush-lib] Refactor alwaysInjectDependenciesFromOtherSubspaces logic

Open g-chao opened this issue 1 year ago • 0 comments

Summary

We check the injected settings in the package.json to tell if a dependency is injected or not. However, in the current alwaysInjectDependenciesFromOtherSubspaces implementation, user no need to set injected settings in package.json for these cross subspace dependencies. This leads to inconvenience to check if a dependency is injected or not.

The alternative we check the version representation in pnpm-lock.yaml to see if it is started with file:, if yes, then it is a injected dependency. But, this method also has drawback, not all dependencies started with file: is the injected dependency, for example , we can't treat this file:./tarball/colors-1.4.0.tgz as a injected dependency.

So, we need to refactor the alwaysInjectDependenciesFromOtherSubspaces logic. Now, if user enable this logic, we write injected:true in the package.json

Details

How it was tested

Impacted documentation

g-chao avatar May 18 '24 06:05 g-chao