Problem/Motivation

Update to CKEditor5 v32.0.0 in core: https://github.com/ckeditor/ckeditor5/releases/tag/v32.0.0.

Key changes we need (besides the many bugfixes we benefit from):

Proposed resolution

  1. core/package.json
  2. cd core
  3. yarn install
  4. yarn run vendor-update
  5. yarn run build:ckeditor5

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Drupal 9.4.x and 10.0.x
CKEditor 5 asset library updated to version 32.0.0.

Drupal 9.3.9:
CKEditor 5 asset library updated to version 32.0.0. Since the latest release of CKEditor 5 depends on Node.js 14, the Drupal provided yarn vendor-update command now also depends on Node.js 14.

Issue fork drupal-3261600

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Issue summary: View changes

hooroomoo made their first commit to this issue’s fork.

hooroomoo’s picture

Version: 9.3.x-dev » 9.4.x-dev
hooroomoo’s picture

Version: 9.4.x-dev » 9.3.x-dev
hooroomoo’s picture

Please ignore 3261600-9.4-branch

lauriii’s picture

Version: 9.3.x-dev » 9.4.x-dev
wim leers’s picture

Title: Update to CKEditor5 v32.0.0 » [PP-1] Update to CKEditor5 v32.0.0
Status: Active » Postponed
Related issues: +#3261734: Require Node.js 16

@hooroomoo I see you've created a single commit that does everything. It'd be better to first have a commit that only changes package.json. And then a second commit that contains the build results. Because then rebasing becomes a lot simpler!

I have no idea what triggers the

Drupal's JavaScript development dependencies are not installed. Run 'yarn install' inside the core directory.

error though.

Time to investigate the console:

00:01:01.148 ----------------   Starting yarn_install   ----------------
00:01:01.156 Directory created at /var/lib/drupalci/workspace/jenkins-drupal_patches-112078/ancillary/yarn_install
00:01:01.156 Executing yarn install for core nodejs dev dependencies.
00:01:01.156 sudo -u www-data yarn install --no-progress --non-interactive --cwd /var/www/html/core
00:01:01.549 yarn install v1.22.17
00:01:01.670 [1/5] Validating package.json...
00:01:01.675 [2/5] Resolving packages...
00:01:02.407 [3/5] Fetching packages...
00:01:22.752 error @ckeditor/ckeditor5-alignment@32.0.0: The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "12.22.1"
00:01:22.762 error Found incompatible module.
00:01:22.762 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
00:01:22.806 Yarn install command returned code: yarn install v1.22.17
00:01:22.806 [1/5] Validating package.json...
00:01:22.806 [2/5] Resolving packages...
00:01:22.806 [3/5] Fetching packages...
00:01:22.806 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
00:01:22.806 Yarn install failed; Proceeding anyways...
00:01:22.807 ---------------- Finished yarn_install in 21.658 seconds ---------------- 

uh oh … apparently DrupalCI is still on node 12.22.1. CKEditor 5 32.0.0 now requires node 14.

Why did they do that? The answer is in https://github.com/ckeditor/ckeditor5/issues/10972: because node 12 LTS ends in April, in less than 3 months.

Drupal core last bumped its node version in #3107918: Require Node.js 12.

I just opened #3261734: Require Node.js 16 to get Drupal core on version 14.

There is one very tricky consequence: the CKEditor 5 module is experimental, and can have commits to 9.3.x. But I doubt it is okay for Drupal 9.3.3 (latest stable release) to use node 12 and Drupal 9.3.4 to use node 14…

I defer to JS maintainers in Drupal core to decide how to proceed here. I think this is new territory…

wim leers’s picture

Title: [PP-1] Update to CKEditor5 v32.0.0 » [PP-2] Update to CKEditor5 v32.0.0

FYI #3261734: Require Node.js 16 has itself been blocked for 3 weeks now: #3261753: Update Node.js to v16 on DrupalCI.

Clarifying that in the title.

wim leers’s picture

#3261753: Update Node.js to v16 on DrupalCI has made some progress, but still not there yet.

