Merged
Conversation
By not expecting the current version name to be "A"
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on December 2
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| }); | ||
| const versionDirectoryPaths = versionDirectoryEntries | ||
| .filter((dirent) => dirent.isDirectory()) | ||
| .map((dirent) => path.join(dirent.parentPath, dirent.name)); |
There was a problem hiding this comment.
Bug: Dirent Path Access Incompatibility Causes Runtime Errors
The code uses dirent.parentPath to construct a path. This property isn't reliably available on fs.Dirent objects returned by non-recursive fs.readdir, which can lead to runtime errors, especially on older Node.js versions. The versionsPath variable is already in scope for this purpose.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shipping a prebuilt Xcframework on NPM is harder than it should be.
It may contain internal symbolic links when it wraps a versioned MacOS framework.
These are stripped from the archive uploaded to the registry, meaning it's broken when downloaded again 🫠
Merging this PR will:
filesand.gitignoreof the repo to enable anpm pack(although not actively being used though).There's some information about the "current" version which could be derived from the surrounding Xcframework to support Apple frameworks shipping multiple versions, but I'll leave that for now to keep things "simple".
Note
Reconstructs missing symlinks in Apple versioned frameworks (including weak-node-api) and updates package metadata/scripts for packaging.
restoreFrameworkLinks(frameworkPath)to rebuildVersions/Currentand binary symlinks for versioned frameworks.restoreFrameworkLinksinlinkVersionedFrameworkand from CLI after linking to fixweak-node-api.xcframeworkslices.apple.test.tsto cover restoring symlinks and flat-framework error case.program.tsto restore weak-node-api framework symlinks when--appleis used.versionandfilesfields and new scripts topackages/node-addon-examplesandpackages/node-tests; include prebuilt.apple.node/.android.nodeartifacts.packages/ferric-examplewithversionandfilesentries..gitignoreto includebuild/innode-addon-examples.Written by Cursor Bugbot for commit 178c7ea. This will update automatically on new commits. Configure here.