Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
b9007fa
Update version in package.json
Sep 29, 2025
3a6a720
Update patch
Sep 29, 2025
54b2f36
Update lockfile
Sep 29, 2025
8bd57c8
Adjust renamed imports
Sep 29, 2025
539a455
Migrate ckeditor5-bbcode package to node test runner
Oct 6, 2025
4a9ae9d
Remove unused jest dependency
Oct 6, 2025
05da36b
Migrate ckeditor5-common package to node test runner
Oct 6, 2025
422d76d
Remove Jest from ckeditor5-core-common
Oct 6, 2025
fcb6fb0
Remove Jest from ckeditor5-coremedia-blocklist
Oct 6, 2025
056303b
Remove Jest from ckeditor5-coremedia-content
Oct 6, 2025
98c6ed6
Remove Jest from ckeditor5-coremedia-content-clipboard
Oct 6, 2025
2401305
Migrate ckeditor5-coremedia-differencing package to node test runner
Oct 6, 2025
1441781
Remove unused import
Oct 6, 2025
3c445e9
Migrate ckeditor5-coremedia-example-data package to node test runner
Oct 6, 2025
c88a5a7
Remove Jest from ckeditor5-coremedia-images
Oct 6, 2025
cd7e0e9
Remove Jest from ckeditor5-coremedia-studio-essentials
Oct 6, 2025
6ac7017
Migrate ckeditor5-coremedia-studio-integration package to node test r…
Oct 6, 2025
7ae728a
Remove Jest from ckeditor5-link-common
Oct 7, 2025
54c67c3
Migrate ckeditor5-dom-converter package to node test runner
Oct 7, 2025
3caa63c
Migrate ckeditor5-dataprocessor-support package to node test runner
Oct 7, 2025
102285d
Migrate ckeditor5-coremedia-richtext-support package to node test runner
Oct 7, 2025
0f77e15
Migrate ckeditor5-coremedia-studio-integration-mock package to node t…
Oct 8, 2025
404781f
Migrate ckeditor5-font-mapper package to node test runner
Oct 8, 2025
cb18e84
Migrate ckeditor5-coremedia-link package to node test runner
Oct 8, 2025
798b779
Migrate ckeditor5-com-support package to node test runner
Oct 8, 2025
ca3438d
switch all packages to "type": "module"
jens-meisner Oct 9, 2025
1fcdf23
fix webpack.config for app
jens-meisner Oct 9, 2025
1ab1549
fix tests in ckeditor5-coremedia-link
jens-meisner Oct 9, 2025
cc7a9bc
Migrate ckeditor5-coremedia-richtext package to node test runner
Oct 9, 2025
102110e
update tsconfig to test folder
jens-meisner Oct 9, 2025
b68640b
Migrate ckeditor5-coremedia-data-facade package to node test runner
Oct 9, 2025
4a17a76
rename __tests__ to test
jens-meisner Oct 9, 2025
a7aff09
prepend void to test and describe in test files to fix lint issues
jens-meisner Oct 9, 2025
63e2c0b
added @types/node and test-runner-helper where necessary and remove t…
jens-meisner Oct 9, 2025
717017d
added @types/node and test-runner-helper where necessary and remove t…
jens-meisner Oct 9, 2025
8b9fa63
prepend some more test with void to fix lint issues
jens-meisner Oct 9, 2025
dda605a
add optional count of iterations to ObservableMutableProperty
jens-meisner Oct 10, 2025
4310adf
Remove tsx dependency from package.json files
Oct 10, 2025
afbbd16
Merge main into branch (without applying most of the changes in test …
Oct 10, 2025
7d2fe78
set Version of @coremedia/service-agent to 2.1.2 in dev- and peer-dep…
jens-meisner Oct 10, 2025
fbfcb8f
fix tests in studio-integration-mock
jens-meisner Oct 10, 2025
3716792
fix tests in dom-support
jens-meisner Oct 10, 2025
6eac5e4
fix tests in logging
jens-meisner Oct 13, 2025
3f27db8
readd "tsx" devDependency for now
jens-meisner Oct 13, 2025
5028c36
Fix eslint combined with "type": "module"
Oct 13, 2025
04ee4cd
run pnpm -r --no-bail lint --fix
Oct 13, 2025
b9bebb0
add missing beforeEach import
Oct 13, 2025
65e7995
eslint: fix "Definition for rule 'no-null/no-null' was not found no-…
Oct 13, 2025
3bcadd4
eslint: remove any types
Oct 13, 2025
939692f
remove deprecation: use CssTransitionDisablerMixin instead of injectC…
Oct 13, 2025
8b202f4
fix eslint/prettier issue in FontMappingRegistry.test.ts
Oct 13, 2025
1eb04f3
re-enable ckeditor5-coremedia-richtext tests
Oct 13, 2025
c8708da
fix tests in coremedia-richtext: important! avoid calling test inside…
jens-meisner Oct 14, 2025
33d4f4c
fix tests + use new test-runner version + added parameter --test-forc…
jens-meisner Oct 14, 2025
b6c1d7e
remove now unnecessary patch for ckeditor5
jens-meisner Oct 14, 2025
69b053d
fix NodeProxy.test.ts (fix wrong migration)
Oct 14, 2025
8e3318a
fix test script in ckeditor5-dataprocessor-support package
Oct 14, 2025
ed176f4
remove jest.config.cjs in ckeditor5-logging
Oct 14, 2025
ba78af2
change test script in root package.json and github workflows from "je…
Oct 14, 2025
2d7509e
change required node version to ^22.3.0
Oct 14, 2025
a73a81c
remove "types": ["jest"] from tsconfig.json
Oct 14, 2025
3f60f44
remove jest from workspace root
Oct 14, 2025
232dc23
fix playwright test after updating service-agent to 2.x
Oct 14, 2025
88a59b6
copy jest config to itest and remove ckeditor5-jest-test-helpers
Oct 14, 2025
07f5794
fixed DataFacadeController.test.ts
jens-meisner Oct 14, 2025
fcc85f0
merge main into branch
Oct 14, 2025
e7c7cd6
Merge remote-tracking branch 'origin/Update-to-46.x' into Update-to-46.x
Oct 14, 2025
6270dcc
add jsdom as devDependency to fix bad peerDependency warning
jens-meisner Oct 14, 2025
5145e84
cleanup: remove unused jest files, silenced() calls and unused code i…
Oct 15, 2025
8514865
bbCode fixes - work in progress - packages builds successful - some t…
jens-meisner Oct 15, 2025
d36b866
refactor remaining describe.each() occurrences
Oct 15, 2025
80bffec
change expected results for colors (now same result as chrome)
Oct 15, 2025
0f32f32
Merge remote-tracking branch 'origin/Update-to-46.x' into Update-to-4…
jens-meisner Oct 16, 2025
15ccd8c
fix test error in Paragraphs
jens-meisner Oct 16, 2025
e345929
fixed next test error in Paragraphs
jens-meisner Oct 16, 2025
4465596
fixed test error in KnownIssues - but still a TODO
jens-meisner Oct 16, 2025
46058e6
fixed test error in BBCodeCode
jens-meisner Oct 17, 2025
7faf25e
removed TODO
jens-meisner Oct 17, 2025
2378338
Merge pull request #234 from CoreMedia/Update-to-46.x-bbcode-4.2
jens-meisner Oct 17, 2025
76cf412
add patch to @bbob-presethtml5
jens-meisner Oct 17, 2025
2aa1ceb
remove unused import
Oct 17, 2025
884d81f
merge main into branch
Oct 17, 2025
a741030
fix pre-release job
Oct 17, 2025
ad7157f
add jest-transform-stub dependency to itest package
Oct 17, 2025
c9c9dfc
add missing dependencies to itest package
Oct 17, 2025
d32b413
use bbob dependencies in version 4.3.1, apply patch
Oct 20, 2025
6b42177
Revert "use bbob dependencies in version 4.3.1, apply patch"
Oct 20, 2025
7bc9f85
remove version range from bbob dependencies
Oct 20, 2025
3ea08be
use @bbob version 4.3.1 + remove dynamic imports
jens-meisner Oct 20, 2025
13c1b05
skip some tests, to be able to test pre-release in studio - reactivat…
jens-meisner Oct 20, 2025
0c5edbb
fix tests in ckeditor5-bbcode
Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
env:
CKEDITOR_LICENSE_KEY: ${{ secrets.CKEDITOR_LICENSE }}
run: |
pnpm jest
pnpm test
- id: itest
if: ${{ inputs.itest }}
name: "Integration Tests"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
NODE_OPTIONS: "--max_old_space_size=4096"
PNPM_VERSION: ^10.9
NPM_CONFIG_@coremedia:registry: 'https://npm.coremedia.io'
NPM_CONFIG_@coremedia-internal:registry: 'https://npm.coremedia.io'

jobs:
build:
Expand Down Expand Up @@ -83,7 +84,7 @@ jobs:
- name: Test
env:
CKEDITOR_LICENSE_KEY: ${{ secrets.CKEDITOR_LICENSE }}
run: pnpm jest
run: pnpm test
- name: Playwright Tests
run: pnpm playwright
- name: TypeDoc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Test
env:
CKEDITOR_LICENSE_KEY: ${{ secrets.CKEDITOR_LICENSE }}
run: pnpm jest
run: pnpm test
- name: Playwright Tests
run: pnpm playwright
- name: TypeDoc
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CKEDITOR_LICENSE_KEY=<your-license-key>
To run tests use:

```text
pnpm run jest
pnpm run test
```

## Update Process
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ workspace usage, are not published and have scope `@coremedia-internal/`.
| [`ckeditor5-dom-converter`][] | Base architecture for data-processing |
| [`ckeditor5-dom-support`][] | Utilities for handling DOM objects |
| [`ckeditor5-font-mapper`][] | Replaces characters in given font to alternative representation on paste |
| [`ckeditor5-jest-test-helpers`][] | Support for JEST tests |
| [`ckeditor5-link-common`][] | Assistive Utilities for `@ckeditor/ckeditor5-link` |
| [`ckeditor5-logging`][] | Logging Facade |

Expand Down Expand Up @@ -226,8 +225,6 @@ implements the described behavior.

[`ckeditor5-font-mapper`]: <./packages/ckeditor5-font-mapper> "@coremedia/ckeditor5-font-mapper"

[`ckeditor5-jest-test-helpers`]: <./packages/ckeditor5-jest-test-helpers> "@coremedia-internal/ckeditor5-jest-test-helpers"

[`ckeditor5-link-common`]: <./packages/ckeditor5-link-common> "@coremedia/ckeditor5-link-common"

[`ckeditor5-logging`]: <./packages/ckeditor5-logging> "@coremedia/ckeditor5-logging"
Expand Down
15 changes: 8 additions & 7 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"name": "@coremedia/ckeditor5-app",
"description": "A custom CKEditor 5 build made by the CKEditor 5 online builder.",
"version": "25.0.4-rc.4",
"type": "module",
"author": {
"name": "CoreMedia GmbH",
"email": "info@coremedia.com",
"url": "https://coremedia.com/",
"avatar": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2OTguNjY3IiBoZWlnaHQ9IjY5OC42NjciIHZlcnNpb249IjEuMCIgdmlld0JveD0iMCAwIDUyNCA1MjQiPjxwYXRoIGQ9Ik0yODIuNS42QzI0NSA0LjUgMjE1LjEgMTIuOSAxODUgMjcuOSAxMDYuNCA2Ny4yIDUzLjUgMTQyLjEgNDIuNCAyMjkuNWMtMi4xIDE3LjItMi4yIDQ4IDAgNjQuMUM0OCAzMzYuMiA2MS4zIDM3Mi4yIDg0IDQwNi4zYzYxLjkgOTMuMSAxNzUuNCAxMzYuNCAyODUgMTA4LjcgMTkuMi00LjggMzMuNy0xMC4zIDUzLjItMjAuMSAyMS0xMC41IDQyLjUtMjUuMyA1OC4zLTQwLjJsOC03LjYtMjEuNS0yMS42Yy0yMy42LTIzLjgtMjcuMS0yNi43LTM4LjYtMzIuNC0yMi40LTExLjItNDQuNy0xMS42LTcxLjctMS41LTE4LjYgNy0zMC40IDkuNC00OC43IDEwLjEtMTMgLjQtMTcuNS4yLTI3LjgtMS42LTMwLjUtNS4yLTU1LTE3LjgtNzYuOC0zOS41LTMzLjYtMzMuNi00Ny44LTgwLjQtMzguNC0xMjYuNCAxMC4yLTUwLjUgNDYuMi05MC41IDk1LjItMTA2LjEgMzEuNy0xMC4xIDY0LjItOC44IDk2LjYgMy45IDEyLjggNC45IDIyLjcgNyAzNC4xIDcgMTYuNCAwIDMxLjItNC4yIDQ1LjEtMTIuNyA1LjUtMy40IDEzLjYtMTAuNyAzMC40LTI3LjNsMjIuOC0yMi42LTkuMy04LjRjLTM5LjgtMzUuNC04NS42LTU3LTEzOC40LTY1LjEtMTIuNS0yLTQ4LjctMy4zLTU5LTIuM3oiLz48cGF0aCBkPSJNMjk2IDIxOC4xYy0yOC4zIDQuOC00NC4zIDM1LjQtMzIuMSA2MS40IDcuOSAxNyAyNy4yIDI3LjQgNDUuNCAyNC41IDI4LjktNC42IDQ1LjEtMzUuMiAzMi43LTYxLjctOC0xNy4yLTI3LjMtMjcuMy00Ni0yNC4yeiIvPjwvc3ZnPg=="
},
"engines": {
"node": "22",
"node": "^22.3.0",
"pnpm": "^10.9"
},
"license": "Apache-2.0",
Expand All @@ -31,13 +32,12 @@
"@coremedia/ckeditor5-dom-converter": "25.0.4-rc.4",
"@coremedia/ckeditor5-font-mapper": "25.0.4-rc.4",
"@coremedia/ckeditor5-link-common": "25.0.4-rc.4",
"@coremedia/service-agent": "^1.1.5",
"ckeditor5": "45.2.1",
"@coremedia/service-agent": "^2.1.2",
"ckeditor5": "46.1.1",
"xml-formatter": "^3.6.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"source-map-loader": "^1.0.0",
"@babel/plugin-transform-runtime": "^7.25.4",
"@ckeditor/ckeditor5-dev-translations": "^45.0.8",
"@ckeditor/ckeditor5-dev-utils": "^45.0.8",
Expand All @@ -54,18 +54,19 @@
"postcss-loader": "^8.1.1",
"raw-loader": "^4.0.2",
"rimraf": "^6.0.1",
"source-map-loader": "^1.0.0",
"style-loader": "^4.0.0",
"terser-webpack-plugin": "^5.3.10",
"typescript": "5.4.5",
"webpack": "^5.93.0",
"webpack-cli": "^5.1.4"
"webpack": "^5.101.3",
"webpack-cli": "^6.0.1"
},
"scripts": {
"clean": "pnpm clean:src && pnpm clean:dist",
"clean:src": "rimraf --glob \"src/**/*.@(js|js.map|d.ts|d.ts.map)\"",
"clean:dist": "rimraf ./dist",
"build": "webpack --mode production --stats-error-details",
"lint": "eslint \"**/*.{js,cjs,mjs,ts,tsx}\"",
"lint": "eslint \"**/*.{ts,tsx}\"",
"npm-check-updates": "npm-check-updates --upgrade",
"start": "http-server . --port 0 -d false -o sample"
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/CKEditorInstanceFactory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClassicEditor } from "ckeditor5";
import { ApplicationState } from "./ApplicationState";
import type { ClassicEditor } from "ckeditor5";
import type { ApplicationState } from "./ApplicationState";

