@nsnanocat/util 2.5.15 → 2.5.16

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/package.json CHANGED
@@ -41,5 +41,5 @@
41
41
  "registry": "https://registry.npmjs.org/",
42
42
  "access": "public"
43
43
  },
44
- "version": "2.5.15"
44
+ "version": "2.5.16"
45
45
  }
@@ -288,9 +288,7 @@ export class Storage {
288
288
  if ($app !== "Node.js") return {};
289
289
  // 优先复用全局运行时对象,不存在时再按需加载。
290
290
  // Prefer reusing global runtime modules and lazily require when missing.
291
- // eslint-disable-next-line n/no-missing-require, n/prefer-node-protocol
292
291
  if (!globalThis.fs) globalThis.fs = require("fs");
293
- // eslint-disable-next-line n/no-missing-require, n/prefer-node-protocol
294
292
  if (!globalThis.path) globalThis.path = require("path");
295
293
  const dataFilePathCandidates = [...new Set([globalThis.path.resolve(dataFile), globalThis.path.resolve(process.cwd(), dataFile)])];
296
294
  const dataFilePath = dataFilePathCandidates.find(filePath => globalThis.fs.existsSync(filePath));