@layerzerolabs/common-node-utils 0.2.6 → 0.2.8
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/.turbo/turbo-build.log +11 -11
- package/.turbo/turbo-lint.log +4 -0
- package/.turbo/turbo-test.log +1 -1
- package/dist/{HUETPARE.js → P5H7F74Q.js} +6 -7
- package/dist/P5H7F74Q.js.map +1 -0
- package/dist/files.js +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/dist/HUETPARE.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -4,23 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/files.ts, src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
-
[34mCLI[39m tsup v8.
|
|
7
|
+
[34mCLI[39m tsup v8.5.1
|
|
8
8
|
[34mCLI[39m Using tsup config: /home/runner/work/monorepo-internal/monorepo-internal/packages/common/common-node-utils/tsup.config.ts
|
|
9
9
|
[34mCLI[39m Target: ES2023
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
+
[32mESM[39m [1mdist/files.js [22m[32m141.00 B[39m
|
|
14
|
+
[32mESM[39m [1mdist/index.js [22m[32m1.09 KB[39m
|
|
15
|
+
[32mESM[39m [1mdist/P5H7F74Q.js [22m[32m1.20 KB[39m
|
|
16
|
+
[32mESM[39m [1mdist/files.js.map [22m[32m69.00 B[39m
|
|
17
|
+
[32mESM[39m [1mdist/index.js.map [22m[32m2.04 KB[39m
|
|
18
|
+
[32mESM[39m [1mdist/P5H7F74Q.js.map [22m[32m2.51 KB[39m
|
|
19
|
+
[32mESM[39m ⚡️ Build success in 163ms
|
|
13
20
|
[32mCJS[39m [1mdist/files.cjs [22m[32m421.00 B[39m
|
|
14
|
-
[32mCJS[39m [1mdist/AY3Z4VAF.cjs [22m[32m1019.00 B[39m
|
|
15
21
|
[32mCJS[39m [1mdist/index.cjs [22m[32m1.99 KB[39m
|
|
22
|
+
[32mCJS[39m [1mdist/AY3Z4VAF.cjs [22m[32m1019.00 B[39m
|
|
16
23
|
[32mCJS[39m [1mdist/files.cjs.map [22m[32m70.00 B[39m
|
|
17
|
-
[32mCJS[39m [1mdist/AY3Z4VAF.cjs.map [22m[32m1.74 KB[39m
|
|
18
24
|
[32mCJS[39m [1mdist/index.cjs.map [22m[32m2.08 KB[39m
|
|
19
|
-
[32mCJS[39m
|
|
20
|
-
[
|
|
21
|
-
[32mESM[39m [1mdist/index.js [22m[32m1.07 KB[39m
|
|
22
|
-
[32mESM[39m [1mdist/HUETPARE.js [22m[32m1.21 KB[39m
|
|
23
|
-
[32mESM[39m [1mdist/files.js.map [22m[32m69.00 B[39m
|
|
24
|
-
[32mESM[39m [1mdist/index.js.map [22m[32m2.04 KB[39m
|
|
25
|
-
[32mESM[39m [1mdist/HUETPARE.js.map [22m[32m2.49 KB[39m
|
|
26
|
-
[32mESM[39m ⚡️ Build success in 157ms
|
|
25
|
+
[32mCJS[39m [1mdist/AY3Z4VAF.cjs.map [22m[32m1.74 KB[39m
|
|
26
|
+
[32mCJS[39m ⚡️ Build success in 163ms
|
package/.turbo/turbo-lint.log
CHANGED
|
@@ -2,3 +2,7 @@
|
|
|
2
2
|
> @layerzerolabs/common-node-utils@0.0.0 lint /home/runner/work/monorepo-internal/monorepo-internal/packages/common/common-node-utils
|
|
3
3
|
> eslint . --max-warnings 0 || (eslint . --fix --max-warnings 0 && false)
|
|
4
4
|
|
|
5
|
+
(node:27334) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///home/runner/work/monorepo-internal/monorepo-internal/eslint.config.js?mtime=1766003582514 is not specified and it doesn't parse as CommonJS.
|
|
6
|
+
Reparsing as ES module because module syntax was detected. This incurs a performance overhead.
|
|
7
|
+
To eliminate this warning, add "type": "module" to /home/runner/work/monorepo-internal/monorepo-internal/package.json.
|
|
8
|
+
(Use `node --trace-warnings ...` to show where the warning was created)
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[33mTesting types with tsc and vue-tsc is an experimental feature.
|
|
6
6
|
Breaking changes might not follow SemVer, please pin Vitest's version when using it.[39m
|
|
7
7
|
|
|
8
|
-
[1m[46m RUN [49m[22m [36mv3.2.
|
|
8
|
+
[1m[46m RUN [49m[22m [36mv3.2.4 [39m[90m/home/runner/work/monorepo-internal/monorepo-internal/packages/common/common-node-utils[39m
|
|
9
9
|
|
|
10
10
|
No test files found, exiting with code 0
|
|
11
11
|
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import path, { dirname } from 'path';
|
|
1
2
|
import { fileURLToPath } from 'url';
|
|
2
|
-
import
|
|
3
|
-
import { mkdir, writeFile, stat } from 'node:fs/promises';
|
|
4
|
-
import { dirname } from 'node:path';
|
|
3
|
+
import { mkdir, writeFile, stat } from 'fs/promises';
|
|
5
4
|
|
|
6
5
|
var __defProp = Object.defineProperty;
|
|
7
6
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
8
7
|
var getFilename = /* @__PURE__ */ __name(() => fileURLToPath(import.meta.url), "getFilename");
|
|
9
8
|
var getDirname = /* @__PURE__ */ __name(() => path.dirname(getFilename()), "getDirname");
|
|
10
|
-
var __dirname = /* @__PURE__ */ getDirname();
|
|
9
|
+
var __dirname$1 = /* @__PURE__ */ getDirname();
|
|
11
10
|
var dirCache = /* @__PURE__ */ new Map();
|
|
12
11
|
var writeFileAndCreateDirsCached = /* @__PURE__ */ __name(async (path2, data) => {
|
|
13
12
|
const dir = dirname(path2);
|
|
@@ -30,6 +29,6 @@ async function pathExists(path2) {
|
|
|
30
29
|
}
|
|
31
30
|
__name(pathExists, "pathExists");
|
|
32
31
|
|
|
33
|
-
export { __dirname, __name, pathExists, writeFileAndCreateDirsCached };
|
|
34
|
-
//# sourceMappingURL=
|
|
35
|
-
//# sourceMappingURL=
|
|
32
|
+
export { __dirname$1 as __dirname, __name, pathExists, writeFileAndCreateDirsCached };
|
|
33
|
+
//# sourceMappingURL=P5H7F74Q.js.map
|
|
34
|
+
//# sourceMappingURL=P5H7F74Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/.pnpm/tsup@8.5.1_@swc+core@1.15.2_@swc+helpers@0.5.17__jiti@2.6.1_postcss@8.5.6_tsx@4.20.6_typescript@5.8.2_yaml@2.8.1/node_modules/tsup/assets/esm_shims.js","../src/files.ts"],"names":["getFilename","fileURLToPath","url","getDirname","path","dirname","__dirname","dirCache","Map","writeFileAndCreateDirsCached","data","dir","has","set","mkdir","recursive","get","then","writeFile","encoding","pathExists","stat","err","code"],"mappings":";;;;;;AAIA,IAAMA,WAAAA,mBAAc,MAAA,CAAA,MAAMC,aAAAA,CAAc,MAAA,CAAA,IAAA,CAAYC,GAAG,CAAA,EAAnC,aAAA,CAAA;AACpB,IAAMC,6BAAa,MAAA,CAAA,MAAMC,IAAAA,CAAKC,OAAAA,CAAQL,WAAAA,EAAAA,CAAAA,EAAnB,YAAA,CAAA;AAEZ,IAAMM,8BAA4BH,UAAAA;ACJzC,IAAMI,QAAAA,uBAAeC,GAAAA,EAAAA;AAEd,IAAMC,4BAAAA,mBAA+B,MAAA,CAAA,OAAOL,KAAAA,EAAcM,IAAAA,KAAAA;AAC7D,EAAA,MAAMC,GAAAA,GAAMN,QAAQD,KAAAA,CAAAA;AAEpB,EAAA,IAAI,CAACG,QAAAA,CAASK,GAAAA,CAAID,GAAAA,CAAAA,EAAM;AACpBJ,IAAAA,QAAAA,CAASM,GAAAA,CAAIF,GAAAA,EAAKG,KAAAA,CAAMH,GAAAA,EAAK;MAAEI,SAAAA,EAAW;AAAK,KAAA,CAAA,CAAA;AACnD,EAAA;AACA,EAAA,MAAMR,QAAAA,CAASS,IAAIL,GAAAA,CAAAA,EAAMM,KAAK,MAAMC,SAAAA,CAAUd,OAAMM,IAAAA,EAAM;IAAES,QAAAA,EAAU;AAAQ,GAAA,CAAA,CAAA;AAClF,CAAA,EAP4C,8BAAA;AAS5C,eAAsBC,WAAWhB,KAAAA,EAAY;AACzC,EAAA,IAAI;AACA,IAAA,MAAMiB,KAAKjB,KAAAA,CAAAA;AACX,IAAA,OAAO,IAAA;AACX,EAAA,CAAA,CAAA,OAASkB,GAAAA,EAAU;AACf,IAAA,OAAOA,GAAAA,CAAIC,IAAAA,KAAS,QAAA,GAAW,IAAA,GAAO,KAAA;AAC1C,EAAA;AACJ;AAPsBH,MAAAA,CAAAA,UAAAA,EAAAA,YAAAA,CAAAA","file":"P5H7F74Q.js","sourcesContent":["// Shim globals in esm bundle\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","import { mkdir, stat, writeFile } from 'node:fs/promises';\nimport { dirname } from 'node:path';\n\nconst dirCache = new Map<string, Promise<string | undefined>>();\n\nexport const writeFileAndCreateDirsCached = async (path: string, data: string) => {\n const dir = dirname(path);\n // Deduplicate concurrent mkdir calls\n if (!dirCache.has(dir)) {\n dirCache.set(dir, mkdir(dir, { recursive: true }));\n }\n await dirCache.get(dir)?.then(() => writeFile(path, data, { encoding: 'utf-8' }));\n};\n\nexport async function pathExists(path: string): Promise<boolean> {\n try {\n await stat(path);\n return true;\n } catch (err: any) {\n return err.code !== 'ENOENT' ? true : false;\n }\n}\n"]}
|
package/dist/files.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __name, __dirname } from './
|
|
2
|
-
export { pathExists, writeFileAndCreateDirsCached } from './
|
|
1
|
+
import { __name, __dirname as __dirname$1 } from './P5H7F74Q.js';
|
|
2
|
+
export { pathExists, writeFileAndCreateDirsCached } from './P5H7F74Q.js';
|
|
3
3
|
import * as fs from 'fs/promises';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
|
|
@@ -7,7 +7,7 @@ var _fullyQualifiedRepoRootPath = void 0;
|
|
|
7
7
|
var getFullyQualifiedRepoRootPath = /* @__PURE__ */ __name(() => {
|
|
8
8
|
if (!_fullyQualifiedRepoRootPath) {
|
|
9
9
|
_fullyQualifiedRepoRootPath = (async () => {
|
|
10
|
-
let currentDir = __dirname;
|
|
10
|
+
let currentDir = __dirname$1;
|
|
11
11
|
while (true) {
|
|
12
12
|
const candidate = path.join(currentDir, "pnpm-workspace.yaml");
|
|
13
13
|
try {
|
|
@@ -16,7 +16,7 @@ var getFullyQualifiedRepoRootPath = /* @__PURE__ */ __name(() => {
|
|
|
16
16
|
} catch {
|
|
17
17
|
const parent = path.dirname(currentDir);
|
|
18
18
|
if (parent === currentDir) {
|
|
19
|
-
throw new Error(`Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname}, ended at ${currentDir}`);
|
|
19
|
+
throw new Error(`Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname$1}, ended at ${currentDir}`);
|
|
20
20
|
}
|
|
21
21
|
currentDir = parent;
|
|
22
22
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["_fullyQualifiedRepoRootPath","undefined","getFullyQualifiedRepoRootPath","currentDir","__dirname","candidate","path","join","access","parent","dirname","Error"],"mappings":";;;;;AAGA,IAAIA,2BAAAA,GAA2DC,MAAAA;AACxD,IAAMC,gDAAgC,MAAA,CAAA,MAAA;AACzC,EAAA,IAAI,CAACF,2BAAAA,EAA6B;AAC9BA,IAAAA,2BAAAA,GAAAA,CAA+B,YAAA;AAC3B,MAAA,IAAIG,UAAAA,GAAaC,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["_fullyQualifiedRepoRootPath","undefined","getFullyQualifiedRepoRootPath","currentDir","__dirname","candidate","path","join","access","parent","dirname","Error"],"mappings":";;;;;AAGA,IAAIA,2BAAAA,GAA2DC,MAAAA;AACxD,IAAMC,gDAAgC,MAAA,CAAA,MAAA;AACzC,EAAA,IAAI,CAACF,2BAAAA,EAA6B;AAC9BA,IAAAA,2BAAAA,GAAAA,CAA+B,YAAA;AAC3B,MAAA,IAAIG,UAAAA,GAAaC,WAAAA;AACjB,MAAA,OAAO,IAAA,EAAM;AACT,QAAA,MAAMC,SAAAA,GAAYC,IAAAA,CAAKC,IAAAA,CAAKJ,UAAAA,EAAY,qBAAA,CAAA;AACxC,QAAA,IAAI;AACA,UAAA,MAASK,UAAOH,SAAAA,CAAAA;AAChB,UAAA,OAAOF,UAAAA;QACX,CAAA,CAAA,MAAQ;AACJ,UAAA,MAAMM,MAAAA,GAASH,IAAAA,CAAKI,OAAAA,CAAQP,UAAAA,CAAAA;AAC5B,UAAA,IAAIM,WAAWN,UAAAA,EAAY;AACvB,YAAA,MAAM,IAAIQ,KAAAA,CACN,CAAA,oEAAA,EAAuEP,WAAAA,CAAAA,WAAAA,EAAuBD,UAAAA,CAAAA,CAAY,CAAA;AAElH,UAAA;AACAA,UAAAA,UAAAA,GAAaM,MAAAA;AACjB,QAAA;AACJ,MAAA;IACJ,CAAA,GAAA;AACJ,EAAA;AAEA,EAAA,OAAOT,2BAAAA;AACX,CAAA,EAvB6C,+BAAA","file":"index.js","sourcesContent":["import * as fs from 'fs/promises';\nimport path from 'path';\n\nlet _fullyQualifiedRepoRootPath: Promise<string> | undefined = undefined;\nexport const getFullyQualifiedRepoRootPath = (): Promise<string> => {\n if (!_fullyQualifiedRepoRootPath) {\n _fullyQualifiedRepoRootPath = (async (): Promise<string> => {\n let currentDir = __dirname;\n while (true) {\n const candidate = path.join(currentDir, 'pnpm-workspace.yaml');\n try {\n await fs.access(candidate);\n return currentDir;\n } catch {\n const parent = path.dirname(currentDir);\n if (parent === currentDir) {\n throw new Error(\n `Could not locate root (pnpm-workspace.yaml not found)--started from ${__dirname}, ended at ${currentDir}`,\n );\n }\n currentDir = parent;\n }\n }\n })();\n }\n\n return _fullyQualifiedRepoRootPath;\n};\n\nexport * from './files';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/common-node-utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"tsup": "^8.4.0",
|
|
18
18
|
"vitest": "^3.2.3",
|
|
19
|
-
"@layerzerolabs/tsup-configuration": "0.2.
|
|
20
|
-
"@layerzerolabs/typescript-configuration": "0.2.
|
|
19
|
+
"@layerzerolabs/tsup-configuration": "0.2.8",
|
|
20
|
+
"@layerzerolabs/typescript-configuration": "0.2.8"
|
|
21
21
|
},
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "restricted",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsup",
|
|
28
|
-
"clean": "rm -rf ./node_modules .turbo ./dist",
|
|
29
28
|
"lint": "eslint . --max-warnings 0 || (eslint . --fix --max-warnings 0 && false)",
|
|
30
29
|
"test": "vitest --run --pass-with-no-tests --typecheck"
|
|
31
30
|
}
|
package/dist/HUETPARE.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.12.5_@swc+helpers@0.5.17__postcss@8.5.3_tsx@4.20.4_typescript@5.8.2_yaml@2.8.0/node_modules/tsup/assets/esm_shims.js","../src/files.ts"],"names":["getFilename","fileURLToPath","url","getDirname","path","dirname","__dirname","dirCache","Map","writeFileAndCreateDirsCached","data","dir","has","set","mkdir","recursive","get","then","writeFile","encoding","pathExists","stat","err","code"],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const getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n","import { mkdir, stat, writeFile } from 'node:fs/promises';\nimport { dirname } from 'node:path';\n\nconst dirCache = new Map<string, Promise<string | undefined>>();\n\nexport const writeFileAndCreateDirsCached = async (path: string, data: string) => {\n const dir = dirname(path);\n // Deduplicate concurrent mkdir calls\n if (!dirCache.has(dir)) {\n dirCache.set(dir, mkdir(dir, { recursive: true }));\n }\n await dirCache.get(dir)?.then(() => writeFile(path, data, { encoding: 'utf-8' }));\n};\n\nexport async function pathExists(path: string): Promise<boolean> {\n try {\n await stat(path);\n return true;\n } catch (err: any) {\n return err.code !== 'ENOENT' ? true : false;\n }\n}\n"]}
|