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: clarify use of timeout option in vm #23512

Closed
wants to merge 1 commit into from
Closed

doc: clarify use of timeout option in vm #23512

wants to merge 1 commit into from

Conversation

vdeturckheim
Copy link
Member

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

This clarifies the use of the timeout option in the vm module. This number always must be a strictly positive integer otherwise it results in a TypeError

@vdeturckheim vdeturckheim added doc Issues and PRs related to the documentations. vm Issues and PRs related to the vm subsystem. labels Oct 12, 2018
@targos targos removed code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. labels Oct 12, 2018
Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Does it already throw in all cases if the value is not a positive integer?

@vdeturckheim
Copy link
Member Author

@targos I believe so. I tested 0, 0.1, 10.1 and they all failled

@vsemozhetbyt
Copy link
Contributor

Maybe it is worth to replace the {number} type with {integer} type then?

@vdeturckheim
Copy link
Member Author

@vsemozhetbyt do you know if we use it somewhere else in the doc? From a js perspective, the argument is of type number

@vsemozhetbyt
Copy link
Contributor

FWIW, we have it as a hint in tools/doc/type-parser.js:

integer: 'Number', // Not a primitive, used for clarification.

And we use it in docs:

https://github.com/nodejs/node/search?l=Markdown&q=%7Binteger%7D

@vdeturckheim
Copy link
Member Author

Make sense! I'll update :) Thanks for pointing it!

This updates the documentation
to clarify how to use `timeout`
in the vm module.
@vdeturckheim
Copy link
Member Author

I am not sure why CI considers the subsystem is missing 🤔

@mmarchini
Copy link
Contributor

I am not sure why CI considers the subsystem is missing 🤔

I saw this on other PRs as well. Probably something wrong with our .travis.yml file.

@vdeturckheim
Copy link
Member Author

Let's restart CI when #23739 (review) is merged then

@Trott
Copy link
Member

Trott commented Nov 6, 2018

@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 6, 2018
@Trott
Copy link
Member

Trott commented Nov 6, 2018

Landed in 278086a

@Trott Trott closed this Nov 6, 2018
Trott pushed a commit to Trott/io.js that referenced this pull request Nov 6, 2018
This updates the documentation
to clarify how to use `timeout`
in the vm module.

PR-URL: nodejs#23512
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
targos pushed a commit that referenced this pull request Nov 6, 2018
This updates the documentation
to clarify how to use `timeout`
in the vm module.

PR-URL: #23512
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
codebytere pushed a commit that referenced this pull request Nov 29, 2018
This updates the documentation
to clarify how to use `timeout`
in the vm module.

PR-URL: #23512
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
MylesBorins pushed a commit that referenced this pull request Nov 29, 2018
This updates the documentation
to clarify how to use `timeout`
in the vm module.

PR-URL: #23512
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@codebytere codebytere mentioned this pull request Nov 29, 2018
MylesBorins pushed a commit that referenced this pull request Dec 3, 2018
This updates the documentation
to clarify how to use `timeout`
in the vm module.

PR-URL: #23512
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
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. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants