Skip to content

Commit

Permalink
chore: patch winston to suppress padLevels warning (#18824)
Browse files Browse the repository at this point in the history
  • Loading branch information
flotwig authored Nov 9, 2021
1 parent cf4cc76 commit 925fc65
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions patches/winston+2.4.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/node_modules/winston/lib/winston/common.js b/node_modules/winston/lib/winston/common.js
index 8ed9973..ecc59f8 100644
--- a/node_modules/winston/lib/winston/common.js
+++ b/node_modules/winston/lib/winston/common.js
@@ -32,7 +32,10 @@ exports.setLevels = function (target, past, current, isDefault) {
}

target.levels = current || config.npm.levels;
- if (target.padLevels) {
+ // Check if `padLevels` exists to suppress a warning about accessing
+ // a non-existing property on `exports`.
+ // @see https://github.com/winstonjs/winston/issues/1882
+ if (target.hasOwnProperty('padLevels') && target.padLevels) {
target.levelLength = exports.longestElement(Object.keys(target.levels));
}

4 comments on commit 925fc65

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 925fc65 Nov 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.7.1/circle-develop-925fc659b37facf80acfbf10466eed40d6cb8647/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 925fc65 Nov 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 ia32 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.7.1/appveyor-develop-925fc659b37facf80acfbf10466eed40d6cb8647/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 925fc65 Nov 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppVeyor has built the win32 x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.7.1/appveyor-develop-925fc659b37facf80acfbf10466eed40d6cb8647/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 925fc65 Nov 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/8.7.1/circle-develop-925fc659b37facf80acfbf10466eed40d6cb8647/cypress.tgz

Please sign in to comment.