-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utf-8-validate
doesn't work with bun install
due to not running postinstall script
#3497
Labels
bug
Something isn't working
Comments
This is due to #3288. This package depends on a native module and we aren't running postinstall for that right now |
bun install
due to not running postinstall script
bun install
due to not running postinstall scriptutf-8-validate
doesn't work with bun install
due to not running postinstall script
After #3498 lands, you can use this to validate utf8: import {isUtf8} from 'node:buffer' |
Merged
Jarred-Sumner
added a commit
that referenced
this issue
Aug 3, 2023
* Fix #3497 * Fix #3497 * Run prettier * Fix package.json * remove this too * yeah * Fix missing tests * Use native for utf-8-validate * Add module ID names to builtins * Defer evaluation of ESM & CJS modules until link time * Use builtin name for exports in plugins * Add module IDs to builtins * Update JSC build with new flag * WebKit upgrade fixes * Update WebKit * prettier * Upgrade WebKit * bump * Update once again * Add visitAdditionalChildren, remove .fill() usage * Update process.test.js * Update fs.test.ts --------- Co-authored-by: dave caruso <me@paperdave.net> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
trnxdev
pushed a commit
to trnxdev/bun
that referenced
this issue
Aug 9, 2023
* Fix oven-sh#3497 * Fix oven-sh#3497 * Run prettier * Fix package.json * remove this too * yeah * Fix missing tests * Use native for utf-8-validate * Add module ID names to builtins * Defer evaluation of ESM & CJS modules until link time * Use builtin name for exports in plugins * Add module IDs to builtins * Update JSC build with new flag * WebKit upgrade fixes * Update WebKit * prettier * Upgrade WebKit * bump * Update once again * Add visitAdditionalChildren, remove .fill() usage * Update process.test.js * Update fs.test.ts --------- Co-authored-by: dave caruso <me@paperdave.net> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version of Bun is running?
0.6.12
What platform is your computer?
Linux 5.15.0-76-generic x86_64 x86_64
What steps can reproduce the bug?
I have found this issue while trying to use the package
https://www.npmjs.com/package/utf-8-validate
After installing the package (with bun install utf-8-validate), just copy the example code there
in a file validate.js
and run it with bun validate.js
What is the expected behavior?
Under node (tested with version16.20-1) it prints "true" as documented in that page.
What do you see instead?
7 | console.log(isValidUTF8(buf));
^
TypeError: isValidUTF8 is not a function. (In 'isValidUTF8(buf)', 'isValidUTF8' is an instance of Object)
Additional information
Adding a console.log(isValidUTF8)
shows it is an anonymous function
[Function (anonymous)]
The text was updated successfully, but these errors were encountered: