Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKEditor5 v41.4.0 pulls in too many dependencies #16360

Open
bnf opened this issue May 15, 2024 · 2 comments
Open

CKEditor5 v41.4.0 pulls in too many dependencies #16360

bnf opened this issue May 15, 2024 · 2 comments
Labels
type:task This issue reports a chore (non-production change) and other types of "todos".

Comments

@bnf
Copy link

bnf commented May 15, 2024

With v41.4.0 many packages get pulled in by ckeditor5 npm package, see https://unpkg.com/browse/[email protected]/package.json compared to https://unpkg.com/browse/[email protected]/package.json@ckeditor/ckeditor5-build-* is added many more packages which were not pulled in before.

This means a plugin like @ckeditor/ckeditor5-word-count (which has a dependency to ckeditor5) will pull in all those unneeded dependencies.

What steps should be taken to fulfill the task?

Ideally the bundled dependencies should be reverted back to the state from 41.3, or at least @ckeditor/* packages should stop requiring and importing from the ckeditor5 meta package and instead require and import from @ckeditor/ckeditor5-core directly (allowing to use @ckeditor/* packages only, without the big-meta-package).

Background info regarding our (TYPO3) usecase
Note that we package all @ckeditor/* packages in TYPO3 core into native ESM modules and this update is problematic, as the (code-wise required) ckeditor5 package now pulls in too many dependencies, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/84281/1 "Update ckeditor to 41.4"

Build/package-lock.json +1788 -310

BTW, we already patch CKEditor5 sources build-time to replace ckeditor5/src imports by @ckeditor/ckeditor5- – see https://github.com/TYPO3/typo3/blob/415f2e93a656e524d45cabf8f766058c41354676/Build/rollup/ckeditor.js#L59-L60 – if ckeditor5 is now transformed to a meta package – pulling in all packages by design – it would be awesome to get our correction/improvement – to modify all modules to avoid the ckeditor5/src/ indirection – into CKeditor upstream.

Edit: Further info regarding usage CKeditor5 usage in TYPO3: We ship each @ckeditor/* package as one ESM (bunled) per-package ES6 module, loaded via browser native importmaps: https://github.com/TYPO3/typo3/blob/415f2e93a656e524d45cabf8f766058c41354676/typo3/sysext/rte_ckeditor/Configuration/JavaScriptModules.php#L18-L55 (This way we can provide all plugins, but only load those that are configured to be loaded by the TYPO3 integrator)

@bnf bnf added the type:task This issue reports a chore (non-production change) and other types of "todos". label May 15, 2024
@Witoso
Copy link
Member

Witoso commented May 15, 2024

 v41.4.0 is a broken release, and was marked as such, please don't use it (issues are not related to dependencies).

v41.4.0 is the first release which “silently” adds new installation methods into the dist. ckeditor5 will be used as an aggregate package, but we are still testing this pre-release. If you expect changes to the TYPO3 ecosystem, please read the whole thread in the linked issue, as other installation methods will be put on the deprecation path.

we already patch CKEditor5 sources build-time to replace ckeditor/src imports by @ckeditor/ckeditor5-

AFAIK, we do the same in our Rollup bundling step, and it's already incorporated into our build step, @filipsobol?

@filipsobol
Copy link
Member

More details: #15502 (comment)

earthtodani added a commit to AuthoriumDPA/ckeditor5-authorium that referenced this issue May 30, 2024
* Docs: minor fixes. [short flow]

* Shorten the clipboard guide.

* Docs: formatting. [skip ci]

* Docs: timestamp bump. [skip ci]

* Docs: Unify the usage of quotation marks in the React guide.

* Docs: Update the Vue guide to new installation methods.

* Docs: Fix indentations in the React guide

* UI animations do not respect user's preferences on reduced motion (ckeditor#16099)

Feature: Editor UI should respect the user's preferences for reduced motion (WCAG 2.1, Success Criterion 2.3.3).

Feature (utils): Implemented the `env#isMotionReduced` flag to discover reduced motion preferences.

* Improved placeholders and font color grids in high contrast mode (ckeditor#16284)

Feature (utils): Implemented the `env#isMediaForcedColors` property for forced colors detection (e.g. high contrast mode on Windows). See ckeditor#14907.

Feature (ui): Implemented `ck-media-forced-colors` and `ck-media-default-colors` mixins for detecting forced colors (e.g. high contrast mode on Windows). See ckeditor#14907.

Fix (theme-lark): The caret should be visible in a placeholder while in forced colors mode (e.g. high contrast mode on Windows). Improved the look of the placeholders in the forced colors mode. Closes ckeditor#14907.

Fix (theme-lark): The color grid component should render as a grid of labels in the forced colors mode (e.g. high contrast mode on Windows). Closes ckeditor#14907.

* Docs: import link fix. [short flow]

* Use `dev-utils` with updated esbuild-loader

* Fix issues caused by targeting ES2022 (and dropping some polyfills)

* Image jumps when resizing in container that has padding (ckeditor#16304)

Fix (image, widget): An image should not jump upon resizing in a container with padding. Closes ckeditor#14698

---------

Co-authored-by: Aleksander Nowodzinski <[email protected]>

* Name, role, value accessibility fixes (ckeditor#16295)

Fix (restricted-editing): Improved the accessibility of the restricted editing dropdown by setting the correct ARIA role on the toolbar menu.

Fix (minimap): Addressed the issue of the minimap `<iframe>` being unnecessarily exposed to assistive technologies.   

---------

Co-authored-by: Aleksander Nowodzinski <[email protected]>

* Add menu bar integration to multi root editor. (ckeditor#16280)

Feature (editor-multi-root): Added menu bar support for multi-root editor.

* Other: Updated translations. [skip ci]

* Other: Updated translations. [skip ci]

* Internal (build-*): Builds.

* Add widget ESC shortuct accessibility dialog entry (ckeditor#16310)

Other (widget): Added information to the Accessibility help dialog about a keyboard shortcut that moves focus from a nested editable back to the widget.

---------

Co-authored-by: Aleksander Nowodzinski <[email protected]>

* Docs: Update the Next.js guide to new installation methods.

* Docs: Update builder links in integrations.

* No longer delay showing tooltip while focusing an element (ckeditor#16296)

Fix (ui): `TooltipManager` tooltips should immediately show up when triggered by user focus for better responsiveness and accessibility.

---------

Co-authored-by: Aleksander Nowodzinski <[email protected]>

* Mark mixin calls as pure

* Add `/* #__PURE__ */` before mixin calls in global scope

* Other: Updated translations. [skip ci]

* Internal (build-*): Builds.

* Docs: update Builder links. [short flow]

* Docs: update Builder links. [short flow]

* Use regular `dev-utils`

* Bump `ckeditor5-dev-*` packages to `^40.0.0`

* Use `declare` for `View.viewUid` property

* Updated the Accessibility guide with VPAT for the latest editor version and new keystrokes added to the list (ckeditor#16324)

Docs: Updated the Accessibility guide with VPAT for the latest editor version and new keystrokes added to the list.

* Docs: testing helpers fix. [short flow]

* Remove menu bar on editor destroy. (ckeditor#16329)

Tests (editor-multi-root): Removing the menu bar element on editor destroy.

* Docs: minor update. [skip ci]

* Docs: minor update. [skip ci]

* Add `declare` to few dynamically populated fields

* Docs: lists install update. [short flow]

* Docs: UI language link. [short flow]

* Docs: API links. [short flow]

* Docs: API links. [short flow]

* Docs: restoring new imports. [short flow]

* Update docs/tutorials/widgets/data-from-external-source.md

Co-authored-by: Piotr Szczęśniak <[email protected]>

* Update docs/tutorials/widgets/implementing-a-block-widget.md

Co-authored-by: Piotr Szczęśniak <[email protected]>

* Update docs/tutorials/widgets/implementing-a-block-widget.md

Co-authored-by: Piotr Szczęśniak <[email protected]>

* Update docs/tutorials/widgets/implementing-an-inline-widget.md

Co-authored-by: Piotr Szczęśniak <[email protected]>

* Docs: Updated the 2.5.7 section of the VPAT document.

* Internal: Move the internal `generatePositions` function to a static method on `BalloonPanelView` class.

* Docs: lotsa various fixes. [short flow]

* Docs: Fix link to `BalloonPanelView.generatePositions`

* Docs: lotsa various fixes. [short flow]

* Docs: lotsa various fixes. [short flow]

* Docs: Updated the 4.1.3 section of the VPAT document.

* Docs: expanding snippets. [short flow]

* Docs: crosslinking. [short flow]

* Increased specificity of image-style-align CSS classes.

* Internal: Vale evaluation. [skip ci]

* Docs: post-tests fixes. [short flow]

* Docs: Changelog. [skip ci]

* Docs: language fixes. [short flow]

* Docs: Corrected the changelog. [skip ci]

* Docs: Added an intro section. [skip ci]

* Docs: explaining Essentials. [short flow]

* Docs: minor rearrangements. [short flow]

* Increased specificity of almost all image-style-align CSS classes.

* Docs: updating and examples update. [short flow]

* Docs: await update. [short flow]

* Docs: setup rearrangements. [short flow]

* Docs: minor fix. [skip ci]

* Docs: Fix typos in the React guide.

* Docs: Update the Angular guide to new installation methods.

* Docs: review fixes and more changes. [short flow]

* Docs: removing the removing features section. [short flow]

* Docs: minor technical fix. [short flow]

* Docs: removing infoboxes. [short flow]

* Docs: removing redundant guides. [short flow]

* Docs: restoring the removal section. [short flow]

* Docs: restoring an internal link. [short flow]

* Changelog review.

* Docs: Prepare a structure for the Vue 2 guide.

* Docs: Unify subhedings in integrations.

* Docs: unsupported packages infobox.

* Docs: typos. [short flow]

* Docs: quick start update. [short flow]

* Docs: quick start update. [short flow]

* Docs: quick start update. [short flow]

* Docs: updating UI language guide. [short flow]

* Update ui on close image ckbox dialog.

* Docs: updste. [short flow]

* Docs: updste. [short flow]

* Docs: updste. [short flow]

* Internal: Improve tree-shaking by adding `#__PURE__` comments before function calls in global scope

* Update docs/getting-started/setup/ui-language.md

Co-authored-by: Filip Sobol <[email protected]>

* Docs: update. [short flow]

* Docs: updating Builder link. [short flow]

* Docs: updating API install commands. [short flow]

* Docs: updating API install commands. [short flow]

* Release: v41.4.0.

* Docs: Add the component installation step to the Vue 3 guide.

* Docs: Fix import in the Vue snippet.

* Docs: Fix formatting in the Vue guide.

* Docs: Add context to the Vue guide.

* Docs: Update snippets in the Vue 3 guide.

* Docs: Change the Angular guide structure.

* Docs: Unify collaboration sections across integrations.

* Docs: Fix typo.

* Docs: Add the localization section to the Vue 2 guide.

* Docs: Unify the localization section in Vue integrations.

* The TooltipManager should verify if the tooltip is not already unpinned while trying to update its position.

* Removed unnecessary non-null assertions.

* Updated the GH link to point to the public repo.

* Added info about the changes related to the silent release of NIM.

See: ckeditor#16360 (comment)

* Merge pull request ckeditor#16363 from ckeditor/cc/6219-update-race

Fix (ui): Prevented editor error in a situation where tooltip was unpinned after it was already removed. This happened when "Unlink" button was pressed while the tooltip was shown.

