Skip to content

Comments

[_] add inlineOnly#29

Merged
TamaraFinogina merged 2 commits intomasterfrom
fix_npm_build
Feb 19, 2026
Merged

[_] add inlineOnly#29
TamaraFinogina merged 2 commits intomasterfrom
fix_npm_build

Conversation

@TamaraFinogina
Copy link
Contributor

@TamaraFinogina TamaraFinogina commented Feb 18, 2026

Description

Fix npm warning to enable release

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

unit tests

@TamaraFinogina TamaraFinogina changed the title [_] add inlineOnle [_] add inlineOnly Feb 18, 2026
@TamaraFinogina TamaraFinogina self-assigned this Feb 18, 2026
tsdown.config.ts Outdated
treeshake: true,
outDir: 'dist',
dts: true,
inlineOnly: false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if it's better to make 'hash-wasm' external or bundle it

Copy link
Contributor

@larryrider larryrider Feb 19, 2026

Choose a reason for hiding this comment

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

what is the difference between them? (pros vs cons)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I get it: one is clean, and has no external dependencies (current one), another is (with hash-wasm made external) will require any library that uses internxt-crypto to install hash-wasm as a dependency. In theory the second way can prevent double loading and be easier if different builders are used. But not sure

Copy link

Choose a reason for hiding this comment

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

I will left it bundled in order to avoid future incompatible issues in different hash-wasm versions (as we have in crypto-js in another projects with 4.2 and <4.2.
Also I think better to change inlineOnly, InlineOnly: false silences the warning, if another dep is bundled in the future, there will be nothing to detect it.
A more robust alternative would be: inlineOnly: [“hash-wasm”]
This also removes the warning, but also acts as a whitelist, if any other node_modules package is accidentally bundled, tsdown will throw an error in the build

Copy link
Contributor

Choose a reason for hiding this comment

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

i see, lets let it bundle and we'll see

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sonarqubecloud
Copy link

@TamaraFinogina TamaraFinogina merged commit e96e071 into master Feb 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants