@baeta/util-path 0.1.4 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @baeta/util-path
2
2
 
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#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
8
+
9
+ ### Patch Changes
10
+
11
+ - [#189](https://github.com/andreisergiu98/baeta/pull/189) [`d500378`](https://github.com/andreisergiu98/baeta/commit/d500378198e0a9c48298c4242913bca8ad348228) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - add jsdocs
12
+
3
13
  ## 0.1.4
4
14
 
5
15
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ParsedPath } from 'node:path';
1
2
  import upath from 'upath';
2
3
 
3
4
  declare function posixPath(pathname: string): string;
@@ -9,17 +10,35 @@ declare const defaultExt: typeof upath.defaultExt;
9
10
  declare const delimiter: string;
10
11
  declare const dirname: typeof upath.dirname;
11
12
  declare const extname: typeof upath.extname;
12
- declare const format: typeof upath.format;
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;
13
19
  declare const isAbsolute: typeof upath.isAbsolute;
14
20
  declare const join: typeof upath.join;
15
- declare const joinSafe: typeof upath.joinSafe;
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;
16
29
  declare const normalize: typeof upath.normalize;
17
30
  declare const normalizeSafe: typeof upath.normalizeSafe;
18
31
  declare const normalizeTrim: typeof upath.normalizeTrim;
19
32
  declare const parse: typeof upath.parse;
20
33
  declare const posix: typeof upath.posix;
21
34
  declare const relative: typeof upath.relative;
22
- declare const removeExt: typeof upath.removeExt;
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;
23
42
  declare const resolve: typeof upath.resolve;
24
43
  declare const sep: string;
25
44
  declare const toUnix: typeof upath.toUnix;
@@ -33,17 +52,17 @@ declare const _default: {
33
52
  delimiter: string;
34
53
  dirname: typeof upath.dirname;
35
54
  extname: typeof upath.extname;
36
- format: typeof upath.format;
55
+ format: (pathObject: ParsedPath) => string;
37
56
  isAbsolute: typeof upath.isAbsolute;
38
57
  join: typeof upath.join;
39
- joinSafe: typeof upath.joinSafe;
58
+ joinSafe: (...paths: any[]) => string;
40
59
  normalize: typeof upath.normalize;
41
60
  normalizeSafe: typeof upath.normalizeSafe;
42
61
  normalizeTrim: typeof upath.normalizeTrim;
43
62
  parse: typeof upath.parse;
44
63
  posix: typeof upath.posix;
45
64
  relative: typeof upath.relative;
46
- removeExt: typeof upath.removeExt;
65
+ removeExt: (filename: string, ext: string) => string;
47
66
  resolve: typeof upath.resolve;
48
67
  sep: string;
49
68
  toUnix: typeof upath.toUnix;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../index.ts"],"sourcesContent":["import path 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;\nexport const format = upath.format;\nexport const isAbsolute = upath.isAbsolute;\nexport const join = upath.join;\nexport const joinSafe = upath.joinSafe;\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;\nexport const removeExt = upath.removeExt;\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,UAAU;AACjB,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;AACtB,IAAM,SAAS,MAAM;AACrB,IAAM,aAAa,MAAM;AACzB,IAAM,OAAO,MAAM;AACnB,IAAM,WAAW,MAAM;AACvB,IAAM,YAAY,MAAM;AACxB,IAAM,gBAAgB,MAAM;AAC5B,IAAM,gBAAgB,MAAM;AAC5B,IAAM,QAAQ,MAAM;AACpB,IAAM,QAAQ,MAAM;AACpB,IAAM,WAAW,MAAM;AACvB,IAAM,YAAY,MAAM;AACxB,IAAM,UAAU,MAAM;AACtB,IAAM,MAAM,MAAM;AAClB,IAAM,SAAS,MAAM;AACrB,IAAM,UAAU,MAAM;AACtB,IAAM,QAAQ,MAAM;AAE3B,IAAO,oBAAQ;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":[]}
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 */\n// biome-ignore lint/suspicious/noExplicitAny: accept any arguments\nexport const joinSafe = upath.joinSafe as (...paths: any[]) => 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;AAUnB,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,oBAAQ;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": "0.1.4",
3
+ "version": "1.0.0",
4
4
  "keywords": [
5
5
  "baeta",
6
6
  "graphql",
@@ -79,6 +79,12 @@
79
79
  "./index.ts"
80
80
  ],
81
81
  "readme": "none",
82
- "tsconfig": "./tsconfig.json"
82
+ "tsconfig": "./tsconfig.json",
83
+ "sort": [
84
+ "kind",
85
+ "instance-first",
86
+ "required-first",
87
+ "alphabetical-ignoring-documents"
88
+ ]
83
89
  }
84
90
  }