* Internal (build-*): Builds.

* Docs: Changelog. [skip ci]

* Docs: Changelog. [skip ci]

* Internal: An empty commit to trigger the release.

* Docs: Changelog.

* Release: v41.4.1.

* Docs: new methods READMEs.

* Merge master.

* Internal: Fixed wording in the `ImageResize` plugin description in `ckeditor5-metadata.json`. [skip ci]

* Docs: updating main README. [short flow]

* Docs: adding decoupled editor toolbar config. [short flow]

* Add clearTimeout and test.

* Docs: a typo. [skip ci]

* Update docs/getting-started/setup/toolbar.md

Co-authored-by: Piotr Szczęśniak <[email protected]>

* Docs: snippet update. [short flow]

* Docs: Update the Laravel integration guide to new installation methods.

* Added image style align left/right between image and image-inline.

* Fix (utils): Prevented error thrown when `ckeditor5-utils/src/env.ts` is used in an environment without `window` global object.

* Fixed lint issue.

* Rename `globalVar` to `global`.

* Docs (utils): Added a clarification remark to some properties in `env` object.

* Docs (utils): Grammar and typo fix.

* Internal (build-*): Builds.

* Docs: Changelog. [skip ci]

* Docs: Changelog (v41.4.2).

* Release: v41.4.2.