export type CKEditorInstanceFactory = (sourceElement: HTMLElement, state: ApplicationState) => Promise<ClassicEditor>;
3 changes: 2 additions & 1 deletion app/src/DataTypeSwitch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SwitchButton, SwitchButtonConfig } from "./SwitchButton";
import type { SwitchButtonConfig } from "./SwitchButton";
import { SwitchButton } from "./SwitchButton";

export const dataTypes = {
["richtext" as const]: "Rich Text",
Expand Down
3 changes: 2 additions & 1 deletion app/src/PreviewSwitch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SwitchButton, SwitchButtonConfig } from "./SwitchButton";
import type { SwitchButtonConfig } from "./SwitchButton";
import { SwitchButton } from "./SwitchButton";

export const previewStates = {
["hidden" as const]: "Hidden",
Expand Down
3 changes: 2 additions & 1 deletion app/src/ReadOnlySwitch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SwitchButton, SwitchButtonConfig } from "./SwitchButton";
import type { SwitchButtonConfig } from "./SwitchButton";
import { SwitchButton } from "./SwitchButton";

export const readOnlyStates = {
["rw" as const]: "Read Write",
Expand Down
3 changes: 2 additions & 1 deletion app/src/SwitchButton.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ApplicationToolbarConfig, requireApplicationToolbar } from "./ApplicationToolbar";
import type { ApplicationToolbarConfig } from "./ApplicationToolbar";
import { requireApplicationToolbar } from "./ApplicationToolbar";

