-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: fix, unify, formalize, and amplify vm.md #25422
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in vm.Script()
constructor and all concerned vm.runIn...()
methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) passesvm
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.