@bemedev/dev-utils 0.8.2 → 0.8.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.
- package/lib/build-tests/constants.cjs +2 -0
- package/lib/build-tests/constants.cjs.map +1 -1
- package/lib/build-tests/constants.d.ts +1 -0
- package/lib/build-tests/constants.js +2 -1
- package/lib/build-tests/constants.js.map +1 -1
- package/lib/build-tests/getTypescriptOutdir.cjs +2 -5
- package/lib/build-tests/getTypescriptOutdir.cjs.map +1 -1
- package/lib/build-tests/getTypescriptOutdir.js +4 -6
- package/lib/build-tests/getTypescriptOutdir.js.map +1 -1
- package/package.json +2 -2
|
@@ -17,8 +17,10 @@ const PACKAGE_PATH = "./package.json";
|
|
|
17
17
|
const TARBALL_FOLDER = ".pack";
|
|
18
18
|
const TARBALL_EXTENSION = ".tgz";
|
|
19
19
|
const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;
|
|
20
|
+
const DEFAULT_OUT_DIR = "./lib";
|
|
20
21
|
//#endregion
|
|
21
22
|
exports.BIN_KEY = BIN_KEY;
|
|
23
|
+
exports.DEFAULT_OUT_DIR = DEFAULT_OUT_DIR;
|
|
22
24
|
exports.DOT = DOT;
|
|
23
25
|
exports.EXPORT_KEY = EXPORT_KEY;
|
|
24
26
|
exports.EXPORT_KEYS = EXPORT_KEYS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.cjs","names":[],"sources":["../../src/build-tests/constants.ts"],"sourcesContent":["export const FILE_ORIGIN = 'file';\nexport const devKey = 'devDependencies';\nexport const THIS1 = 'this-gen-1';\nexport const EXPORT_KEYS = ['main', 'typings', 'module'] as const;\nexport const EXPORT_KEY = 'exports';\nexport const PATH_OUT_DIR = 'compilerOptions.outDir';\nexport const DOT = './';\nexport const BIN_KEY = 'bin';\nexport const TS_PATH = './tsconfig.json';\nexport const PACKAGE_PATH = './package.json';\nexport const TARBALL_FOLDER = '.pack';\nexport const TARBALL_EXTENSION = '.tgz';\nexport const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;\n\n// export const FIXTURES = {\n// true: 'true',\n// false: 'false',\n// recursive: 'TEST_RECURSIVE',\n// vitest: 'VITEST_VSCODE',\n// } as const;\n"],"mappings":";;AAAA,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,cAAc;CAAC;CAAQ;CAAW;CAAS;AACxD,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,mBAAmB,eAAe"}
|
|
1
|
+
{"version":3,"file":"constants.cjs","names":[],"sources":["../../src/build-tests/constants.ts"],"sourcesContent":["export const FILE_ORIGIN = 'file';\nexport const devKey = 'devDependencies';\nexport const THIS1 = 'this-gen-1';\nexport const EXPORT_KEYS = ['main', 'typings', 'module'] as const;\nexport const EXPORT_KEY = 'exports';\nexport const PATH_OUT_DIR = 'compilerOptions.outDir';\nexport const DOT = './';\nexport const BIN_KEY = 'bin';\nexport const TS_PATH = './tsconfig.json';\nexport const PACKAGE_PATH = './package.json';\nexport const TARBALL_FOLDER = '.pack';\nexport const TARBALL_EXTENSION = '.tgz';\nexport const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;\nexport const DEFAULT_OUT_DIR = './lib';\n\n// export const FIXTURES = {\n// true: 'true',\n// false: 'false',\n// recursive: 'TEST_RECURSIVE',\n// vitest: 'VITEST_VSCODE',\n// } as const;\n"],"mappings":";;AAAA,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,cAAc;CAAC;CAAQ;CAAW;CAAS;AACxD,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,mBAAmB,eAAe;AAC/C,MAAa,kBAAkB"}
|
|
@@ -11,3 +11,4 @@ export declare const PACKAGE_PATH = "./package.json";
|
|
|
11
11
|
export declare const TARBALL_FOLDER = ".pack";
|
|
12
12
|
export declare const TARBALL_EXTENSION = ".tgz";
|
|
13
13
|
export declare const TEARDOWN_COMMAND = "pnpm remove this-gen-1";
|
|
14
|
+
export declare const DEFAULT_OUT_DIR = "./lib";
|
|
@@ -16,7 +16,8 @@ const PACKAGE_PATH = "./package.json";
|
|
|
16
16
|
const TARBALL_FOLDER = ".pack";
|
|
17
17
|
const TARBALL_EXTENSION = ".tgz";
|
|
18
18
|
const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;
|
|
19
|
+
const DEFAULT_OUT_DIR = "./lib";
|
|
19
20
|
//#endregion
|
|
20
|
-
export { BIN_KEY, DOT, EXPORT_KEY, EXPORT_KEYS, FILE_ORIGIN, PACKAGE_PATH, PATH_OUT_DIR, TARBALL_EXTENSION, TARBALL_FOLDER, TEARDOWN_COMMAND, THIS1, TS_PATH, devKey };
|
|
21
|
+
export { BIN_KEY, DEFAULT_OUT_DIR, DOT, EXPORT_KEY, EXPORT_KEYS, FILE_ORIGIN, PACKAGE_PATH, PATH_OUT_DIR, TARBALL_EXTENSION, TARBALL_FOLDER, TEARDOWN_COMMAND, THIS1, TS_PATH, devKey };
|
|
21
22
|
|
|
22
23
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","names":[],"sources":["../../src/build-tests/constants.ts"],"sourcesContent":["export const FILE_ORIGIN = 'file';\nexport const devKey = 'devDependencies';\nexport const THIS1 = 'this-gen-1';\nexport const EXPORT_KEYS = ['main', 'typings', 'module'] as const;\nexport const EXPORT_KEY = 'exports';\nexport const PATH_OUT_DIR = 'compilerOptions.outDir';\nexport const DOT = './';\nexport const BIN_KEY = 'bin';\nexport const TS_PATH = './tsconfig.json';\nexport const PACKAGE_PATH = './package.json';\nexport const TARBALL_FOLDER = '.pack';\nexport const TARBALL_EXTENSION = '.tgz';\nexport const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;\n\n// export const FIXTURES = {\n// true: 'true',\n// false: 'false',\n// recursive: 'TEST_RECURSIVE',\n// vitest: 'VITEST_VSCODE',\n// } as const;\n"],"mappings":";AAAA,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,cAAc;CAAC;CAAQ;CAAW;CAAS;AACxD,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,mBAAmB,eAAe"}
|
|
1
|
+
{"version":3,"file":"constants.js","names":[],"sources":["../../src/build-tests/constants.ts"],"sourcesContent":["export const FILE_ORIGIN = 'file';\nexport const devKey = 'devDependencies';\nexport const THIS1 = 'this-gen-1';\nexport const EXPORT_KEYS = ['main', 'typings', 'module'] as const;\nexport const EXPORT_KEY = 'exports';\nexport const PATH_OUT_DIR = 'compilerOptions.outDir';\nexport const DOT = './';\nexport const BIN_KEY = 'bin';\nexport const TS_PATH = './tsconfig.json';\nexport const PACKAGE_PATH = './package.json';\nexport const TARBALL_FOLDER = '.pack';\nexport const TARBALL_EXTENSION = '.tgz';\nexport const TEARDOWN_COMMAND = `pnpm remove ${THIS1}`;\nexport const DEFAULT_OUT_DIR = './lib';\n\n// export const FIXTURES = {\n// true: 'true',\n// false: 'false',\n// recursive: 'TEST_RECURSIVE',\n// vitest: 'VITEST_VSCODE',\n// } as const;\n"],"mappings":";AAAA,MAAa,cAAc;AAC3B,MAAa,SAAS;AACtB,MAAa,QAAQ;AACrB,MAAa,cAAc;CAAC;CAAQ;CAAW;CAAS;AACxD,MAAa,aAAa;AAC1B,MAAa,eAAe;AAC5B,MAAa,MAAM;AACnB,MAAa,UAAU;AACvB,MAAa,UAAU;AACvB,MAAa,eAAe;AAC5B,MAAa,iBAAiB;AAC9B,MAAa,oBAAoB;AACjC,MAAa,mBAAmB,eAAe;AAC/C,MAAa,kBAAkB"}
|
|
@@ -2,15 +2,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
const require_build_tests_constants = require("./constants.cjs");
|
|
4
4
|
let path = require("path");
|
|
5
|
-
path = require_runtime.__toESM(path, 1);
|
|
6
5
|
let edit_json_file = require("edit-json-file");
|
|
7
6
|
edit_json_file = require_runtime.__toESM(edit_json_file, 1);
|
|
8
|
-
let url = require("url");
|
|
9
7
|
//#region src/build-tests/getTypescriptOutdir.ts
|
|
10
8
|
const getTypescriptOutdir = () => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const outDir1 = file.get(require_build_tests_constants.PATH_OUT_DIR);
|
|
9
|
+
let file = (0, edit_json_file.default)((0, path.resolve)(process.cwd(), require_build_tests_constants.TS_PATH));
|
|
10
|
+
const outDir1 = file.get("compilerOptions.outDir") ?? "./lib";
|
|
14
11
|
/* v8 ignore next 3 */
|
|
15
12
|
const outDir2 = outDir1.startsWith("./") ? outDir1.replace("./", "") : outDir1;
|
|
16
13
|
file = void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTypescriptOutdir.cjs","names":["TS_PATH"
|
|
1
|
+
{"version":3,"file":"getTypescriptOutdir.cjs","names":["TS_PATH"],"sources":["../../src/build-tests/getTypescriptOutdir.ts"],"sourcesContent":["import type { Fn } from '#utils/types';\nimport editJsonFile, { type JsonEditor } from 'edit-json-file';\nimport { resolve } from 'path';\nimport { DEFAULT_OUT_DIR, DOT, PATH_OUT_DIR, TS_PATH } from './constants';\n\ntype Fn1 = Fn<[], string>;\n\nexport const getTypescriptOutdir: Fn1 = () => {\n let file: JsonEditor | undefined = editJsonFile(\n resolve(process.cwd(), TS_PATH),\n );\n\n const outDir1 = file.get(PATH_OUT_DIR) ?? DEFAULT_OUT_DIR;\n /* v8 ignore next 3 */\n const outDir2 = outDir1.startsWith(DOT)\n ? outDir1.replace(DOT, '')\n : outDir1;\n\n file = undefined;\n return outDir2;\n};\n"],"mappings":";;;;;;;AAOA,MAAa,4BAAiC;CAC5C,IAAI,QAAA,GAAA,eAAA,UAAA,GAAA,KAAA,SACM,QAAQ,KAAK,EAAEA,8BAAAA,QAAQ,CAChC;CAED,MAAM,UAAU,KAAK,IAAA,yBAAiB,IAAA;;CAEtC,MAAM,UAAU,QAAQ,WAAA,KAAe,GACnC,QAAQ,QAAA,MAAa,GAAG,GACxB;AAEJ,QAAO,KAAA;AACP,QAAO"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { TS_PATH } from "./constants.js";
|
|
2
|
+
import { resolve } from "path";
|
|
3
3
|
import editJsonFile from "edit-json-file";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
4
|
//#region src/build-tests/getTypescriptOutdir.ts
|
|
6
5
|
const getTypescriptOutdir = () => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const outDir1 = file.get(PATH_OUT_DIR);
|
|
6
|
+
let file = editJsonFile(resolve(process.cwd(), TS_PATH));
|
|
7
|
+
const outDir1 = file.get("compilerOptions.outDir") ?? "./lib";
|
|
10
8
|
/* v8 ignore next 3 */
|
|
11
9
|
const outDir2 = outDir1.startsWith("./") ? outDir1.replace("./", "") : outDir1;
|
|
12
10
|
file = void 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTypescriptOutdir.js","names":[],"sources":["../../src/build-tests/getTypescriptOutdir.ts"],"sourcesContent":["import editJsonFile, { type JsonEditor } from 'edit-json-file';\nimport
|
|
1
|
+
{"version":3,"file":"getTypescriptOutdir.js","names":[],"sources":["../../src/build-tests/getTypescriptOutdir.ts"],"sourcesContent":["import type { Fn } from '#utils/types';\nimport editJsonFile, { type JsonEditor } from 'edit-json-file';\nimport { resolve } from 'path';\nimport { DEFAULT_OUT_DIR, DOT, PATH_OUT_DIR, TS_PATH } from './constants';\n\ntype Fn1 = Fn<[], string>;\n\nexport const getTypescriptOutdir: Fn1 = () => {\n let file: JsonEditor | undefined = editJsonFile(\n resolve(process.cwd(), TS_PATH),\n );\n\n const outDir1 = file.get(PATH_OUT_DIR) ?? DEFAULT_OUT_DIR;\n /* v8 ignore next 3 */\n const outDir2 = outDir1.startsWith(DOT)\n ? outDir1.replace(DOT, '')\n : outDir1;\n\n file = undefined;\n return outDir2;\n};\n"],"mappings":";;;;AAOA,MAAa,4BAAiC;CAC5C,IAAI,OAA+B,aACjC,QAAQ,QAAQ,KAAK,EAAE,QAAQ,CAChC;CAED,MAAM,UAAU,KAAK,IAAA,yBAAiB,IAAA;;CAEtC,MAAM,UAAU,QAAQ,WAAA,KAAe,GACnC,QAAQ,QAAA,MAAa,GAAG,GACxB;AAEJ,QAAO,KAAA;AACP,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bemedev/dev-utils",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "A collection of utilities for Node.js development, including build tools, testing utilities, and configuration management.",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "bri_lvi@icloud.com",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@bemedev/basifun": "0.5.3",
|
|
103
103
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
104
104
|
"@types/edit-json-file": "^1.7.4",
|
|
105
|
-
"@types/node": "^26.0.
|
|
105
|
+
"@types/node": "^26.0.1",
|
|
106
106
|
"@types/shelljs": "^0.10.0",
|
|
107
107
|
"typescript": "^6.0.3",
|
|
108
108
|
"zod": "^4.4.3",
|