Skip to content

Commit 896d4e7

Browse files
committed
🐛 fix for reuploading test zips
1 parent 506fd41 commit 896d4e7

File tree

3 files changed

+12
-27
lines changed

3 files changed

+12
-27
lines changed

bin/helpers/archiver.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ const archiveSpecs = (runSettings, filePath, excludeFiles, md5data) => {
6666
}
6767

6868
if (typeof runSettings.npm_dependencies === 'object') {
69-
if (!("cypress" in runSettings.npm_dependencies)) {
70-
logger.warn("Missing cypress not found in npm_dependencies");
71-
if ("cypress_version" in runSettings && !runSettings.cypress_version.toString().match(Constants.LATEST_VERSION_SYNTAX_REGEX)) {
72-
runSettings.npm_dependencies.cypress = runSettings.cypress_version;
73-
} else {
74-
runSettings.npm_dependencies.cypress = "latest";
75-
}
76-
logger.debug(`Adding cypress version ${runSettings.npm_dependencies.cypress} in npm_dependencies`);
77-
}
7869
Object.assign(packageJSON, {
7970
devDependencies: runSettings.npm_dependencies,
8071
});

bin/helpers/checkUploaded.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,6 @@ const checkPackageMd5 = (runSettings) => {
6161
}
6262

6363
if (typeof runSettings.npm_dependencies === 'object') {
64-
if (!("cypress" in runSettings.npm_dependencies)) {
65-
logger.warn("Missing cypress not found in npm_dependencies");
66-
if ("cypress_version" in runSettings && !runSettings.cypress_version.toString().match(Constants.LATEST_VERSION_SYNTAX_REGEX)) {
67-
runSettings.npm_dependencies.cypress = runSettings.cypress_version;
68-
} else {
69-
runSettings.npm_dependencies.cypress = "latest";
70-
}
71-
logger.warn(`Adding cypress version ${runSettings.npm_dependencies.cypress} in npm_dependencies`);
72-
}
7364
Object.assign(packageJSON, {
7465
devDependencies: utils.sortJsonKeys(runSettings.npm_dependencies),
7566
});
@@ -95,6 +86,18 @@ const checkUploadedMd5 = (bsConfig, args, instrumentBlocks) => {
9586
zipUrlPresent: false,
9687
packageUrlPresent: false,
9788
};
89+
const runSettings = bsConfig.run_settings;
90+
if (typeof runSettings.npm_dependencies === 'object') {
91+
if (!("cypress" in runSettings.npm_dependencies)) {
92+
logger.warn("Missing cypress not found in npm_dependencies");
93+
if ("cypress_version" in runSettings && !runSettings.cypress_version.toString().match(Constants.LATEST_VERSION_SYNTAX_REGEX)) {
94+
runSettings.npm_dependencies.cypress = runSettings.cypress_version;
95+
} else {
96+
runSettings.npm_dependencies.cypress = "latest";
97+
}
98+
logger.warn(`Adding cypress version ${runSettings.npm_dependencies.cypress} in npm_dependencies`);
99+
}
100+
}
98101
if (args["force-upload"]) {
99102
logger.debug("force-upload set to true. Uploading tests and npm packages.");
100103
return resolve(obj);

bin/helpers/packageInstaller.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,6 @@ const setupPackageFolder = (runSettings, directoryPath) => {
2929
}
3030

3131
if (typeof runSettings.npm_dependencies === 'object') {
32-
if (!("cypress" in runSettings.npm_dependencies)) {
33-
logger.warn("Missing cypress not found in npm_dependencies");
34-
if ("cypress_version" in runSettings && !runSettings.cypress_version.toString().match(Constants.LATEST_VERSION_SYNTAX_REGEX)) {
35-
runSettings.npm_dependencies.cypress = runSettings.cypress_version;
36-
} else {
37-
runSettings.npm_dependencies.cypress = "latest";
38-
}
39-
logger.debug(`Adding cypress version ${runSettings.npm_dependencies.cypress} in npm_dependencies`);
40-
}
4132
Object.assign(packageJSON, {
4233
devDependencies: runSettings.npm_dependencies,
4334
});

0 commit comments

Comments
 (0)