Skip to content

Commit f3d4ee7

Browse files
committed
feat: v5.1.0
1 parent a92ea37 commit f3d4ee7

File tree

6 files changed

+833
-837
lines changed

6 files changed

+833
-837
lines changed

CHANGELOG.md

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

3+
### 5.1.0 (2022-06-12)
4+
5+
- Update codemirror dependencies to 6.x
6+
- The package no longer exports `@codemirror/view` `@codemirror/state` `@codemirror/basic-setup`.
7+
- Change the package [from `@codemirror/example-setup` to just `codemirror`](https://github.com/codemirror/basic-setup/blob/main/CHANGELOG.md#breaking-changes).
8+
39
### 5.0.1 (2022-05-14)
410

511
- Use the correct version dependencies for the `@codemirror/*` package.

dev/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import { oneDark } from '@codemirror/theme-one-dark'
88
import { Codemirror } from '../src'
99
10-
const themes = { oneDark }
11-
const languages = {
10+
const themes: any = { oneDark }
11+
const languages: any = {
1212
javascript: javascript(),
1313
html: html(),
1414
json: json(),

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-codemirror",
33
"description": "CodeMirror component for Vue",
4-
"version": "5.0.1",
4+
"version": "5.1.0",
55
"homepage": "https://github.com/surmon-china/vue-codemirror#readme",
66
"license": "MIT",
77
"keywords": [
@@ -45,28 +45,28 @@
4545
"vue": "3.x"
4646
},
4747
"dependencies": {
48-
"@codemirror/basic-setup": "^0.20.0",
49-
"@codemirror/commands": "^0.20.0",
50-
"@codemirror/language": "^0.20.0",
51-
"@codemirror/state": "^0.20.0",
52-
"@codemirror/view": "^0.20.0",
48+
"codemirror": "6.x",
49+
"@codemirror/commands": "6.x",
50+
"@codemirror/language": "6.x",
51+
"@codemirror/state": "6.x",
52+
"@codemirror/view": "6.x",
5353
"csstype": "^2.6.8"
5454
},
5555
"devDependencies": {
56-
"@codemirror/lang-cpp": "^0.20.0",
57-
"@codemirror/lang-html": "^0.20.0",
58-
"@codemirror/lang-java": "^0.20.0",
59-
"@codemirror/lang-javascript": "^0.20.0",
60-
"@codemirror/lang-json": "^0.20.0",
61-
"@codemirror/lang-lezer": "^0.20.0",
62-
"@codemirror/lang-markdown": "^0.20.0",
63-
"@codemirror/lang-php": "^0.20.0",
64-
"@codemirror/lang-python": "^0.20.0",
65-
"@codemirror/lang-rust": "^0.20.0",
66-
"@codemirror/lang-sql": "^0.20.0",
67-
"@codemirror/lang-xml": "^0.20.0",
68-
"@codemirror/legacy-modes": "^0.20.0",
69-
"@codemirror/theme-one-dark": "^0.20.0",
56+
"@codemirror/lang-cpp": "^6.0.0",
57+
"@codemirror/lang-html": "^6.0.0",
58+
"@codemirror/lang-java": "^6.0.0",
59+
"@codemirror/lang-javascript": "^6.0.0",
60+
"@codemirror/lang-json": "^6.0.0",
61+
"@codemirror/lang-lezer": "^6.0.0",
62+
"@codemirror/lang-markdown": "^6.0.0",
63+
"@codemirror/lang-php": "^6.0.0",
64+
"@codemirror/lang-python": "^6.0.0",
65+
"@codemirror/lang-rust": "^6.0.0",
66+
"@codemirror/lang-sql": "^6.0.0",
67+
"@codemirror/lang-xml": "^6.0.0",
68+
"@codemirror/legacy-modes": "^6.0.0",
69+
"@codemirror/theme-one-dark": "^6.0.0",
7070
"@surmon-china/libundler": "^2.2.0",
7171
"@typescript-eslint/eslint-plugin": "^5.9.1",
7272
"@typescript-eslint/parser": "^5.9.1",

src/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {
1010
ExtractPropTypes
1111
} from 'vue'
1212
import * as CSS from 'csstype'
13+
import { basicSetup } from 'codemirror'
1314
import { EditorState, EditorStateConfig } from '@codemirror/state'
1415
import { EditorView, ViewUpdate } from '@codemirror/view'
15-
import { basicSetup } from '@codemirror/basic-setup'
1616
import { useGlobalConfig } from './config'
1717
import * as cm from './codemirror'
1818

src/index.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ import type { Plugin } from 'vue'
22
import Component, { Props } from './component'
33
import { injectGlobalConfig } from './config'
44

5-
export * from '@codemirror/view'
6-
export * from '@codemirror/state'
7-
export * from '@codemirror/basic-setup'
8-
export { Props, DEFAULT_CONFIG } from './component'
5+
export type { Props } from './component'
6+
export { DEFAULT_CONFIG } from './component'
7+
8+
// Stop exports codemirror primitive interface to prevent module domain flooding naming conflicts.
9+
// export * from 'codemirror'
10+
// export * from '@codemirror/view'
11+
// export * from '@codemirror/state'
12+
// export * from '@codemirror/commands'
13+
// export * from '@codemirror/language'
914

1015
export const Codemirror = Component
1116
export const install: Plugin = (app, defaultConfig?: Props) => {

0 commit comments

Comments
 (0)