@baeta/util-path 2.0.0-next.1 → 2.0.0-next.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @baeta/util-path
2
2
 
3
+ ## 2.0.0-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix broken types
8
+
3
9
  ## 2.0.0-next.1
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,75 @@
1
+ import { ParsedPath } from 'node:path';
2
+ import upath from 'upath';
3
+
4
+ declare function posixPath(pathname: string): string;
5
+ declare function winPath(pathname: string): string;
6
+ declare const addExt: typeof upath.addExt;
7
+ declare const basename: typeof upath.basename;
8
+ declare const changeExt: typeof upath.changeExt;
9
+ declare const defaultExt: typeof upath.defaultExt;
10
+ declare const delimiter: string;
11
+ declare const dirname: typeof upath.dirname;
12
+ declare const extname: typeof upath.extname;
13
+ /**
14
+ * Returns a path string from an object - the opposite of parse().
15
+ *
16
+ * @param pathObject path to evaluate.
17
+ */
18
+ declare const format: (pathObject: ParsedPath) => string;
19
+ declare const isAbsolute: typeof upath.isAbsolute;
20
+ declare const join: typeof upath.join;
21
+ /**
22
+ * Exactly like path.join(), but it keeps the first meaningful ./.
23
+ *
24
+ * Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
25
+ *
26
+ * @param paths string paths to join
27
+ */
28
+ declare const joinSafe: (...paths: string[]) => string;
29
+ declare const normalize: typeof upath.normalize;
30
+ declare const normalizeSafe: typeof upath.normalizeSafe;
31
+ declare const normalizeTrim: typeof upath.normalizeTrim;
32
+ declare const parse: typeof upath.parse;
33
+ declare const posix: typeof upath.posix;
34
+ declare const relative: typeof upath.relative;
35
+ /**
36
+ * Removes the specific ext extension from filename, if it has it. Otherwise it leaves it as is. As in all upath functions, it be .ext or ext.
37
+ *
38
+ * @param filename string filename to remove extension to
39
+ * @param ext string extension to remove
40
+ */
41
+ declare const removeExt: (filename: string, ext: string) => string;
42
+ declare const resolve: typeof upath.resolve;
43
+ declare const sep: string;
44
+ declare const toUnix: typeof upath.toUnix;
45
+ declare const trimExt: typeof upath.trimExt;
46
+ declare const win32: typeof upath.win32;
47
+ declare const _default: {
48
+ addExt: typeof upath.addExt;
49
+ basename: typeof upath.basename;
50
+ changeExt: typeof upath.changeExt;
51
+ defaultExt: typeof upath.defaultExt;
52
+ delimiter: string;
53
+ dirname: typeof upath.dirname;
54
+ extname: typeof upath.extname;
55
+ format: (pathObject: ParsedPath) => string;
56
+ isAbsolute: typeof upath.isAbsolute;
57
+ join: typeof upath.join;
58
+ joinSafe: (...paths: string[]) => string;
59
+ normalize: typeof upath.normalize;
60
+ normalizeSafe: typeof upath.normalizeSafe;
61
+ normalizeTrim: typeof upath.normalizeTrim;
62
+ parse: typeof upath.parse;
63
+ posix: typeof upath.posix;
64
+ relative: typeof upath.relative;
65
+ removeExt: (filename: string, ext: string) => string;
66
+ resolve: typeof upath.resolve;
67
+ sep: string;
68
+ toUnix: typeof upath.toUnix;
69
+ trimExt: typeof upath.trimExt;
70
+ win32: typeof upath.win32;
71
+ posixPath: typeof posixPath;
72
+ winPath: typeof winPath;
73
+ };
74
+
75
+ export { addExt, basename, changeExt, _default as default, defaultExt, delimiter, dirname, extname, format, isAbsolute, join, joinSafe, normalize, normalizeSafe, normalizeTrim, parse, posix, posixPath, relative, removeExt, resolve, sep, toUnix, trimExt, win32, winPath };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baeta/util-path",
3
- "version": "2.0.0-next.1",
3
+ "version": "2.0.0-next.2",
4
4
  "keywords": [
5
5
  "baeta",
6
6
  "graphql",