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

[Docs] Add missing metadata in page “using-npm/semver” to fix broken links and nav #1572

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/content/using-npm/semver.md
@@ -1,3 +1,9 @@
---
section: using-npm
title: semver
description: The semantic versioner for npm
---

semver(7) -- The semantic versioner for npm
===========================================

Expand Down
4 changes: 3 additions & 1 deletion test/tap/semver-doc.js
Expand Up @@ -5,8 +5,10 @@ test('semver doc is up to date', function (t) {
var moddoc = path.join(__dirname, '../../node_modules/semver/README.md')
var mydoc = path.join(__dirname, '../../docs/content/using-npm/semver.md')
var fs = require('fs')
var mod = fs.readFileSync(moddoc, 'utf8').replace(/semver\(1\)/, 'semver(7)')
var mod = fs.readFileSync(moddoc, 'utf8')
mod = mod.substr(mod.match(/^## Install$/m).index)
var my = fs.readFileSync(mydoc, 'utf8')
my = my.substr(my.match(/^## Install$/m).index)
t.equal(my, mod)
t.end()
})