export interface SwitchButtonConfig<T extends string = string> extends ApplicationToolbarConfig {
id?: string;
Expand Down
3 changes: 2 additions & 1 deletion app/src/UiLanguageSwitch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SwitchButton, SwitchButtonConfig } from "./SwitchButton";
import type { SwitchButtonConfig } from "./SwitchButton";
import { SwitchButton } from "./SwitchButton";

export const uiLanguages = {
["en" as const]: "English",
Expand Down
6 changes: 3 additions & 3 deletions app/src/createCKEditorInstance.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ClassicEditor, Command, Editor } from "ckeditor5";
import type { ClassicEditor, Command, Editor } from "ckeditor5";
import { Differencing } from "@coremedia/ckeditor5-coremedia-differencing";
import { ApplicationState } from "./ApplicationState";
import { CKEditorInstanceFactory } from "./CKEditorInstanceFactory";
import type { ApplicationState } from "./ApplicationState";
import type { CKEditorInstanceFactory } from "./CKEditorInstanceFactory";
import { initReadOnlyToggle } from "./ReadOnlySwitch";
import { initPreview, updatePreview } from "./preview";
import { createRichTextEditor } from "./editors/richtext";
Expand Down
4 changes: 2 additions & 2 deletions app/src/editors/bbCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import {
ImageBlockEditing,
} from "ckeditor5";
import { updatePreview } from "../preview";
import { ApplicationState } from "../ApplicationState";
import { CKEditorInstanceFactory } from "../CKEditorInstanceFactory";
import type { ApplicationState } from "../ApplicationState";
import type { CKEditorInstanceFactory } from "../CKEditorInstanceFactory";

