From 1c21fbfa9aa82e33576e759325e000c3b18ae4cc Mon Sep 17 00:00:00 2001 From: Axel Kittenberger Date: Fri, 31 Mar 2023 14:24:30 +0200 Subject: [PATCH] doc: vm.SourceTextModule() without context option Explaining that vm.SourceTextModule() is able to evaluate in current context if non is given Fixes: https://github.com/nodejs/node/issues/47280 PR-URL: https://github.com/nodejs/node/pull/47295 Reviewed-By: Debadree Chatterjee Reviewed-By: Luigi Pinca Reviewed-By: Ben Noordhuis Reviewed-By: Chengzhong Wu --- doc/api/vm.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/vm.md b/doc/api/vm.md index d7e72ab42e3de6..eff0d4a848f79a 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -745,6 +745,8 @@ changes: `cachedData` was created. * `context` {Object} The [contextified][] object as returned by the `vm.createContext()` method, to compile and evaluate this `Module` in. + If no context is specified, the module is evaluated in the current + execution context. * `lineOffset` {integer} Specifies the line number offset that is displayed in stack traces produced by this `Module`. **Default:** `0`. * `columnOffset` {integer} Specifies the first-line column number offset that