@reliverse/pathkit 1.0.3 → 1.0.5

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 (2) hide show
  1. package/bin/mod.d.ts +29 -14
  2. package/package.json +1 -1
package/bin/mod.d.ts CHANGED
@@ -1,29 +1,44 @@
1
+ import type { PlatformPath } from "node:path";
1
2
  import { normalizeWindowsPath } from "./pathkit-impl/_internal.js";
2
3
  import { sep, normalize, join, resolve, normalizeString, isAbsolute, toNamespacedPath, extname, relative, dirname, format, basename, parse } from "./pathkit-impl/_path.js";
3
4
  import { delimiter, posix, win32 } from "./pathkit-impl/args-impl.js";
4
5
  import { normalizeAliases, resolveAlias, reverseResolveAlias, filename } from "./pathkit-impl/args-utils.js";
5
- export { basename, delimiter, dirname, extname, filename, format, isAbsolute, join, normalize, normalizeAliases, normalizeString, normalizeWindowsPath, parse, posix, relative, resolve, resolveAlias, reverseResolveAlias, sep, toNamespacedPath, win32, };
6
+ type ParsedPath = {
7
+ root: string;
8
+ dir: string;
9
+ base: string;
10
+ ext: string;
11
+ name: string;
12
+ };
13
+ type FormatInputPathObject = {
14
+ root?: string;
15
+ dir?: string;
16
+ base?: string;
17
+ ext?: string;
18
+ name?: string;
19
+ };
20
+ export { basename, delimiter, dirname, extname, filename, format, isAbsolute, join, normalize, normalizeAliases, normalizeString, normalizeWindowsPath, parse, posix, relative, resolve, resolveAlias, reverseResolveAlias, sep, toNamespacedPath, win32, type ParsedPath, type FormatInputPathObject, type PlatformPath, };
6
21
  declare const pathObj: {
7
- readonly basename: any;
22
+ readonly basename: (path: string, ext?: string) => string;
8
23
  readonly delimiter: ":" | ";";
9
- readonly dirname: any;
10
- readonly extname: any;
24
+ readonly dirname: (path: string) => string;
25
+ readonly extname: (path: string) => string;
11
26
  readonly filename: typeof filename;
12
- readonly format: any;
13
- readonly isAbsolute: any;
14
- readonly join: any;
15
- readonly normalize: any;
27
+ readonly format: (pathObject: FormatInputPathObject) => string;
28
+ readonly isAbsolute: (path: string) => boolean;
29
+ readonly join: (...paths: string[]) => string;
30
+ readonly normalize: (path: string) => string;
16
31
  readonly normalizeAliases: typeof normalizeAliases;
17
32
  readonly normalizeString: typeof normalizeString;
18
33
  readonly normalizeWindowsPath: typeof normalizeWindowsPath;
19
- readonly parse: any;
20
- readonly posix: import("path").PlatformPath;
21
- readonly relative: any;
22
- readonly resolve: any;
34
+ readonly parse: (path: string) => ParsedPath;
35
+ readonly posix: PlatformPath;
36
+ readonly relative: (from: string, to: string) => string;
37
+ readonly resolve: (...paths: string[]) => string;
23
38
  readonly resolveAlias: typeof resolveAlias;
24
39
  readonly reverseResolveAlias: typeof reverseResolveAlias;
25
40
  readonly sep: "/";
26
- readonly toNamespacedPath: any;
27
- readonly win32: import("path").PlatformPath;
41
+ readonly toNamespacedPath: (path: string) => string;
42
+ readonly win32: PlatformPath;
28
43
  };
29
44
  export default pathObj;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "license": "MIT",
4
4
  "name": "@reliverse/pathkit",
5
5
  "type": "module",
6
- "version": "1.0.3",
6
+ "version": "1.0.5",
7
7
  "dependencies": {},
8
8
  "devDependencies": {},
9
9
  "exports": {