doc: fix, unify, formalize, and amplify vm.md#25422
doc: fix, unify, formalize, and amplify vm.md#25422vsemozhetbyt wants to merge 2 commits intonodejs:masterfrom vsemozhetbyt:doc-vm-formalize
Conversation
`vm` module API heavily reuses common code, but the doc seems to be a bit out of date: some options are listed in wrong places, some options and history entries are missed. Also some fragments need to be formalized and unified.
|
cc @nodejs/documentation @nodejs/vm |
|
Pulling in @guybedford from #25421 (comment). He mentioned the It also looks like |
This comment has been minimized.
This comment has been minimized.
| * Returns: {Module Namespace Object|vm.SourceTextModule} Returning a | ||
| `vm.SourceTextModule` is recommended in order to take advantage of error | ||
| tracking, and to avoid issues with namespaces that contain `then` | ||
| function exports. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry I copied the wrong one, this should apply to the whole vm.sourceTextModule section.
The note above should apply only for the vm.Script option.
There was a problem hiding this comment.
Added in vm.Script() constructor and all concerned vm.runIn...() methods.
There was a problem hiding this comment.
vm.sourceTextModule already has experimental note.
| * Returns: {Module Namespace Object|vm.SourceTextModule} Returning a | ||
| `vm.SourceTextModule` is recommended in order to take advantage of error | ||
| tracking, and to avoid issues with namespaces that contain `then` | ||
| function exports. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
The note is added to all concerned places in a new commit. |
|
Landed in c69ea3b |
`vm` module API heavily reuses common code, but the doc seems to be a bit out of date: some options are listed in wrong places, some options and history entries are missed. Also some fragments need to be formalized and unified. PR-URL: #25422 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
`vm` module API heavily reuses common code, but the doc seems to be a bit out of date: some options are listed in wrong places, some options and history entries are missed. Also some fragments need to be formalized and unified. PR-URL: #25422 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
`vm` module API heavily reuses common code, but the doc seems to be a bit out of date: some options are listed in wrong places, some options and history entries are missed. Also some fragments need to be formalized and unified. PR-URL: nodejs#25422 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesvmmodule API heavily reuses common code, but the doc seems to be a bit out of date: some options are listed in wrong places, some options and history entries are missed.Also, some fragments need to be formalized and unified.