@zenfs/core 0.16.0 → 0.16.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.
Files changed (46) hide show
  1. package/dist/backends/fetch.js +5 -4
  2. package/dist/backends/index/fs.js +12 -5
  3. package/dist/backends/overlay.d.ts +1 -1
  4. package/dist/backends/overlay.js +9 -9
  5. package/dist/backends/port/fs.d.ts +22 -0
  6. package/dist/backends/port/fs.js +12 -1
  7. package/dist/backends/port/rpc.d.ts +2 -0
  8. package/dist/backends/port/rpc.js +13 -1
  9. package/dist/backends/store/fs.js +1 -1
  10. package/dist/browser.min.js +4 -4
  11. package/dist/browser.min.js.map +4 -4
  12. package/dist/config.d.ts +1 -2
  13. package/dist/config.js +2 -2
  14. package/dist/emulation/async.d.ts +4 -5
  15. package/dist/emulation/async.js +9 -9
  16. package/dist/emulation/dir.js +1 -1
  17. package/dist/emulation/promises.js +10 -5
  18. package/dist/emulation/sync.d.ts +1 -0
  19. package/dist/emulation/sync.js +1 -1
  20. package/dist/file.js +6 -6
  21. package/dist/filesystem.js +1 -1
  22. package/dist/inode.d.ts +1 -1
  23. package/dist/inode.js +54 -37
  24. package/dist/polyfills.js +1 -0
  25. package/dist/utils.d.ts +1 -1
  26. package/dist/utils.js +1 -1
  27. package/eslint.shared.js +53 -0
  28. package/package.json +16 -6
  29. package/src/backends/fetch.ts +6 -5
  30. package/src/backends/index/fs.ts +12 -5
  31. package/src/backends/index/index.ts +1 -1
  32. package/src/backends/overlay.ts +9 -9
  33. package/src/backends/port/fs.ts +18 -3
  34. package/src/backends/port/readme.md +7 -12
  35. package/src/backends/port/rpc.ts +16 -1
  36. package/src/backends/store/fs.ts +2 -2
  37. package/src/config.ts +3 -3
  38. package/src/emulation/async.ts +31 -18
  39. package/src/emulation/dir.ts +1 -1
  40. package/src/emulation/promises.ts +11 -6
  41. package/src/emulation/sync.ts +5 -4
  42. package/src/file.ts +6 -6
  43. package/src/filesystem.ts +2 -1
  44. package/src/inode.ts +56 -37
  45. package/src/polyfills.ts +1 -0
  46. package/src/utils.ts +5 -2
package/src/utils.ts CHANGED
@@ -1,3 +1,6 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
2
+ /* eslint-disable @typescript-eslint/no-unsafe-call */
3
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
1
4
  import type { OptionalTuple } from 'utilium';
2
5
  import { ErrnoError, Errno } from './error.js';
3
6
  import type { Cred } from './cred.js';
@@ -187,14 +190,14 @@ export function _toUnixTimestamp(time: Date | number): number {
187
190
  if (time instanceof Date) {
188
191
  return Math.floor(time.getTime() / 1000);
189
192
  }
190
- throw new Error('Cannot parse time: ' + time);
193
+ throw new Error('Cannot parse time');
191
194
  }
192
195
 
193
196
  /**
194
197
  * Normalizes a mode
195
198
  * @internal
196
199
  */
197
- export function normalizeMode(mode: string | number | unknown, def?: number): number {
200
+ export function normalizeMode(mode: unknown, def?: number): number {
198
201
  if (typeof mode == 'number') {
199
202
  return mode;
200
203
  }