Skip to content

Commit

Permalink
Re-enable node-gyp-build as fallback.
Browse files Browse the repository at this point in the history
Needed for ARM, which is presently not supported by prebuildify due to lack of official node builds:
nodejs/node#25998
  • Loading branch information
simonbuchan committed Jul 16, 2022
1 parent ec2ff8d commit 2627e8b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.*/
!/.idea/
/.idea/workspace.xml
/binding/build/
/binding/prebuilds/
/build/
/prebuilds/
/lib/
node_modules/
yarn-error.log*
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Restored node-gyp-build as a fallback for prebuildify on unsupported platforms. Unfortunately this does
add the otherwise unnecessary `node-addon-api` dependency, about ~400kb.

## [v1.0.0] - 2021-10-22

No effective changes, bumping to v1.0.0 to reflect that the library should be considered stable at this point.
Expand Down
File renamed without changes.
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "native-reg",
"description": "Native in-process low-level windows registry access.",
"version": "1.0.0",
"version": "1.1.0-alpha.0",
"repository": "https://github.com/simonbuchan/native-reg",
"bugs": "https://github.com/simonbuchan/native-reg/issues",
"license": "MIT",
Expand All @@ -13,33 +13,32 @@
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"gypfile": false,
"files": [
"lib",
"src",
"test",
"binding/prebuilds",
"binding/binding.gyp",
"prebuilds",
"binding.gyp",
"*.cc"
],
"scripts": {
"install": "echo using prebuilds",
"install": "node-gyp-build",
"prepack": "yarn rebuild",
"rebuild": "yarn clean && yarn build && yarn test",
"clean": "rimraf build lib prebuilds",
"build": "yarn build:js && yarn build:ia32 && yarn build:x64",
"build:js": "tsc -p src",
"build:ia32": "prebuildify --napi --target node@12.0.0 --cwd binding --arch ia32",
"build:x64": "prebuildify --napi --target node@12.0.0 --cwd binding --arch x64",
"build:ia32": "prebuildify --napi --target node@12.0.0 --arch ia32",
"build:x64": "prebuildify --napi --target node@12.0.0 --arch x64",
"test": "mocha --ui tdd"
},
"dependencies": {
"node-gyp-build": "4"
"node-gyp-build": "4",
"node-addon-api": "4"
},
"devDependencies": {
"@types/node": "12",
"mocha": "9",
"node-addon-api": "4",
"prebuildify": "4",
"rimraf": "3",
"typescript": "~4.4"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const types = require('util').types || {
};

const isWindows = process.platform === 'win32';
const native = isWindows && require('node-gyp-build')(__dirname + '/../binding');
const native = isWindows && require('node-gyp-build')(__dirname + "/..");

// from winreg.h
export enum HKEY {
Expand Down

0 comments on commit 2627e8b

Please sign in to comment.