Skip to content

Commit 706ba6c

Browse files
authored
INT-3366: Upgrade dependencies
2 parents f5edec7 + 71cd3c0 commit 706ba6c

File tree

7 files changed

+3648
-2396
lines changed

7 files changed

+3648
-2396
lines changed

CHANGELOG.md

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

77
## Unreleased
88

9+
### Fixed
10+
- Editor initialization failure error handling. #INT-3366
11+
912
## 2.3.1 - 2025-08-11
1013

1114
### Fixed

eslint.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// eslint.config.js
2+
import { defineConfig } from "eslint/config";
3+
import tinymceEslintPlugin from "@tinymce/eslint-plugin";
4+
5+
export default defineConfig([
6+
{
7+
plugins: {
8+
"@tinymce": tinymceEslintPlugin
9+
},
10+
extends: [
11+
"@tinymce/standard"
12+
],
13+
languageOptions: {
14+
parserOptions: {
15+
sourceType: "module",
16+
project: [
17+
"./tsconfig.json"
18+
]
19+
},
20+
},
21+
rules: {
22+
"no-underscore-dangle": "off",
23+
"@typescript-eslint/explicit-member-accessibility": "off",
24+
"@tinymce/prefer-fun": "off",
25+
"@typescript-eslint/member-ordering": "off",
26+
"quote-props": [
27+
2,
28+
"consistent-as-needed",
29+
{
30+
keywords: false
31+
}
32+
]
33+
}
34+
}
35+
]);

package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"description": "Official TinyMCE Web Component",
3+
"version": "2.3.2-rc",
4+
"name": "@tinymce/tinymce-webcomponent",
35
"repository": {
46
"url": "https://github.com/tinymce/tinymce-webcomponent"
57
},
@@ -24,33 +26,32 @@
2426
"license": "MIT",
2527
"devDependencies": {
2628
"@ephox/agar": "^8.0.1",
27-
"@ephox/bedrock-client": "^14.1.1",
28-
"@ephox/bedrock-server": "^14.1.4",
29+
"@ephox/bedrock-client": "^15.0.0",
30+
"@ephox/bedrock-server": "^15.0.0",
2931
"@ephox/katamari": "^9.1.5",
3032
"@ephox/sugar": "^9.2.1",
3133
"@ephox/swag": "^4.6.0",
3234
"@tinymce/beehive-flow": "^0.19.0",
33-
"@tinymce/eslint-plugin": "^2.2.1",
35+
"@tinymce/eslint-plugin": "^3.0.0",
3436
"@types/esm": "^3.2.0",
3537
"@types/express": "^5.0.0",
36-
"@types/node": "^22.7.7",
37-
"@typescript-eslint/eslint-plugin": "^5.48.2",
38-
"@typescript-eslint/parser": "^5.48.2",
39-
"eslint": "^8.32.0",
38+
"@types/node": "^24.5.2",
39+
"@typescript-eslint/eslint-plugin": "^8.44.0",
40+
"@typescript-eslint/parser": "^8.44.0",
41+
"eslint": "^9.36.0",
42+
"eslint-config-eslint": "^13.0.0",
4043
"eslint-plugin-import": "^2.27.5",
4144
"eslint-plugin-prefer-arrow": "^1.2.3",
4245
"esm": "^3.2.25",
43-
"express": "^4.18.2",
46+
"express": "^5.1.0",
4447
"rollup": "^4.24.0",
4548
"tinymce": "^8.0.0",
4649
"ts-loader": "^9.4.2",
4750
"ts-node": "^10.9.1",
48-
"typescript": "~5.6.3",
51+
"typescript": "~5.9.2",
4952
"webpack": "^5.75.0"
5053
},
5154
"dependencies": {
5255
"@tinymce/miniature": "^6.0.0"
53-
},
54-
"version": "2.3.2-rc",
55-
"name": "@tinymce/tinymce-webcomponent"
56+
}
5657
}

src/demo/ts/Server.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ const page = (editor1Value: string, editor2Value: string, editor3Value: string,
7474
const tinyPath = path.normalize(path.join(__dirname, '..', '..', '..', 'node_modules', 'tinymce'));
7575
const distPath = path.normalize(path.join(__dirname, '..', '..', '..', 'dist'));
7676

77+
/* eslint-disable-next-line no-console */
7778
console.log('Serving /tinymce from: ' + tinyPath);
79+
/* eslint-disable-next-line no-console */
7880
console.log('Serving /dist from: ' + distPath);
7981

8082
app.use('/tinymce', express.static(tinyPath));
@@ -89,4 +91,5 @@ app.post('/', (request, response) => {
8991
response.send(page(request.body.editor1 as string, request.body.editor2 as string, request.body.editor3 as string, request.body.editor4 as string));
9092
});
9193

94+
/* eslint-disable-next-line no-console */
9295
app.listen(3000, () => console.log('http://localhost:3000/'));

src/main/ts/component/Editor.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const lookup = <T extends Record<string, unknown>, K extends keyof T>(values: T)
4343

4444
const parseGlobal = Resolve.resolve;
4545
const parseString = Fun.identity;
46-
const parseFalseOrString = lookup({ 'false': false as const });
47-
const parseBooleanOrString = lookup({ 'true': true, 'false': false });
46+
const parseFalseOrString = lookup({ false: false });
47+
const parseBooleanOrString = lookup({ true: true, false: false });
4848
const parseNumberOrString = (value: string) => /^\d+$/.test(value) ? Number.parseInt(value, 10) : value;
4949

5050
const configAttributes: Record<string, (v: string) => unknown> = {
@@ -279,7 +279,10 @@ class TinyMceEditor extends HTMLElement {
279279
}
280280
};
281281
// use target
282-
this._getTinymce().init(conf);
282+
this._getTinymce().init(conf).catch((err) => {
283+
/* eslint-disable-next-line no-console */
284+
console.error('TinyMCE init failed', err);
285+
});
283286
}
284287

285288
private _getTinymceSrc(): string {
@@ -451,4 +454,3 @@ class TinyMceEditor extends HTMLElement {
451454
export default () => {
452455
window.customElements.define('tinymce-editor', TinyMceEditor);
453456
};
454-

src/test/ts/browser/LoadTest.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ UnitTest.asynctest('LoadTest', (success, failure) => {
3131
seenInit = true;
3232
};
3333
}),
34-
Step.sync(() => makeTinymceElement({ setup: 'customElementTinymceSetup', 'on-init': 'customElementTinymceInit' }, '<p>Hello world</p>')),
34+
Step.sync(() => makeTinymceElement({
35+
'setup': 'customElementTinymceSetup',
36+
'on-init': 'customElementTinymceInit'
37+
}, '<p>Hello world</p>')),
3538
Waiter.sTryUntilPredicate('Waiting for editor setup', () => seenSetup),
3639
Waiter.sTryUntilPredicate('Waiting for editor init', () => seenInit),
3740
Step.sync(() => {

0 commit comments

Comments
 (0)