-
Notifications
You must be signed in to change notification settings - Fork 45
[APS-22106] replace decompress@4.2.1 with adm-zip@0.6.1 #1184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ const logger = require('./logger').winstonLogger, | |
| const { default: axios } = require('axios'); | ||
| const { HttpsProxyAgent = require('https-proxy-agent') } = require('https-proxy-agent'); | ||
| const FormData = require('form-data'); | ||
| const decompress = require('decompress'); | ||
| const AdmZip = require('adm-zip'); | ||
| const unzipper = require("unzipper"); | ||
| const { setAxiosProxy } = require('./helper'); | ||
|
|
||
|
|
@@ -154,10 +154,11 @@ const downloadAndUnzip = async (filePath, fileName, url) => { | |
| const unzipFile = async (filePath, fileName) => { | ||
| return new Promise( async (resolve, reject) => { | ||
| try { | ||
| await decompress(path.join(filePath, fileName), filePath); | ||
| const zip = new AdmZip(path.join(filePath, fileName)); | ||
|
avinash-bharti marked this conversation as resolved.
Dismissed
|
||
| await zip.extractAllToAsync(filePath, /* overwrite */ true); | ||
| resolve(); | ||
| } catch (error) { | ||
| logger.debug(`Error unzipping with decompress, trying with unzipper. Stacktrace: ${error}.`); | ||
| logger.debug(`Error unzipping with adm-zip, trying with unzipper. Stacktrace: ${error}.`); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: git diff 4a6768e38195b5ecdd609320a42bd8da4adf3d30 adc6c2b57212db080ec962d2b0af0f4b7d569161 -- bin/helpers/buildArtifacts.js bin/helpers/reporterHTML.js
sed -n '140,178p' bin/helpers/buildArtifacts.js
sed -n '165,196p' bin/helpers/reporterHTML.js
rg -n 'logger.debug|function unzipFile|unzipFile\(' bin/helpers/buildArtifacts.js bin/helpers/reporterHTML.js bin/helpers/logger.jsRepository: browserstack/browserstack-cypress-cli Length of output: 5948 Apply the Constants rule only to the new build fallback message. The The 🧰 Tools🪛 Biome (2.5.11)[error] 155-176: Promise executor functions should not be (lint/suspicious/noAsyncPromiseExecutor) 🤖 Prompt for AI Agents |
||
| try { | ||
| fs.createReadStream(path.join(filePath, fileName)) | ||
| .pipe(unzipper.Extract({ path: filePath })) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.