@naturalcycles/dev-lib 16.6.1 → 16.6.3

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.
@@ -1,8 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const tslib_1 = require("tslib");
5
- const node_os_1 = tslib_1.__importDefault(require("node:os"));
6
4
  const prompts_1 = require("@inquirer/prompts");
7
5
  const js_lib_1 = require("@naturalcycles/js-lib");
8
6
  const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
@@ -113,7 +111,6 @@ const commands = [
113
111
  const commandMap = (0, js_lib_1._by)(commands.filter(c => !(c instanceof prompts_1.Separator)), c => c.name);
114
112
  const { CI } = process.env;
115
113
  (0, nodejs_lib_1.runScript)(async () => {
116
- logEnvironment();
117
114
  let cmd = process.argv.find(s => commandMap[s] && !commandMap[s].interactiveOnly);
118
115
  if (!cmd) {
119
116
  // interactive mode
@@ -146,18 +143,3 @@ async function bt() {
146
143
  async function tscAll() {
147
144
  await (0, build_util_1.runTSCInFolders)(['.', 'scripts', 'e2e'], ['--noEmit']);
148
145
  }
149
- function logEnvironment() {
150
- const { platform, arch, versions: { node }, env: { CPU_LIMIT, NODE_OPTIONS = 'not defined' }, } = process;
151
- const cpuLimit = Number(CPU_LIMIT) || undefined;
152
- const availableParallelism = node_os_1.default.availableParallelism?.();
153
- const cpus = node_os_1.default.cpus().length;
154
- console.log((0, nodejs_lib_1.dimGrey)(Object.entries({
155
- node: `${node} ${platform} ${arch}`,
156
- NODE_OPTIONS,
157
- cpus,
158
- availableParallelism,
159
- cpuLimit,
160
- })
161
- .map(([k, v]) => `${k}: ${v}`)
162
- .join(', ')));
163
- }
package/dist/lint.util.js CHANGED
@@ -14,7 +14,6 @@ const node_child_process_1 = tslib_1.__importDefault(require("node:child_process
14
14
  const node_fs_1 = tslib_1.__importDefault(require("node:fs"));
15
15
  const js_lib_1 = require("@naturalcycles/js-lib");
16
16
  const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
17
- const yargs_1 = tslib_1.__importDefault(require("yargs"));
18
17
  const paths_1 = require("./paths");
19
18
  const { prettierDirs, prettierExtensionsAll, stylelintExtensions, eslintExtensions, lintExclude, minActionlintVersion, } = require('../cfg/_cnst');
20
19
  /**
@@ -22,7 +21,7 @@ const { prettierDirs, prettierExtensionsAll, stylelintExtensions, eslintExtensio
22
21
  */
23
22
  async function lintAllCommand() {
24
23
  const started = Date.now();
25
- const { commitOnChanges, failOnChanges } = yargs_1.default.options({
24
+ const { commitOnChanges, failOnChanges } = (0, nodejs_lib_1._yargs)().options({
26
25
  commitOnChanges: {
27
26
  type: 'boolean',
28
27
  default: false,
@@ -74,7 +73,7 @@ async function lintAllCommand() {
74
73
  */
75
74
  async function eslintAll(opt) {
76
75
  const started = Date.now();
77
- const { argv } = yargs_1.default.options({
76
+ const { argv } = (0, nodejs_lib_1._yargs)().options({
78
77
  ext: {
79
78
  type: 'string',
80
79
  default: eslintExtensions,
@@ -167,7 +166,7 @@ const stylelintPaths = [
167
166
  ...lintExclude.map((s) => `!${s}`),
168
167
  ];
169
168
  function stylelintAll() {
170
- const { fix } = yargs_1.default.options({
169
+ const { fix } = (0, nodejs_lib_1._yargs)().options({
171
170
  fix: {
172
171
  type: 'boolean',
173
172
  default: true,
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
- "version": "16.6.1",
3
+ "version": "16.6.3",
4
4
  "scripts": {
5
5
  "prepare": "husky",
6
- "tsn-debug": "tsn testScript.ts",
7
- "dev-lib": "tsn ./src/bin/dev-lib.ts",
8
- "bt": "tsn ./src/bin/dev-lib.ts bt && tsn eslintPrintConfig",
9
- "lbt": "tsn ./src/bin/dev-lib.ts lbt && tsn eslintPrintConfig",
10
- "build": "tsn ./src/bin/dev-lib.ts build",
11
- "build-prod-esm-cjs": "tsn ./src/bin/dev-lib.ts build-esm-cjs",
12
- "test": "tsn ./src/bin/dev-lib.ts test",
13
- "test-leaks": "tsn ./src/bin/dev-lib.ts test-leaks",
14
- "test-integration": "tsn ./src/bin/dev-lib.ts test-integration",
15
- "test-manual": "tsn ./src/bin/dev-lib.ts test-manual",
16
- "lint": "tsn ./src/bin/dev-lib.ts lint",
17
- "up": "tsn ./src/bin/up.ts",
18
- "upnc": "tsn ./src/bin/upnc.ts"
6
+ "tsn-debug": "tsx scripts/testScript.ts",
7
+ "dev-lib": "tsx ./src/bin/dev-lib.ts",
8
+ "bt": "tsx ./src/bin/dev-lib.ts bt && tsx scripts/eslintPrintConfig.script.ts",
9
+ "lbt": "tsx ./src/bin/dev-lib.ts lbt && tsx scripts/eslintPrintConfig.script.ts",
10
+ "build": "tsx ./src/bin/dev-lib.ts build",
11
+ "build-prod-esm-cjs": "tsx ./src/bin/dev-lib.ts build-esm-cjs",
12
+ "test": "tsx ./src/bin/dev-lib.ts test",
13
+ "test-leaks": "tsx ./src/bin/dev-lib.ts test-leaks",
14
+ "test-integration": "tsx ./src/bin/dev-lib.ts test-integration",
15
+ "test-manual": "tsx ./src/bin/dev-lib.ts test-manual",
16
+ "lint": "tsx ./src/bin/dev-lib.ts lint",
17
+ "up": "tsx ./src/bin/up.ts",
18
+ "upnc": "tsx ./src/bin/upnc.ts"
19
19
  },
20
20
  "dependencies": {
21
21
  "@biomejs/biome": "^1",
@@ -43,14 +43,13 @@
43
43
  "timekeeper": "^2",
44
44
  "typescript": "^5",
45
45
  "typescript-eslint": "^8",
46
- "vue-eslint-parser": "^10",
47
- "yargs": "^17"
46
+ "vue-eslint-parser": "^10"
48
47
  },
49
48
  "devDependencies": {
50
- "@types/yargs": "^16",
51
49
  "@vitest/coverage-v8": "^3",
52
50
  "stylelint": "^16",
53
51
  "stylelint-config-standard-scss": "^14",
52
+ "tsx": "^4",
54
53
  "vitest": "^3"
55
54
  },
56
55
  "files": [