Skip to content

Commit 7472fcb

Browse files
authored
INT-3324: move tinymce to be an optional peer dependency (#422)
* INT-3324: Move tinymce to be a optional peer dependency * INT-3324: Use `import type` for tinymce types * INT-3324: Bumped major version * INT-3324: Added a changelog entry
1 parent e938cb7 commit 7472fcb

File tree

7 files changed

+19
-12
lines changed

7 files changed

+19
-12
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Changed
11+
- Moved tinymce dependency to be a optional peer dependency. #INT-3324
12+
1013
## 6.0.0 - 2024-06-05
1114

1215
### Added

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tinymce/tinymce-vue",
3-
"version": "6.0.2-rc",
3+
"version": "7.0.2-rc",
44
"description": "Official TinyMCE Vue 3 Component",
55
"private": false,
66
"repository": {
@@ -33,8 +33,14 @@
3333
"LICENSE.txt"
3434
],
3535
"peerDependencies": {
36+
"tinymce": "^7.0.0 || ^6.0.0 || ^5.5.1",
3637
"vue": "^3.0.0"
3738
},
39+
"peerDependenciesMeta": {
40+
"tinymce": {
41+
"optional": true
42+
}
43+
},
3844
"devDependencies": {
3945
"@babel/core": "^7.20.2",
4046
"@ephox/agar": "^8.0.1",
@@ -69,6 +75,7 @@
6975
"rollup-plugin-node-resolve": "^5.2.0",
7076
"rollup-plugin-typescript2": "^0.34.1",
7177
"rollup-plugin-uglify": "^6.0.0",
78+
"tinymce": "^7",
7279
"tinymce-4": "npm:tinymce@^4",
7380
"tinymce-5": "npm:tinymce@^5",
7481
"tinymce-6": "npm:tinymce@^6",
@@ -84,8 +91,5 @@
8491
"vue-router": "^4.3.2",
8592
"vue-template-compiler": "^2.7.16",
8693
"webpack": "^5.75.0"
87-
},
88-
"dependencies": {
89-
"tinymce": "^7.0.0 || ^6.0.0 || ^5.5.1"
9094
}
9195
}

src/main/ts/Utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import { Ref, watch, SetupContext } from 'vue';
1010
import { IPropTypes } from './components/EditorPropTypes';
11-
import { Editor as TinyMCEEditor, EditorEvent } from 'tinymce';
11+
import type { Editor as TinyMCEEditor, EditorEvent } from 'tinymce';
1212

1313
const validEvents = [
1414
'onActivate',

src/main/ts/components/Editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { getTinymce } from '../TinyMCE';
1111
import { isTextarea, mergePlugins, uuid, isNullOrUndefined, initEditor } from '../Utils';
1212
import { editorProps, IPropTypes } from './EditorPropTypes';
1313
import { h, defineComponent, onMounted, ref, Ref, toRefs, nextTick, watch, onBeforeUnmount, onActivated, onDeactivated } from 'vue';
14-
import { Editor as TinyMCEEditor, EditorEvent, TinyMCE } from 'tinymce';
14+
import type { Editor as TinyMCEEditor, EditorEvent, TinyMCE } from 'tinymce';
1515

1616
type EditorOptions = Parameters<TinyMCE['init']>[0];
1717

src/main/ts/components/EditorPropTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*
77
*/
8-
import { TinyMCE } from 'tinymce';
8+
import type { TinyMCE } from 'tinymce';
99

1010
type EditorOptions = Parameters<TinyMCE['init']>[0];
1111

src/stories/Editor.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { onBeforeMount, ref } from 'vue';
33
import { ScriptLoader } from '../main/ts/ScriptLoader';
44

55
import { Editor } from '../main/ts/components/Editor';
6-
import { Editor as TinyMCEEditor, EditorEvent } from 'tinymce';
6+
import type { Editor as TinyMCEEditor, EditorEvent } from 'tinymce';
77

88
const apiKey = 'qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc';
99
const content = `

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15341,10 +15341,10 @@ tiny-emitter@^2.0.0:
1534115341
resolved "https://registry.npmjs.org/tinymce/-/tinymce-7.0.1.tgz"
1534215342
integrity sha512-0a7DJnhniBx2psRuKcVQ9g4hujN6PAR4fPS0NSF1T1luH1RBDZVVEn2pGND6Ly+AW1lUm/cHOHjsasqBelMhbw==
1534315343

15344-
"tinymce@^7.0.0 || ^6.0.0 || ^5.5.1":
15345-
version "7.1.1"
15346-
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-7.1.1.tgz#63cd62c0288bdbddb854b3565387c8d7dec14be4"
15347-
integrity sha512-QQJKsEiM+jUfrlxNivuVUiv1jsHv4a27rub4oqajtsYQ4mFukN3hkWQrZnzVNtnPOIUsOGU2Ycem0DnEU/JKcA==
15344+
tinymce@^7:
15345+
version "7.2.1"
15346+
resolved "https://registry.yarnpkg.com/tinymce/-/tinymce-7.2.1.tgz#9b4f6b5a0fa647e2953c174ac69aa47483683332"
15347+
integrity sha512-ADd1cvdIuq6NWyii0ZOZRuu+9sHIdQfcRNWBcBps2K8vy7OjlRkX6iw7zz1WlL9kY4z4L1DvIP+xOrVX/46aHA==
1534815348

1534915349
tmp@^0.2.1:
1535015350
version "0.2.1"

0 commit comments

Comments
 (0)