doc: fix more type case inconsistencies #11697

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
9 participants
@silverwind
Contributor

silverwind commented Mar 5, 2017

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

Turns out I missed quite a few types in ff13619 because my sed skills weren't up to par. This commit should fix all remaining issues with primitive type cases.

I also made the syntax with multiple types consistent by removing any whitespace between curly braces. If more people prefer {type | type | type} over {type|type|type}, I can also change to that.

Type replacement was done with:

sed -i -E 's#(\{|\|)\s+?(Boolean|Null|Undefined|Number|String|Symbol)\s+?(\||\})#\1\L\2\3#g' *.md
@lpinca

lpinca approved these changes Mar 6, 2017

doc/api/buffer.md
@@ -508,7 +508,7 @@ added: v5.10.0
-->
* `size` {Integer} The desired length of the new `Buffer`
-* `fill` {string | Buffer | Integer} A value to pre-fill the new `Buffer` with.
+* `fill` {string|Buffer|Integer} A value to pre-fill the new `Buffer` with.

This comment has been minimized.

@TimothyGu

TimothyGu Mar 6, 2017

Member

Integer needs to be fixed as well

@TimothyGu

TimothyGu Mar 6, 2017

Member

Integer needs to be fixed as well

This comment has been minimized.

@silverwind

silverwind Mar 6, 2017

Contributor

Integer is not a valid type. Shall we change them all to number?

@silverwind

silverwind Mar 6, 2017

Contributor

Integer is not a valid type. Shall we change them all to number?

This comment has been minimized.

@addaleax

addaleax Mar 6, 2017

Member

I think it would make sense to be specific to keep Integer here because it doesn’t really make sense to pass in non-integer numbers here… the upper-casing is a bit weird but I’d be okay with it, as long as we try to be consistent

(also /cc @ameliavoncat whose awesome PRs also touch these parts of the docs and who might want to keep track of this discussion)

@addaleax

addaleax Mar 6, 2017

Member

I think it would make sense to be specific to keep Integer here because it doesn’t really make sense to pass in non-integer numbers here… the upper-casing is a bit weird but I’d be okay with it, as long as we try to be consistent

(also /cc @ameliavoncat whose awesome PRs also touch these parts of the docs and who might want to keep track of this discussion)

This comment has been minimized.

@silverwind

silverwind Mar 6, 2017

Contributor

Yeah, I guess it's better to keep it as-is. Per our rule discussed in the last PR, everything except the six primitives should be uppercased.

@silverwind

silverwind Mar 6, 2017

Contributor

Yeah, I guess it's better to keep it as-is. Per our rule discussed in the last PR, everything except the six primitives should be uppercased.

This comment has been minimized.

@TimothyGu

TimothyGu Mar 6, 2017

Member

@silverwind in your commit that changed the case in the doctool, Integer was changed to integer. Either way it doesn't seem right to me that number and integer have different cases.

@TimothyGu

TimothyGu Mar 6, 2017

Member

@silverwind in your commit that changed the case in the doctool, Integer was changed to integer. Either way it doesn't seem right to me that number and integer have different cases.

This comment has been minimized.

@silverwind

silverwind Mar 6, 2017

Contributor

I think I'll move it out of jsPrimitives and into typeMap, possibly linking it to number docs.

@silverwind

silverwind Mar 6, 2017

Contributor

I think I'll move it out of jsPrimitives and into typeMap, possibly linking it to number docs.

@addaleax addaleax referenced this pull request Mar 6, 2017

Closed

crypto: add sign/verify support for RSASSA-PSS #11705

4 of 4 tasks complete
doc/api/crypto.md
-* `key` : {String} - PEM encoded private key
-* `passphrase` : {String} - passphrase for the private key
+* `key` : {string} - PEM encoded private key
+* `passphrase` : {string} - passphrase for the private key

This comment has been minimized.

@addaleax

addaleax Mar 6, 2017

Member

Can you drop the spaces before the colons in this file? We don’t do that anywhere else in the docs

@addaleax

addaleax Mar 6, 2017

Member

Can you drop the spaces before the colons in this file? We don’t do that anywhere else in the docs

This comment has been minimized.

@silverwind

silverwind Mar 6, 2017

Contributor

done

@silverwind

silverwind Mar 6, 2017

Contributor

done

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind Mar 7, 2017

Contributor

@TimothyGu d5d4274 fixes the Integer inconsistency in the doctool. I also added the missing undefined type, which results in a few new links in the doc. I still think we should keep it at Integer because we only lowercase the six primitives.

Contributor

