@vuepress/utils 2.0.0-beta.37 → 2.0.0-beta.40

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 ADDED
@@ -0,0 +1 @@
1
+ export declare const hash: (val: unknown) => string;
package/lib/hash.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hash = void 0;
4
+ const hashSum = require("hash-sum");
5
+ exports.hash = hashSum;
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, hash, ora };
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.hash = exports.globby = exports.chalk = exports.debug = void 0;
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.37",
3
+ "version": "2.0.0-beta.40",
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": "Evan You",
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
- "@types/hash-sum": "^1.0.0",
32
- "@vuepress/shared": "2.0.0-beta.37",
27
+ "@vuepress/shared": "2.0.0-beta.40",
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
- "gitHead": "6600a8c1a293b948be977c348eb9907178bb3263"
45
- }
39
+ "scripts": {
40
+ "build": "tsc -b tsconfig.build.json",
41
+ "clean": "rimraf lib *.tsbuildinfo"
42
+ }
43
+ }
@@ -1,7 +0,0 @@
1
- /**
2
- * Wrapper of `require.resolve` of nodejs
3
- *
4
- * Return `null` if the module cannot be resolved
5
- * instead of throwing an error
6
- */
7
- export declare const requireResolve: (request: string) => string | null;
@@ -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;