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 <debadree333@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
This commit is contained in:
Axel Kittenberger 2023-03-31 14:24:30 +02:00 committed by GitHub
parent b541d2c7e9
commit b74b9ddb7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -747,6 +747,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