From c1f23c578881b85ae79b524a60160d8f4fb7151b Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Sat, 8 Jun 2024 18:36:13 +0200 Subject: fix(ext/node): lossy UTF-8 read node_modules files (#24140) Previously various reads of files in `node_modules` would error on invalid UTF-8. These were cases involving: - reading package.json from Rust - reading package.json from JS - reading CommonJS files from JS - reading CommonJS files from Rust (for ESM translation) - reading ESM files from Rust --- tests/specs/npm/lossy_utf8_script/main.mjs | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tests/specs/npm/lossy_utf8_script/main.mjs (limited to 'tests/specs/npm/lossy_utf8_script/main.mjs') diff --git a/tests/specs/npm/lossy_utf8_script/main.mjs b/tests/specs/npm/lossy_utf8_script/main.mjs new file mode 100644 index 000000000..59fe555aa --- /dev/null +++ b/tests/specs/npm/lossy_utf8_script/main.mjs @@ -0,0 +1,3 @@ +import mod from "npm:@denotest/lossy-utf8-script@1.0.0"; + +console.log(mod); -- cgit v1.2.3