wim leers’s picture

Title: [PP-2] Update to CKEditor5 v32.0.0 » [PP-1] Update to CKEditor5 v32.0.0
wim leers’s picture

Title: [PP-1] Update to CKEditor5 v32.0.0 » Update to CKEditor5 v32.0.0
Status: Postponed » Needs work

#3261734: Require Node.js 16 landed in 9.4 and 10, hopefully soon also in 9.3.

In any case, this is now finally unblocked! We'll need to redo this MR now. Probably simpler if we start a new one.

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new2.5 MB
new31.22 KB

Let's see if this installs on DrupalCI 🤞

nod_’s picture

Status: Needs review » Reviewed & tested by the community

That seems like the right solution: https://docs.npmjs.com/cli/v8/configuring-npm/package-json#optionaldepen...

optionalDependencies If a dependency can be used, but you would like npm to proceed if it cannot be found or fails to install

The last submitted patch, 15: 3261600-15.patch, failed testing. View results

wim leers’s picture

Random unrelated failure:

1) Drupal\FunctionalJavascriptTests\Ajax\AjaxTest::testInsertAjaxResponse
Page contains expected value: 
Failed asserting that false is true.

Re-testing…

The last submitted patch, 15: 3261600-15.patch, failed testing. View results

lauriii’s picture

StatusFileSize
new13.01 KB
new2.56 MB
new2.5 MB
new2.5 MB

There was one deprecation warning caused by updating to CKEditor 5 32.0.0 and I addressed that. Unfortunately, the CKE deprecation warnings are not caught by DrupalCI which should probably warrant another followup.

wim leers’s picture

Hm … again

1) Drupal\FunctionalJavascriptTests\Ajax\AjaxTest::testInsertAjaxResponse
Page contains expected value: 
Failed asserting that false is true.

But it's impossible that this patch causes that. That test doesn't even install the ckeditor5 module, and the patch doesn't touch anything besides CKEditor 5!

Re-testing again, now on 2 environments. Perhaps one of the test environments has something weird going on?

EDIT: cross-posted with #20.

lauriii’s picture

StatusFileSize
new2.5 MB
new2.5 MB
new2.56 MB
new310 bytes

cspell 🤦‍♂️

The last submitted patch, 15: 3261600-15.patch, failed testing. View results

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 22: 3261600-22-d9.3.patch, failed testing. View results

wim leers’s picture

Looks like 9.3 fails consistently, and looks like this is broken in HEAD too: https://www.drupal.org/pift-ci-job/2332384 (on all branches actually it seems?!) — perhaps this is related to #3258114: Upgrade Chromedriver?

xjm’s picture

Priority: Major » Critical

Yeah, CI is a disaster since the Chromedriver deployment. We're working on it.... :P

xjm’s picture

Remember to always use a parent issue that is a descendent of the D10 meta. :)

wim leers’s picture

Status: Needs work » Needs review

Re-testing, should be geen now … 🤞

wim leers’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new27.1 KB

Applied #22 and:

I'm relieved I'm able to RTBC this on my first (thorough!) review — this one has been blocking so many things for so long! 🚀

  • catch committed cd515ad on 10.0.x
    Issue #3261600 by lauriii, hooroomoo, Wim Leers: Update to CKEditor5 v32...

  • catch committed b45e695 on 9.4.x
    Issue #3261600 by lauriii, hooroomoo, Wim Leers: Update to CKEditor5 v32...
catch’s picture

Version: 9.4.x-dev » 9.3.x-dev
Status: Reviewed & tested by the community » Fixed

Good to see this unblocked and nice that 9.3.x backport works.
Committed/pushed the three patches to their respective branches, thanks!

  • catch committed fa38b1f on 9.3.x
    Issue #3261600 by lauriii, hooroomoo, Wim Leers: Update to CKEditor5 v32...
lauriii’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

xjm’s picture

We're on v33 now for HEAD and have been since alpha2, so removing the intermediate update from the release notes for 10.0 and 9.4.