@zenfs/core 1.6.11 → 1.6.13

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.
@@ -245,7 +245,7 @@ export function Async(FS) {
245
245
  this[key] = async (...args) => {
246
246
  var _a, _b;
247
247
  const result = await originalMethod.apply(this, args);
248
- if (new Error().stack.includes(`at async ${this.constructor.name}._next`))
248
+ if (new Error().stack.includes(`at async ${this.constructor.name}._next`) || !this._isInitialized)
249
249
  return result;
250
250
  try {
251
251
  // @ts-expect-error 2556
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenfs/core",
3
- "version": "1.6.11",
3
+ "version": "1.6.13",
4
4
  "description": "A filesystem, anywhere",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -59,11 +59,6 @@
59
59
  "dev": "npm run build -- --watch",
60
60
  "prepublishOnly": "npm run build"
61
61
  },
62
- "lint-staged": {
63
- "*": [
64
- "prettier --write"
65
- ]
66
- },
67
62
  "dependencies": {
68
63
  "@types/node": "^22.10.1",
69
64
  "@types/readable-stream": "^4.0.10",
@@ -73,7 +68,6 @@
73
68
  "utilium": "^1.1.1"
74
69
  },
75
70
  "optionalDependencies": {
76
- "minimatch": "^9.0.3",
77
71
  "c8": "^10.1.2"
78
72
  },
79
73
  "devDependencies": {
@@ -81,7 +75,6 @@
81
75
  "@types/eslint__js": "^8.42.3",
82
76
  "eslint": "^9.15.0",
83
77
  "globals": "^15.9.0",
84
- "lint-staged": "^15.2.7",
85
78
  "prettier": "^3.2.5",
86
79
  "tsx": "^4.19.1",
87
80
  "typedoc": "^0.27.1",
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { readdirSync, statSync, writeFileSync } from 'node:fs';
3
- import _path from 'node:path/posix';
3
+ import { matchesGlob, relative, join, resolve } from 'node:path/posix';
4
4
  import { parseArgs } from 'node:util';
5
5
 
6
6
  const { values: options, positionals } = parseArgs({
@@ -36,24 +36,6 @@ if (options.quiet && options.verbose) {
36
36
  process.exit();
37
37
  }
38
38
 
39
- let matchesGlob = _path.matchesGlob;
40
-
41
- if (matchesGlob && options.verbose) {
42
- console.debug('[debug] path.matchesGlob is available.');
43
- }
44
-
45
- if (!matchesGlob) {
46
- console.warn('Warning: path.matchesGlob is not available, falling back to minimatch. (Node 20.17.0+ or 22.5.0+ needed)');
47
-
48
- try {
49
- const { minimatch } = await import('minimatch');
50
- matchesGlob = minimatch;
51
- } catch {
52
- console.error('Fatal error: Failed to fall back to minimatch (is it installed?)');
53
- process.exit(1);
54
- }
55
- }
56
-
57
39
  function fixSlash(path) {
58
40
  return path.replaceAll('\\', '/');
59
41
  }
@@ -96,7 +78,7 @@ function computeEntries(path) {
96
78
  const stats = statSync(path);
97
79
 
98
80
  if (stats.isFile()) {
99
- entries.set('/' + _path.relative(resolvedRoot, path), stats);
81
+ entries.set('/' + relative(resolvedRoot, path), stats);
100
82
  if (options.verbose) {
101
83
  console.log(`${color('green', 'file')} ${path}`);
102
84
  }
@@ -104,9 +86,9 @@ function computeEntries(path) {
104
86
  }
105
87
 
106
88
  for (const file of readdirSync(path)) {
107
- computeEntries(_path.join(path, file));
89
+ computeEntries(join(path, file));
108
90
  }
109
- entries.set('/' + _path.relative(resolvedRoot, path), stats);
91
+ entries.set('/' + relative(resolvedRoot, path), stats);
110
92
  if (options.verbose) {
111
93
  console.log(`${color('bright_green', ' dir')} ${path}`);
112
94
  }
@@ -119,7 +101,7 @@ function computeEntries(path) {
119
101
 
120
102
  computeEntries(resolvedRoot);
121
103
  if (!options.quiet) {
122
- console.log('Generated listing for ' + fixSlash(_path.resolve(root)));
104
+ console.log('Generated listing for ' + fixSlash(resolve(root)));
123
105
  }
124
106
 
125
107
  const index = {