Skip to content

Commit

Permalink
Fix nodejs package and path (#1341)
Browse files Browse the repository at this point in the history
* Fix path

* Fix published package

* Remove unused import
  • Loading branch information
Thoralf-M authored Oct 31, 2022
1 parent c5b53f4 commit f9efaf6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changes/build-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

---
"nodejs-binding": patch
---

Run tsc before publishing.
6 changes: 6 additions & 0 deletions .changes/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
2 changes: 1 addition & 1 deletion client/bindings/nodejs/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ module.exports = {
testEnvironment: 'node',
testMatch: ['<rootDir>/test/**/*.(test|spec).ts'],
moduleNameMapper: {
'index.node': '<rootDir>/index.node',
'index.node': '<rootDir>/build/Release/index.node',
},
};
2 changes: 1 addition & 1 deletion client/bindings/nodejs/lib/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion client/bindings/nodejs/types/generateAddressesOptions.ts
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down

0 comments on commit f9efaf6

Please sign in to comment.