@nsnanocat/util 2.6.0 → 2.6.2

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/getStorage.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./lib/argument.mjs";
2
2
  import { Console } from "./polyfill/Console.mjs";
3
3
  import { Lodash as _ } from "./polyfill/Lodash.mjs";
4
- import { Storage } from "./polyfill/Storage.mjs";
4
+ import { Storage } from "./polyfill/Storage.js";
5
5
 
6
6
  /**
7
7
  * 存储配置读取与合并结果。
package/package.json CHANGED
@@ -41,5 +41,5 @@
41
41
  "registry": "https://registry.npmjs.org/",
42
42
  "access": "public"
43
43
  },
44
- "version": "2.6.0"
44
+ "version": "2.6.2"
45
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("node:fs");
290
- this.path = this.path ? this.path : require("node:path");
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("node:fs");
317
- this.path = this.path ? this.path : require("node:path");
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);