@qavajs/create 2.0.0 → 2.1.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/CHANGELOG.MD CHANGED
@@ -8,6 +8,12 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
8
8
  :beetle: - bugfix
9
9
  :x: - deprecation
10
10
 
11
+ ## [2.1.0]
12
+ - :rocket: removed yarn-install dependency
13
+
14
+ ## [2.0.0]
15
+ - :rocket: release v2
16
+
11
17
  ## [1.0.0]
12
18
  - :rocket: release
13
19
 
package/lib/install.js CHANGED
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
36
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
37
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -31,15 +41,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31
41
  step((generator = generator.apply(thisArg, _arguments || [])).next());
32
42
  });
33
43
  };
34
- var __importDefault = (this && this.__importDefault) || function (mod) {
35
- return (mod && mod.__esModule) ? mod : { "default": mod };
36
- };
37
44
  Object.defineProperty(exports, "__esModule", { value: true });
38
45
  exports.default = install;
39
46
  const promises_1 = require("node:fs/promises");
40
47
  const fs_extra_1 = require("fs-extra");
41
48
  const node_path_1 = require("node:path");
42
- const yarn_install_1 = __importDefault(require("yarn-install"));
49
+ const node_child_process_1 = require("node:child_process");
50
+ function installModules({ deps, cwd }) {
51
+ const modules = deps.join(' ');
52
+ (0, node_child_process_1.execSync)(`npm install ${modules}`, { cwd });
53
+ }
43
54
  const deps_1 = __importStar(require("./deps"));
44
55
  const ejs_1 = require("ejs");
45
56
  const prompts_1 = require("@inquirer/prompts");
@@ -192,10 +203,9 @@ function install() {
192
203
  ];
193
204
  console.log('installing packages...');
194
205
  console.log(modulesToInstall);
195
- (0, yarn_install_1.default)({
206
+ installModules({
196
207
  deps: modulesToInstall,
197
- cwd: process.cwd(),
198
- respectNpm5: true
208
+ cwd: process.cwd()
199
209
  });
200
210
  console.log('test script:');
201
211
  console.log(`npx qavajs --config config.${isTypescript ? 'ts' : 'js'}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qavajs/create",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "initializer of @qavajs project",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,17 +20,16 @@
20
20
  "author": "Alexandr Galichenko",
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@inquirer/prompts": "^7.0.1",
23
+ "@inquirer/prompts": "^7.2.3",
24
24
  "ejs": "^3.1.10",
25
- "fs-extra": "^11.2.0",
26
- "typescript": "^5.6.3",
27
- "yarn-install": "^1.0.0"
25
+ "fs-extra": "^11.3.0",
26
+ "typescript": "^5.7.3"
28
27
  },
29
28
  "devDependencies": {
30
29
  "@types/ejs": "^3.1.5",
31
30
  "@types/fs-extra": "^11.0.4",
32
- "@types/node": "^22.8.2",
33
- "@vitest/coverage-v8": "^2.1.4",
34
- "vitest": "^2.1.4"
31
+ "@types/node": "^22.10.7",
32
+ "@vitest/coverage-v8": "^3.0.1",
33
+ "vitest": "^3.0.1"
35
34
  }
36
35
  }
package/src/install.ts CHANGED
@@ -1,7 +1,13 @@
1
1
  import { readFile, writeFile } from 'node:fs/promises';
2
2
  import { ensureDir } from 'fs-extra';
3
3
  import { resolve } from 'node:path';
4
- import yarnInstall from 'yarn-install';
4
+ import { execSync } from 'node:child_process';
5
+
6
+ function installModules({ deps, cwd }: { deps: any[], cwd: string }) {
7
+ const modules = deps.join(' ');
8
+ execSync(`npm install ${modules}`, { cwd });
9
+ }
10
+
5
11
  import deps, { steps, format, modules, additionalModules, ModuleDefinition } from './deps';
6
12
  import { compile } from 'ejs';
7
13
  import { select, checkbox } from '@inquirer/prompts';
@@ -197,10 +203,9 @@ export default async function install(): Promise<void> {
197
203
  console.log('installing packages...');
198
204
  console.log(modulesToInstall);
199
205
 
200
- yarnInstall({
206
+ installModules({
201
207
  deps: modulesToInstall,
202
- cwd: process.cwd(),
203
- respectNpm5: true
208
+ cwd: process.cwd()
204
209
  });
205
210
 
206
211
  console.log('test script:');
@@ -11,7 +11,7 @@
11
11
  <%-` format: `%><%-format%>,
12
12
  <%-` memory: new Memory()`%>,
13
13
  <% if (isPlaywrightIncluded || isWdioIncluded) {%>
14
- <%-` pageObject: App`%>,
14
+ <%-` pageObject: new App()`%>,
15
15
  <%-` browser: {`%>
16
16
  <%-` capabilities: {`%>
17
17
  <%-` browserName: `%><% if (isWdioIncluded) {%><%-'"chrome"'%><%} else {%><%-'"chromium"'%><%}%>
@@ -36,7 +36,7 @@
36
36
  <%-` format: `%><%-format%>,
37
37
  <%-` memory: new Memory()`%>,
38
38
  <% if (isPlaywrightIncluded || isWdioIncluded) {%>
39
- <%-` pageObject: App`%>,
39
+ <%-` pageObject: new App()`%>,
40
40
  <%-` browser: {`%>
41
41
  <%-` capabilities: {`%>
42
42
  <%-` browserName: `%><% if (isWdioIncluded) {%><%-'"chrome"'%><%} else {%><%-'"chromium"'%><%}%>
@@ -1,17 +0,0 @@
1
- declare module 'yarn-install' {
2
- export default function yarnInstall(
3
- params: {
4
- deps: string[]
5
- cwd?: string
6
- registry?: string
7
- dev?: boolean
8
- global?: boolean
9
- remove?: boolean
10
- production?: boolean
11
- respectNpm5?: boolean
12
- }
13
- ): {
14
- stderr: string
15
- status: number
16
- }
17
- }