Skip to content

Conversation

rubys
Copy link
Member

@rubys rubys commented Jul 12, 2018

The current marked based implementation of json generation has code in place to flag invalid parameters; unfortunately that code is regularly defeated by a statement that immediately precedes it that will create an empty definition. The only use case I could find for such was for a single occurrence of a ...rest parameter. In my remark implementation, I've tightened up the check, and this commit will provide the necessary definitions. If that is not desired, I will withdraw this pull request and loosen up the check.

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

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Jul 12, 2018
doc/api/http.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should be using asterisks instead for consistency. This might mean the options and requestListener lines should be changed instead.

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

LGTM with @mscdex's nit addressed

doc/api/net.md Outdated
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt Jul 12, 2018

Choose a reason for hiding this comment

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

Should be {Object} in all places, only primitive values are lowercased. See tools/doc/type-parser.js if in doubt. (The build failure in CI is due to this check.)

Copy link
Contributor

@vsemozhetbyt vsemozhetbyt left a comment

Choose a reason for hiding this comment

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

Some nits.

doc/api/net.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

`utf8` -> `'utf8'`?

Copy link
Contributor

@vsemozhetbyt vsemozhetbyt Jul 12, 2018

Choose a reason for hiding this comment

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

This means an array of integers, but the description below states this can be a number or a string?

doc/api/util.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

A tricky one. It seems this should be {any}, as formally the function accepts any types including even undefined, and returns a valid answer in all cases.

The same seems true for other similar cases below.

doc/api/v8.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems this function also accepts {any}.

doc/api/v8.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto (not full {any} (no symbols, for example), but a comment below warns about this, so we can state {any} to include primitives).

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should also add a comment right here?

Copy link
Member Author

Choose a reason for hiding this comment

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

@BridgeAR: please explain?

Copy link
Member

Choose a reason for hiding this comment

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

I was just wondering about adding the same warning that describes the details here as well when changing it to {any}. Or we could just move that part.

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

LGTM with the comments addressed.

doc/api/net.md Outdated
Copy link
Member

Choose a reason for hiding this comment

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

This likely has to be shortened to below 80 characters.

doc/api/v8.md Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should also add a comment right here?

@BridgeAR
Copy link
Member

This is great work! Thanks a lot :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

{integer | string} ?

@vsemozhetbyt
Copy link
Contributor

This needs rebasing and addressing the nit)

@vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt
Copy link
Contributor

Node.js Collaborators, please, add 👍 here if you approve fast-tracking.

@vsemozhetbyt vsemozhetbyt added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 14, 2018
vsemozhetbyt pushed a commit that referenced this pull request Jul 15, 2018
PR-URL: #21782
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
@vsemozhetbyt
Copy link
Contributor

Landed in 40c85ff
Thank you!

@targos
Copy link
Member

targos commented Jul 16, 2018

Depends on #21616 to land on v10.x-staging.

@targos targos removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 24, 2018
targos pushed a commit that referenced this pull request Aug 7, 2018
PR-URL: #21782
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
rvagg pushed a commit that referenced this pull request Aug 13, 2018
PR-URL: #21782
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
tniessen added a commit to tniessen/node that referenced this pull request Dec 28, 2019
OpenSSL does not provide a straight-forward way to implement a
non-integer generator, so createDiffieHellman never supported anything
other than a number as the generator. (This only applies to the
signature where the first argument is the size of the prime, and
therefore a number.)

Refs: nodejs/node-v0.x-archive#7086
Refs: nodejs#21782
Trott pushed a commit that referenced this pull request Dec 30, 2019
OpenSSL does not provide a straight-forward way to implement a
non-integer generator, so createDiffieHellman never supported anything
other than a number as the generator. (This only applies to the
signature where the first argument is the size of the prime, and
therefore a number.)

Refs: nodejs/node-v0.x-archive#7086
Refs: #21782

PR-URL: #31121
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
BridgeAR pushed a commit that referenced this pull request Jan 3, 2020
OpenSSL does not provide a straight-forward way to implement a
non-integer generator, so createDiffieHellman never supported anything
other than a number as the generator. (This only applies to the
signature where the first argument is the size of the prime, and
therefore a number.)

Refs: nodejs/node-v0.x-archive#7086
Refs: #21782

PR-URL: #31121
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
targos pushed a commit that referenced this pull request Jan 14, 2020
OpenSSL does not provide a straight-forward way to implement a
non-integer generator, so createDiffieHellman never supported anything
other than a number as the generator. (This only applies to the
signature where the first argument is the size of the prime, and
therefore a number.)

Refs: nodejs/node-v0.x-archive#7086
Refs: #21782

PR-URL: #31121
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
OpenSSL does not provide a straight-forward way to implement a
non-integer generator, so createDiffieHellman never supported anything
other than a number as the generator. (This only applies to the
signature where the first argument is the size of the prime, and
therefore a number.)

Refs: nodejs/node-v0.x-archive#7086
Refs: #21782

PR-URL: #31121
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
firass111 pushed a commit to firass111/Project_node1 that referenced this pull request Apr 16, 2025
PR-URL: nodejs/node#21782
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants