1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(ext/node): throw when loading cpu-features module (#25257)

It crashes because of NAN usage, we want to trigger the fallback case in
ssh2 by throwing an error.

Fixes https://github.com/denoland/deno/issues/25236
This commit is contained in:
Divy Srivastava 2024-08-28 18:03:15 +05:30 committed by Luca Casonato
parent 8db5e9bbe1
commit 14e9b5049d
No known key found for this signature in database
GPG key ID: 01A83EB62563811F

View file

@ -1121,6 +1121,9 @@ Module._extensions[".json"] = function (module, filename) {
// Native extension for .node
Module._extensions[".node"] = function (module, filename) {
if (filename.endsWith("cpufeatures.node")) {
throw new Error("Using cpu-features module is currently not supported");
}
module.exports = op_napi_open(
filename,
globalThis,