cypress 12.9.0 → 12.10.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/cli.js +13 -15
- package/package.json +5 -5
package/lib/cli.js
CHANGED
@@ -124,17 +124,12 @@ const text = description => {
|
|
124
124
|
return descriptions[description];
|
125
125
|
};
|
126
126
|
function includesVersion(args) {
|
127
|
-
return _.includes(args, '
|
127
|
+
return _.includes(args, '--version') || _.includes(args, '-v');
|
128
128
|
}
|
129
|
-
function showVersions(
|
129
|
+
function showVersions(opts) {
|
130
130
|
debug('printing Cypress version');
|
131
|
-
debug('additional arguments %o',
|
132
|
-
|
133
|
-
const parsed = versionParser.parse(args);
|
134
|
-
const parsedOptions = {
|
135
|
-
component: parsed.component
|
136
|
-
};
|
137
|
-
debug('parsed version arguments %o', parsedOptions);
|
131
|
+
debug('additional arguments %o', opts);
|
132
|
+
debug('parsed version arguments %o', opts);
|
138
133
|
const reportAllVersions = versions => {
|
139
134
|
logger.always('Cypress package version:', versions.package);
|
140
135
|
logger.always('Cypress binary version:', versions.binary);
|
@@ -165,8 +160,8 @@ function showVersions(args) {
|
|
165
160
|
electronNodeVersion: undefined
|
166
161
|
};
|
167
162
|
return require('./exec/versions').getVersions().then((versions = defaultVersions) => {
|
168
|
-
if (
|
169
|
-
reportComponentVersion(
|
163
|
+
if (opts !== null && opts !== void 0 && opts.component) {
|
164
|
+
reportComponentVersion(opts.component, versions);
|
170
165
|
} else {
|
171
166
|
reportAllVersions(versions);
|
172
167
|
}
|
@@ -323,9 +318,12 @@ module.exports = {
|
|
323
318
|
program.command('help').description('Shows CLI help and exits').action(() => {
|
324
319
|
program.help();
|
325
320
|
});
|
326
|
-
|
327
|
-
|
328
|
-
|
321
|
+
const handleVersion = cmd => {
|
322
|
+
return cmd.option('--component <package|binary|electron|node>', 'component to report version for').action((opts, ...other) => {
|
323
|
+
showVersions(util.parseOpts(opts));
|
324
|
+
});
|
325
|
+
};
|
326
|
+
handleVersion(program.storeOptionsAsProperties().option('-v, --version', text('version')).command('version').description(text('version')));
|
329
327
|
maybeAddInspectFlags(addCypressOpenCommand(program)).action(opts => {
|
330
328
|
debug('opening Cypress');
|
331
329
|
require('./exec/open').start(util.parseOpts(opts)).then(util.exit).catch(util.logErrorExit1);
|
@@ -426,7 +424,7 @@ module.exports = {
|
|
426
424
|
// and now does not understand top level options
|
427
425
|
// .option('-v, --version').command('version')
|
428
426
|
// so we have to manually catch '-v, --version'
|
429
|
-
|
427
|
+
handleVersion(program);
|
430
428
|
}
|
431
429
|
debug('program parsing arguments');
|
432
430
|
return program.parse(args);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cypress",
|
3
|
-
"version": "12.
|
3
|
+
"version": "12.10.0",
|
4
4
|
"main": "index.js",
|
5
5
|
"scripts": {
|
6
6
|
"postinstall": "node index.js --exec install",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"check-more-types": "^2.24.0",
|
22
22
|
"cli-cursor": "^3.1.0",
|
23
23
|
"cli-table3": "~0.6.1",
|
24
|
-
"commander": "^
|
24
|
+
"commander": "^6.2.1",
|
25
25
|
"common-tags": "^1.8.0",
|
26
26
|
"dayjs": "^1.10.4",
|
27
27
|
"debug": "^4.3.4",
|
@@ -39,7 +39,7 @@
|
|
39
39
|
"listr2": "^3.8.3",
|
40
40
|
"lodash": "^4.17.21",
|
41
41
|
"log-symbols": "^4.0.0",
|
42
|
-
"minimist": "^1.2.
|
42
|
+
"minimist": "^1.2.8",
|
43
43
|
"ospath": "^1.2.2",
|
44
44
|
"pretty-bytes": "^5.6.0",
|
45
45
|
"proxy-from-env": "1.0.0",
|
@@ -118,8 +118,8 @@
|
|
118
118
|
},
|
119
119
|
"buildInfo": {
|
120
120
|
"commitBranch": "develop",
|
121
|
-
"commitSha": "
|
122
|
-
"commitDate": "2023-
|
121
|
+
"commitSha": "1ed2031faac6e01848fafe71f27e5c3afd9c21a3",
|
122
|
+
"commitDate": "2023-04-17T15:59:15.000Z",
|
123
123
|
"stable": true
|
124
124
|
},
|
125
125
|
"description": "Cypress is a next generation front end testing tool built for the modern web",
|