const licenseKeyErrorMessage =
"Please provide a valid license key for your CKEditor5 instance. Please create a .env file in the workspace root and make your license as CKEDITOR_LICENSE_KEY variable. Please use 'GPL' if you want to use the GNU General Public License.";
Expand Down
13 changes: 7 additions & 6 deletions app/src/editors/richtext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
CoreMediaStudioEssentials,
Strictness,
} from "@coremedia/ckeditor5-coremedia-studio-essentials";
import type { PluginConstructor } from "ckeditor5";
import {
Alignment,
Autoformat,
Expand Down Expand Up @@ -53,7 +54,6 @@ import {
List,
Paragraph,
PasteFromOffice,
PluginConstructor,
RemoveFormat,
SourceEditing,
Strikethrough,
Expand All @@ -63,7 +63,7 @@ import {
TableToolbar,
Underline,
} from "ckeditor5";
import { RuleConfig } from "@coremedia/ckeditor5-dom-converter";
import type { RuleConfig } from "@coremedia/ckeditor5-dom-converter";
import type {
LatestCoreMediaRichTextConfig,
V10CoreMediaRichTextConfig,
Expand All @@ -74,13 +74,14 @@ import {
stripFixedAttributes,
} from "@coremedia/ckeditor5-coremedia-richtext";
import "ckeditor5/ckeditor5.css";
import { FilterRuleSetConfiguration } from "@coremedia/ckeditor5-dataprocessor-support";
import { LinkAttributes, LinkAttributesConfig } from "@coremedia/ckeditor5-link-common";
import type { FilterRuleSetConfiguration } from "@coremedia/ckeditor5-dataprocessor-support";
import type { LinkAttributesConfig } from "@coremedia/ckeditor5-link-common";
import { LinkAttributes } from "@coremedia/ckeditor5-link-common";
import { Differencing } from "@coremedia/ckeditor5-coremedia-differencing";
import { Blocklist } from "@coremedia/ckeditor5-coremedia-blocklist";
import { DataFacade } from "@coremedia/ckeditor5-data-facade";
import { CKEditorInstanceFactory } from "../CKEditorInstanceFactory";
import { ApplicationState } from "../ApplicationState";
import type { CKEditorInstanceFactory } from "../CKEditorInstanceFactory";
import type { ApplicationState } from "../ApplicationState";
import { getHashParam } from "../HashParams";
import { initInputExampleContent } from "../inputExampleContents";
import { updatePreview } from "../preview";
Expand Down
11 changes: 4 additions & 7 deletions app/src/example-data.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
// noinspection HttpUrlsUsage
import { PREDEFINED_MOCK_LINK_DATA } from "@coremedia/ckeditor5-coremedia-studio-integration-mock";
import {
bbCodeData,
ExampleData,
initExamples,
richTextData,
} from "@coremedia-internal/ckeditor5-coremedia-example-data";
import { EditingView, Editor } from "ckeditor5";
import type { ExampleData } from "@coremedia-internal/ckeditor5-coremedia-example-data";
import { bbCodeData, initExamples, richTextData } from "@coremedia-internal/ckeditor5-coremedia-example-data";
import type { Editor } from "ckeditor5";
import { EditingView } from "ckeditor5";
import { DataFacade } from "@coremedia/ckeditor5-data-facade";

const exampleData: {
Expand Down
9 changes: 3 additions & 6 deletions app/src/inputExampleContents.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import {
MockContentPlugin,
MockInputExamplePlugin,
InputExampleElement,
} from "@coremedia/ckeditor5-coremedia-studio-integration-mock";
import { ClassicEditor } from "ckeditor5";
import type { InputExampleElement } from "@coremedia/ckeditor5-coremedia-studio-integration-mock";
import { MockContentPlugin, MockInputExamplePlugin } from "@coremedia/ckeditor5-coremedia-studio-integration-mock";
import type { ClassicEditor } from "ckeditor5";

const INPUT_EXAMPLE_CONTENT_DIV_CLASS = "inputExampleContentDiv";
const initInputExampleContent = (editor: ClassicEditor) => {
Expand Down
2 changes: 1 addition & 1 deletion app/src/preview.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { dataFormatter } from "./DataFormatter";
import { initPreviewSwitch } from "./PreviewSwitch";
import { ApplicationState } from "./ApplicationState";
import type { ApplicationState } from "./ApplicationState";

const previewToggleButtonId = "previewToggle";
const withPreviewClass = "with-preview";
Expand Down
33 changes: 20 additions & 13 deletions app/webpack.config.mjs → app/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
"use strict";

/* eslint-env node */

const { default: path } = await import("path");
const { default: webpack } = await import("webpack");
const { bundler, loaders } = await import("@ckeditor/ckeditor5-dev-utils");
const { CKEditorTranslationsPlugin } = await import("@ckeditor/ckeditor5-dev-translations");
const { default: TerserPlugin } = await import("terser-webpack-plugin");
const { default: CircularDependencyPlugin } = await import("circular-dependency-plugin");
import path from "path";
import webpack from "webpack";
import { bundler, loaders } from "@ckeditor/ckeditor5-dev-utils";
import { CKEditorTranslationsPlugin } from "@ckeditor/ckeditor5-dev-translations";
import TerserPlugin from "terser-webpack-plugin";
import CircularDependencyPlugin from "circular-dependency-plugin";
import fs from "fs";
import { fileURLToPath } from "url";
import dotenv from "dotenv";

function findEnvFile(startDir = import.meta.dirname) {
const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);

function findEnvFile(startDir = dirname) {
let dir = startDir;
let nothingFound = false;
while (!nothingFound) {
Expand All @@ -39,9 +40,6 @@ if (!envPath) {

dotenv.config({ path: envPath });

const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);

export default {
devtool: "source-map",
performance: { hints: false },
Expand All @@ -51,7 +49,6 @@ export default {
output: {
// The name under which the editor will be exported.
library: "ClassicEditor",

path: path.resolve(dirname, "dist"),
filename: "ckeditor.js",
libraryTarget: "umd",
Expand Down Expand Up @@ -103,10 +100,20 @@ export default {
enforce: "pre",
use: ["source-map-loader"],
},
{
test: /\.m?js$/,
resolve: {
fullySpecified: false,
},
},
],
},

resolve: {
extensions: [".ts", ".js", ".json"],
extensionAlias: {
".js": [".js", ".ts"],
},
fullySpecified: false,
},
};
25 changes: 23 additions & 2 deletions itest/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const jestConfig = require("@coremedia-internal/ckeditor5-jest-test-helpers/shared-jest.config.js");
const babelConfig = require("@coremedia-internal/ckeditor5-babel-config");

module.exports = {
...jestConfig,
roots: ["<rootDir>/src/"],
// The default timeout is 5000. This may be not enough for Jest Playwright
// tests. If the test fails due to test-timeout, we will only get unspecific
Expand All @@ -11,4 +10,26 @@ module.exports = {
// Override from shared config.
testEnvironment: require.resolve("jest-playwright-preset"),
setupFilesAfterEnv: [require.resolve("expect-playwright")],
// Don't detect utility files as tests, i.e. require `test` in name.
testMatch: ["**/?(*.)+(test).[jt]s?(x)"],
moduleFileExtensions: ["js", "ts", "d.ts"],
moduleNameMapper: {
// https://www.npmjs.com/package/jest-transform-stub
"^.+\\.(css|less|sass|scss|gif|png|jpg|ttf|eot|woff|woff2|svg)$": require.resolve("jest-transform-stub"),
},
transform: {
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
"^.+\\.tsx?$": [
"ts-jest",
{
// ts-jest configuration goes here
},
],
// Required, e.g., for CKEditor 5 Dependencies.
"^.+\\.jsx?$": [require.resolve("babel-jest"), babelConfig],
// https://www.npmjs.com/package/jest-transform-stub
"^.+\\.(css|less|sass|scss|gif|png|jpg|ttf|eot|woff|woff2|svg)$": require.resolve("jest-transform-stub"),
},
transformIgnorePatterns: ["node_modules/.pnpm/(?!@ckeditor|@bbob|lodash-es|rxjs|ckeditor5|vanilla-colorful)"],
};
Loading
Loading