From ade7af36dce86396e34773d843d443570f22ccbb Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Fri, 4 Oct 2019 17:57:42 +0900 Subject: [PATCH] refactor: port read to typescript --- @commitlint/cli/src/cli.js | 3 +- @commitlint/read/package.json | 26 +----- .../read/src/{index.test.js => index.test.ts} | 30 +++---- @commitlint/read/src/{index.js => index.ts} | 50 +++++++---- @commitlint/read/tsconfig.json | 15 ++++ @commitlint/top-level/src/index.ts | 2 +- tsconfig.json | 1 + yarn.lock | 83 ++++++++++++++++--- 8 files changed, 143 insertions(+), 67 deletions(-) rename @commitlint/read/src/{index.test.js => index.test.ts} (65%) rename @commitlint/read/src/{index.js => index.ts} (55%) create mode 100644 @commitlint/read/tsconfig.json diff --git a/@commitlint/cli/src/cli.js b/@commitlint/cli/src/cli.js index cad49f191f..f3b7a7eb26 100755 --- a/@commitlint/cli/src/cli.js +++ b/@commitlint/cli/src/cli.js @@ -1,9 +1,10 @@ #!/usr/bin/env node require('babel-polyfill'); // eslint-disable-line import/no-unassigned-import +import read from '@commitlint/read'; + const load = require('@commitlint/load'); const lint = require('@commitlint/lint'); -const read = require('@commitlint/read'); const meow = require('meow'); const {merge, pick, isFunction} = require('lodash'); const stdin = require('get-stdin'); diff --git a/@commitlint/read/package.json b/@commitlint/read/package.json index 946a6b0dd6..f0855c919d 100644 --- a/@commitlint/read/package.json +++ b/@commitlint/read/package.json @@ -3,30 +3,13 @@ "version": "8.1.0", "description": "Read commit messages from a specified range or last edit", "main": "lib/index.js", + "types": "lib/index.d.ts", "files": [ "lib/" ], "scripts": { - "build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps", "deps": "dep-check", - "pkg": "pkg-check --skip-import", - "start": "concurrently \"ava -c 4 --verbose --watch\" \"yarn run watch\"", - "test": "ava -c 4 --verbose", - "watch": "babel src --out-dir lib --watch --source-maps" - }, - "ava": { - "files": [ - "src/**/*.test.js", - "!lib/**/*" - ], - "source": [ - "src/**/*.js", - "!lib/**/*" - ], - "babel": "inherit", - "require": [ - "babel-register" - ] + "pkg": "pkg-check --skip-import" }, "babel": { "presets": [ @@ -58,13 +41,10 @@ "devDependencies": { "@commitlint/test": "8.0.0", "@commitlint/utils": "^8.1.0", - "ava": "0.22.0", "babel-cli": "6.26.0", "babel-preset-commitlint": "^8.0.0", "babel-register": "6.26.0", - "concurrently": "3.6.1", - "cross-env": "5.1.1", - "execa": "0.11.0" + "execa": "2.0.4" }, "dependencies": { "@commitlint/top-level": "^8.1.0", diff --git a/@commitlint/read/src/index.test.js b/@commitlint/read/src/index.test.ts similarity index 65% rename from @commitlint/read/src/index.test.js rename to @commitlint/read/src/index.test.ts index 4c4b93c4a7..1954b07d14 100644 --- a/@commitlint/read/src/index.test.js +++ b/@commitlint/read/src/index.test.ts @@ -1,33 +1,33 @@ -import {git} from '@commitlint/test'; -import test from 'ava'; import execa from 'execa'; -import * as sander from '@marionebl/sander'; + +const {git} = require('@commitlint/test'); +const sander = require('@marionebl/sander'); import read from '.'; -test('get edit commit message specified by the `edit` flag', async t => { - const cwd = await git.bootstrap(); +test('get edit commit message specified by the `edit` flag', async () => { + const cwd: string = await git.bootstrap(); await sander.writeFile(cwd, 'commit-msg-file', 'foo'); const expected = ['foo\n']; const actual = await read({edit: 'commit-msg-file', cwd}); - t.deepEqual(actual, expected); + expect(actual).toEqual(expected); }); -test('get edit commit message from git root', async t => { - const cwd = await git.bootstrap(); +test('get edit commit message from git root', async () => { + const cwd: string = await git.bootstrap(); await sander.writeFile(cwd, 'alpha.txt', 'alpha'); await execa('git', ['add', '.'], {cwd}); await execa('git', ['commit', '-m', 'alpha'], {cwd}); const expected = ['alpha\n\n']; const actual = await read({edit: true, cwd}); - t.deepEqual(actual, expected); + expect(actual).toEqual(expected); }); -test('get history commit messages', async t => { - const cwd = await git.bootstrap(); +test('get history commit messages', async () => { + const cwd: string = await git.bootstrap(); await sander.writeFile(cwd, 'alpha.txt', 'alpha'); await execa('git', ['add', 'alpha.txt'], {cwd}); await execa('git', ['commit', '-m', 'alpha'], {cwd}); @@ -36,11 +36,11 @@ test('get history commit messages', async t => { const expected = ['remove alpha\n\n', 'alpha\n\n']; const actual = await read({cwd}); - t.deepEqual(actual, expected); + expect(actual).toEqual(expected); }); -test('get edit commit message from git subdirectory', async t => { - const cwd = await git.bootstrap(); +test('get edit commit message from git subdirectory', async () => { + const cwd: string = await git.bootstrap(); await sander.mkdir(cwd, 'beta'); await sander.writeFile(cwd, 'beta/beta.txt', 'beta'); @@ -49,5 +49,5 @@ test('get edit commit message from git subdirectory', async t => { const expected = ['beta\n\n']; const actual = await read({edit: true, cwd}); - t.deepEqual(actual, expected); + expect(actual).toEqual(expected); }); diff --git a/@commitlint/read/src/index.js b/@commitlint/read/src/index.ts similarity index 55% rename from @commitlint/read/src/index.js rename to @commitlint/read/src/index.ts index b9ae72e0b4..4dc44396b5 100644 --- a/@commitlint/read/src/index.js +++ b/@commitlint/read/src/index.ts @@ -1,14 +1,24 @@ import path from 'path'; -import gitRawCommits from 'git-raw-commits'; -import * as sander from '@marionebl/sander'; +import {Stats} from 'fs'; +import Buffer from 'buffer'; +import {Readable} from 'stream'; import toplevel from '@commitlint/top-level'; +const gitRawCommits = require('git-raw-commits'); +const sander = require('@marionebl/sander'); + +interface Settings { + cwd?: string; + from?: string; + to?: string; + edit?: boolean | string; +} + export default getCommitMessages; // Get commit messages -// Object => Promise> -async function getCommitMessages(settings) { +async function getCommitMessages(settings: Settings): Promise { const {cwd, from, to, edit} = settings; if (edit) { @@ -19,11 +29,13 @@ async function getCommitMessages(settings) { } // Get commit messages from history -// Object => Promise -function getHistoryCommits(options, opts = {}) { +function getHistoryCommits( + options: {from?: string; to?: string}, + opts: {cwd?: string} = {} +): Promise { return new Promise((resolve, reject) => { - const data = []; - gitRawCommits(options, {cwd: opts.cwd}) + const data: string[] = []; + (gitRawCommits(options, {cwd: opts.cwd}) as Readable) .on('data', chunk => data.push(chunk.toString('utf-8'))) .on('error', reject) .on('end', () => { @@ -33,8 +45,10 @@ function getHistoryCommits(options, opts = {}) { } // Get recently edited commit message -// (cwd: string, edit: any) => Promise> -async function getEditCommit(cwd, edit) { +async function getEditCommit( + cwd?: string, + edit?: boolean | string +): Promise { const top = await toplevel(cwd); if (typeof top !== 'string') { @@ -43,23 +57,27 @@ async function getEditCommit(cwd, edit) { const editFilePath = await getEditFilePath(top, edit); - const editFile = await sander.readFile(editFilePath); + const editFile: Buffer = await sander.readFile(editFilePath); return [`${editFile.toString('utf-8')}\n`]; } // Get path to recently edited commit message file -// (top: string, edit: any) => Promise -async function getEditFilePath(top, edit) { - let editFilePath; +async function getEditFilePath( + top: string, + edit?: boolean | string +): Promise { + let editFilePath: string; if (typeof edit === 'string') { editFilePath = path.resolve(top, edit); } else { const dotgitPath = path.join(top, '.git'); - const dotgitStats = sander.lstatSync(dotgitPath); + const dotgitStats: Stats = sander.lstatSync(dotgitPath); if (dotgitStats.isDirectory()) { editFilePath = path.join(top, '.git/COMMIT_EDITMSG'); } else { - const gitFile = await sander.readFile(dotgitPath, {encoding: 'utf-8'}); + const gitFile: string = await sander.readFile(dotgitPath, { + encoding: 'utf-8' + }); const relativeGitPath = gitFile.replace('gitdir: ', '').replace('\n', ''); editFilePath = path.resolve(top, relativeGitPath, 'COMMIT_EDITMSG'); } diff --git a/@commitlint/read/tsconfig.json b/@commitlint/read/tsconfig.json new file mode 100644 index 0000000000..f4a57643f0 --- /dev/null +++ b/@commitlint/read/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.shared.json", + "compilerOptions": { + "composite": true, + "rootDir": "./src", + "outDir": "./lib" + }, + "include": [ + "./src" + ], + "exclude": [ + "./src/**/*.test.ts", + "./lib/**/*" + ] +} diff --git a/@commitlint/top-level/src/index.ts b/@commitlint/top-level/src/index.ts index 6984e899a7..dde9b29249 100644 --- a/@commitlint/top-level/src/index.ts +++ b/@commitlint/top-level/src/index.ts @@ -13,7 +13,7 @@ export default toplevel; /** * Find the next git root */ -async function toplevel(cwd: string) { +async function toplevel(cwd?: string) { const found = await up('.git', {cwd, type: 'directory'}); if (typeof found !== 'string') { diff --git a/tsconfig.json b/tsconfig.json index 02b03b0b40..04c654ea91 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,5 +12,6 @@ { "path": "@commitlint/resolve-extends" }, { "path": "@commitlint/to-lines" }, { "path": "@commitlint/top-level" }, + { "path": "@commitlint/read" } ] } diff --git a/yarn.lock b/yarn.lock index f829f9b116..e252cad36d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2856,7 +2856,7 @@ brace-expansion@^1.1.7: braces@2.3.1, braces@^1.8.2, braces@^2.3.0: version "2.3.1" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" + resolved "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz#7086c913b4e5a08dbe37ac0ee6a2500c4ba691bb" integrity sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ== dependencies: arr-flatten "^1.1.0" @@ -3877,7 +3877,7 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -4050,7 +4050,7 @@ deep-equal@^1.0.0: deep-extend@0.5.1, deep-extend@^0.6.0, deep-extend@~0.4.0: version "0.5.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" + resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" integrity sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w== deep-is@~0.1.3: @@ -4514,6 +4514,21 @@ execa@0.9.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@2.0.4: + version "2.0.4" + resolved "https://registry.npmjs.org/execa/-/execa-2.0.4.tgz#2f5cc589c81db316628627004ea4e37b93391d8e" + integrity sha512-VcQfhuGD51vQUQtKIq2fjGDLDbL6N1DTQVpYzxZ7LPIXw3HqTuIz6uxRmpV1qf8i31LHf2kjiaGI+GdHwRgbnQ== + dependencies: + cross-spawn "^6.0.5" + get-stream "^5.0.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^3.0.0" + onetime "^5.1.0" + p-finally "^2.0.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + execa@^0.10.0: version "0.10.0" resolved "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" @@ -5133,6 +5148,13 @@ get-stream@^4.0.0, get-stream@^4.1.0: dependencies: pump "^3.0.0" +get-stream@^5.0.0: + version "5.1.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" + integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + dependencies: + pump "^3.0.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -5546,7 +5568,7 @@ hawk@3.1.3, hawk@~3.1.3: hoek@2.x.x, hoek@5.0.3: version "5.0.3" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-5.0.3.tgz#b71d40d943d0a95da01956b547f83c4a5b4a34ac" + resolved "https://registry.npmjs.org/hoek/-/hoek-5.0.3.tgz#b71d40d943d0a95da01956b547f83c4a5b4a34ac" integrity sha512-Bmr56pxML1c9kU+NS51SMFkiVQAb+9uFfXwyqR2tn4w2FPvmPt65eZ9aCcEfRXd9G74HkZnILC6p967pED4aiw== home-or-tmp@^2.0.0: @@ -6275,6 +6297,11 @@ is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= +is-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + is-subset@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" @@ -6817,7 +6844,7 @@ js-tokens@^4.0.0: js-yaml@>=3.13.0, js-yaml@^3.10.0, js-yaml@^3.13.0, js-yaml@^3.8.2, js-yaml@^3.9.0: version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== dependencies: argparse "^1.0.7" @@ -7451,7 +7478,7 @@ map-visit@^1.0.0: marked@0.3.9, marked@^0.3.6, marked@^0.5.1: version "0.3.9" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.9.tgz#54ce6a57e720c3ac6098374ec625fcbcc97ff290" + resolved "https://registry.npmjs.org/marked/-/marked-0.3.9.tgz#54ce6a57e720c3ac6098374ec625fcbcc97ff290" integrity sha512-nW5u0dxpXxHfkHzzrveY45gCbi+R4PaO4WRZYqZNl+vB0hVGeqlFn0aOg1c8AKL63TrNFn9Bm2UP4AdiZ9TPLw== matcher@^0.1.1: @@ -7596,6 +7623,11 @@ merge-stream@^1.0.1: dependencies: readable-stream "^2.0.1" +merge-stream@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" + integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== + merge2@1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.2.1.tgz#271d2516ff52d4af7f7b710b8bf3e16e183fef66" @@ -7710,7 +7742,7 @@ mimic-fn@^1.0.0: resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" integrity sha1-5md4PZLonb00KBi1IwudYqZyrRg= -mimic-fn@^2.0.0: +mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== @@ -7811,7 +7843,7 @@ module-not-found-error@^1.0.1: moment@2.19.3, moment@^2.18.1: version "2.19.3" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.3.tgz#bdb99d270d6d7fda78cc0fbace855e27fe7da69f" + resolved "https://registry.npmjs.org/moment/-/moment-2.19.3.tgz#bdb99d270d6d7fda78cc0fbace855e27fe7da69f" integrity sha1-vbmdJw1tf9p4zA+6zoVeJ/59pp8= move-concurrently@^1.0.1: @@ -8192,6 +8224,13 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" +npm-run-path@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz#7f91be317f6a466efed3c9f2980ad8a4ee8b0fa5" + integrity sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg== + dependencies: + path-key "^3.0.0" + npm-which@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" @@ -8327,6 +8366,13 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + opencollective@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz#aee6372bc28144583690c3ca8daecfc120dd0ef1" @@ -8481,6 +8527,11 @@ p-finally@^1.0.0: resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= +p-finally@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz#bd6fcaa9c559a096b680806f4d657b3f0f240561" + integrity sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw== + p-is-promise@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" @@ -8740,6 +8791,11 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= +path-key@^3.0.0: + version "3.1.0" + resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.0.tgz#99a10d870a803bdd5ee6f0470e58dfcd2f9a54d3" + integrity sha512-8cChqz0RP6SHJkMt48FW0A7+qUOn+OsnOsVtzI59tZ8m+5bCSk7hzwET0pulwOM2YMn9J1efb07KB9l9f30SGg== + path-parse@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" @@ -9114,7 +9170,7 @@ quick-lru@^1.0.0: randomatic@3: version "3.1.1" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + resolved "https://registry.npmjs.org/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== dependencies: is-number "^4.0.0" @@ -10242,7 +10298,7 @@ sprintf-js@~1.0.2: sshpk@1.14.1: version "1.14.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" + resolved "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" integrity sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s= dependencies: asn1 "~0.2.3" @@ -10403,7 +10459,7 @@ stringify-object@^3.2.2: stringstream@0.0.6, stringstream@~0.0.4: version "0.0.6" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" + resolved "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" integrity sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA== strip-ansi@^0.3.0: @@ -10463,6 +10519,11 @@ strip-eof@^1.0.0: resolved "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= +strip-final-newline@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" + integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== + strip-indent@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2"