diff --git a/.changes/build-fix.md b/.changes/build-fix.md new file mode 100644 index 000000000..1166ebade --- /dev/null +++ b/.changes/build-fix.md @@ -0,0 +1,6 @@ + +--- +"nodejs-binding": patch +--- + +Run tsc before publishing. diff --git a/.changes/config.json b/.changes/config.json index 3107b42ff..9ecea3814 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -21,6 +21,12 @@ { "command": "dasel put string -f Cargo.toml '.dependencies.iota-client.features.[1]' mqtt" }, + { + "command": "yarn --ignore-scripts" + }, + { + "command": "tsc" + }, { "command": "cat Cargo.toml" } diff --git a/client/bindings/nodejs/jest.config.js b/client/bindings/nodejs/jest.config.js index 3c4eec214..d82be59e0 100644 --- a/client/bindings/nodejs/jest.config.js +++ b/client/bindings/nodejs/jest.config.js @@ -4,6 +4,6 @@ module.exports = { testEnvironment: 'node', testMatch: ['/test/**/*.(test|spec).ts'], moduleNameMapper: { - 'index.node': '/index.node', + 'index.node': '/build/Release/index.node', }, }; diff --git a/client/bindings/nodejs/lib/bindings.ts b/client/bindings/nodejs/lib/bindings.ts index 864265ee0..e3545183f 100644 --- a/client/bindings/nodejs/lib/bindings.ts +++ b/client/bindings/nodejs/lib/bindings.ts @@ -4,7 +4,7 @@ import type { MessageHandler } from './MessageHandler'; // @ts-ignore: path is set to match runtime transpiled js path -import addon = require('../../index.node'); +import addon = require('../../build/Release/index.node'); const { initLogger, sendMessage, messageHandlerNew, listen } = addon; diff --git a/client/bindings/nodejs/types/generateAddressesOptions.ts b/client/bindings/nodejs/types/generateAddressesOptions.ts index 64f23f870..42075514e 100644 --- a/client/bindings/nodejs/types/generateAddressesOptions.ts +++ b/client/bindings/nodejs/types/generateAddressesOptions.ts @@ -1,7 +1,6 @@ // Copyright 2021-2022 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 import type { CoinType } from '../lib'; -import type { Network } from './network'; import type { IRange } from './range'; /**