Skip to content

Commit 84b672c

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

File tree

6 files changed

+285
-298
lines changed

6 files changed

+285
-298
lines changed

README.md

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

4646
## Install
4747

48-
### Peer Dependencies
49-
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
53-
54-
<br>
55-
5648
### Vue 3
5749

5850
```shell
59-
npm i json-editor-vue vanilla-jsoneditor
51+
npm i json-editor-vue
6052
```
6153

6254
#### Local Registration
@@ -171,7 +163,7 @@ createApp()
171163
### Vue 2.7
172164

173165
```shell
174-
npm i json-editor-vue vanilla-jsoneditor
166+
npm i json-editor-vue
175167
```
176168

177169
#### Local Registration
@@ -286,7 +278,7 @@ Vue.use(JsonEditorVue, {
286278
### Vue 2.6 or Earlier
287279

288280
```shell
289-
npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
281+
npm i json-editor-vue @vue/composition-api
290282
```
291283

292284
#### Local Registration
@@ -423,7 +415,7 @@ Vue.use(JsonEditorVue, {
423415
### Nuxt 3
424416

425417
```shell
426-
npm i json-editor-vue vanilla-jsoneditor
418+
npm i json-editor-vue
427419
```
428420

429421
#### Local Registration
@@ -510,7 +502,7 @@ const value = ref()
510502
### Nuxt 2 + Vue 2.7
511503

512504
```shell
513-
npm i json-editor-vue vanilla-jsoneditor
505+
npm i json-editor-vue
514506
```
515507

516508
#### Local Registration
@@ -611,7 +603,7 @@ const value = ref()
611603
### Nuxt 2 + Vue 2.6 or Earlier
612604

613605
```shell
614-
npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
606+
npm i json-editor-vue @vue/composition-api
615607
```
616608

617609
#### Local Registration
@@ -849,6 +841,20 @@ module.exports = {
849841

850842
<br>
851843

844+
### Override dependency versions
845+
846+
```json
847+
// package.json
848+
{
849+
"overrides": {
850+
"vanilla-jsoneditor": "x.x.x",
851+
"vue-demi": "x.x.x"
852+
}
853+
}
854+
```
855+
856+
<br>
857+
852858
## Props
853859

854860
| Name | Description | Type | Default |

docs/README.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
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>

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)