silverwind commented Mar 7, 2017

@TimothyGu d5d4274 fixes the Integer inconsistency in the doctool. I also added the missing undefined type, which results in a few new links in the doc. I still think we should keep it at Integer because we only lowercase the six primitives.

@silverwind silverwind referenced this pull request Mar 7, 2017

Closed

tools/doc: improvements for types #11167

3 of 3 tasks complete
@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Mar 7, 2017

Member

I still think we should keep it at Integer because we only lowercase the six primitives.

But the issue at hand is that an integer is expressed as a number primitive.

I also just looked at a proposal in TypeScript to add integral types, and though not yet accepted, it also uses lower cased type name (int). And AFAICT, there isn't any disagreement in that thread about its capitalization.

Member

TimothyGu commented Mar 7, 2017

I still think we should keep it at Integer because we only lowercase the six primitives.

But the issue at hand is that an integer is expressed as a number primitive.

I also just looked at a proposal in TypeScript to add integral types, and though not yet accepted, it also uses lower cased type name (int). And AFAICT, there isn't any disagreement in that thread about its capitalization.

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind Mar 7, 2017

Contributor

@TimothyGu okay, lowercased integer. I guess a argument could be made about it not being a valid constructor. It's really a odd type, but I see its value in documentation.

Contributor

silverwind commented Mar 7, 2017

@TimothyGu okay, lowercased integer. I guess a argument could be made about it not being a valid constructor. It's really a odd type, but I see its value in documentation.

@jasnell

jasnell approved these changes Mar 7, 2017

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind Mar 8, 2017

Contributor

Landed in 5f32024.

Contributor

silverwind commented Mar 8, 2017

Landed in 5f32024.

@silverwind silverwind closed this Mar 8, 2017

silverwind added a commit that referenced this pull request Mar 8, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

@silverwind silverwind deleted the silverwind:type-fixes-part-2 branch Mar 8, 2017

silverwind added a commit to silverwind/io.js that referenced this pull request Mar 8, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

italoacasas added a commit to italoacasas/node that referenced this pull request Mar 13, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

jungx098 added a commit to jungx098/node that referenced this pull request Mar 21, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
@MylesBorins

This comment has been minimized.

Show comment
Hide comment
@MylesBorins

MylesBorins Apr 17, 2017

Member

Do we want to backport to v6.x?

Member

MylesBorins commented Apr 17, 2017

Do we want to backport to v6.x?

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind Apr 19, 2017

Contributor

I'd say it's not strictly necessary, but it could make landing future doc backports easier.

Ideally, these commits should be landed in tandem:

ff13619
9be03a2
172be50
5f32024

Contributor

silverwind commented Apr 19, 2017

I'd say it's not strictly necessary, but it could make landing future doc backports easier.

Ideally, these commits should be landed in tandem:

ff13619
9be03a2
172be50
5f32024

@MylesBorins

This comment has been minimized.

Show comment
Hide comment
@MylesBorins

MylesBorins May 8, 2017

Member

@silverwind would you be willing to put together a PR with those commits?

Member

MylesBorins commented May 8, 2017

@silverwind would you be willing to put together a PR with those commits?

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind May 9, 2017

Contributor

@MylesBorins not right now, I'm busy on other projects. But if you can wait a bit, I can put something together later.

Contributor

silverwind commented May 9, 2017

@MylesBorins not right now, I'm busy on other projects. But if you can wait a bit, I can put something together later.

@silverwind

This comment has been minimized.

Show comment
Hide comment
@silverwind

silverwind May 16, 2017

Contributor

Backport in #13054

Contributor

silverwind commented May 16, 2017

Backport in #13054

gibfahn added a commit that referenced this pull request May 16, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Backport-PR-URL: #13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

MylesBorins added a commit that referenced this pull request May 18, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Backport-PR-URL: #13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

silverwind added a commit to silverwind/io.js that referenced this pull request May 18, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

gibfahn added a commit to gibfahn/node that referenced this pull request Jun 17, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: nodejs#11697
Backport-PR-URL: nodejs#13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

gibfahn added a commit that referenced this pull request Jun 20, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Backport-PR-URL: #13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

MylesBorins added a commit that referenced this pull request Jul 11, 2017

doc/tools: fix more type inconsistencies
- fix a number of uppercase types
- lowercase 'integer'
- consistent formatting in crypto

PR-URL: #11697
Backport-PR-URL: #13054
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>

@MylesBorins MylesBorins referenced this pull request Jul 18, 2017

Merged

v6.11.2 proposal #14356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment