@modern-js/utils 1.7.7 → 1.7.8
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/dist/ensureArray.d.ts +1 -0
- package/dist/ensureArray.js +10 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/path.d.ts +1 -1
- package/dist/path.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# @modern-js/utils
|
2
2
|
|
3
|
+
## 1.7.8
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 63c354ad5: fix normalizeToPosixPath utils function args would be null
|
8
|
+
- 073e9ad78: feat(webpack): improve utils of tools.webpack
|
9
|
+
- f4a7d49e1: fix: applyOptionsChain argument type
|
10
|
+
|
3
11
|
## 1.7.7
|
4
12
|
|
5
13
|
### Patch Changes
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const ensureArray: <T>(params: T | T[]) => T[];
|
package/dist/index.d.ts
CHANGED
@@ -8,6 +8,7 @@ export * from './is';
|
|
8
8
|
export * from './compatRequire';
|
9
9
|
export * from './logger';
|
10
10
|
export * from './constants';
|
11
|
+
export * from './ensureArray';
|
11
12
|
export * from './ensureAbsolutePath';
|
12
13
|
export * from './clearConsole';
|
13
14
|
export * from './applyOptionsChain';
|
package/dist/index.js
CHANGED
@@ -20,6 +20,7 @@ __exportStar(require("./is"), exports);
|
|
20
20
|
__exportStar(require("./compatRequire"), exports);
|
21
21
|
__exportStar(require("./logger"), exports);
|
22
22
|
__exportStar(require("./constants"), exports);
|
23
|
+
__exportStar(require("./ensureArray"), exports);
|
23
24
|
__exportStar(require("./ensureAbsolutePath"), exports);
|
24
25
|
__exportStar(require("./clearConsole"), exports);
|
25
26
|
__exportStar(require("./applyOptionsChain"), exports);
|
package/dist/path.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
export declare const isRelativePath: (test: string) => boolean;
|
2
2
|
export declare const normalizeOutputPath: (s: string) => string;
|
3
|
-
export declare const normalizeToPosixPath: (p: string) => string;
|
3
|
+
export declare const normalizeToPosixPath: (p: string | undefined) => string;
|
package/dist/path.js
CHANGED
@@ -10,5 +10,5 @@ const isRelativePath = (test) => /^\.\.?($|[\\/])/.test(test);
|
|
10
10
|
exports.isRelativePath = isRelativePath;
|
11
11
|
const normalizeOutputPath = (s) => s.replace(/\\/g, '\\\\');
|
12
12
|
exports.normalizeOutputPath = normalizeOutputPath;
|
13
|
-
const normalizeToPosixPath = (p) => compiled_1.upath.normalizeSafe(path_1.default.normalize(p));
|
13
|
+
const normalizeToPosixPath = (p) => compiled_1.upath.normalizeSafe(path_1.default.normalize(p || ''));
|
14
14
|
exports.normalizeToPosixPath = normalizeToPosixPath;
|