@baeta/util-path 1.0.1 → 2.0.0-next.0
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/CHANGELOG.md +0 -89
- package/dist/index.d.ts +0 -75
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../index.ts"],"sourcesContent":["import path, { type ParsedPath } from 'node:path';\nimport upath from 'upath';\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\nexport const addExt = upath.addExt;\nexport const basename = upath.basename;\nexport const changeExt = upath.changeExt;\nexport const defaultExt = upath.defaultExt;\nexport const delimiter = upath.delimiter;\nexport const dirname = upath.dirname;\nexport const extname = upath.extname;\n\n/**\n * Returns a path string from an object - the opposite of parse().\n *\n * @param pathObject path to evaluate.\n */\nexport const format = upath.format as (pathObject: ParsedPath) => string;\n\nexport const isAbsolute = upath.isAbsolute;\nexport const join = upath.join;\n\n/**\n * Exactly like path.join(), but it keeps the first meaningful ./.\n *\n * Note that the unix / is returned everywhere, so windows \\ is always converted to unix /.\n *\n * @param paths string paths to join\n */\
|
|
1
|
+
{"version":3,"sources":["../index.ts"],"sourcesContent":["import path, { type ParsedPath } from 'node:path';\nimport upath from 'upath';\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\nexport const addExt = upath.addExt;\nexport const basename = upath.basename;\nexport const changeExt = upath.changeExt;\nexport const defaultExt = upath.defaultExt;\nexport const delimiter = upath.delimiter;\nexport const dirname = upath.dirname;\nexport const extname = upath.extname;\n\n/**\n * Returns a path string from an object - the opposite of parse().\n *\n * @param pathObject path to evaluate.\n */\nexport const format = upath.format as (pathObject: ParsedPath) => string;\n\nexport const isAbsolute = upath.isAbsolute;\nexport const join = upath.join;\n\n/**\n * Exactly like path.join(), but it keeps the first meaningful ./.\n *\n * Note that the unix / is returned everywhere, so windows \\ is always converted to unix /.\n *\n * @param paths string paths to join\n */\nexport const joinSafe = upath.joinSafe as (...paths: string[]) => string;\n\nexport const normalize = upath.normalize;\nexport const normalizeSafe = upath.normalizeSafe;\nexport const normalizeTrim = upath.normalizeTrim;\nexport const parse = upath.parse;\nexport const posix = upath.posix;\nexport const relative = upath.relative;\n\n/**\n * 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.\n *\n * @param filename string filename to remove extension to\n * @param ext string extension to remove\n */\nexport const removeExt = upath.removeExt as (filename: string, ext: string) => string;\n\nexport const resolve = upath.resolve;\nexport const sep = upath.sep;\nexport const toUnix = upath.toUnix;\nexport const trimExt = upath.trimExt;\nexport const win32 = upath.win32;\n\nexport default {\n\taddExt,\n\tbasename,\n\tchangeExt,\n\tdefaultExt,\n\tdelimiter,\n\tdirname,\n\textname,\n\tformat,\n\tisAbsolute,\n\tjoin,\n\tjoinSafe,\n\tnormalize,\n\tnormalizeSafe,\n\tnormalizeTrim,\n\tparse,\n\tposix,\n\trelative,\n\tremoveExt,\n\tresolve,\n\tsep,\n\ttoUnix,\n\ttrimExt,\n\twin32,\n\tposixPath,\n\twinPath,\n};\n"],"mappings":";AAAA,OAAO,UAA+B;AACtC,OAAO,WAAW;AAEX,SAAS,UAAU,UAAkB;AAC3C,SAAO,SAAS,MAAM,KAAK,MAAM,GAAG,EAAE,KAAK,KAAK,MAAM,GAAG;AAC1D;AAEO,SAAS,QAAQ,UAAkB;AACzC,SAAO,SAAS,MAAM,KAAK,MAAM,GAAG,EAAE,KAAK,KAAK,MAAM,GAAG;AAC1D;AAEO,IAAM,SAAS,MAAM;AACrB,IAAM,WAAW,MAAM;AACvB,IAAM,YAAY,MAAM;AACxB,IAAM,aAAa,MAAM;AACzB,IAAM,YAAY,MAAM;AACxB,IAAM,UAAU,MAAM;AACtB,IAAM,UAAU,MAAM;AAOtB,IAAM,SAAS,MAAM;AAErB,IAAM,aAAa,MAAM;AACzB,IAAM,OAAO,MAAM;AASnB,IAAM,WAAW,MAAM;AAEvB,IAAM,YAAY,MAAM;AACxB,IAAM,gBAAgB,MAAM;AAC5B,IAAM,gBAAgB,MAAM;AAC5B,IAAM,QAAQ,MAAM;AACpB,IAAM,QAAQ,MAAM;AACpB,IAAM,WAAW,MAAM;AAQvB,IAAM,YAAY,MAAM;AAExB,IAAM,UAAU,MAAM;AACtB,IAAM,MAAM,MAAM;AAClB,IAAM,SAAS,MAAM;AACrB,IAAM,UAAU,MAAM;AACtB,IAAM,QAAQ,MAAM;AAE3B,IAAO,gBAAQ;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baeta/util-path",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-next.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"baeta",
|
|
6
6
|
"graphql",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"type": "module",
|
|
28
28
|
"exports": {
|
|
29
29
|
".": {
|
|
30
|
-
"types": "./
|
|
31
|
-
"default": "./
|
|
30
|
+
"types": "./index.ts",
|
|
31
|
+
"default": "./index.ts"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"upath": "^2.0.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@baeta/builder": "
|
|
51
|
-
"@baeta/testing": "
|
|
52
|
-
"@baeta/tsconfig": "
|
|
53
|
-
"@types/node": "^22.
|
|
54
|
-
"typescript": "^5.
|
|
50
|
+
"@baeta/builder": "workspace:^",
|
|
51
|
+
"@baeta/testing": "workspace:^",
|
|
52
|
+
"@baeta/tsconfig": "workspace:^",
|
|
53
|
+
"@types/node": "^22.18.11",
|
|
54
|
+
"typescript": "^5.9.3"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=22.
|
|
57
|
+
"node": ">=22.20.0"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public",
|
|
@@ -87,4 +87,4 @@
|
|
|
87
87
|
"alphabetical-ignoring-documents"
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
|
-
}
|
|
90
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
# @baeta/util-path
|
|
2
|
-
|
|
3
|
-
## 1.0.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- [`583014f`](https://github.com/andreisergiu98/baeta/commit/583014f0bac810b25d9a8226bda2df4c9039f5e3) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Update dependencies
|
|
8
|
-
|
|
9
|
-
## 1.0.0
|
|
10
|
-
|
|
11
|
-
### Major Changes
|
|
12
|
-
|
|
13
|
-
- [#165](https://github.com/andreisergiu98/baeta/pull/165) [`1334c2a`](https://github.com/andreisergiu98/baeta/commit/1334c2a866676c88f0f3d380b22133d81c4e98bc) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - mark as stable
|
|
14
|
-
|
|
15
|
-
### Patch Changes
|
|
16
|
-
|
|
17
|
-
- [#189](https://github.com/andreisergiu98/baeta/pull/189) [`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add jsdocs
|
|
18
|
-
|
|
19
|
-
## 0.1.4
|
|
20
|
-
|
|
21
|
-
### Patch Changes
|
|
22
|
-
|
|
23
|
-
- [`b59db50`](https://github.com/andreisergiu98/baeta/commit/b59db501a83275ab2d964933080e688a3a5d8820) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add readme
|
|
24
|
-
|
|
25
|
-
## 0.1.3
|
|
26
|
-
|
|
27
|
-
### Patch Changes
|
|
28
|
-
|
|
29
|
-
- [#180](https://github.com/andreisergiu98/baeta/pull/180) [`483c709`](https://github.com/andreisergiu98/baeta/commit/483c70932f815fd114732c00b74f9488d7924c72) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Raise minimum required NodeJS version to 22.12.0. Drop CommonJS builds in favor of the require_esm feature from NodeJS 22.12.0 onwards.
|
|
30
|
-
|
|
31
|
-
- [`de6e89c`](https://github.com/andreisergiu98/baeta/commit/de6e89c1b592e280967c73a4137d24ee56ef1857) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - raise es target to 2024
|
|
32
|
-
|
|
33
|
-
## 0.1.2
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
- [#170](https://github.com/andreisergiu98/baeta/pull/170) [`59bbb9c`](https://github.com/andreisergiu98/baeta/commit/59bbb9c4baaf716f27dc251fe7aeb0231e6c5321) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
|
|
38
|
-
|
|
39
|
-
## 0.1.1
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
- [`a3f0e5d`](https://github.com/andreisergiu98/baeta/commit/a3f0e5d03fc9ef21a87d3ec6bf264d0e9707636a) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - fix exports order in package.json
|
|
44
|
-
|
|
45
|
-
- [#161](https://github.com/andreisergiu98/baeta/pull/161) [`cca37dd`](https://github.com/andreisergiu98/baeta/commit/cca37dd7135a2852f1f6e287c46911306bdc8da0) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
|
|
46
|
-
|
|
47
|
-
## 0.1.0
|
|
48
|
-
|
|
49
|
-
### Minor Changes
|
|
50
|
-
|
|
51
|
-
- [#156](https://github.com/andreisergiu98/baeta/pull/156) [`01f3c20`](https://github.com/andreisergiu98/baeta/commit/01f3c20365539fad6e8a8694c59a8e86c95784e8) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - raise engine requirement to node >= 22
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- [#152](https://github.com/andreisergiu98/baeta/pull/152) [`d538c79`](https://github.com/andreisergiu98/baeta/commit/d538c7905e6ba96d9f294e2d528f9252e83acbe7) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update formatter
|
|
56
|
-
|
|
57
|
-
- [#145](https://github.com/andreisergiu98/baeta/pull/145) [`08428d4`](https://github.com/andreisergiu98/baeta/commit/08428d4f03b79cab9c116ff7b3a3cf9a0b2620f2) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
|
|
58
|
-
|
|
59
|
-
## 0.0.6
|
|
60
|
-
|
|
61
|
-
### Patch Changes
|
|
62
|
-
|
|
63
|
-
- [#139](https://github.com/andreisergiu98/baeta/pull/139) [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
|
|
64
|
-
|
|
65
|
-
- [#139](https://github.com/andreisergiu98/baeta/pull/139) [`00dbc8f`](https://github.com/andreisergiu98/baeta/commit/00dbc8f35839aaa6524a6c0125ff38a766e45be4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update typescript
|
|
66
|
-
|
|
67
|
-
## 0.0.5
|
|
68
|
-
|
|
69
|
-
### Patch Changes
|
|
70
|
-
|
|
71
|
-
- [#128](https://github.com/andreisergiu98/baeta/pull/128) [`534917a`](https://github.com/andreisergiu98/baeta/commit/534917a18e7ed5d788a90a0335a5370d6af8f4a4) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
|
|
72
|
-
|
|
73
|
-
## 0.0.4
|
|
74
|
-
|
|
75
|
-
### Patch Changes
|
|
76
|
-
|
|
77
|
-
- [#121](https://github.com/andreisergiu98/baeta/pull/121) [`ceae50d`](https://github.com/andreisergiu98/baeta/commit/ceae50d88e4e59b22c603637620f4fc6b28b2454) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Update Node to v20
|
|
78
|
-
|
|
79
|
-
## 0.0.3
|
|
80
|
-
|
|
81
|
-
### Patch Changes
|
|
82
|
-
|
|
83
|
-
- [#119](https://github.com/andreisergiu98/baeta/pull/119) [`643a2eb`](https://github.com/andreisergiu98/baeta/commit/643a2eb17c2789cd25361ddeede149a0e459e68a) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - update dependencies
|
|
84
|
-
|
|
85
|
-
## 0.0.2
|
|
86
|
-
|
|
87
|
-
### Patch Changes
|
|
88
|
-
|
|
89
|
-
- [#106](https://github.com/andreisergiu98/baeta/pull/106) [`01788ab`](https://github.com/andreisergiu98/baeta/commit/01788ab04ff6956b2b50186af5bec8ed7ebbe76e) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add compatibility with windows
|
package/dist/index.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
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: any[]) => 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: any[]) => 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 };
|