@reliverse/pathkit 1.0.2 → 1.0.4

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 (3) hide show
  1. package/bin/mod.d.ts +39 -27
  2. package/bin/mod.js +35 -30
  3. package/package.json +1 -1
package/bin/mod.d.ts CHANGED
@@ -1,32 +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 { delimiter, posix, win32 };
6
- export { normalizeAliases, resolveAlias, reverseResolveAlias, filename };
7
- export { normalizeWindowsPath };
8
- export { sep, normalize, join, resolve, normalizeString, isAbsolute, toNamespacedPath, extname, relative, dirname, format, basename, parse, };
9
- declare const pathkit: {
10
- delimiter: ":" | ";";
11
- posix: import("path").PlatformPath;
12
- win32: import("path").PlatformPath;
13
- normalizeAliases: typeof normalizeAliases;
14
- resolveAlias: typeof resolveAlias;
15
- reverseResolveAlias: typeof reverseResolveAlias;
16
- filename: typeof filename;
17
- normalizeWindowsPath: typeof normalizeWindowsPath;
18
- sep: string;
19
- normalize: any;
20
- join: any;
21
- resolve: any;
22
- normalizeString: typeof normalizeString;
23
- isAbsolute: any;
24
- toNamespacedPath: any;
25
- extname: any;
26
- relative: any;
27
- dirname: any;
28
- format: any;
29
- basename: any;
30
- parse: any;
6
+ type ParsedPath = {
7
+ root: string;
8
+ dir: string;
9
+ base: string;
10
+ ext: string;
11
+ name: string;
31
12
  };
32
- export default pathkit;
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, };
21
+ declare const pathObj: {
22
+ readonly basename: (path: string, ext?: string) => string;
23
+ readonly delimiter: ":" | ";";
24
+ readonly dirname: (path: string) => string;
25
+ readonly extname: (path: string) => string;
26
+ readonly filename: typeof filename;
27
+ readonly format: (pathObject: FormatInputPathObject) => string;
28
+ readonly isAbsolute: (path: string) => boolean;
29
+ readonly join: (...paths: string[]) => string;
30
+ readonly normalize: (path: string) => string;
31
+ readonly normalizeAliases: typeof normalizeAliases;
32
+ readonly normalizeString: typeof normalizeString;
33
+ readonly normalizeWindowsPath: typeof normalizeWindowsPath;
34
+ readonly parse: (path: string) => ParsedPath;
35
+ readonly posix: PlatformPath;
36
+ readonly relative: (from: string, to: string) => string;
37
+ readonly resolve: (...paths: string[]) => string;
38
+ readonly resolveAlias: typeof resolveAlias;
39
+ readonly reverseResolveAlias: typeof reverseResolveAlias;
40
+ readonly sep: "/";
41
+ readonly toNamespacedPath: (path: string) => string;
42
+ readonly win32: PlatformPath;
43
+ };
44
+ export default pathObj;
package/bin/mod.js CHANGED
@@ -21,45 +21,50 @@ import {
21
21
  reverseResolveAlias,
22
22
  filename
23
23
  } from "./pathkit-impl/args-utils.js";
24
- export { delimiter, posix, win32 };
25
- export { normalizeAliases, resolveAlias, reverseResolveAlias, filename };
26
- export { normalizeWindowsPath };
27
24
  export {
28
- sep,
29
- normalize,
25
+ basename,
26
+ delimiter,
27
+ dirname,
28
+ extname,
29
+ filename,
30
+ format,
31
+ isAbsolute,
30
32
  join,
31
- resolve,
33
+ normalize,
34
+ normalizeAliases,
32
35
  normalizeString,
33
- isAbsolute,
34
- toNamespacedPath,
35
- extname,
36
+ normalizeWindowsPath,
37
+ parse,
38
+ posix,
36
39
  relative,
37
- dirname,
38
- format,
39
- basename,
40
- parse
40
+ resolve,
41
+ resolveAlias,
42
+ reverseResolveAlias,
43
+ sep,
44
+ toNamespacedPath,
45
+ win32
41
46
  };
42
- const pathkit = {
47
+ const pathObj = {
48
+ basename,
43
49
  delimiter,
44
- posix,
45
- win32,
50
+ dirname,
51
+ extname,
52
+ filename,
53
+ format,
54
+ isAbsolute,
55
+ join,
56
+ normalize,
46
57
  normalizeAliases,
58
+ normalizeString,
59
+ normalizeWindowsPath,
60
+ parse,
61
+ posix,
62
+ relative,
63
+ resolve,
47
64
  resolveAlias,
48
65
  reverseResolveAlias,
49
- filename,
50
- normalizeWindowsPath,
51
66
  sep,
52
- normalize,
53
- join,
54
- resolve,
55
- normalizeString,
56
- isAbsolute,
57
67
  toNamespacedPath,
58
- extname,
59
- relative,
60
- dirname,
61
- format,
62
- basename,
63
- parse
68
+ win32
64
69
  };
65
- export default pathkit;
70
+ 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.2",
6
+ "version": "1.0.4",
7
7
  "dependencies": {},
8
8
  "devDependencies": {},
9
9
  "exports": {