Skip to content

Conversation

@mickael9
Copy link
Contributor

This is based on existing PR #168 by @MarshallOfSound

I rebased the original commits except for the one introducing the tests which I have rewritten

Instead of requiring an external library (ffi-napi), I created a dummy binding that node-pre-gyp can use as input with a predictable binding file path that won't depend on the platform.

@mickael9 mickael9 force-pushed the computed-node-gyp-build-path branch from 0d01d32 to 7d08ab2 Compare May 13, 2024 22:30
@mickael9 mickael9 changed the title Use computed node gyp build path fix: Use computed node gyp build path May 13, 2024
@mickael9 mickael9 force-pushed the computed-node-gyp-build-path branch from 7d08ab2 to 1035b59 Compare May 13, 2024 22:35
@mickael9 mickael9 changed the title fix: Use computed node gyp build path fix: Use computed node-gyp-build path May 13, 2024
@mickael9 mickael9 marked this pull request as ready for review May 13, 2024 22:45
@mickael9 mickael9 requested review from Timer and styfle as code owners May 13, 2024 22:45
Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@styfle
Copy link
Member

styfle commented May 16, 2024

Looks like like we need to upgrade node

@styfle styfle merged commit 5704e33 into vercel:main May 16, 2024
@github-actions
Copy link

🎉 This PR is included in version 1.7.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

styfle added a commit that referenced this pull request Jul 4, 2025
…#198)

Extracted from #194

This is taking advantage of #185, which used a function in
node-gyp-build to compute the path. Some moons ago,
[node-gyp-build.js#L62-L75](https://github.com/prebuild/node-gyp-build/blob/v4.8.4/node-gyp-build.js#L62-L75)
was updated with a function to resolve native addons from the prebuilds
directory. All we have to do here is update `node-gyp-build`.

This enables assets relocation for packages like [bcrypt
v6.0.0](https://www.npmjs.com/package/bcrypt?activeTab=code)

I added some tests according to the platform used in CI. Hopefully, the
architecture and the fixtures align well.

---------

Co-authored-by: Steven <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants