From 700cd200c18d4a54f98c3633b898236038e8e550 Mon Sep 17 00:00:00 2001 From: snek Date: Tue, 25 Jun 2024 11:17:35 -0700 Subject: [PATCH] feat: add module.parent (#24333) This field is deprecated but still used by the ecosystem, so let's just support it. --- ext/node/polyfills/01_require.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index 10e89b3399..bdd91e0b44 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -475,6 +475,7 @@ function Module(id = "", parent) { updateChildren(parent, this, false); this.filename = null; this.loaded = false; + this.parent = parent; this.children = []; }