create-wdio 7.1.1 ā 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/constants.js +2 -1
- package/build/index.js +12 -8
- package/package.json +13 -13
package/build/constants.js
CHANGED
|
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.UNSUPPORTED_NODE_VERSION = exports.PROGRAM_TITLE = exports.ASCII_ROBOT = void 0;
|
|
6
|
+
exports.UNSUPPORTED_NODE_VERSION = exports.PROGRAM_TITLE = exports.ASCII_ROBOT = exports.DEFAULT_NPM_TAG = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
exports.DEFAULT_NPM_TAG = 'latest';
|
|
8
9
|
const colorItBold = chalk_1.default.bold.rgb(234, 89, 6);
|
|
9
10
|
const colorIt = chalk_1.default.rgb(234, 89, 6);
|
|
10
11
|
exports.ASCII_ROBOT = `
|
package/build/index.js
CHANGED
|
@@ -15,7 +15,9 @@ let pkg = { version: 'unknown' };
|
|
|
15
15
|
try {
|
|
16
16
|
pkg = JSON.parse(fs_1.default.readFileSync(__dirname + '/../package.json').toString());
|
|
17
17
|
}
|
|
18
|
-
catch (e) {
|
|
18
|
+
catch (e) {
|
|
19
|
+
/* ignore */
|
|
20
|
+
}
|
|
19
21
|
let projectName;
|
|
20
22
|
let useYarn;
|
|
21
23
|
function run(operation = createWebdriverIO) {
|
|
@@ -30,10 +32,11 @@ function run(operation = createWebdriverIO) {
|
|
|
30
32
|
.arguments('[project]')
|
|
31
33
|
.usage(`${chalk_1.default.green('[project]')} [options]`)
|
|
32
34
|
.action(name => (projectName = name))
|
|
33
|
-
.option('--
|
|
34
|
-
.option('--
|
|
35
|
-
.option('--
|
|
36
|
-
.option('--
|
|
35
|
+
.option('-t, --npm-tag <tag>', 'Which NPM version you like to install, e.g. @next', constants_1.DEFAULT_NPM_TAG)
|
|
36
|
+
.option('-u, --use-yarn', 'Use Yarn package manager to install packages', false)
|
|
37
|
+
.option('-v, --verbose', 'print additional logs')
|
|
38
|
+
.option('-y, --yes', 'will fill in all config defaults without prompting', false)
|
|
39
|
+
.option('-d, --dev', 'Install all packages as into devDependencies', true)
|
|
37
40
|
.allowUnknownOption()
|
|
38
41
|
.on('--help', () => console.log())
|
|
39
42
|
.parse(process.argv);
|
|
@@ -53,7 +56,8 @@ function run(operation = createWebdriverIO) {
|
|
|
53
56
|
}
|
|
54
57
|
exports.run = run;
|
|
55
58
|
async function createWebdriverIO(opts) {
|
|
56
|
-
const
|
|
59
|
+
const cwd = process.cwd();
|
|
60
|
+
const npmTag = opts.npmTag.startsWith('@') ? opts.npmTag : `@${opts.npmTag}`;
|
|
57
61
|
const unsupportedNodeVersion = !semver_1.default.satisfies(process.version, '>=12');
|
|
58
62
|
if (unsupportedNodeVersion) {
|
|
59
63
|
console.log(chalk_1.default.yellow(constants_1.UNSUPPORTED_NODE_VERSION));
|
|
@@ -80,7 +84,7 @@ async function createWebdriverIO(opts) {
|
|
|
80
84
|
};
|
|
81
85
|
await fs_1.default.promises.writeFile(pkgJsonPath, JSON.stringify(pkgJson, null, 4));
|
|
82
86
|
}
|
|
83
|
-
const deps = [
|
|
87
|
+
const deps = [`@wdio/cli${npmTag}`];
|
|
84
88
|
await install(deps.flat(), root, opts);
|
|
85
89
|
console.log('\nFinished installing packages.');
|
|
86
90
|
console.log('\nRunning WDIO CLI Wizard...');
|
|
@@ -96,7 +100,7 @@ async function createWebdriverIO(opts) {
|
|
|
96
100
|
await fs_1.default.promises.writeFile(pkgJsonPath, JSON.stringify(pkgJson, null, 4));
|
|
97
101
|
}
|
|
98
102
|
console.log(`\nš¤ Successfully setup project at ${root} š`);
|
|
99
|
-
if (root !=
|
|
103
|
+
if (root != cwd) {
|
|
100
104
|
console.log(`\n${chalk_1.default.yellow('ā ')} First, change the directory via: ${chalk_1.default.cyan('$ cd')} ${chalk_1.default.green(root)}`);
|
|
101
105
|
}
|
|
102
106
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-wdio",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Install WebdriverIO with all its dependencies in a single run",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,19 +39,19 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@schemastore/package": "^0.0.6",
|
|
41
41
|
"@types/cross-spawn": "^6.0.2",
|
|
42
|
-
"@types/jest": "^27.
|
|
43
|
-
"@types/node": "^
|
|
44
|
-
"@types/semver": "^7.3.
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
46
|
-
"@typescript-eslint/parser": "^5.
|
|
47
|
-
"eslint": "^8.0
|
|
48
|
-
"eslint-plugin-import": "^2.25.
|
|
49
|
-
"jest": "^27.
|
|
42
|
+
"@types/jest": "^27.4.1",
|
|
43
|
+
"@types/node": "^18.0.0",
|
|
44
|
+
"@types/semver": "^7.3.9",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
|
46
|
+
"@typescript-eslint/parser": "^5.14.0",
|
|
47
|
+
"eslint": "^8.10.0",
|
|
48
|
+
"eslint-plugin-import": "^2.25.4",
|
|
49
|
+
"jest": "^27.5.1",
|
|
50
50
|
"npm-run-all": "^4.1.5",
|
|
51
|
-
"release-it": "^
|
|
52
|
-
"ts-jest": "^27.
|
|
53
|
-
"ts-node": "^10.
|
|
54
|
-
"typescript": "^4.
|
|
51
|
+
"release-it": "^15.0.0",
|
|
52
|
+
"ts-jest": "^27.1.3",
|
|
53
|
+
"ts-node": "^10.7.0",
|
|
54
|
+
"typescript": "^4.6.2"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"chalk": "^4.1.2",
|