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

Bring the doctool up to date on v4.x #7668

Merged
merged 20 commits into from
Jul 12, 2016

Conversation

addaleax
Copy link
Member

Backport:

I’m sorry.

@addaleax addaleax added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. v4.x labels Jul 12, 2016
@nodejs-github-bot nodejs-github-bot added http Issues or PRs related to the http subsystem. util Issues and PRs related to the built-in util module. build Issues and PRs related to build files or the CI. labels Jul 12, 2016
@MylesBorins
Copy link
Contributor

WOWOW code forensics.

So this biggest question for me in all this is if we want to include 294d370 as it is semver-minor

/cc @nodejs/lts

Perhaps we should talk about this big backport briefly on the call on Wednesday (adding label)

@addaleax
Copy link
Member Author

So this biggest question for me in all this is if we want to include 294d370 as it is semver-minor

I was assuming that, yes. It’s definitely non-essential here, but I saw an opportunity to do something that basically just made sense.

@addaleax
Copy link
Member Author

Rebased against the current v4.x-staging, CI: https://ci.nodejs.org/job/node-test-commit/4070/

@MylesBorins
Copy link
Contributor

@addaleax I'm going to request another rebase here and to drop 294d370. I don't think that is a valid candidate for LTS

You may find a spurious test: http commit after the rebase, so keep an eye out. Thanks for the patience

@addaleax addaleax removed the http Issues or PRs related to the http subsystem. label Jul 12, 2016
@addaleax
Copy link
Member Author

Rebased & removed the HTTP commit.

addaleax and others added 8 commits July 12, 2016 19:49
Add a hack js-yaml module to the doctool dependencies that simply
loads the one that’s included with eslint.

This helps avoiding to check in the whole dependency tree into
the core repo.

PR-URL: nodejs#6495
Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
This commit introduces the Documentation YAML metadata concept to the
documentation.

- Parses added or Added for HTML
- Parses all data for JSON

Ref: nodejs#3867
Ref: nodejs#3713
Ref: nodejs#6470
PR-URL: nodejs#6495
Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Add checks that make sure the doctool parses metadata correctly.

PR-URL: nodejs#6495
Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Allow multiple `added:` version entries, since semver-minors
can trickle down to previous major versions, and thus
features may have been added in multiple versions.

Also include `deprecated:` entries and apply the same logic
to them for consistency.

Stylize the added HTML as `Added in:` and `Deprecated since:`.

PR-URL: nodejs#6495
Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Update module marked. Customize renderer to remove id from heading.

PR-URL: nodejs#6396
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
There has been occasional nits for spacing in object literals in PRs but
the project does not lint for it and it is not always handled
consistently in the existing code, even on adjacent lines of a file.

This change enables a linting rule requiring no space between the key
and the colon, and requiring at least one space (but allowing for more
so property values can be lined up if desired) between the colon and the
value. This appears to be the most common style used in the current code
base.

Example code the complies with lint rule:

    myObj = { foo: 'bar' };

Examples that do not comply with the lint rule:

    myObj = { foo : 'bar' };
    myObj = { foo:'bar' };

PR-URL: nodejs#6592
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Brian White <[email protected]>
bnoordhuis and others added 12 commits July 12, 2016 19:49
Use the overload of `v8::Function::NewInstance()` that returns a
`v8::MaybeLocal<v8::Object>`.  The overloads that return a simple
`v8::Local<v8::Object>` are deprecated.

PR-URL: nodejs#6652
Reviewed-By: Anna Henningsen <[email protected]>
* Make the 'extract embedded addons in the documentations' step a normal
  prerequisite.  As an order-only prerequisite, it's sometimes skipped
  when it shouldn't be.

* Make `tools/doc/addon-verify.js` a dependency of that step.  Changes
  to that file should result in a rebuild.

PR-URL: nodejs#6652
Reviewed-By: Anna Henningsen <[email protected]>
Introduced in commit 3f69ea5 ("tools: update marked dependency"), it
stopped the embedded addons in the documentation from getting built.

PR-URL: nodejs#6652
Reviewed-By: Ben Noordhuis <[email protected]>
Allows building just docs using existing Node instead of building Node
first.

PR-URL: nodejs#3888
Reviewed-By: Chris Dickinson <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
101dd1e introduced a regression in the doctool. This commit reverts
the changes that were made to the function signature of the various
doctool functions while maintaining support for passing in specific
node versions.

Refs: nodejs@101dd1e

PR-URL: nodejs#6680
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Robert Lindstaedt <[email protected]>
Adjust style in doctool tests to conform with predominant style of the
rest of the project. The biggest changes are:

* Replace string concatenation with `path.join()`
* Remove unnecessary quotes from property names

PR-URL: nodejs#6719
Reviewed-By: James M Snell <[email protected]>
These signatures were originally converted to opts hashes in nodejs#3888. That
change was misinterpreted as the intrinsic cause of a test failure and
reverted in nodejs#6680.

PR-URL: nodejs#6690
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Previously, output files which were created using includes (notably,
the single-page all.html) had basically broken internal links all
over the place because references like `errors.html#errors_class_error`
are being used, yet `id` attributes were generated that looked like
`all_class_error`.

This PR adds generation of comments from the include preprocessor
that indicate from which file the current markdown bits come and
lets the HTML output generation take advantage of that so that more
appropriate `id` attributes can be generated.

PR-URL: nodejs#6943
Reviewed-By: Robert Jefe Lindstaedt <[email protected]>
Reviewed-By: Daniel Wang <[email protected]>
Ref: nodejs#6578
PR-URL: nodejs#6864
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Add a `REPLACEME` tag that should be used when introducing
docs for new features, so that they can be updated when releases
are made.

Ref: nodejs#6578
PR-URL: nodejs#6864
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Skip the doctool tests when js-yaml, which is currently `require()`d
from the eslint source tree, is missing. This can happen, for example,
because eslint is not included in the release source tarballs.

Fixes: nodejs#7201
Ref: nodejs#6495
PR-URL: nodejs#7218
Reviewed-By: Roman Reiss <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
After the nodejs#3888 it was not possible to "make doc-only"
in some situations. This now fallsback to any installed
node version and throws "node not found" in error case.

Ref: nodejs#3888

PR-URL: nodejs#6906
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@MylesBorins MylesBorins merged commit 76c7918 into nodejs:v4.x-staging Jul 12, 2016
@addaleax addaleax deleted the backport-doctool-stuff branch July 12, 2016 18:00
@MylesBorins MylesBorins removed their assignment Dec 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants