GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tools: build all.json by combining generated JSON by rubys · Pull Request #21637 · nodejs/node

Conversation

@rubys

@rubys rubys commented Jul 3, 2018

Copy link
Copy Markdown
Member

Notes:

  1. Removed a number of root properties that did not seem relevant: source,
    desc, and introduced_in. There no longer is a source, and the other two are
    from the first include and do not reflect the entire API.

  2. As with doc: all.html is seriously broken link-wise #20100, the current "desc"
    properties sometimes contained in-page links, other times referenced another
    page, and often did not match the links in the original HTML or JSON file.
    I chose to standardize on external links as "desc" values are isolated
    snippets as opposed to all.html which can be viewed as a standalone and self
    contained document.

  3. Eliminated preprocessing for @include entirely, including the test case
    for this function.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are updated
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. doc Issues and PRs related to Node.js documentation. tools Issues and PRs related to the tools directory. labels Jul 3, 2018
@rubys

rubys commented Jul 3, 2018

Copy link
Copy Markdown
Member Author

See #21568 (comment) for the original request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Jul 3, 2018

Copy link
Copy Markdown
Member

Not sure if @tolmasky or any of their RunKit colleagues will be able to test this ahead of time, but pinging anyway as their the one significant consumer of our docs-in-JSON-format that I'm aware of. (I don't know if this would help or not, but maybe it would help them if the resulting JSON could be stashed somewhere, maybe in a gist or something.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jul 3, 2018

Copy link
Copy Markdown
Contributor

What will happen with https://github.com/nodejs/node/blob/master/doc/api/index.md? It also contains one include directive.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rubys

rubys commented Jul 3, 2018

Copy link
Copy Markdown
Member Author

@Trott @tolmasky gist containing both what all.json will look like after this change, and a diff between what it looks like after vs what it looked like before.

@vsemozhetbyt good catch! Initial thoughts: _toc.md should be renamed to _index.md (overwriting this file). allhtml.js and alljson.js would need to be updated to read this data from its new location.

If you agree, I'll make this change and squash the commit.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jul 3, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Seems good, but we should also check mentions like this one:

node/tools/doc/html.js

Line 39 in 6e16ad7

const gtocPath = path.join(docPath, 'api', '_toc.md');

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rubys
rubys force-pushed the alljson branch 2 times, most recently from 95ad110 to 511f403 Compare July 3, 2018 19:04
@vsemozhetbyt

vsemozhetbyt commented Jul 3, 2018

Copy link
Copy Markdown
Contributor

I hope I will be able to review at the weekend. If anybody feels confident to review and land sooner please do)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Me1000

Me1000 commented Jul 3, 2018

Copy link
Copy Markdown

Hey all! I work on the RunKit team, thanks for the ping @Trott.

The new output looks like it contains all the existing data. If that is indeed the case (the output is quite large, so maybe I missed something) then it should be fairly easy for us consume the new format. :)

vsemozhetbyt reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jul 7, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

One breaking change in the index.html: previously, preprocess.js not only processed @include directives but also stripped the special comments (see commentExpr mentions in preprocess.js). Maybe we should make these comments formatted as HTML comments — these are just two lines in the index.md. Otherwise, they are rendered in the index.html:

cmm

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt
vsemozhetbyt reviewed Jul 7, 2018
View reviewed changes
Comment thread test/doctool/test-make-doc.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

It seems the parentheses are redundant now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tools/doc/alljson.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

global -> globals?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tools/doc/alljson.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

  1. initialize -> Initialize.
  2. Extra space between the sentences.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tools/doc/alljson.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

.replace('.html', '.json') seems erroneous here?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tools/doc/alljson.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

It seems this should be /<a href=\\"#/g, `<a href=\\"${href}#`, as double quotes are escaped in .json sources.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread tools/doc/alljson.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

seen[href] -> seen[json]?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rubys
rubys force-pushed the alljson branch from 511f403 to f2308dc Compare July 7, 2018 15:03
vsemozhetbyt
vsemozhetbyt reviewed Jul 7, 2018
View reviewed changes
Comment thread tools/doc/html.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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, it seems this line also need to be updated so that the new HTML comment from index.md could be excluded from all the docs except the index.html.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

I mean the .replace(/^@\/\/.*$/gm, '') part.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rubys
rubys force-pushed the alljson branch from f2308dc to f54c875 Compare July 7, 2018 17:26
vsemozhetbyt
vsemozhetbyt reviewed Jul 7, 2018
View reviewed changes
Comment thread tools/doc/html.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

(Just to prevent doubts: dotAll flag is supported since V8 6.2, so this line is backportable for Node.js 8 LTS.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rubys reacted with heart emoji
All reactions
  • ❤️ 1 reaction
vsemozhetbyt
vsemozhetbyt reviewed Jul 7, 2018
View reviewed changes
Comment thread tools/doc/alljson.js Outdated

@vsemozhetbyt vsemozhetbyt Jul 7, 2018

Copy link
Copy Markdown
Contributor

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.

Just one more significant nit I've found while diffing the old and new results: new all.json lacks the \n at the end of the file, just after the last }. So maybe it is worth to replace JSON.stringify(results, null, 2) with `${JSON.stringify(results, null, 2)}\n` to be on the safe side)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rubys rubys Jul 7, 2018

Copy link
Copy Markdown
Member Author

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.

Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vsemozhetbyt

vsemozhetbyt commented Jul 7, 2018

Copy link
Copy Markdown
Contributor

A note: amended commits are not reported to the people that are subscribed to a PR, so maybe it is worth to let everybody know about a new commit version by a comment)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rubys
tools: build all.json by combining generated JSON
7ac03da
Notes:

