vladx 1.2.0 → 1.3.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.
Files changed (2) hide show
  1. package/bin/vladx.js +6 -8
  2. package/package.json +1 -1
package/bin/vladx.js CHANGED
@@ -242,7 +242,7 @@ export class CLI {
242
242
  await this.engine.execute(source, { filename: filepath });
243
243
  } else {
244
244
  // Искать тесты
245
- const files = this.findTestFiles();
245
+ const files = await this.findTestFiles();
246
246
 
247
247
  for (const file of files) {
248
248
  const source = readFileSync(file, 'utf-8');
@@ -448,9 +448,9 @@ VladX - Мощный интерпретируемый язык программ
448
448
  /**
449
449
  * Найти тестовые файлы
450
450
  */
451
- findTestFiles() {
452
- const fs = require('fs');
453
- const path = require('path');
451
+ async findTestFiles() {
452
+ const fs = await import('fs');
453
+ const path = await import('path');
454
454
 
455
455
  const testFiles = [];
456
456
 
@@ -478,9 +478,7 @@ VladX - Мощный интерпретируемый язык программ
478
478
  /**
479
479
  * Запуск CLI
480
480
  */
481
- if (import.meta.url === `file://${process.argv[1]}`) {
482
- const cli = new CLI();
483
- cli.start(process.argv);
484
- }
481
+ const cli = new CLI();
482
+ cli.start(process.argv);
485
483
 
486
484
  export default CLI;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vladx",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Мощный интерпретируемый язык программирования с русским синтаксисом",
5
5
  "main": "src/index.js",
6
6
  "bin": {