Skip to content

Commit

Permalink
fix(bindings/nodejs): Resolve issues with prebuilt binaries and posti…
Browse files Browse the repository at this point in the history
…nstall scripts (#755)

* fix(bindings/nodejs): Resolve issues with locations of prebuilt binaries

* chore(bindings/nodejs): Bump prebuild-install to 6.1.4

* fix(bindings/nodejs): Use script for building from source

* fix(bindings/nodejs): Fix index.node paths

* chore: Add change file

* fix(bindings/nodejs): Fix postinstall scripts

The exit code was not being checked for commands called with spawnSync

* ci: Force CI to build Node.js bindings from source

* Fix Windows postinstall commands

Co-authored-by: Thoralf-M <[email protected]>
  • Loading branch information
rajivshah3 and Thoralf-M authored Feb 5, 2022
1 parent 01af056 commit ed4eb35
Show file tree
Hide file tree
Showing 14 changed files with 7,137 additions and 7,341 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-prebuilds-and-postinstall-scripts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nodejs-binding": patch
---

Fix prebuilt binaries and postinstall scripts
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ jobs:
${{ matrix.os }}-stable-cargo-build-node-target-
- name: Build nodejs binding
run: npm ci
run: npm ci --build-from-source
working-directory: bindings/nodejs

python-bindings:
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/lib/binding/account.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

const addon = require('../../index.node');
const addon = require('../../build/Release/index.node');
const utils = require('../utils.js');
const { SyncedAccount } = require('./syncedAccount.js');

Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/lib/binding/accountManager.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

const addon = require('../../index.node');
const addon = require('../../build/Release/index.node');
const utils = require('../utils.js');
const acc = require('./account.js');
const { SyncedAccount } = require('./syncedAccount.js');
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/lib/eventListener.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

const addon = require('../index.node');
const addon = require('../build/Release/index.node');
const { listen, eventListenerNew, removeEventListeners } = addon;

class EventListener {
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

const addon = require('../index.node');
const addon = require('../build/Release/index.node');
const mh = require('./messages/messageHandler.js');
const el = require('./eventListener.js');
const amm = require('./messages/accountManager.js');
Expand Down
2 changes: 1 addition & 1 deletion bindings/nodejs/lib/messages/messageHandler.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2021 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

const addon = require('../../index.node');
const addon = require('../../build/Release/index.node');
const utils = require('../utils.js');

let { sendMessage, messageHandlerNew } = addon;
Expand Down
Loading

0 comments on commit ed4eb35

Please sign in to comment.