From c4a6a246e4bf7ef582137fe8d197b55b7a368320 Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Mon, 2 Aug 2021 21:52:44 +0900 Subject: [PATCH] feat(actions): add `ybiquitous/npm-diff-action` (#1024) https://github.com/ybiquitous/npm-diff-action --- lib/init.js | 1 + test/init.test.js | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/init.js b/lib/init.js index b5992587..f98635c3 100644 --- a/lib/init.js +++ b/lib/init.js @@ -149,6 +149,7 @@ export async function init({ cwd = process.cwd(), logger = defaultLogger } = {}) await cmd.writePackageFile(".remarkignore"); await cmd.writePackageFile(".github", "workflows", "commitlint.yml"); await cmd.writePackageFile(".github", "workflows", "npm-audit-fix.yml"); + await cmd.writePackageFile(".github", "workflows", "npm-diff.yml"); await cmd.writePackageFile(".github", "workflows", "release.yml"); await cmd.writePackageFile(".github", "workflows", "test.yml"); await cmd.writePackageFile(".husky", "commit-msg"); diff --git a/test/init.test.js b/test/init.test.js index cfb131ad..a4310093 100644 --- a/test/init.test.js +++ b/test/init.test.js @@ -86,18 +86,19 @@ test("End-to-End via CLI", () => cwd: ctx.initArgs.cwd, }); expect(stdout).toMatchInlineSnapshot(` - "=> 'package.json' was updated - => '.editorconfig' was updated - => '.remarkignore' was updated - => '.github/workflows/commitlint.yml' was updated - => '.github/workflows/npm-audit-fix.yml' was updated - => '.github/workflows/release.yml' was updated - => '.github/workflows/test.yml' was updated - => '.husky/commit-msg' was updated - => '.husky/post-commit' was updated - => '.husky/pre-commit' was updated - " - `); +"=> 'package.json' was updated +=> '.editorconfig' was updated +=> '.remarkignore' was updated +=> '.github/workflows/commitlint.yml' was updated +=> '.github/workflows/npm-audit-fix.yml' was updated +=> '.github/workflows/npm-diff.yml' was updated +=> '.github/workflows/release.yml' was updated +=> '.github/workflows/test.yml' was updated +=> '.husky/commit-msg' was updated +=> '.husky/post-commit' was updated +=> '.husky/pre-commit' was updated +" +`); expect(stderr).toEqual(""); }));