From ab8cf18dc03c5ff3c7f15fca5d8ddd9da2fd887a Mon Sep 17 00:00:00 2001 From: Daniel Stockman Date: Thu, 14 Feb 2019 11:32:59 -0800 Subject: [PATCH] refactor(publish): Punch up loglevel of FYI messages --- commands/publish/__tests__/publish-from-package.test.js | 4 ++-- commands/publish/index.js | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/publish/__tests__/publish-from-package.test.js b/commands/publish/__tests__/publish-from-package.test.js index 5fc34ee28c..2d5684cb0a 100644 --- a/commands/publish/__tests__/publish-from-package.test.js +++ b/commands/publish/__tests__/publish-from-package.test.js @@ -72,7 +72,7 @@ describe("publish from-package", () => { expect(npmPublish).not.toHaveBeenCalled(); - const logMessages = loggingOutput("info"); + const logMessages = loggingOutput("notice"); expect(logMessages).toContain("No unpublished release found"); }); @@ -105,7 +105,7 @@ describe("publish from-package", () => { expect(npmPublish).toHaveBeenCalled(); expect(writePkg.updatedManifest("package-1")).not.toHaveProperty("gitHead"); - const logMessages = loggingOutput("info"); + const logMessages = loggingOutput("notice"); expect(logMessages).toContain("Unable to verify working tree, proceed at your own risk"); expect(logMessages).toContain( "Unable to set temporary gitHead property, it will be missing from registry metadata" diff --git a/commands/publish/index.js b/commands/publish/index.js index 3bd908f7ba..0206236fe6 100644 --- a/commands/publish/index.js +++ b/commands/publish/index.js @@ -262,7 +262,7 @@ class PublishCommand extends Command { if (err.failed && err.code === 128 && err.stderr && /not a git repository/.test(err.stderr)) { // (we tried) this.logger.silly("EWORKINGTREE", err.message); - this.logger.info("FYI", "Unable to verify working tree, proceed at your own risk"); + this.logger.notice("FYI", "Unable to verify working tree, proceed at your own risk"); } else { // validation errors should be preserved throw err; @@ -506,7 +506,7 @@ class PublishCommand extends Command { } catch (err) { // from-package should be _able_ to run without git, but at least we tried this.logger.silly("EGITHEAD", err.message); - this.logger.info( + this.logger.notice( "FYI", "Unable to set temporary gitHead property, it will be missing from registry metadata" ); @@ -529,7 +529,7 @@ class PublishCommand extends Command { return gitCheckout(dirtyManifests, this.execOpts).catch(err => { this.logger.silly("EGITCHECKOUT", err.message); - this.logger.info("FYI", "Unable to reset working tree changes, this probably isn't a git repo."); + this.logger.notice("FYI", "Unable to reset working tree changes, this probably isn't a git repo."); }); }