@baeta/util-path 2.0.0-next.3 → 2.0.0-next.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.
- package/CHANGELOG.md +8 -0
- package/dist/index.d.ts +3 -71
- package/dist/index.js +4 -72
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @baeta/util-path
|
|
2
2
|
|
|
3
|
+
## 2.0.0-next.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#389](https://github.com/andreisergiu98/baeta/pull/389) [`3e7a4d7`](https://github.com/andreisergiu98/baeta/commit/3e7a4d71a59543b8a506938f788aec8b5d907776) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Switch internals to 'pathe'
|
|
8
|
+
|
|
9
|
+
- [#284](https://github.com/andreisergiu98/baeta/pull/284) [`53322ca`](https://github.com/andreisergiu98/baeta/commit/53322ca8ad0c10bce70e49692d5d15023ec3a5e8) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Repalce upath with pathe
|
|
10
|
+
|
|
3
11
|
## 2.0.0-next.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,77 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import pathe_default from "pathe";
|
|
2
|
+
export * from "pathe";
|
|
3
3
|
|
|
4
4
|
//#region index.d.ts
|
|
5
5
|
declare function posixPath(pathname: string): string;
|
|
6
6
|
declare function winPath(pathname: string): string;
|
|
7
|
-
declare const addExt: typeof upath.addExt;
|
|
8
|
-
declare const basename: typeof upath.basename;
|
|
9
|
-
declare const changeExt: typeof upath.changeExt;
|
|
10
|
-
declare const defaultExt: typeof upath.defaultExt;
|
|
11
|
-
declare const delimiter: string;
|
|
12
|
-
declare const dirname: typeof upath.dirname;
|
|
13
|
-
declare const extname: typeof upath.extname;
|
|
14
|
-
/**
|
|
15
|
-
* Returns a path string from an object - the opposite of parse().
|
|
16
|
-
*
|
|
17
|
-
* @param pathObject path to evaluate.
|
|
18
|
-
*/
|
|
19
|
-
declare const format: (pathObject: ParsedPath) => string;
|
|
20
|
-
declare const isAbsolute: typeof upath.isAbsolute;
|
|
21
|
-
declare const join: typeof upath.join;
|
|
22
|
-
/**
|
|
23
|
-
* Exactly like path.join(), but it keeps the first meaningful ./.
|
|
24
|
-
*
|
|
25
|
-
* Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
|
|
26
|
-
*
|
|
27
|
-
* @param paths string paths to join
|
|
28
|
-
*/
|
|
29
|
-
declare const joinSafe: (...paths: string[]) => string;
|
|
30
|
-
declare const normalize: typeof upath.normalize;
|
|
31
|
-
declare const normalizeSafe: typeof upath.normalizeSafe;
|
|
32
|
-
declare const normalizeTrim: typeof upath.normalizeTrim;
|
|
33
|
-
declare const parse: typeof upath.parse;
|
|
34
|
-
declare const posix: typeof upath.posix;
|
|
35
|
-
declare const relative: typeof upath.relative;
|
|
36
|
-
/**
|
|
37
|
-
* 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.
|
|
38
|
-
*
|
|
39
|
-
* @param filename string filename to remove extension to
|
|
40
|
-
* @param ext string extension to remove
|
|
41
|
-
*/
|
|
42
|
-
declare const removeExt: (filename: string, ext: string) => string;
|
|
43
|
-
declare const resolve: typeof upath.resolve;
|
|
44
|
-
declare const sep: string;
|
|
45
|
-
declare const toUnix: typeof upath.toUnix;
|
|
46
|
-
declare const trimExt: typeof upath.trimExt;
|
|
47
|
-
declare const win32: typeof upath.win32;
|
|
48
|
-
declare const _default: {
|
|
49
|
-
addExt: typeof upath.addExt;
|
|
50
|
-
basename: typeof upath.basename;
|
|
51
|
-
changeExt: typeof upath.changeExt;
|
|
52
|
-
defaultExt: typeof upath.defaultExt;
|
|
53
|
-
delimiter: string;
|
|
54
|
-
dirname: typeof upath.dirname;
|
|
55
|
-
extname: typeof upath.extname;
|
|
56
|
-
format: (pathObject: ParsedPath) => string;
|
|
57
|
-
isAbsolute: typeof upath.isAbsolute;
|
|
58
|
-
join: typeof upath.join;
|
|
59
|
-
joinSafe: (...paths: string[]) => string;
|
|
60
|
-
normalize: typeof upath.normalize;
|
|
61
|
-
normalizeSafe: typeof upath.normalizeSafe;
|
|
62
|
-
normalizeTrim: typeof upath.normalizeTrim;
|
|
63
|
-
parse: typeof upath.parse;
|
|
64
|
-
posix: typeof upath.posix;
|
|
65
|
-
relative: typeof upath.relative;
|
|
66
|
-
removeExt: (filename: string, ext: string) => string;
|
|
67
|
-
resolve: typeof upath.resolve;
|
|
68
|
-
sep: string;
|
|
69
|
-
toUnix: typeof upath.toUnix;
|
|
70
|
-
trimExt: typeof upath.trimExt;
|
|
71
|
-
win32: typeof upath.win32;
|
|
72
|
-
posixPath: typeof posixPath;
|
|
73
|
-
winPath: typeof winPath;
|
|
74
|
-
};
|
|
75
7
|
//#endregion
|
|
76
|
-
export {
|
|
8
|
+
export { pathe_default as default, posixPath, winPath };
|
|
77
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import pathe_default from "pathe";
|
|
3
|
+
export * from "pathe";
|
|
4
4
|
//#region index.ts
|
|
5
5
|
function posixPath(pathname) {
|
|
6
6
|
return pathname.split(path.win32.sep).join(path.posix.sep);
|
|
@@ -8,75 +8,7 @@ function posixPath(pathname) {
|
|
|
8
8
|
function winPath(pathname) {
|
|
9
9
|
return pathname.split(path.posix.sep).join(path.win32.sep);
|
|
10
10
|
}
|
|
11
|
-
const addExt = upath.addExt;
|
|
12
|
-
const basename = upath.basename;
|
|
13
|
-
const changeExt = upath.changeExt;
|
|
14
|
-
const defaultExt = upath.defaultExt;
|
|
15
|
-
const delimiter = upath.delimiter;
|
|
16
|
-
const dirname = upath.dirname;
|
|
17
|
-
const extname = upath.extname;
|
|
18
|
-
/**
|
|
19
|
-
* Returns a path string from an object - the opposite of parse().
|
|
20
|
-
*
|
|
21
|
-
* @param pathObject path to evaluate.
|
|
22
|
-
*/
|
|
23
|
-
const format = upath.format;
|
|
24
|
-
const isAbsolute = upath.isAbsolute;
|
|
25
|
-
const join = upath.join;
|
|
26
|
-
/**
|
|
27
|
-
* Exactly like path.join(), but it keeps the first meaningful ./.
|
|
28
|
-
*
|
|
29
|
-
* Note that the unix / is returned everywhere, so windows \ is always converted to unix /.
|
|
30
|
-
*
|
|
31
|
-
* @param paths string paths to join
|
|
32
|
-
*/
|
|
33
|
-
const joinSafe = upath.joinSafe;
|
|
34
|
-
const normalize = upath.normalize;
|
|
35
|
-
const normalizeSafe = upath.normalizeSafe;
|
|
36
|
-
const normalizeTrim = upath.normalizeTrim;
|
|
37
|
-
const parse = upath.parse;
|
|
38
|
-
const posix = upath.posix;
|
|
39
|
-
const relative = upath.relative;
|
|
40
|
-
/**
|
|
41
|
-
* 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.
|
|
42
|
-
*
|
|
43
|
-
* @param filename string filename to remove extension to
|
|
44
|
-
* @param ext string extension to remove
|
|
45
|
-
*/
|
|
46
|
-
const removeExt = upath.removeExt;
|
|
47
|
-
const resolve = upath.resolve;
|
|
48
|
-
const sep = upath.sep;
|
|
49
|
-
const toUnix = upath.toUnix;
|
|
50
|
-
const trimExt = upath.trimExt;
|
|
51
|
-
const win32 = upath.win32;
|
|
52
|
-
var util_path_default = {
|
|
53
|
-
addExt,
|
|
54
|
-
basename,
|
|
55
|
-
changeExt,
|
|
56
|
-
defaultExt,
|
|
57
|
-
delimiter,
|
|
58
|
-
dirname,
|
|
59
|
-
extname,
|
|
60
|
-
format,
|
|
61
|
-
isAbsolute,
|
|
62
|
-
join,
|
|
63
|
-
joinSafe,
|
|
64
|
-
normalize,
|
|
65
|
-
normalizeSafe,
|
|
66
|
-
normalizeTrim,
|
|
67
|
-
parse,
|
|
68
|
-
posix,
|
|
69
|
-
relative,
|
|
70
|
-
removeExt,
|
|
71
|
-
resolve,
|
|
72
|
-
sep,
|
|
73
|
-
toUnix,
|
|
74
|
-
trimExt,
|
|
75
|
-
win32,
|
|
76
|
-
posixPath,
|
|
77
|
-
winPath
|
|
78
|
-
};
|
|
79
|
-
|
|
80
11
|
//#endregion
|
|
81
|
-
export {
|
|
12
|
+
export { pathe_default as default, posixPath, winPath };
|
|
13
|
+
|
|
82
14
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../index.ts"],"sourcesContent":["import path
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../index.ts"],"sourcesContent":["import path from 'node:path';\n\nexport * from 'pathe';\nexport { default } from 'pathe';\n\nexport function posixPath(pathname: string) {\n\treturn pathname.split(path.win32.sep).join(path.posix.sep);\n}\n\nexport function winPath(pathname: string) {\n\treturn pathname.split(path.posix.sep).join(path.win32.sep);\n}\n"],"mappings":";;;;AAKA,SAAgB,UAAU,UAAkB;AAC3C,QAAO,SAAS,MAAM,KAAK,MAAM,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI;;AAG3D,SAAgB,QAAQ,UAAkB;AACzC,QAAO,SAAS,MAAM,KAAK,MAAM,IAAI,CAAC,KAAK,KAAK,MAAM,IAAI"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baeta/util-path",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.4",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"baeta",
|
|
6
6
|
"graphql",
|
|
@@ -38,26 +38,26 @@
|
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "builder build",
|
|
41
|
+
"check:deps": "builder check-deps",
|
|
41
42
|
"prepack": "builder prepare",
|
|
42
|
-
"postpack": "builder prepare --
|
|
43
|
+
"postpack": "builder prepare --restore",
|
|
43
44
|
"test": "builder test",
|
|
44
|
-
"test:circular": "builder test-circular",
|
|
45
45
|
"types": "tsc --noEmit"
|
|
46
46
|
},
|
|
47
47
|
"ava": {
|
|
48
|
-
"extensions":
|
|
49
|
-
"ts"
|
|
50
|
-
|
|
48
|
+
"extensions": [
|
|
49
|
+
"ts"
|
|
50
|
+
]
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"
|
|
53
|
+
"pathe": "^2.0.3"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@baeta/builder": "^0.0.0",
|
|
57
57
|
"@baeta/testing": "^0.0.0",
|
|
58
58
|
"@baeta/tsconfig": "^0.0.0",
|
|
59
|
-
"@types/node": "^22.19.
|
|
60
|
-
"typescript": "^
|
|
59
|
+
"@types/node": "^22.19.17",
|
|
60
|
+
"typescript": "^6.0.0"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=22.20.0"
|