Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Mar 23, 2020
1 parent 5f736cc commit 6910784
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 47 deletions.
5 changes: 1 addition & 4 deletions lib/find/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,7 @@ function urlToPath(value, config) {
// the `foo/bar` branch, or, `baz` in the `bar` directory on the `foo`
// branch.
// Currently, we’re ignoring this and just not supporting branches.
value = value
.split(slash)
.slice(1)
.join(slash)
value = value.split(slash).slice(1).join(slash)

return normalize(path.resolve(config.root, value + url.hash), config)
}
Expand Down
5 changes: 1 addition & 4 deletions lib/find/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ var findRepo = require('./find-repo')
var config = require('./config')
var find = require('./find')

module.exports = trough()
.use(findRepo)
.use(config)
.use(find)
module.exports = trough().use(findRepo).use(config).use(find)
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function cliCompleter(set, next) {

function checkAll(files, next) {
// Check all references and landmarks.
check.run({files: files}, function(err) {
check.run({files: files}, function (err) {
next(err)
})
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"index.js"
],
"dependencies": {
"github-slugger": "^1.2.0",
"github-slugger": "^1.0.0",
"hosted-git-info": "^2.5.0",
"mdast-util-to-string": "^1.0.4",
"mdast-util-to-string": "^1.0.0",
"propose": "0.0.5",
"to-vfile": "^6.0.0",
"trough": "^1.0.0",
Expand All @@ -52,15 +52,15 @@
},
"devDependencies": {
"nyc": "^15.0.0",
"prettier": "^1.0.0",
"prettier": "^2.0.0",
"remark": "^11.0.0",
"remark-cli": "^7.0.0",
"remark-preset-wooorm": "^6.0.0",
"rimraf": "^3.0.0",
"strip-ansi": "^6.0.0",
"tape": "^4.0.0",
"vfile-sort": "^2.0.0",
"xo": "^0.25.0"
"xo": "^0.28.0"
},
"scripts": {
"format": "remark *.md -qfo && prettier --write \"**/*.js\" && xo --fix",
Expand Down
68 changes: 34 additions & 34 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ var links = require('..')

process.chdir(path.resolve(process.cwd(), 'test', 'fixtures'))

test.onFinish(function() {
test.onFinish(function () {
process.chdir(path.resolve(process.cwd(), '..', '..'))
})

var bin = path.join('..', '..', 'node_modules', '.bin', 'remark')

test('remark-validate-links', function(t) {
t.test('should work on the API', function(st) {
test('remark-validate-links', function (t) {
t.test('should work on the API', function (st) {
st.plan(1)

remark()
.use(links)
.use(sort)
.process(vfile.readSync('github.md'), function(err, file) {
.process(vfile.readSync('github.md'), function (err, file) {
st.deepEqual(
[err].concat(file.messages.map(String)),
[
Expand All @@ -42,7 +42,7 @@ test('remark-validate-links', function(t) {
})
})

t.test('should ignore invalid repositories', function(st) {
t.test('should ignore invalid repositories', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -77,7 +77,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should throw on Gist repositories', function(st) {
t.test('should throw on Gist repositories', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -112,7 +112,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should ignore unfound files (#1)', function(st) {
t.test('should ignore unfound files (#1)', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -147,7 +147,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should ignore unfound files (#2)', function(st) {
t.test('should ignore unfound files (#2)', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -186,7 +186,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work if there are no links', function(st) {
t.test('should work if there are no links', function (st) {
st.plan(1)

childProcess.exec(
Expand All @@ -212,7 +212,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work with stdin', function(st) {
t.test('should work with stdin', function (st) {
st.plan(1)

var subprocess = childProcess.exec(
Expand Down Expand Up @@ -248,7 +248,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work when not all files are given', function(st) {
t.test('should work when not all files are given', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -291,7 +291,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work when all files are given', function(st) {
t.test('should work when all files are given', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -342,7 +342,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work with definitions', function(st) {
t.test('should work with definitions', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -377,7 +377,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work on GitHub URLs when given a repo', function(st) {
t.test('should work on GitHub URLs when given a repo', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -445,7 +445,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work when with Git directory', function(st) {
t.test('should work when with Git directory', function (st) {
st.plan(1)

childProcess.exec('git init', oninit)
Expand Down Expand Up @@ -538,7 +538,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should fail w/o Git repository', function(st) {
t.test('should fail w/o Git repository', function (st) {
st.plan(1)

fs.renameSync('../../.git', '../../.git.bak')
Expand All @@ -563,7 +563,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should fail w/o Git repository w/o remote', function(st) {
t.test('should fail w/o Git repository w/o remote', function (st) {
st.plan(1)

childProcess.exec('git init', oninit)
Expand Down Expand Up @@ -592,7 +592,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work w/o Git repository w/ repo', function(st) {
t.test('should work w/o Git repository w/ repo', function (st) {
st.plan(1)

fs.renameSync('../../.git', '../../.git.bak')
Expand Down Expand Up @@ -630,7 +630,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work w/o Git repository w/ remote', function(st) {
t.test('should work w/o Git repository w/ remote', function (st) {
st.plan(1)

fs.renameSync('../../.git', '../../.git.bak')
Expand Down Expand Up @@ -666,7 +666,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work w/o Git repository w/ remote and root', function(st) {
t.test('should work w/o Git repository w/ remote and root', function (st) {
st.plan(1)

fs.renameSync('../../.git', '../../.git.bak')
Expand Down Expand Up @@ -702,7 +702,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work with `repository:false`', function(st) {
t.test('should work with `repository:false`', function (st) {
st.plan(1)

fs.renameSync('../../.git', '../../.git.bak')
Expand Down Expand Up @@ -757,7 +757,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should work when finding non-hosted Git remotes', function(st) {
t.test('should work when finding non-hosted Git remotes', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -792,7 +792,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should support a GitLab shortcode', function(st) {
t.test('should support a GitLab shortcode', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -843,7 +843,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should support a Bitbucket shortcode', function(st) {
t.test('should support a Bitbucket shortcode', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -894,7 +894,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should suggest similar links', function(st) {
t.test('should suggest similar links', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -930,7 +930,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should recognise links to particular lines', function(st) {
t.test('should recognise links to particular lines', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -966,7 +966,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should recognise links with encoded URLs', function(st) {
t.test('should recognise links with encoded URLs', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -1004,7 +1004,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should support folders', function(st) {
t.test('should support folders', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -1043,7 +1043,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should check images', function(st) {
t.test('should check images', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -1082,7 +1082,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should support query parameters', function(st) {
t.test('should support query parameters', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -1117,7 +1117,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should support case insensitive headings', function(st) {
t.test('should support case insensitive headings', function (st) {
st.plan(1)

childProcess.exec(
Expand Down Expand Up @@ -1153,7 +1153,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should ignore external links', function(st) {
t.test('should ignore external links', function (st) {
st.plan(1)

childProcess.exec(
Expand All @@ -1179,7 +1179,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should ignore external links (without repo)', function(st) {
t.test('should ignore external links (without repo)', function (st) {
st.plan(1)

childProcess.exec(
Expand All @@ -1205,7 +1205,7 @@ test('remark-validate-links', function(t) {
}
})

t.test('should support self-hosted Git solutions', function(st) {
t.test('should support self-hosted Git solutions', function (st) {
st.plan(1)

childProcess.exec('git init', oninit)
Expand Down

0 comments on commit 6910784

Please sign in to comment.