Skip to content

fix: replace neon-js with neon-core and neon-api dependencies#52

Closed
raulduartep wants to merge 1 commit into
mainfrom
fix-neon-js-dependecy
Closed

fix: replace neon-js with neon-core and neon-api dependencies#52
raulduartep wants to merge 1 commit into
mainfrom
fix-neon-js-dependecy

Conversation

@raulduartep

@raulduartep raulduartep commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Since neon-js bundles its dependencies into a single file (index.js), it becomes impossible to patch specific libraries. For example, if you try to patch the noble/hashes package to use a native version in React Native, neon-js won’t use the patched version because it relies on its own bundled copy of the library.

Another issue this causes is TypeScript conflicts with types exported by neon-core. For example, if an app uses neon-dappkit and also depends on neon-core, both versions must match exactly. Even if you try to enforce this with overrides, it won’t work properly because neon-dappkit depends on neon-js, which bundles its own version of neon-core instead of using the one installed in the app.

I also removed the browser field from package.json, since it’s important to let consumers decide which patches or polyfills to use. For example, in React Native it’s better to use react-native-quick-crypto instead of crypto-browserify.

@raulduartep
raulduartep requested review from ixje and luc10921 and removed request for ixje April 13, 2026 20:15
Comment on lines +12 to +13
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-require-imports': 'off',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are you removing those rules?

@raulduartep raulduartep Apr 13, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These rules were added when I updated the typescript-eslint library. To avoid changing a large portion of the codebase, I’ve disabled them.

@raulduartep

Copy link
Copy Markdown
Contributor Author

I've closed this PR since it does not seems to fix the main problem with neon-js. I noticed that neon-core also bundle all dependency into it's bundle file.

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.

2 participants