Skip to content

Commit 1e61484

Browse files
Merge pull request #102 from LambdaTest/dev
Release 2.1.9
2 parents 4012ae5 + 73c951b commit 1e61484

File tree

3 files changed

+27
-20
lines changed

3 files changed

+27
-20
lines changed

commands/utils/archive.js

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function archive_project(lt_config) {
6969
console.log("Ignoring files: ", ignore_files);
7070
archive.glob(
7171
"**/*",
72-
{ cwd: process.cwd(), ignore: ignore_files, dot: true },
72+
{ cwd: process.cwd(), ignore: ignore_files, dot: false },
7373
{ prefix: "project/" }
7474
);
7575
//OverRide NPM Dependencies
@@ -90,12 +90,12 @@ function archive_project(lt_config) {
9090
{ prefix: "project/" }
9191
);
9292
}
93-
if (
94-
lt_config.run_settings.dep_tokens &&
95-
lt_config.run_settings.dep_tokens.length > 0
96-
) {
97-
if (fs.existsSync(".npmrc")) {
98-
let raw_data = fs.readFileSync(".npmrc", "utf8");
93+
if (fs.existsSync(".npmrc")) {
94+
let raw_data = fs.readFileSync(".npmrc", "utf8");
95+
if (
96+
lt_config.run_settings.dep_tokens &&
97+
lt_config.run_settings.dep_tokens.length > 0
98+
) {
9999
let replace_map = {};
100100
for (let i = 0; i < lt_config.run_settings.dep_tokens.length; i++) {
101101
if (process.env[lt_config.run_settings.dep_tokens[i]]) {
@@ -115,18 +115,21 @@ function archive_project(lt_config) {
115115
raw_data = raw_data.replace(re, function (matched) {
116116
return replace_map[matched];
117117
});
118-
archive.append(
119-
raw_data,
120-
{
121-
name: "project/.npmrc",
122-
cwd: process.cwd(),
123-
ignore: ignore_files,
124-
},
125-
{ prefix: "project/" }
126-
);
127-
} else {
128-
reject("Dep Tokens are passed but .npmrc does not exist");
129118
}
119+
archive.append(
120+
raw_data,
121+
{
122+
name: "project/.npmrc",
123+
cwd: process.cwd(),
124+
ignore: ignore_files,
125+
},
126+
{ prefix: "project/" }
127+
);
128+
} else if (
129+
lt_config.run_settings.dep_tokens &&
130+
lt_config.run_settings.dep_tokens.length > 0
131+
) {
132+
reject("Dep Tokens are passed but .npmrc does not exist");
130133
}
131134

132135
archive.finalize();

commands/utils/validate.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ module.exports = validate_config = function (lt_config) {
106106
}
107107
}
108108
}
109-
if (cypress_flag == false) {
109+
if (cypress_flag == false && lt_config.run_settings.npm_dependencies) {
110+
reject(
111+
"Error!!Cypress dependency is not present in npm_dependencies"
112+
);
113+
} else if (cypress_flag == false) {
110114
reject("Error!!Cypress dependency is not present in package.json");
111115
}
112116
} catch (e) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lambdatest-cypress-cli",
3-
"version": "2.1.8",
3+
"version": "2.1.9",
44
"description": "The lambdatest-cypress-cli is LambdaTest's command-line interface (CLI) aimed to help you run your Cypress tests on LambdaTest platform.",
55
"homepage": "https://github.com/LambdaTest/lambdatest-cypress-cli",
66
"author": "LambdaTest <keys@lambdatest.com>",

0 commit comments

Comments
 (0)