Skip to content

Commit dade6fb

Browse files
authored
feat: upgrade to Rspress V2 and release V1.0.0 (#11)
1 parent 7569719 commit dade6fb

File tree

169 files changed

+2948
-7759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+2948
-7759
lines changed

packages/rspress-plugin-align-image/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# rspress-plugin-align-image
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- 732b475: feat: Compatible with V2 Rspress
8+
9+
### Patch Changes
10+
11+
- Updated dependencies [732b475]
12+
13+
314
## 0.3.0
415

516
### Minor Changes

packages/rspress-plugin-align-image/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "rspress-plugin-align-image",
3-
"version": "0.3.0",
3+
"version": "1.0.0",
44
"description": "Rspress plugin for aligning images",
5+
"type": "module",
56
"keywords": [
67
"rspress",
78
"plugin",
@@ -33,14 +34,13 @@
3334
"docs:dev": "rspress dev"
3435
},
3536
"dependencies": {
36-
"@rspress/shared": "^1.17.1",
3737
"rspress-plugin-devkit": "workspace:^"
3838
},
3939
"devDependencies": {
4040
"@types/node": "^20.12.5",
4141
"typescript": "^5.4.4"
4242
},
4343
"peerDependencies": {
44-
"rspress": "*"
44+
"@rspress/core": "^2.0.0-rc.4 || ^2.0.0"
4545
}
46-
}
46+
}

packages/rspress-plugin-align-image/rspress.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as path from 'path';
2-
import { defineConfig } from 'rspress/config';
2+
import { defineConfig } from '@rspress/core';
33
import mermaid from './src';
44

55
export default defineConfig({

packages/rspress-plugin-align-image/src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
type HASTRoot,
55
type RehypePluginFactory,
66
} from 'rspress-plugin-devkit';
7-
import type { RspressPlugin } from '@rspress/shared';
7+
import type { RspressPlugin } from '@rspress/core';
88

99
export interface RspressPluginAlignImageOptions {
1010
containerClassNames?: string[];
@@ -16,9 +16,7 @@ export default function rspressPluginAlignImage(
1616
): RspressPlugin {
1717
return {
1818
name: 'rspress-plugin-align-image',
19-
config(config) {
20-
return new PresetConfigMutator(config).disableMdxRs().toConfig();
21-
},
19+
// config not needed for Rspress V2
2220
markdown: {
2321
rehypePlugins: [[rehypeAlignImage(), options]],
2422
},

packages/rspress-plugin-back-to-top/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# rspress-plugin-back-to-top
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- 732b475: feat: Compatible with V2 Rspress
8+
9+
### Patch Changes
10+
11+
- Updated dependencies [732b475]
12+
13+
314
## 0.3.0
415

516
### Minor Changes

packages/rspress-plugin-back-to-top/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "rspress-plugin-back-to-top",
3-
"version": "0.3.0",
3+
"version": "1.0.0",
44
"files": [
55
"dist"
66
],
77
"description": "Rspress plugin that add a back to top button to your site.",
8+
"type": "module",
89
"keywords": [
910
"rspress",
1011
"plugin",
@@ -32,7 +33,6 @@
3233
"docs:dev": "rspress dev"
3334
},
3435
"dependencies": {
35-
"@rspress/shared": "^1.17.1",
3636
"rspress-plugin-devkit": "workspace:^",
3737
"throttle-debounce": "^5.0.0"
3838
},
@@ -45,6 +45,6 @@
4545
"typescript": "^5.4.4"
4646
},
4747
"peerDependencies": {
48-
"rspress": "*"
48+
"@rspress/core": "^2.0.0-rc.4 || ^2.0.0"
4949
}
50-
}
50+
}

packages/rspress-plugin-back-to-top/rspress.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as path from 'path';
2-
import { defineConfig } from 'rspress/config';
2+
import { defineConfig } from '@rspress/core';
33
import back2Top from './src';
44

55
export default defineConfig({

packages/rspress-plugin-back-to-top/src/components/Back2Top.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useState, useEffect } from 'react';
2-
import { useDark } from 'rspress/runtime';
2+
// @ts-ignore - requires moduleResolution: bundler
3+
import { useDark } from '@rspress/core/runtime';
34

45
import { throttle } from 'throttle-debounce';
56

packages/rspress-plugin-back-to-top/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import path from 'node:path';
22

33
import { PresetConfigMutator } from 'rspress-plugin-devkit';
44

5-
import type { RspressPlugin } from '@rspress/shared';
5+
import type { RspressPlugin } from '@rspress/core';
66
import type { Back2TopProps } from './components/Back2Top';
77

88
export const componentsPath = path.join(__dirname, './components');

packages/rspress-plugin-devkit/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# rspress-plugin-devkit
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- 732b475: feat: Compatible with V2 Rspress
8+
39
## 0.3.0
410

511
### Minor Changes

0 commit comments

Comments
 (0)