Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install-strategy=linked package name for workspace packages + workaround for another bug #8096

Draft
wants to merge 2 commits into
base: latest
Choose a base branch
from

Conversation

xkr47
Copy link

@xkr47 xkr47 commented Feb 11, 2025

Attempts to fix #6122.

I don't know whether the packageName to name propagation should be limited to workspaceProxy() or whether I was correct in placing it in assignCommonProperties(). It is based on similar code I found elsewhere.

Also had to add a fix/workaround for this.idealTree.children.get being undefined/null sometimes when running npm install. Haven't got the slightest clue why.

Additional tests not yet done, requires some test code refactoring to support workspace packages having names not matching their directory name..

Works for me (TM). You can try these changes out locally by implementing the same changes in the files in <your_node_installation_root>/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/.

References

Fixes #6122

xkr47 and others added 2 commits February 11, 2025 02:59
I don't know whether this fix should be limited to `workspaceProxy()` or whether I was correct in placing it in `assignCommonProperties()`.
@xkr47 xkr47 changed the title Install strategy linked package name Fix install-strategy=linked package name for workspace packages + another bug Feb 11, 2025
@xkr47 xkr47 changed the title Fix install-strategy=linked package name for workspace packages + another bug Fix install-strategy=linked package name for workspace packages + workaround for another bug Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Import error with install-strategy=linked and namespaced packages in a workspace
1 participant