- Put the patch in
.yarn/patches
folder. - Add the patch in
resolutions
of package.json. - Make sure both files are committed to the repo.
Last active
August 24, 2023 16:05
-
-
Save arinthros/68e1b622b27b98f3a6a45585dc751b82 to your computer and use it in GitHub Desktop.
Yarn Patch for Util Package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"resolutions": { | |
"util@0.12.5": "patch:util@npm:0.12.5#.yarn/patches/util-npm-0.12.5-3668276f26.patch" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/util.js b/util.js | |
index 6db393e279126c82e074539649053a2cf314206a..34ddc1adfb82d5bc6096fe9d1b9f0b25f55d5777 100644 | |
--- a/util.js | |
+++ b/util.js | |
@@ -106,7 +106,7 @@ exports.deprecate = function(fn, msg) { | |
var debugs = {}; | |
var debugEnvRegex = /^$/; | |
-if (process.env.NODE_DEBUG) { | |
+if (typeof process !== 'undefined' && process.env.NODE_DEBUG) { | |
var debugEnv = process.env.NODE_DEBUG; | |
debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&') | |
.replace(/\*/g, '.*') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment