@naturalcycles/dev-lib 13.38.4 → 13.39.1

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/dist/bin/bt.js CHANGED
@@ -2,10 +2,10 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
5
+ const nodejs_lib_2 = require("@naturalcycles/nodejs-lib");
6
6
  const jest_util_1 = require("../util/jest.util");
7
7
  const tsc_util_1 = require("../util/tsc.util");
8
- (0, script_1.runScript)(async () => {
8
+ (0, nodejs_lib_2.runScript)(async () => {
9
9
  (0, nodejs_lib_1._emptyDirSync)('./dist'); // it doesn't delete the dir itself, to prevent IDE jumping
10
10
  // fs.rmSync('./dist', { recursive: true, force: true })
11
11
  await (0, tsc_util_1.tscMainAndScripts)(true);
package/dist/bin/btl.js CHANGED
@@ -2,11 +2,11 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
5
+ const nodejs_lib_2 = require("@naturalcycles/nodejs-lib");
6
6
  const lint_all_command_1 = require("../cmd/lint-all.command");
7
7
  const jest_util_1 = require("../util/jest.util");
8
8
  const tsc_util_1 = require("../util/tsc.util");
9
- (0, script_1.runScript)(async () => {
9
+ (0, nodejs_lib_2.runScript)(async () => {
10
10
  await (0, lint_all_command_1.lintAllCommand)();
11
11
  (0, nodejs_lib_1._emptyDirSync)('./dist'); // it doesn't delete the dir itself, to prevent IDE jumping
12
12
  // fs.rmSync('./dist', { recursive: true, force: true })
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const build_copy_command_1 = require("../cmd/build-copy.command");
6
- (0, script_1.runScript)(build_copy_command_1.buildCopyCommand);
6
+ (0, nodejs_lib_1.runScript)(build_copy_command_1.buildCopyCommand);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const build_prod_esm_cjs_command_1 = require("../cmd/build-prod-esm-cjs.command");
6
- (0, script_1.runScript)(build_prod_esm_cjs_command_1.buildProdESMCJSCommand);
6
+ (0, nodejs_lib_1.runScript)(build_prod_esm_cjs_command_1.buildProdESMCJSCommand);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const build_prod_command_1 = require("../cmd/build-prod.command");
6
- (0, script_1.runScript)(build_prod_command_1.buildProdCommand);
6
+ (0, nodejs_lib_1.runScript)(build_prod_command_1.buildProdCommand);
package/dist/bin/build.js CHANGED
@@ -2,9 +2,9 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
5
+ const nodejs_lib_2 = require("@naturalcycles/nodejs-lib");
6
6
  const tsc_util_1 = require("../util/tsc.util");
7
- (0, script_1.runScript)(async () => {
7
+ (0, nodejs_lib_2.runScript)(async () => {
8
8
  (0, nodejs_lib_1._emptyDirSync)('./dist'); // it doesn't delete the dir itself, to prevent IDE jumping
9
9
  // fs.rmSync('./dist', { recursive: true, force: true })
10
10
  await (0, tsc_util_1.tscMainAndScripts)(true);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const eslint_all_command_1 = require("../cmd/eslint-all.command");
6
- (0, script_1.runScript)(eslint_all_command_1.eslintAllCommand);
6
+ (0, nodejs_lib_1.runScript)(eslint_all_command_1.eslintAllCommand);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const init_from_dev_lib_command_1 = require("../cmd/init-from-dev-lib.command");
6
- (0, script_1.runScript)(init_from_dev_lib_command_1.initFromDevLibCommand);
6
+ (0, nodejs_lib_1.runScript)(init_from_dev_lib_command_1.initFromDevLibCommand);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const lint_all_command_1 = require("../cmd/lint-all.command");
6
- (0, script_1.runScript)(lint_all_command_1.lintAllCommand);
6
+ (0, nodejs_lib_1.runScript)(lint_all_command_1.lintAllCommand);
@@ -2,9 +2,9 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const fs = require("node:fs");
5
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
5
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
6
6
  const paths_cnst_1 = require("../cnst/paths.cnst");
7
- (0, script_1.runScript)(async () => {
7
+ (0, nodejs_lib_1.runScript)(async () => {
8
8
  // const cwd = process.cwd()
9
9
  const localConfig = `./lint-staged.config.js`;
10
10
  const sharedConfig = `${paths_cnst_1.cfgDir}/lint-staged.config.js`;
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const prettier_util_1 = require("../util/prettier.util");
6
- (0, script_1.runScript)(() => {
6
+ (0, nodejs_lib_1.runScript)(() => {
7
7
  (0, prettier_util_1.runPrettier)();
8
8
  });
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const stylelint_util_1 = require("../util/stylelint.util");
6
- (0, script_1.runScript)(async () => {
6
+ (0, nodejs_lib_1.runScript)(async () => {
7
7
  (0, stylelint_util_1.stylelintAll)();
8
8
  });
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const jest_util_1 = require("../util/jest.util");
6
- (0, script_1.runScript)(async () => {
6
+ (0, nodejs_lib_1.runScript)(async () => {
7
7
  console.log('! "yarn test-ci" is deprecated, use plain `yarn test` instead !');
8
8
  (0, jest_util_1.runJest)();
9
9
  });
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const jest_util_1 = require("../util/jest.util");
6
- (0, script_1.runScript)(async () => {
6
+ (0, nodejs_lib_1.runScript)(async () => {
7
7
  console.log('! "yarn test-integration-ci" is deprecated, use plain `yarn test-integration` instead !');
8
8
  (0, jest_util_1.runJest)({ integration: true });
9
9
  });
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const jest_util_1 = require("../util/jest.util");
6
- (0, script_1.runScript)(async () => {
6
+ (0, nodejs_lib_1.runScript)(async () => {
7
7
  (0, jest_util_1.runJest)({ integration: true });
8
8
  });
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const jest_util_1 = require("../util/jest.util");
6
- (0, script_1.runScript)(async () => {
6
+ (0, nodejs_lib_1.runScript)(async () => {
7
7
  (0, jest_util_1.runJest)({ leaks: true });
8
8
  });
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const jest_util_1 = require("../util/jest.util");
6
- (0, script_1.runScript)(async () => {
6
+ (0, nodejs_lib_1.runScript)(async () => {
7
7
  (0, jest_util_1.runJest)({ manual: true });
8
8
  });
package/dist/bin/test.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const jest_util_1 = require("../util/jest.util");
6
- (0, script_1.runScript)(async () => {
6
+ (0, nodejs_lib_1.runScript)(async () => {
7
7
  (0, jest_util_1.runJest)();
8
8
  });
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const tsc_prod_command_1 = require("../cmd/tsc-prod.command");
6
- (0, script_1.runScript)(tsc_prod_command_1.tscProdCommand);
6
+ (0, nodejs_lib_1.runScript)(tsc_prod_command_1.tscProdCommand);
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
4
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
5
5
  const tsc_util_1 = require("../util/tsc.util");
6
- (0, script_1.runScript)(tsc_util_1.tscScripts);
6
+ (0, nodejs_lib_1.runScript)(tsc_util_1.tscScripts);
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/bin/up.js ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const fs = require("node:fs");
5
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
6
+ const nodejs_lib_2 = require("@naturalcycles/nodejs-lib");
7
+ (0, nodejs_lib_2.runScript)(async () => {
8
+ (0, nodejs_lib_1.execVoidCommandSync)('yarn', ['upgrade']);
9
+ if (fs.existsSync(`node_modules/patch-package`)) {
10
+ (0, nodejs_lib_1.execVoidCommandSync)('patch-package');
11
+ }
12
+ });
@@ -2,9 +2,9 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const fs_1 = require("@naturalcycles/nodejs-lib/dist/fs");
5
- const script_1 = require("@naturalcycles/nodejs-lib/dist/script");
5
+ const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
6
6
  const paths_cnst_1 = require("../cnst/paths.cnst");
7
- (0, script_1.runScript)(() => {
7
+ (0, nodejs_lib_1.runScript)(() => {
8
8
  (0, fs_1.kpySync)({
9
9
  baseDir: paths_cnst_1.cfgOverwriteDir,
10
10
  outputDir: './',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
- "version": "13.38.4",
3
+ "version": "13.39.1",
4
4
  "scripts": {
5
5
  "prepare": "husky install",
6
6
  "tsn-debug": "tsn testScript.ts",
@@ -24,6 +24,7 @@
24
24
  "stylelint-all": "tsn ./src/bin/stylelint-all.ts",
25
25
  "lint-all": "tsn ./src/bin/lint-all.ts",
26
26
  "eslint-all": "tsn ./src/bin/eslint-all.ts",
27
+ "up": "tsn ./src/bin/up.ts",
27
28
  "eslint-print-config": "eslint --print-config src/index.ts > tmp/eslint.config.json",
28
29
  "update-from-dev-lib": "tsn ./src/bin/update-from-dev-lib.ts"
29
30
  },
@@ -92,6 +93,7 @@
92
93
  "test-manual": "dist/bin/test-manual.js",
93
94
  "tsc-prod": "dist/bin/tsc-prod.js",
94
95
  "tsc-scripts": "dist/bin/tsc-scripts.js",
96
+ "up": "dist/bin/up.js",
95
97
  "update-from-dev-lib": "dist/bin/update-from-dev-lib.js"
96
98
  },
97
99
  "engines": {
package/readme.md CHANGED
@@ -168,6 +168,8 @@ Install it **locally** in you project by adding
168
168
 
169
169
  #### Other commands
170
170
 
171
+ - `up`: shortcut for `yarn upgrade` && `yarn patch-package` (if `patch-package` exists in the
172
+ project).
171
173
  - `init-from-dev-lib`: copy config files from `dev-lib/cfg/init` to the project
172
174
  - `update-from-dev-lib`: copy config files from `dev-lib/cfg/overwrite` to the project
173
175