-
Notifications
You must be signed in to change notification settings - Fork 62
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: fix tar node module #134
Conversation
🦋 Changeset detectedLatest commit: ce78ac6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
for k := range *list { | ||
names = append(names, k) | ||
} | ||
sort.Strings(names) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The electron-builder pipeline(https://github.com/electron-userland/electron-builder/actions/runs/10856416053/job/30131018855) occasionally failed, and I finally found the root cause. The map in Golang doesn't maintain a fixed order, so sometimes it returns [foo, ms]
, and other times it returns [ms, foo]
. If the order is incorrect, it leads to different results. Now that we've fixed the order, it won't fail anymore.
fix electron-userland/electron-builder#8431
package.json
main.js
error
root cause
The version of
minipass
in theminizlib
dependency is incorrect; it shouldn't be 3.3.6.Currently, there's no record of the parent-child tree relationship, and it doesn't search for the highest parent node. If it's already found, it directly returns
nil
, causing it to revert to an older version.How to fix
Perform a fixed-order loop search on the
NodeModuleDirToDependencyMap
. If the dependency is in thehoistedDependMap
and the version number is different, place that dependency in theconflictDependencyMap
of the highest parent node. If it's not in thehoistedDependMap
, just set it directly.The current approach is to implement a
hoistedDependMap
, so it's no longer necessary to setnode-linker=hoisted
in pnpm's configuration.