Classify only a native addon refusal as one

The computed createRequire note main added ('…, such as a native addon,
ends the program') matched the native-addon pattern, so every package with
a computed require became a runtime island; it is a deferred gap now, like
other fences that may never run.
This commit is contained in:
Malte Ubl
2026-10-26 16:01:09 -07:00
parent 69ecfbe1fa
commit 2d264e2401
@@ -25,7 +25,7 @@ const MESSAGE_REASONS: { code: string; pattern: RegExp; reason: string }[] = [
pattern: /createRequire's require with this argument shape/,
reason: "dynamic-require",
},
{ code: "SC2020", pattern: /native addon/, reason: "native-addon" },
{ code: "SC2020", pattern: /^native addon /, reason: "native-addon" },
{
code: "SC2020",
pattern: /through require\.cache|require\.extensions|Module\._|module\.register/,