@rspress/plugin-api-docgen 2.0.21 → 2.0.22

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +5 -6
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ const pluginVirtualModule = (pluginOptions = {})=>({
46
46
  }
47
47
  }
48
48
  });
49
- node_path.join(__dirname, '..');
49
+ const PACKAGE_ROOT = node_path.join(import.meta.dirname, '..');
50
50
  const apiDocMap = {};
51
51
  const locales = {
52
52
  zh: {
@@ -266,7 +266,7 @@ function pluginApiDocgen(options) {
266
266
  },
267
267
  markdown: {
268
268
  globalComponents: [
269
- node_path.join(__dirname, '..', 'static', 'global-components', 'API.tsx')
269
+ node_path.join(PACKAGE_ROOT, 'static', 'global-components', 'API.tsx')
270
270
  ]
271
271
  }
272
272
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/plugin-api-docgen",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "A plugin for rspress to generate api doc.",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -32,15 +32,14 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@microsoft/api-extractor": "^7.59.0",
35
- "@rslib/core": "1.0.0-rc.0",
36
35
  "@types/hast": "^3.0.5",
37
36
  "@types/mdast": "^4.0.4",
38
37
  "@types/node": "^22.8.1",
39
38
  "@types/react": "^19.2.18",
40
- "@types/react-dom": "^19.2.4",
39
+ "@types/react-dom": "^19.2.7",
41
40
  "react": "^19.2.8",
42
41
  "react-dom": "^19.2.8",
43
- "react-router-dom": "^7.18.2",
42
+ "react-router-dom": "^7.18.3",
44
43
  "rsbuild-plugin-publint": "^1.0.0",
45
44
  "rsbuild-plugin-virtual-module": "0.4.5",
46
45
  "typescript": "^6.0.3"
@@ -62,8 +61,8 @@
62
61
  "registry": "https://registry.npmjs.org/"
63
62
  },
64
63
  "scripts": {
65
- "build": "rslib build",
66
- "dev": "rslib build -w",
64
+ "build": "rs lib",
65
+ "dev": "rs lib -w",
67
66
  "reset": "rimraf ./**/node_modules"
68
67
  }
69
68
  }