Skip to content

Commit

Permalink
make patch ofr appium support logger mocked log
Browse files Browse the repository at this point in the history
  • Loading branch information
burtonemily committed Jul 18, 2024
1 parent a346d0f commit d7cfc10
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 2 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,10 @@
"appium-xcuitest-driver": "^7.24.0",
"chalk": "^5.3.0"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"resolutions": {
"@appium/support@npm:^5.1.2": "patch:@appium/support@npm%3A5.1.2#~/patches/@appium-support-npm-5.1.2-0c5ea57d71.patch",
"@appium/support@npm:^5.0.3": "patch:@appium/support@npm%3A5.1.2#~/patches/@appium-support-npm-5.1.2-0c5ea57d71.patch",
"@appium/support@npm:^5.1.1": "patch:@appium/support@npm%3A5.1.2#~/patches/@appium-support-npm-5.1.2-0c5ea57d71.patch"
}
}
20 changes: 20 additions & 0 deletions patches/@appium-support-npm-5.1.2-0c5ea57d71.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/build/lib/logging.js b/build/lib/logging.js
index f609feec3b89ef005177392a54c95560679630bf..d12007dd1880230b1900785daafb9225f697f114 100644
--- a/build/lib/logging.js
+++ b/build/lib/logging.js
@@ -13,7 +13,6 @@ exports.LEVELS = ['silly', 'verbose', 'debug', 'info', 'http', 'warn', 'error'];
const MAX_LOG_RECORDS_COUNT = 3000;
const PREFIX_TIMESTAMP_FORMAT = 'HH-mm-ss:SSS';
// export a default logger with no prefix
-exports.log = getLogger();
// mock log object is used in testing mode to silence the output
const MOCK_LOG = {
unwrap: () => ({
@@ -27,6 +26,7 @@ const MOCK_LOG = {
}),
...(lodash_1.default.fromPairs(exports.LEVELS.map((l) => [l, lodash_1.default.noop]))),
};
+exports.log = getLogger();
/**
*
* @param {AppiumLoggerPrefix?} [prefix=null]
66 changes: 65 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ __metadata:
languageName: node
linkType: hard

"@appium/support@npm:^5.0.3, @appium/support@npm:^5.1.1, @appium/support@npm:^5.1.2":
"@appium/support@npm:5.1.2":
version: 5.1.2
resolution: "@appium/support@npm:5.1.2"
dependencies:
Expand Down Expand Up @@ -225,6 +225,70 @@ __metadata:
languageName: node
linkType: hard

"@appium/support@patch:@appium/support@npm%3A5.1.2#~/patches/@appium-support-npm-5.1.2-0c5ea57d71.patch":
version: 5.1.2
resolution: "@appium/support@patch:@appium/support@npm%3A5.1.2#~/patches/@appium-support-npm-5.1.2-0c5ea57d71.patch::version=5.1.2&hash=33056c"
dependencies:
"@appium/logger": "npm:^1.6.0"
"@appium/tsconfig": "npm:^0.3.3"
"@appium/types": "npm:^0.21.1"
"@colors/colors": "npm:1.6.0"
"@types/archiver": "npm:6.0.2"
"@types/base64-stream": "npm:1.0.5"
"@types/find-root": "npm:1.1.4"
"@types/jsftp": "npm:2.1.5"
"@types/klaw": "npm:3.0.6"
"@types/lockfile": "npm:1.0.4"
"@types/mv": "npm:2.1.4"
"@types/ncp": "npm:2.0.8"
"@types/pluralize": "npm:0.0.33"
"@types/semver": "npm:7.5.8"
"@types/shell-quote": "npm:1.7.5"
"@types/supports-color": "npm:8.1.3"
"@types/teen_process": "npm:2.0.4"
"@types/uuid": "npm:10.0.0"
"@types/which": "npm:3.0.4"
archiver: "npm:7.0.1"
axios: "npm:1.7.2"
base64-stream: "npm:1.0.0"
bluebird: "npm:3.7.2"
bplist-creator: "npm:0.1.1"
bplist-parser: "npm:0.3.2"
form-data: "npm:4.0.0"
get-stream: "npm:6.0.1"
glob: "npm:10.4.2"
jsftp: "npm:2.1.3"
klaw: "npm:4.1.0"
lockfile: "npm:1.0.4"
lodash: "npm:4.17.21"
log-symbols: "npm:4.1.0"
moment: "npm:2.30.1"
mv: "npm:2.1.1"
ncp: "npm:2.0.0"
opencv-bindings: "npm:4.5.5"
pkg-dir: "npm:5.0.0"
plist: "npm:3.1.0"
pluralize: "npm:8.0.0"
read-pkg: "npm:5.2.0"
resolve-from: "npm:5.0.0"
sanitize-filename: "npm:1.6.3"
semver: "npm:7.6.2"
sharp: "npm:0.33.4"
shell-quote: "npm:1.8.1"
source-map-support: "npm:0.5.21"
supports-color: "npm:8.1.1"
teen_process: "npm:2.2.0"
type-fest: "npm:4.21.0"
uuid: "npm:10.0.0"
which: "npm:4.0.0"
yauzl: "npm:3.1.3"
dependenciesMeta:
sharp:
optional: true
checksum: 1eeb09c3e3e64a9810556a2c2448c479ab7807ce881b2f4a71fbabfd3241fac1f5c5809901d8744219db6c1877a1f70cfc163f29b969707d9e6f925fe58ee807
languageName: node
linkType: hard

"@appium/tsconfig@npm:^0.3.3":
version: 0.3.3
resolution: "@appium/tsconfig@npm:0.3.3"
Expand Down

0 comments on commit d7cfc10

Please sign in to comment.