@nsnanocat/util 2.5.17 → 2.6.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/index.js
CHANGED
|
@@ -5,11 +5,11 @@ export * from "./lib/notification.mjs";
|
|
|
5
5
|
export * from "./lib/time.mjs";
|
|
6
6
|
export * from "./lib/wait.mjs";
|
|
7
7
|
export * from "./polyfill/Console.mjs";
|
|
8
|
-
export * from "./polyfill/fetch.
|
|
8
|
+
export * from "./polyfill/fetch.js";
|
|
9
9
|
export * from "./polyfill/Lodash.mjs";
|
|
10
10
|
export * from "./polyfill/qs.mjs";
|
|
11
11
|
export * from "./polyfill/StatusTexts.mjs";
|
|
12
|
-
export * from "./polyfill/Storage.
|
|
12
|
+
export * from "./polyfill/Storage.js";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* 已标准化的 `$argument` 快照。
|
package/package.json
CHANGED
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"bugs": "https://github.com/NSNanoCat/util/issues",
|
|
16
16
|
"main": "index.js",
|
|
17
17
|
"types": "types/nsnanocat-util.d.ts",
|
|
18
|
-
"type": "module",
|
|
19
18
|
"scripts": {
|
|
20
19
|
"tsc:build": "npx tsc",
|
|
21
20
|
"test": "node --test test/*.test.js",
|
|
@@ -42,5 +41,5 @@
|
|
|
42
41
|
"registry": "https://registry.npmjs.org/",
|
|
43
42
|
"access": "public"
|
|
44
43
|
},
|
|
45
|
-
"version": "2.
|
|
44
|
+
"version": "2.6.1"
|
|
46
45
|
}
|
|
@@ -286,8 +286,8 @@ export class Storage {
|
|
|
286
286
|
*/
|
|
287
287
|
static #loaddata = dataFile => {
|
|
288
288
|
if ($app === "Node.js") {
|
|
289
|
-
this.fs = this.fs ? this.fs : require("
|
|
290
|
-
this.path = this.path ? this.path : require("
|
|
289
|
+
this.fs = this.fs ? this.fs : require("fs");
|
|
290
|
+
this.path = this.path ? this.path : require("path");
|
|
291
291
|
const curDirDataFilePath = this.path.resolve(dataFile);
|
|
292
292
|
const rootDirDataFilePath = this.path.resolve(process.cwd(), dataFile);
|
|
293
293
|
const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath);
|
|
@@ -313,8 +313,8 @@ export class Storage {
|
|
|
313
313
|
*/
|
|
314
314
|
static #writedata = (dataFile = this.dataFile) => {
|
|
315
315
|
if ($app === "Node.js") {
|
|
316
|
-
this.fs = this.fs ? this.fs : require("
|
|
317
|
-
this.path = this.path ? this.path : require("
|
|
316
|
+
this.fs = this.fs ? this.fs : require("fs");
|
|
317
|
+
this.path = this.path ? this.path : require("path");
|
|
318
318
|
const curDirDataFilePath = this.path.resolve(dataFile);
|
|
319
319
|
const rootDirDataFilePath = this.path.resolve(process.cwd(), dataFile);
|
|
320
320
|
const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath);
|
package/polyfill/fetch.mts
CHANGED
package/polyfill/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Aggregated exports for polyfill modules.
|
|
4
4
|
*/
|
|
5
5
|
export { Console } from "./Console.mjs";
|
|
6
|
-
export { fetch } from "./fetch.
|
|
6
|
+
export { fetch } from "./fetch.js";
|
|
7
7
|
export type { Fetch, FetchRequest, FetchResponse } from "./fetch.mjs";
|
|
8
8
|
export { Lodash } from "./Lodash.mjs";
|
|
9
9
|
export { qs } from "./qs.mjs";
|
|
10
10
|
export { StatusTexts } from "./StatusTexts.mjs";
|
|
11
|
-
export { Storage } from "./Storage.
|
|
11
|
+
export { Storage } from "./Storage.js";
|
package/polyfill/index.js
CHANGED
|
File without changes
|