1) Removed a number of root properties that did not seem relevant: source,
   desc, and introduced_in.  There no longer is a source, and the other two are
   from the first include and do not reflect the entire API.

2) As with nodejs#20100, the current "desc"
   properties sometimes contained in-page links, other times referenced another
   page, and often did not match the links in the original HTML or JSON file.
   I chose to standardize on external links as "desc" values are isolated
   snippets as opposed to all.html which can be viewed as a standalone and self
   contained document.

3) Eliminated preprocessing for @include entirely, including the test case
   for this function.

4) _toc.md was renamed to index.md.

5) index comments no longer appear in embedded TOCs (left hand side column in
   the generated documentation.
@rubys
rubys force-pushed the alljson branch from f54c875 to 7ac03da Compare July 7, 2018 19:58
@rubys

rubys commented Jul 7, 2018

Copy link
Copy Markdown
Member Author

Perhaps I should just stop squashing commits.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt

vsemozhetbyt commented Jul 7, 2018

Copy link
Copy Markdown
Contributor

CI-lite: https://ci.nodejs.org/job/node-test-pull-request-lite/904/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt
vsemozhetbyt approved these changes Jul 7, 2018
View reviewed changes
@vsemozhetbyt vsemozhetbyt added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jul 7, 2018
@vsemozhetbyt

vsemozhetbyt commented Jul 7, 2018

Copy link
Copy Markdown
Contributor

Let's land this on Monday, maybe somebody from @nodejs/documentation will want to chime in.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott
Trott approved these changes Jul 7, 2018
View reviewed changes
vsemozhetbyt pushed a commit that referenced this pull request Jul 9, 2018
@rubys @vsemozhetbyt
tools: build all.json by combining generated JSON
0c743b5
Notes:

1) Removed a number of root properties that did not seem relevant:
   source, desc, and introduced_in.  There no longer is a source, and
   the other two are from the first include and do not reflect the
   entire API.

2) As with #20100, the current
   "desc" properties sometimes contained in-page links, other times
   referenced another page, and often did not match the links in the
   original HTML or JSON file. I chose to standardize on external links
   as "desc" values are isolated snippets as opposed to all.html which
   can be viewed as a standalone and self contained document.

3) Eliminated preprocessing for @include entirely, including the test
   case for this function.

4) _toc.md was renamed to index.md.

5) index comments no longer appear in embedded TOCs (left hand side
   column in the generated documentation.

PR-URL: #21637
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@vsemozhetbyt

vsemozhetbyt commented Jul 9, 2018

Copy link
Copy Markdown
Contributor

Landed in 0c743b5
Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsemozhetbyt vsemozhetbyt closed this Jul 9, 2018
@vsemozhetbyt vsemozhetbyt mentioned this pull request Jul 9, 2018
Creating a branch of the Docs using RunKit #21723
Closed
targos pushed a commit that referenced this pull request Jul 12, 2018
@rubys @targos
tools: build all.json by combining generated JSON
b9bbbbe
Notes:

1) Removed a number of root properties that did not seem relevant:
   source, desc, and introduced_in.  There no longer is a source, and
   the other two are from the first include and do not reflect the
   entire API.

2) As with #20100, the current
   "desc" properties sometimes contained in-page links, other times
   referenced another page, and often did not match the links in the
   original HTML or JSON file. I chose to standardize on external links
   as "desc" values are isolated snippets as opposed to all.html which
   can be viewed as a standalone and self contained document.

3) Eliminated preprocessing for @include entirely, including the test
   case for this function.

4) _toc.md was renamed to index.md.

5) index comments no longer appear in embedded TOCs (left hand side
   column in the generated documentation.

PR-URL: #21637
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@targos targos removed the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jul 12, 2018
@vsemozhetbyt vsemozhetbyt mentioned this pull request Jul 14, 2018
test/doctool/test-make-doc.js fails if .DS_Store exists #21519
Closed
@targos targos mentioned this pull request Jul 17, 2018
v10.7.0 proposal #21851
Merged
This was referenced Jul 18, 2018
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#207
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#208
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#209
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#210
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#211
Closed
@mcollina mcollina mentioned this pull request Jul 20, 2018
test: unclear error with _toc.html #21912
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Trott Trott Trott approved these changes
+1 more reviewer
@vsemozhetbyt vsemozhetbyt vsemozhetbyt approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. doc Issues and PRs related to Node.js documentation. tools Issues and PRs related to the tools directory.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@rubys @Trott @vsemozhetbyt @Me1000 @targos @nodejs-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.