Ability to define peer and dev deps for auto-imported packages - #345
Ability to define peer and dev deps for auto-imported packages#345bterlson wants to merge 2 commits into
Conversation
|
All changed packages have been documented.
Show changes
|
commit: |
jongio
left a comment
There was a problem hiding this comment.
This PR appears to be superseded by #347 ("Adding package versions + kind configuration support for PackageDirectory") which was merged the same day these commits were pushed. The PR currently has merge conflicts and failing CI builds, which aligns with this observation.
If this PR is still intended to land (perhaps it takes a different approach or covers additional cases), a few items to address:
- Merge conflicts with main need resolution
- CI build failures need investigation
- The TypeDeclaration.tsx change (adding
kind="type") seems unrelated to the peer/dev deps feature and could be split into its own commit or removed if #347 already covers it - Second commit message "changes" is non-descriptive
| * Retrieve the package scope associated with an external package created via | ||
| * createPackage. | ||
| */ | ||
| export function getPackageScope(pgk: ExternalPackage) { |
| const versionSpecifier = | ||
| pkgMeta?.versionSpecifiers.get(dependency) ?? dependency.version; | ||
|
|
||
| kinds[kind] ??= {}; |
There was a problem hiding this comment.
Potential mutation: kinds[kind] holds a direct reference to props.dependencies (or devDependencies/peerDependencies). Assigning kinds[kind][dependency.name] = versionSpecifier mutates the original props object if it was passed by reference. Consider spreading: kinds[kind] = { ...(kinds[kind] ?? {}), [dependency.name]: versionSpecifier } or building a fresh object to avoid side effects inside the memo.
No description provided.