@impactor/nodejs 3.0.2 → 3.0.4
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/index.d.ts +7 -7
- package/index.js +7 -7
- package/nx.json +0 -16
- package/package.json +15 -12
- package/src/cache-fs.d.ts +1 -1
- package/src/cache-fs.js +2 -2
- package/src/cache-fs.spec.js +3 -3
- package/src/fs-sync.spec.js +1 -1
- package/src/fs.d.ts +1 -1
- package/src/fs.js +1 -1
- package/src/fs.spec.js +2 -2
- package/src/https.spec.js +1 -1
- package/src/process.spec.js +1 -1
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './src/cache-fs';
|
|
2
|
-
export * from './src/fs';
|
|
3
|
-
export * from './src/fs-sync';
|
|
4
|
-
export * from './src/https';
|
|
5
|
-
export * from './src/process';
|
|
6
|
-
export { default as cacheFs } from './src/cache-fs';
|
|
7
|
-
export { default as https } from './src/https';
|
|
1
|
+
export * from './src/cache-fs.js';
|
|
2
|
+
export * from './src/fs.js';
|
|
3
|
+
export * from './src/fs-sync.js';
|
|
4
|
+
export * from './src/https.js';
|
|
5
|
+
export * from './src/process.js';
|
|
6
|
+
export { default as cacheFs } from './src/cache-fs.js';
|
|
7
|
+
export { default as https } from './src/https.js';
|
package/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./src/cache-fs";
|
|
2
|
-
export * from "./src/fs";
|
|
3
|
-
export * from "./src/fs-sync";
|
|
4
|
-
export * from "./src/https";
|
|
5
|
-
export * from "./src/process";
|
|
6
|
-
import { default as default2 } from "./src/cache-fs";
|
|
7
|
-
import { default as default3 } from "./src/https";
|
|
1
|
+
export * from "./src/cache-fs.js";
|
|
2
|
+
export * from "./src/fs.js";
|
|
3
|
+
export * from "./src/fs-sync.js";
|
|
4
|
+
export * from "./src/https.js";
|
|
5
|
+
export * from "./src/process.js";
|
|
6
|
+
import { default as default2 } from "./src/cache-fs.js";
|
|
7
|
+
import { default as default3 } from "./src/https.js";
|
|
8
8
|
export {
|
|
9
9
|
default2 as cacheFs,
|
|
10
10
|
default3 as https
|
package/nx.json
CHANGED
|
@@ -30,22 +30,6 @@
|
|
|
30
30
|
"packageRoot": "{projectRoot}/dist"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
"semantic-release": {
|
|
34
|
-
"executor": "nx:run-commands",
|
|
35
|
-
"dependsOn": ["build", "prerelease"],
|
|
36
|
-
"options": {
|
|
37
|
-
"cwd": "{projectRoot}",
|
|
38
|
-
"command": "pnpm tsx node_modules/semantic-release/bin/semantic-release.js"
|
|
39
|
-
},
|
|
40
|
-
"configurations": {
|
|
41
|
-
"local": {
|
|
42
|
-
"command": "DOTENV_CONFIG_PATH=../../.env pnpm run release --no-ci"
|
|
43
|
-
},
|
|
44
|
-
"dry": {
|
|
45
|
-
"command": "DOTENV_CONFIG_PATH=../../.env pnpm run release --no-ci --dry-run"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
33
|
"test": {
|
|
50
34
|
"inputs": ["test"],
|
|
51
35
|
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@impactor/nodejs",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "nodejs utils",
|
|
6
6
|
"private": false,
|
|
7
7
|
"publishConfig": {
|
|
8
|
-
"access": "public"
|
|
8
|
+
"access": "public",
|
|
9
|
+
"linkDirectory": false
|
|
9
10
|
},
|
|
10
11
|
"keywords": [
|
|
11
12
|
"nodejs",
|
|
@@ -15,32 +16,34 @@
|
|
|
15
16
|
"nx": {
|
|
16
17
|
"projectType": "library",
|
|
17
18
|
"targets": {
|
|
18
|
-
"build": {}
|
|
19
|
-
"semantic-release": {}
|
|
19
|
+
"build": {}
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"imports": {
|
|
23
|
-
"#*": "./src
|
|
23
|
+
"#*": "./src/*"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
".": {
|
|
27
27
|
"types": "./index.d.js",
|
|
28
28
|
"default": "./index.js"
|
|
29
29
|
},
|
|
30
|
+
"./*": {
|
|
31
|
+
"types": "./src/*",
|
|
32
|
+
"default": "./src/*"
|
|
33
|
+
},
|
|
30
34
|
"./package.json": {
|
|
31
35
|
"default": "./package.json"
|
|
32
|
-
}
|
|
33
|
-
"./*": "./src/*"
|
|
36
|
+
}
|
|
34
37
|
},
|
|
38
|
+
"types": "./index.d.ts",
|
|
39
|
+
"main": "./index.js",
|
|
35
40
|
"dependencies": {
|
|
36
|
-
"
|
|
37
|
-
"@impactor/
|
|
38
|
-
"
|
|
41
|
+
"@impactor/cache": "3.0.4",
|
|
42
|
+
"@impactor/javascript": "3.0.4",
|
|
43
|
+
"content-type": "^1.0.5"
|
|
39
44
|
},
|
|
40
45
|
"devDependencies": {
|
|
41
46
|
"@types/content-type": "^1.1.9",
|
|
42
|
-
"semantic-release": "^25.0.2",
|
|
43
|
-
"semantic-release-monorepo": "^8.0.2",
|
|
44
47
|
"tsx": "^4.21.0"
|
|
45
48
|
},
|
|
46
49
|
"engines": {
|
package/src/cache-fs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type CacheOptions } from '@impactor/cache';
|
|
2
2
|
import { type PathLike } from 'node:fs';
|
|
3
|
-
import { type ReadOptions } from './fs-sync';
|
|
3
|
+
import { type ReadOptions } from './fs-sync.js';
|
|
4
4
|
export interface CacheOpts extends Omit<CacheOptions, 'read' | 'write'> {
|
|
5
5
|
}
|
|
6
6
|
export interface CacheFSOptions extends CacheOptions, ReadOptions {
|
package/src/cache-fs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cache } from "@impactor/cache";
|
|
2
|
-
import { readSync, resolve } from "./fs-sync";
|
|
3
|
-
import { write } from "./fs";
|
|
2
|
+
import { readSync, resolve } from "./fs-sync.js";
|
|
3
|
+
import { write } from "./fs.js";
|
|
4
4
|
function getCache(entries, options) {
|
|
5
5
|
for (let filePath of entries) {
|
|
6
6
|
try {
|
package/src/cache-fs.spec.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { afterAll, beforeEach, expect, test } from "@jest/globals";
|
|
2
|
-
import cache from "./cache-fs";
|
|
3
|
-
import { remove, write } from "./fs";
|
|
4
|
-
import { resolve } from "./fs-sync";
|
|
2
|
+
import cache from "./cache-fs.js";
|
|
3
|
+
import { remove, write } from "./fs.js";
|
|
4
|
+
import { resolve } from "./fs-sync.js";
|
|
5
5
|
let dir = resolve(import.meta.dirname, "./test!!/cache");
|
|
6
6
|
beforeEach(() => remove(`${dir}/file.txt`));
|
|
7
7
|
afterAll(() => remove(dir));
|
package/src/fs-sync.spec.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
removeSync,
|
|
14
14
|
resolve,
|
|
15
15
|
writeSync
|
|
16
|
-
} from "./fs-sync";
|
|
16
|
+
} from "./fs-sync.js";
|
|
17
17
|
import { objectType } from "@impactor/javascript";
|
|
18
18
|
import { existsSync, readFileSync, utimesSync } from "node:fs";
|
|
19
19
|
import { platform } from "node:process";
|
package/src/fs.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PathLike, type WriteFileOptions } from 'node:fs';
|
|
2
2
|
import { type Abortable } from 'node:events';
|
|
3
|
-
import { type Filter, type MoveOptions, type ReadOptions } from './fs-sync';
|
|
3
|
+
import { type Filter, type MoveOptions, type ReadOptions } from './fs-sync.js';
|
|
4
4
|
import { type Obj } from '@impactor/javascript';
|
|
5
5
|
export declare function getSize(path: PathLike | PathLike[], unit?: 'b' | 'kb' | 'mb' | 'gb', filter?: Filter): Promise<number>;
|
|
6
6
|
export declare function isDir(path: PathLike): Promise<boolean>;
|
package/src/fs.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "node:fs/promises";
|
|
18
18
|
import {
|
|
19
19
|
resolve
|
|
20
|
-
} from "./fs-sync";
|
|
20
|
+
} from "./fs-sync.js";
|
|
21
21
|
import { dirname, join } from "node:path";
|
|
22
22
|
import { objectType } from "@impactor/javascript";
|
|
23
23
|
import { cleanJson } from "@impactor/javascript";
|
package/src/fs.spec.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, test } from "@jest/globals";
|
|
2
|
-
import { resolve } from "./fs-sync";
|
|
2
|
+
import { resolve } from "./fs-sync.js";
|
|
3
3
|
import {
|
|
4
4
|
copy,
|
|
5
5
|
getEntries,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
read,
|
|
12
12
|
remove,
|
|
13
13
|
write
|
|
14
|
-
} from "./fs";
|
|
14
|
+
} from "./fs.js";
|
|
15
15
|
import { existsSync } from "node:fs";
|
|
16
16
|
import { objectType } from "@impactor/javascript";
|
|
17
17
|
import { utimes } from "node:fs/promises";
|
package/src/https.spec.js
CHANGED
package/src/process.spec.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect, test } from "@jest/globals";
|
|
2
|
-
import { parseArgv, toArgv } from "./process";
|
|
2
|
+
import { parseArgv, toArgv } from "./process.js";
|
|
3
3
|
let input = "cmd1 cmd2 - --a 1 --b=2 --c true --d false --e --no-f -g -h hh -ijk ok -l- --num=1 --arr=1 --arr=2 --obj.a.b=1 -mn-o -p - -q123 --whitespaces=a\nb c --no-exit -- ext1 ext2";
|
|
4
4
|
let parsed = {
|
|
5
5
|
cmd: ["cmd1", "cmd2", "-"],
|