@vuepress/utils 2.0.0-rc.15 → 2.0.0-rc.17

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## Documentation
7
7
 
8
- https://v2.vuepress.vuejs.org
8
+ https://vuepress.vuejs.org
9
9
 
10
10
  ## License
11
11
 
package/dist/index.d.ts CHANGED
@@ -13,19 +13,19 @@ import { HeadConfig, HeadAttrsConfig } from '@vuepress/shared';
13
13
  */
14
14
  declare const formatMs: (ms: number) => string;
15
15
 
16
- declare const info: (...args: any[]) => void;
17
- declare const tip: (...args: any[]) => void;
18
- declare const success: (...args: any[]) => void;
19
- declare const warn: (...args: any[]) => void;
20
- declare const error: (...args: any[]) => void;
21
- declare const createError: (message?: string | undefined) => Error;
16
+ declare const info: (...args: unknown[]) => void;
17
+ declare const tip: (...args: unknown[]) => void;
18
+ declare const success: (...args: unknown[]) => void;
19
+ declare const warn: (...args: unknown[]) => void;
20
+ declare const error: (...args: unknown[]) => void;
21
+ declare const createError: (message?: string) => Error;
22
22
  declare const logger: {
23
- info: (...args: any[]) => void;
24
- tip: (...args: any[]) => void;
25
- success: (...args: any[]) => void;
26
- warn: (...args: any[]) => void;
27
- error: (...args: any[]) => void;
28
- createError: (message?: string | undefined) => Error;
23
+ info: (...args: unknown[]) => void;
24
+ tip: (...args: unknown[]) => void;
25
+ success: (...args: unknown[]) => void;
26
+ warn: (...args: unknown[]) => void;
27
+ error: (...args: unknown[]) => void;
28
+ createError: (message?: string) => Error;
29
29
  };
30
30
 
31
31
  declare const withSpinner: (msg: string) => <T>(target: (spinner?: Ora) => Promise<T>) => Promise<T>;
@@ -119,7 +119,7 @@ interface TemplateRendererContext {
119
119
  /**
120
120
  * Type of the template renderer function
121
121
  */
122
- type TemplateRenderer = (template: string, context: TemplateRendererContext) => string | Promise<string>;
122
+ type TemplateRenderer = (template: string, context: TemplateRendererContext) => Promise<string> | string;
123
123
  /**
124
124
  * The default template renderer implementation
125
125
  */
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ var logger = {
44
44
  };
45
45
 
46
46
  // src/console/withSpinner.ts
47
- import process from "process";
47
+ import process from "node:process";
48
48
  import ora from "ora";
49
49
  var withSpinner = (msg) => async (target) => {
50
50
  if (process.env.DEBUG) {
@@ -64,14 +64,14 @@ var withSpinner = (msg) => async (target) => {
64
64
  };
65
65
 
66
66
  // src/module/getDirname.ts
67
- import { fileURLToPath } from "url";
67
+ import { fileURLToPath } from "node:url";
68
68
  import path from "upath";
69
69
  var getDirname = (importMetaUrl) => path.dirname(fileURLToPath(importMetaUrl));
70
70
 
71
71
  // src/module/importFile.ts
72
- import { pathToFileURL } from "url";
73
- var importFile = (filePath) => import(pathToFileURL(filePath).toString());
74
- var importFileDefault = (filePath) => importFile(filePath).then((m) => m.default);
72
+ import { pathToFileURL } from "node:url";
73
+ var importFile = async (filePath) => import(pathToFileURL(filePath).toString());
74
+ var importFileDefault = async (filePath) => importFile(filePath).then((m) => m.default);
75
75
 
76
76
  // src/module/isChildPath.ts
77
77
  import path2 from "upath";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/utils",
3
- "version": "2.0.0-rc.15",
3
+ "version": "2.0.0-rc.17",
4
4
  "description": "Utils package of VuePress",
5
5
  "keywords": [
6
6
  "vuepress",
@@ -30,14 +30,14 @@
30
30
  "@types/debug": "^4.1.12",
31
31
  "@types/fs-extra": "^11.0.4",
32
32
  "@types/hash-sum": "^1.0.2",
33
- "debug": "^4.3.6",
33
+ "debug": "^4.3.7",
34
34
  "fs-extra": "^11.2.0",
35
35
  "globby": "^14.0.2",
36
36
  "hash-sum": "^2.0.0",
37
- "ora": "^8.0.1",
38
- "picocolors": "^1.0.1",
37
+ "ora": "^8.1.0",
38
+ "picocolors": "^1.1.0",
39
39
  "upath": "^2.0.1",
40
- "@vuepress/shared": "2.0.0-rc.15"
40
+ "@vuepress/shared": "2.0.0-rc.17"
41
41
  },
42
42
  "publishConfig": {
43
43
  "access": "public"