Skip to content

Commit

Permalink
Bump remark-changelog to a minimum 1.2.1
Browse files Browse the repository at this point in the history
This removes the need to fetch git tags before linting a changelog.

Ref vweevers/remark-changelog@c3e25b1
  • Loading branch information
vweevers committed May 15, 2021
1 parent 8b58387 commit 60aa51d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"github-url-from-git": "^1.5.0",
"remark": "^12.0.1",
"remark-autolink-references": "^1.0.0",
"remark-changelog": "^1.2.0",
"remark-changelog": "^1.2.1",
"remark-collapse": "~0.1.2",
"remark-git-contributors": "^3.0.0",
"remark-github": "^9.0.1",
Expand Down Expand Up @@ -61,7 +61,6 @@
"git-pull-or-clone": "^2.0.1",
"level-community": "^3.0.0",
"npm-consider": "^1.7.0",
"rimraf": "^3.0.0",
"standard": "^15.0.0",
"tape": "^5.0.1",
"tempy": "0.2.1"
Expand Down
32 changes: 13 additions & 19 deletions test/dependents.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@

const test = require('tape')
const path = require('path')
const gitPullOrClone = require('git-pull-or-clone')
const rimraf = require('rimraf')
const pull = require('git-pull-or-clone')
const cp = require('child_process')

const dependents = [
// 'airtap/airtap', // See vweevers/hallmark#45
// 'deltachat/deltachat-desktop', // Failing
// 'deltachat/deltachat-node', // Has empty releases
'airtap/airtap',
// 'deltachat/deltachat-desktop', // Invalid
// 'deltachat/deltachat-node', // Invalid
'Level/abstract-leveldown',
'Level/bench',
'Level/codec',
'Level/compose',
'Level/deferred-leveldown',
'Level/leveldown',
'Level/level-js',

// TODO: Don't use literal URLs without angle brackets
// 'Level/levelup',

'Level/levelup',
'Level/packager',
'Level/mem',
'Level/memdown',
'Level/party',
'Level/subleveldown',
'prebuild/prebuild-install',
'vweevers/detect-tabular',
'vweevers/keyspace',
'vweevers/node-docker-machine',
Expand Down Expand Up @@ -67,8 +69,8 @@ for (const repo of dependents) {
t.is(code, 0, 'hallmark linter on fixed markdown exited with code 0')

// Start fresh on the next test run
rimraf(cwd, { glob: false }, function (err) {
if (err) throw err
cp.execFile('git', ['checkout', '.'], { cwd }, function (err) {
t.ifError(err, 'no git checkout error')
t.end()
})
})
Expand All @@ -78,11 +80,3 @@ for (const repo of dependents) {
})
})
}

function pull (url, cwd, callback) {
// Clone fully because we need git history for remark-git-contributors
gitPullOrClone(url, cwd, { depth: Infinity }, function (err) {
if (err) return callback(err)
cp.execFile('git', ['fetch', '--tags'], { cwd }, callback)
})
}

0 comments on commit 60aa51d

Please sign in to comment.