From 14365c37a50f8278777aa58c6db2ce1d2ddb1898 Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sat, 11 Apr 2020 16:53:27 -0400 Subject: [PATCH 1/2] wip: add messaging --- src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.js b/src/index.js index 2db8afa..054c21e 100644 --- a/src/index.js +++ b/src/index.js @@ -33,6 +33,12 @@ if (!existsSync(MANIFEST_FILENAME)) { console.log( `Package size (${currentStats.packageSize}) adopted as new limit.`, ) + + if (!isUpdatingManifest) { + console.log( + '❗ It looks like you ran PackWatch without a manifest. To prevent accidental passes in CI or hooks, packwatch will termine with an error. If you are running packwatch for the first time in your project, this is expected!', + ) + } // If the update flag wasn't specified, exit with a non-zero code so we // don't "accidentally" pass CI builds if the manifest didn't exist process.exit(isUpdatingManifest ? 0 : 1) -- 2.45.2 From 114d0a75bd69bec77c563571478b89b92b6c302e Mon Sep 17 00:00:00 2001 From: Marc Cataford Date: Sat, 11 Apr 2020 20:59:08 -0400 Subject: [PATCH 2/2] chore: typo --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 054c21e..4d05c07 100644 --- a/src/index.js +++ b/src/index.js @@ -36,7 +36,7 @@ if (!existsSync(MANIFEST_FILENAME)) { if (!isUpdatingManifest) { console.log( - '❗ It looks like you ran PackWatch without a manifest. To prevent accidental passes in CI or hooks, packwatch will termine with an error. If you are running packwatch for the first time in your project, this is expected!', + '❗ It looks like you ran PackWatch without a manifest. To prevent accidental passes in CI or hooks, packwatch will terminate with an error. If you are running packwatch for the first time in your project, this is expected!', ) } // If the update flag wasn't specified, exit with a non-zero code so we -- 2.45.2