@d0paminedriven/fs 5.0.0 → 6.0.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.
@@ -101,10 +101,13 @@ type WriteStreamOptions = BufferEncodingUnion | {
101
101
  type WriteFileAsyncDataUnion = WithImplicitCoercion<string> | {
102
102
  [Symbol.toPrimitive](hint: "string"): string;
103
103
  };
104
- type ReadDirOptions = BufferEncodingUnion | ((ObjEncodingOptions & {
104
+ interface ReadDirOptionsEntity extends ObjEncodingOptions {
105
105
  withFileTypes?: false | undefined;
106
106
  recursive?: boolean | undefined;
107
- }) | null);
107
+ }
108
+ type ReadDirOptions = {
109
+ [P in keyof ReadDirOptionsEntity]: ReadDirOptionsEntity[P];
110
+ };
108
111
  type WriteFileAsyncOptions = (ObjEncodingOptions & {
109
112
  mode?: Mode | undefined;
110
113
  flag?: OpenMode | undefined;
@@ -243,5 +246,18 @@ type ParsedUrlInfo = {
243
246
  search: string;
244
247
  hash: string;
245
248
  };
249
+ declare const unitsObj: {
250
+ readonly PB: 5;
251
+ readonly TB: 4;
252
+ readonly GB: 3;
253
+ readonly MB: 2;
254
+ readonly KB: 1;
255
+ readonly B: 0;
256
+ };
257
+ type Unit = keyof typeof unitsObj;
258
+ type SizeOpts = {
259
+ decimals?: number;
260
+ includeUnits?: boolean;
261
+ };
246
262
 
247
- export type { Abortable, ArrayBufferView, ArrayOrReadOnlyArray, BashEnv, BufferEncodingUnion, CoercionUnion, CommonExecOptions, CommonOptions, ConditionalPromise, ConditionalToRequired, Depth, Dict, Equal, ExcludeFieldEnumerable, ExecSyncOptions, ExecSyncOptionsWithBufferEncoding, ExecSyncOptionsWithStringEncoding, ExecuteCommandProps, Expect, Extends, FieldToConditionallyNever, IOType, InferDepth, InjectScriptsProps, MkDirOptions, MkDirSyncOptions, MkDirSyncProps, Mode, ObjEncodingOptions, OmitSrc, OpenMode, ParsedUrlInfo, ProcessEnv, ProcessEnvOptions, ReadDirOptions, ReadDirProps, RemoveFields, RequiredToConditional, RmDirOptions, RmDirProps, Signals, StdioOptions, TypedArray, Unenumerate, UnwrapPromise, Without, WriteFileAsyncDataUnion, WriteFileAsyncOptions, WriteFileAsyncProps, WriteStreamDataShape, WriteStreamOptions, WriteStreamProps, XOR };
263
+ export { type Abortable, type ArrayBufferView, type ArrayOrReadOnlyArray, type BashEnv, type BufferEncodingUnion, type CoercionUnion, type CommonExecOptions, type CommonOptions, type ConditionalPromise, type ConditionalToRequired, type Depth, type Dict, type Equal, type ExcludeFieldEnumerable, type ExecSyncOptions, type ExecSyncOptionsWithBufferEncoding, type ExecSyncOptionsWithStringEncoding, type ExecuteCommandProps, type Expect, type Extends, type FieldToConditionallyNever, type IOType, type InferDepth, type InjectScriptsProps, type MkDirOptions, type MkDirSyncOptions, type MkDirSyncProps, type Mode, type ObjEncodingOptions, type OmitSrc, type OpenMode, type ParsedUrlInfo, type ProcessEnv, type ProcessEnvOptions, type ReadDirOptions, type ReadDirOptionsEntity, type ReadDirProps, type RemoveFields, type RequiredToConditional, type RmDirOptions, type RmDirProps, type Signals, type SizeOpts, type StdioOptions, type TypedArray, type Unenumerate, type Unit, type UnwrapPromise, type Without, type WriteFileAsyncDataUnion, type WriteFileAsyncOptions, type WriteFileAsyncProps, type WriteStreamDataShape, type WriteStreamOptions, type WriteStreamProps, type XOR, unitsObj };
@@ -1 +1,8 @@
1
+ import {
2
+ unitsObj
3
+ } from "../chunk-4X5DVWVM.js";
4
+ import "../chunk-7QVYU63E.js";
5
+ export {
6
+ unitsObj
7
+ };
1
8
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d0paminedriven/fs",
3
- "version": "5.0.0",
3
+ "version": "6.0.1",
4
4
  "description": "convenient fs helpers",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -53,23 +53,23 @@
53
53
  },
54
54
  "devDependencies": {
55
55
  "@microsoft/api-extractor": "^7.52.8",
56
- "@swc/core": "^1.11.29",
57
- "@swc/wasm": "^1.11.29",
58
- "@types/node": "^22.15.29",
56
+ "@swc/core": "^1.11.31",
57
+ "@swc/wasm": "^1.11.31",
58
+ "@types/node": "^22.15.30",
59
59
  "chokidar": "^4.0.3",
60
60
  "dotenv-cli": "^8.0.0",
61
61
  "eslint": "^9.28.0",
62
62
  "jiti": "^2.4.2",
63
63
  "prettier": "^3.5.3",
64
- "terser": "^5.40.0",
64
+ "terser": "^5.41.0",
65
65
  "tslib": "latest",
66
66
  "tsup": "latest",
67
67
  "tsx": "latest",
68
68
  "typescript": "latest",
69
69
  "typescript-eslint": "latest",
70
70
  "@d0paminedriven/eslint-config": "0.1.0",
71
- "@d0paminedriven/tsconfig": "0.1.0",
72
- "@d0paminedriven/prettier-config": "0.1.0"
71
+ "@d0paminedriven/prettier-config": "0.1.0",
72
+ "@d0paminedriven/tsconfig": "0.1.0"
73
73
  },
74
74
  "prettier": "@d0paminedriven/prettier-config",
75
75
  "scripts": {