From 60aa51dc91918cbd97f960c11ba628c19b8bdbf7 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sat, 15 May 2021 10:13:18 +0200 Subject: [PATCH] Bump remark-changelog to a minimum 1.2.1 This removes the need to fetch git tags before linting a changelog. Ref vweevers/remark-changelog@c3e25b1 --- package.json | 3 +-- test/dependents.js | 32 +++++++++++++------------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index c5dabfc..a334cd0 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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" diff --git a/test/dependents.js b/test/dependents.js index b125f9c..806799e 100644 --- a/test/dependents.js +++ b/test/dependents.js @@ -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', @@ -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() }) }) @@ -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) - }) -}