From aaf225a2a0175178f3b55add5f20f16bdb8ef01c Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 6 Oct 2020 17:50:20 +0200 Subject: [PATCH] module: add setter for module.parent PR-URL: https://github.com/nodejs/node/pull/35522 Reviewed-By: Jan Krems Reviewed-By: Bradley Farias Reviewed-By: Richard Lau Reviewed-By: Ujjwal Sharma Reviewed-By: Benjamin Gruenbaum Reviewed-By: Anna Henningsen --- doc/api/modules.md | 2 +- lib/internal/modules/cjs/loader.js | 13 ++++++++++++- .../test-module-parent-setter-deprecation.js | 13 +++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-module-parent-setter-deprecation.js diff --git a/doc/api/modules.md b/doc/api/modules.md index 9138826fd2f9ee..05135fb0b7dec8 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -913,7 +913,7 @@ deprecated: The module that first required this one, or `null` if the current module is the entry point of the current process, or `undefined` if the module was loaded by -something that is not a CommonJS module (E.G.: REPL or `import`). Read only. +something that is not a CommonJS module (E.G.: REPL or `import`). ### `module.path`