Skip to content

Commit bce9b4d

Browse files
committed
feat: change vanilla-jsoneditor from peerDependency to dependency
1 parent bff6f1b commit bce9b4d

File tree

6 files changed

+304
-305
lines changed

6 files changed

+304
-305
lines changed

README.md

+20-10
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,28 @@
4545

4646
## Install
4747

48-
### Peer Dependencies
48+
### Dependencies
4949

50-
- vue
51-
- vanilla-jsoneditor: Standalone bundle provided by [svelte-jsoneditor](https://github.com/josdejong/svelte-jsoneditor) (successor to [jsoneditor](https://github.com/josdejong/jsoneditor))
52-
- ~~@vue/composition-api~~: Only for Vue 2.6 or earlier
50+
As of v0.11, it's no longer necessary to explicitly install [vanilla-jsoneditor](https://github.com/josdejong/svelte-jsoneditor).
51+
52+
If you want to specify dependency versions:
53+
54+
```json
55+
// package.json
56+
{
57+
"overrides": {
58+
"vanilla-jsoneditor": "x.x.x",
59+
"vue-demi": "x.x.x"
60+
}
61+
}
62+
```
5363

5464
<br>
5565

5666
### Vue 3
5767

5868
```shell
59-
npm i json-editor-vue vanilla-jsoneditor
69+
npm i json-editor-vue
6070
```
6171

6272
#### Local Registration
@@ -171,7 +181,7 @@ createApp()
171181
### Vue 2.7
172182

173183
```shell
174-
npm i json-editor-vue vanilla-jsoneditor
184+
npm i json-editor-vue
175185
```
176186

177187
#### Local Registration
@@ -286,7 +296,7 @@ Vue.use(JsonEditorVue, {
286296
### Vue 2.6 or Earlier
287297

288298
```shell
289-
npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
299+
npm i json-editor-vue @vue/composition-api
290300
```
291301

292302
#### Local Registration
@@ -423,7 +433,7 @@ Vue.use(JsonEditorVue, {
423433
### Nuxt 3
424434

425435
```shell
426-
npm i json-editor-vue vanilla-jsoneditor
436+
npm i json-editor-vue
427437
```
428438

429439
#### Local Registration
@@ -510,7 +520,7 @@ const value = ref()
510520
### Nuxt 2 + Vue 2.7
511521

512522
```shell
513-
npm i json-editor-vue vanilla-jsoneditor
523+
npm i json-editor-vue
514524
```
515525

516526
#### Local Registration
@@ -611,7 +621,7 @@ const value = ref()
611621
### Nuxt 2 + Vue 2.6 or Earlier
612622

613623
```shell
614-
npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
624+
npm i json-editor-vue @vue/composition-api
615625
```
616626

617627
#### Local Registration

docs/README.zh-CN.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,33 @@
3838
- Vue 2.6/2.7/3 一体通用
3939
- 支持 SSR (Nuxt 2/3 一体通用)
4040
- 支持 Vite,Vue CLI,webpack,CDN...
41-
- 支持微前端 ([wujie](https://github.com/Tencent/wujie)[qiankun](https://github.com/umijs/qiankun)[single-spa](https://github.com/single-spa/single-spa)……)
41+
- 支持微前端 ([wujie](https://github.com/Tencent/wujie)[qiankun](https://github.com/umijs/qiankun)[single-spa](https://github.com/single-spa/single-spa)...)
4242
- 局部注册并传参,或全局注册并传参 ([vue-global-config](https://github.com/cloydlau/vue-global-config) 提供技术支持)
4343

4444
<br>
4545

4646
## 安装
4747

48-
### 外置依赖
48+
### 依赖
4949

50-
- vue
51-
- vanilla-jsoneditor:[svelte-jsoneditor](https://github.com/josdejong/svelte-jsoneditor) ([jsoneditor](https://github.com/josdejong/jsoneditor) 的继任者) 提供的原生 JS 版本
52-
- ~~@vue/composition-api~~:仅 Vue 2.6 或更早版本需要
50+
从 v0.11 开始,不再需要显式安装 [vanilla-jsoneditor](https://github.com/josdejong/svelte-jsoneditor)
5351

54-
<br>
52+
如果需要指定依赖的版本:
53+
54+
```json
55+
// package.json
56+
{
57+
"overrides": {
58+
"vanilla-jsoneditor": "x.x.x",
59+
"vue-demi": "x.x.x"
60+
}
61+
}
62+
```
5563

5664
### Vue 3
5765

5866
```shell
59-
npm i json-editor-vue vanilla-jsoneditor
67+
npm i json-editor-vue
6068
```
6169

6270
#### 局部注册
@@ -171,7 +179,7 @@ createApp()
171179
### Vue 2.7
172180

173181
```shell
174-
npm i json-editor-vue vanilla-jsoneditor
182+
npm i json-editor-vue
175183
```
176184

177185
#### 局部注册
@@ -286,7 +294,7 @@ Vue.use(JsonEditorVue, {
286294
### Vue 2.6 或更早版本
287295

288296
```shell
289-
npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
297+
npm i json-editor-vue @vue/composition-api
290298
```
291299

292300
#### 局部注册
@@ -423,7 +431,7 @@ Vue.use(JsonEditorVue, {
423431
### Nuxt 3
424432

425433
```shell
426-
npm i json-editor-vue vanilla-jsoneditor
434+
npm i json-editor-vue
427435
```
428436

429437
#### 局部注册
@@ -510,7 +518,7 @@ const value = ref()
510518
### Nuxt 2 + Vue 2.7
511519

512520
```shell
513-
npm i json-editor-vue vanilla-jsoneditor
521+
npm i json-editor-vue
514522
```
515523

516524
#### 局部注册
@@ -611,7 +619,7 @@ const value = ref()
611619
### Nuxt 2 + Vue 2.6 或更早版本
612620

613621
```shell
614-
npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
622+
npm i json-editor-vue @vue/composition-api
615623
```
616624

617625
#### 局部注册

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"docs",
4848
"nuxt.ts"
4949
],
50+
"engines": { "npm": ">=8.3.0" },
5051
"scripts": {
5152
"dev": "esno ./scripts/dev.mts",
5253
"doc": "vitepress dev --open /README",
@@ -60,7 +61,6 @@
6061
},
6162
"peerDependencies": {
6263
"@vue/composition-api": ">=1",
63-
"vanilla-jsoneditor": ">=0",
6464
"vue": "2||3"
6565
},
6666
"peerDependenciesMeta": {
@@ -69,7 +69,8 @@
6969
}
7070
},
7171
"dependencies": {
72-
"vue-demi": "latest"
72+
"vanilla-jsoneditor": "^0.18.8",
73+
"vue-demi": "^0.14.6"
7374
},
7475
"devDependencies": {
7576
"@antfu/eslint-config": "~0.42.1",
@@ -105,7 +106,6 @@
105106
"typescript": "latest",
106107
"unplugin-auto-import": "latest",
107108
"unplugin-vue-components": "latest",
108-
"vanilla-jsoneditor": "latest",
109109
"vite": "latest",
110110
"vite-plugin-dts": "latest",
111111
"vitepress": "latest",

0 commit comments

Comments
 (0)