Skip to content
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

Closed
wants to merge 2 commits into from
Closed

doc: fix, unify, formalize, and amplify vm.md #25422

wants to merge 2 commits into from

Conversation

vsemozhetbyt
Copy link
Contributor

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

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.

`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.
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Jan 9, 2019
@vsemozhetbyt
Copy link
Contributor Author

cc @nodejs/documentation @nodejs/vm

@vsemozhetbyt vsemozhetbyt added the vm Issues and PRs related to the vm subsystem. label Jan 9, 2019
@jdalton
Copy link
Member

jdalton commented Jan 10, 2019

Pulling in @guybedford from #25421 (comment). He mentioned the importModuleDynamically could be considered experimental. I don't see it documented as such and I've heard mixed messaging on it so I think we should clarify.

It also looks like importModuleDynamically doesn't work without --experimental-modules to enable experimental ESM support so that should probably be documented as well.

@vsemozhetbyt

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

@vsemozhetbyt vsemozhetbyt Jan 10, 2019

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.

@vsemozhetbyt
Copy link
Contributor Author

The note is added to all concerned places in a new commit.

@vsemozhetbyt vsemozhetbyt added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 11, 2019
@vsemozhetbyt
Copy link
Contributor Author

@vsemozhetbyt
Copy link
Contributor Author

Landed in c69ea3b
Thank you for the reviews.

@vsemozhetbyt vsemozhetbyt deleted the doc-vm-formalize branch January 11, 2019 20:27
vsemozhetbyt added a commit that referenced this pull request Jan 11, 2019
`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>
addaleax pushed a commit that referenced this pull request Jan 14, 2019
`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>
@BridgeAR BridgeAR mentioned this pull request Jan 16, 2019
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
`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>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants