@tsed/normalize-path 8.11.1 → 8.11.2-rc.1
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/lib/esm/index.js +0 -1
- package/lib/esm/normalizePath.js +0 -1
- package/package.json +7 -4
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/normalizePath.js.map +0 -1
- package/src/index.ts +0 -4
- package/src/normalizePath.spec.ts +0 -11
- package/src/normalizePath.ts +0 -18
- package/vitest.config.mts +0 -21
package/lib/esm/index.js
CHANGED
package/lib/esm/normalizePath.js
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/normalize-path",
|
|
3
3
|
"description": "Utils to normalize path",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.11.1",
|
|
5
|
+
"version": "8.11.2-rc.1",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "lib/esm/index.js",
|
|
8
8
|
"module": "lib/esm/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"tslib": "2.7.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@tsed/barrels": "8.11.1",
|
|
31
|
-
"@tsed/typescript": "8.11.1",
|
|
30
|
+
"@tsed/barrels": "8.11.2-rc.1",
|
|
31
|
+
"@tsed/typescript": "8.11.2-rc.1",
|
|
32
32
|
"@types/normalize-path": "^3.0.2",
|
|
33
33
|
"eslint": "9.12.0",
|
|
34
34
|
"typescript": "5.4.5",
|
|
@@ -41,5 +41,8 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/tsedio/tsed/tree/production/packages/third-parties/normalize-path",
|
|
43
43
|
"author": "Romain Lenzotti",
|
|
44
|
-
"license": "MIT"
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"tag": "rc"
|
|
47
|
+
}
|
|
45
48
|
}
|
package/lib/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalizePath.js","sourceRoot":"","sources":["../../src/normalizePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAE/B,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAIrC,MAAM,UAAU,aAAa,CAAC,IAAS,EAAE,GAAG,KAAe;IACzD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC;QAClC,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/src/index.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {normalizePath} from "./normalizePath.js";
|
|
2
|
-
|
|
3
|
-
describe("normalizePath", () => {
|
|
4
|
-
it("should normalize path (string)", () => {
|
|
5
|
-
expect(normalizePath("path", "to", "img")).toBe("path/to/img");
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
it("should normalize path (array)", () => {
|
|
9
|
-
expect(normalizePath(["path/to/img", {}])).toEqual(["path/to/img", {}]);
|
|
10
|
-
});
|
|
11
|
-
});
|
package/src/normalizePath.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {join} from "node:path";
|
|
2
|
-
|
|
3
|
-
import fixPath from "normalize-path";
|
|
4
|
-
|
|
5
|
-
export function normalizePath(item: string, ...paths: string[]): string;
|
|
6
|
-
export function normalizePath(item: (string | any)[]): (string | any)[];
|
|
7
|
-
export function normalizePath(item: any, ...paths: string[]) {
|
|
8
|
-
if (typeof item === "string") {
|
|
9
|
-
const path = join(item, ...paths);
|
|
10
|
-
return fixPath(path);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (Array.isArray(item)) {
|
|
14
|
-
return item.map((item: any) => normalizePath(item));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return item;
|
|
18
|
-
}
|
package/vitest.config.mts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
import {presets} from "@tsed/vitest/presets";
|
|
3
|
-
import {defineConfig} from "vitest/config";
|
|
4
|
-
|
|
5
|
-
export default defineConfig(
|
|
6
|
-
{
|
|
7
|
-
...presets,
|
|
8
|
-
test: {
|
|
9
|
-
...presets.test,
|
|
10
|
-
coverage: {
|
|
11
|
-
...presets.test.coverage,
|
|
12
|
-
thresholds: {
|
|
13
|
-
statements: 0,
|
|
14
|
-
branches: 0,
|
|
15
|
-
functions: 0,
|
|
16
|
-
lines: 0
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
);
|