@vuepress/utils 2.0.0-beta.38 → 2.0.0-beta.41
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/hash.d.ts +1 -0
- package/lib/hash.js +5 -0
- package/lib/index.d.ts +2 -3
- package/lib/index.js +2 -4
- package/package.json +8 -10
- package/lib/requireResolve.d.ts +0 -7
- package/lib/requireResolve.js +0 -18
package/lib/hash.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const hash: (val: unknown) => string;
|
package/lib/hash.js
ADDED
package/lib/index.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import * as chalk from 'chalk';
|
|
2
2
|
import * as debug from 'debug';
|
|
3
3
|
import * as globby from 'globby';
|
|
4
|
-
import hash = require('hash-sum');
|
|
5
4
|
import * as ora from 'ora';
|
|
6
|
-
export { debug, chalk, globby,
|
|
5
|
+
export { debug, chalk, globby, ora };
|
|
7
6
|
export * as fs from 'fs-extra';
|
|
8
7
|
export * as path from 'upath';
|
|
9
8
|
export * from './hasExportDefault';
|
|
9
|
+
export * from './hash';
|
|
10
10
|
export * from './logger';
|
|
11
11
|
export * from './renderHead';
|
|
12
12
|
export * from './renderHeadAttrs';
|
|
13
|
-
export * from './requireResolve';
|
|
14
13
|
export * from './withSpinner';
|
package/lib/index.js
CHANGED
|
@@ -14,22 +14,20 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.path = exports.fs = exports.ora = exports.
|
|
17
|
+
exports.path = exports.fs = exports.ora = exports.globby = exports.chalk = exports.debug = void 0;
|
|
18
18
|
const chalk = require("chalk");
|
|
19
19
|
exports.chalk = chalk;
|
|
20
20
|
const debug = require("debug");
|
|
21
21
|
exports.debug = debug;
|
|
22
22
|
const globby = require("globby");
|
|
23
23
|
exports.globby = globby;
|
|
24
|
-
const hash = require("hash-sum");
|
|
25
|
-
exports.hash = hash;
|
|
26
24
|
const ora = require("ora");
|
|
27
25
|
exports.ora = ora;
|
|
28
26
|
exports.fs = require("fs-extra");
|
|
29
27
|
exports.path = require("upath");
|
|
30
28
|
__exportStar(require("./hasExportDefault"), exports);
|
|
29
|
+
__exportStar(require("./hash"), exports);
|
|
31
30
|
__exportStar(require("./logger"), exports);
|
|
32
31
|
__exportStar(require("./renderHead"), exports);
|
|
33
32
|
__exportStar(require("./renderHeadAttrs"), exports);
|
|
34
|
-
__exportStar(require("./requireResolve"), exports);
|
|
35
33
|
__exportStar(require("./withSpinner"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/utils",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.41",
|
|
4
4
|
"description": "Utils package of VuePress",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress",
|
|
@@ -15,21 +15,16 @@
|
|
|
15
15
|
"url": "git+https://github.com/vuepress/vuepress-next.git"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"author": "
|
|
18
|
+
"author": "meteorlxy",
|
|
19
19
|
"main": "lib/index.js",
|
|
20
20
|
"types": "lib/index.d.ts",
|
|
21
21
|
"files": [
|
|
22
22
|
"lib"
|
|
23
23
|
],
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc -b tsconfig.build.json",
|
|
26
|
-
"clean": "rimraf lib *.tsbuildinfo"
|
|
27
|
-
},
|
|
28
24
|
"dependencies": {
|
|
29
25
|
"@types/debug": "^4.1.7",
|
|
30
26
|
"@types/fs-extra": "^9.0.13",
|
|
31
|
-
"@
|
|
32
|
-
"@vuepress/shared": "2.0.0-beta.38",
|
|
27
|
+
"@vuepress/shared": "2.0.0-beta.41",
|
|
33
28
|
"chalk": "^4.1.2",
|
|
34
29
|
"debug": "^4.3.4",
|
|
35
30
|
"fs-extra": "^10.0.1",
|
|
@@ -41,5 +36,8 @@
|
|
|
41
36
|
"publishConfig": {
|
|
42
37
|
"access": "public"
|
|
43
38
|
},
|
|
44
|
-
"
|
|
45
|
-
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc -b tsconfig.build.json",
|
|
41
|
+
"clean": "rimraf lib *.tsbuildinfo"
|
|
42
|
+
}
|
|
43
|
+
}
|
package/lib/requireResolve.d.ts
DELETED
package/lib/requireResolve.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.requireResolve = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Wrapper of `require.resolve` of nodejs
|
|
6
|
-
*
|
|
7
|
-
* Return `null` if the module cannot be resolved
|
|
8
|
-
* instead of throwing an error
|
|
9
|
-
*/
|
|
10
|
-
const requireResolve = (request) => {
|
|
11
|
-
try {
|
|
12
|
-
return require.resolve(request);
|
|
13
|
-
}
|
|
14
|
-
catch (_a) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
exports.requireResolve = requireResolve;
|