Restore Apple framework symlinks #302
Merged
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.