* Docs: removing builds. [short flow]

* Docs: Unify the setup sections.

* Docs: updates. [short flow]

* Docs: Prepare a structure for the .NET integration.

* Docs: Fix typo.

* Docs: Update the .NET integration guide to new installation methods.

* Docs: Fix contraction.

* Other: Add `#__PURE__` comments before objects and arrays in global scope.

* Internal: Vale evaluation. [skip ci]

* Docs: updating VPAT. [short flow]

* Instant pin tooltip on focus only if not hovered

* Docs: updating Drupal guide. [short flow]

* Docs: restoring a deleted file. [short flow]

* Add `onAfterDestroy` callback to react docs snippet, minor wording changes

* Docs: Minor fixes in the Quick Start

* Docs: Minor fixes in the Angular integration

* Docs: Minor fixes in the Next.js integration.

* Docs: Minor fixes in the Vue 2 integration.

* Docs: Minor fixes in the Vue integration.

* Docs: Modify the structure of the Next integration.

* Docs: Add new method to the React integration.

* Docs: minor fixes. [short flow]

* Core review fixes.

* Docs: puntuation. [short flow]

* Tweak plugins.

* Change spinner animation keyframe name to be more unique.

* Fix theme and CSS.

* Fix watchdog setup.

* Docs: general fixes. [skip ci]

* Docs: general fixes. [skip ci]

* Docs: relinking and cleanup. [short flow]

* Code review fixes.

* Docs: Unify the Builder naming.

* Code review fixes.

* Remove type.

* Docs: Remove excessive articles.

* Docs: Remove the excessive section from the Angular guide.

* Docs: Preliminary work in the Block widget guide.

* Docs: updating error codes. [short flow]

* Docs: updating error codes. [short flow]

* Docs: Update the Block widget tutorial to new installation methods.

* Docs: Fix typos in the Block widget guide.

* Docs: minor fixes. [short flow]

* Docs: pre-release fixes.

* Docs: integrations update. [short flow]

* Docs: adding CTA. [short flow]

* Docs: Preliminary work in the Inline widget tutorial.

* Docs: minor update. [short flow]

* Docs: minor update. [short flow]

* Docs: minor update. [short flow]

* Docs: Update the Inline widget tutorial to new installation methods.

* Docs: a review. [short flow]

* Docs: Builder infoboxes. [short flow]

---------

Co-authored-by: godai78 <[email protected]>
Co-authored-by: Witek Socha <[email protected]>
Co-authored-by: Bartek Biedrzycki <[email protected]>
Co-authored-by: Mateusz Gorzeliński <[email protected]>
Co-authored-by: Mateusz Bagiński <[email protected]>
Co-authored-by: Aleksander Nowodzinski <[email protected]>
Co-authored-by: Filip Sobol <[email protected]>
Co-authored-by: Michał Remiszewski <[email protected]>
Co-authored-by: Kamil Piechaczek <[email protected]>
Co-authored-by: Piotr Szczęśniak <[email protected]>
Co-authored-by: CKEditorBot <[email protected]>
Co-authored-by: Illia Sheremetov <[email protected]>
Co-authored-by: Kuba Niegowski <[email protected]>
Co-authored-by: Szymon Cofalik <[email protected]>
Co-authored-by: Piotrek Koszuliński <[email protected]>
Co-authored-by: Witek Socha <[email protected]>
Co-authored-by: Paweł Smyrek <[email protected]>
Co-authored-by: Kuba Niegowski <[email protected]>
Co-authored-by: Daniela Soto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:task This issue reports a chore (non-production change) and other types of "todos".
Projects
None yet
Development

No branches or pull requests

3 participants