magic-editor-x 2.5.1 → 2.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.5.3](https://github.com/Schero94/Magic-Editor-X/compare/v2.5.2...v2.5.3) (2026-11-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **collaboration:** load one copy of Yjs in the ES module server entry ([#14](https://github.com/Schero94/Magic-Editor-X/issues/14)) ([58718e7](https://github.com/Schero94/Magic-Editor-X/commit/58718e7fdc672ac705549a8f2862ac51cdb79c37))
9
+
10
+
11
+ ### Fixed
12
+
13
+ - The ES module server entry (`magic-editor-x/strapi-server` with `import`) loaded two copies of Yjs: the collaboration service used the CommonJS build and the shared document code the ES module build, so documents of one failed the other's constructor checks. CommonJS server code now takes Yjs from one shared module, and each entry loads exactly one build. Strapi itself loads the CommonJS entry, which was not affected.
14
+ - `npm run verify:runtime` loads each server bundle format in its own process and fails when a process prints "Yjs was already imported", instead of printing the warning as noise.
15
+
16
+ ## [2.5.2](https://github.com/Schero94/Magic-Editor-X/compare/v2.5.1...v2.5.2) (2026-11-17)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **link-check:** show the next scheduled run on Strapi before 5.61 ([#13](https://github.com/Schero94/Magic-Editor-X/issues/13)) ([2228217](https://github.com/Schero94/Magic-Editor-X/commit/22282172f528840747a6f867546ab6d0c176af64))
22
+
23
+
24
+ ### Fixed
25
+
26
+ - Settings > Configuration shows the next run of the scheduled link check on Strapi 5.38 to 5.60 again. Those releases schedule cron jobs with node-schedule, whose next run is a cron-parser date object instead of a `Date`, so `nextRunAt` was always empty there.
27
+
3
28
  ## [2.5.1](https://github.com/Schero94/Magic-Editor-X/compare/v2.5.0...v2.5.1) (2026-11-17)
4
29
 
5
30
 
package/README.md CHANGED
@@ -154,10 +154,10 @@ All screenshots use synthetic data (acceptance host: Strapi 5.61.1). Every scree
154
154
 
155
155
  ## Compatibility
156
156
 
157
- | Plugin | Strapi | Node | Notes |
158
- | ------ | -------------------------------------------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
159
- | 2.x | 5.38 or later (acceptance host: Strapi 5.61.1; 2.5 also checked on 5.62.0) | 22.12 or later (22 or 24) | SQLite, PostgreSQL and MySQL/MariaDB through the Strapi database connection. Acceptance runs used SQLite and PostgreSQL 16. |
160
- | 1.x | 5.x | 22 | No longer developed. |
157
+ | Plugin | Strapi | Node | Notes |
158
+ | ------ | ------------------------------------------------------------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
159
+ | 2.x | 5.38 or later (CI builds and tests 5.38.0 and 5.62.0; acceptance host: Strapi 5.61.1) | 22.12 or later (CI: 22, 24 and 26) | SQLite, PostgreSQL and MySQL/MariaDB through the Strapi database connection. Acceptance runs used SQLite and PostgreSQL 16. |
160
+ | 1.x | 5.x | 22 | No longer developed. |
161
161
 
162
162
  - `engines.node` is `>=22.12.0 <=26.x.x` (2.5 declares the floor that sanitize-html 2.18 already required since 2.4.0); the 2.3 to 2.5 test runs used Node 22.23.1.
163
163
  - The admin uses the React, React Router, react-intl, styled-components and Design System versions of the Strapi admin (React 18, Design System 2.2.4 in Strapi 5.61, 2.3.1 in 5.62).
@@ -32,6 +32,7 @@ var __copyProps = (to, from, except, desc) => {
32
32
  }
33
33
  return to;
34
34
  };
35
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
35
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
36
37
  // If the importer is in node compatibility mode or this is not an ESM
37
38
  // file that has been converted to a CommonJS file using a Babel-
@@ -22358,7 +22359,9 @@ var require_link_schedule = __commonJS({
22358
22359
  },
22359
22360
  /**
22360
22361
  * Next planned run of this process's cron job (from the job handle's
22361
- * `nextInvocation()`), or null.
22362
+ * `nextInvocation()`), or null. Strapi 5.61+ (croner) returns a Date;
22363
+ * earlier 5.x releases (node-schedule 2) return a cron-parser `CronDate`,
22364
+ * which is converted with its `toDate()`.
22362
22365
  * @returns {Date|null} Next fire time.
22363
22366
  */
22364
22367
  nextRun() {
@@ -22366,7 +22369,8 @@ var require_link_schedule = __commonJS({
22366
22369
  const entry = (strapi.cron && Array.isArray(strapi.cron.jobs) ? strapi.cron.jobs : []).find(
22367
22370
  (job) => job && job.name === CRON_NAME
22368
22371
  );
22369
- const next = entry && entry.job && entry.job.nextInvocation ? entry.job.nextInvocation() : null;
22372
+ const raw = entry && entry.job && entry.job.nextInvocation ? entry.job.nextInvocation() : null;
22373
+ const next = raw && typeof raw.toDate === "function" ? raw.toDate() : raw;
22370
22374
  return next instanceof Date && !Number.isNaN(next.getTime()) ? next : null;
22371
22375
  } catch {
22372
22376
  return null;
@@ -28604,6 +28608,14 @@ var require_audit2 = __commonJS({
28604
28608
  }
28605
28609
  });
28606
28610
 
28611
+ // shared/yjs.mjs
28612
+ var yjs_exports = {};
28613
+ var init_yjs = __esm({
28614
+ "shared/yjs.mjs"() {
28615
+ __reExport(yjs_exports, require("yjs"));
28616
+ }
28617
+ });
28618
+
28607
28619
  // shared/ydoc-guard.mjs
28608
28620
  var ydoc_guard_exports = {};
28609
28621
  __export(ydoc_guard_exports, {
@@ -28859,7 +28871,7 @@ var require_collaboration2 = __commonJS({
28859
28871
  "use strict";
28860
28872
  var { randomUUID } = require("node:crypto");
28861
28873
  var { Server } = require("socket.io");
28862
- var Y4 = require("yjs");
28874
+ var Y4 = (init_yjs(), __toCommonJS(yjs_exports));
28863
28875
  var { unsignStored } = require_media_signing();
28864
28876
  var { errors } = require("@strapi/utils");
28865
28877
  var { createLogger } = require_logger();
@@ -36,6 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
36
  }
37
37
  return to;
38
38
  };
39
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
39
40
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
41
 
41
42
  // server/src/utils/logger.js
@@ -22354,7 +22355,9 @@ var require_link_schedule = __commonJS({
22354
22355
  },
22355
22356
  /**
22356
22357
  * Next planned run of this process's cron job (from the job handle's
22357
- * `nextInvocation()`), or null.
22358
+ * `nextInvocation()`), or null. Strapi 5.61+ (croner) returns a Date;
22359
+ * earlier 5.x releases (node-schedule 2) return a cron-parser `CronDate`,
22360
+ * which is converted with its `toDate()`.
22358
22361
  * @returns {Date|null} Next fire time.
22359
22362
  */
22360
22363
  nextRun() {
@@ -22362,7 +22365,8 @@ var require_link_schedule = __commonJS({
22362
22365
  const entry = (strapi.cron && Array.isArray(strapi.cron.jobs) ? strapi.cron.jobs : []).find(
22363
22366
  (job) => job && job.name === CRON_NAME
22364
22367
  );
22365
- const next = entry && entry.job && entry.job.nextInvocation ? entry.job.nextInvocation() : null;
22368
+ const raw = entry && entry.job && entry.job.nextInvocation ? entry.job.nextInvocation() : null;
22369
+ const next = raw && typeof raw.toDate === "function" ? raw.toDate() : raw;
22366
22370
  return next instanceof Date && !Number.isNaN(next.getTime()) ? next : null;
22367
22371
  } catch {
22368
22372
  return null;
@@ -28600,6 +28604,15 @@ var require_audit2 = __commonJS({
28600
28604
  }
28601
28605
  });
28602
28606
 
28607
+ // shared/yjs.mjs
28608
+ var yjs_exports = {};
28609
+ import * as yjs_star from "yjs";
28610
+ var init_yjs = __esm({
28611
+ "shared/yjs.mjs"() {
28612
+ __reExport(yjs_exports, yjs_star);
28613
+ }
28614
+ });
28615
+
28603
28616
  // shared/ydoc-guard.mjs
28604
28617
  var ydoc_guard_exports = {};
28605
28618
  __export(ydoc_guard_exports, {
@@ -28855,7 +28868,7 @@ var require_collaboration2 = __commonJS({
28855
28868
  "use strict";
28856
28869
  var { randomUUID } = __require("node:crypto");
28857
28870
  var { Server } = __require("socket.io");
28858
- var Y4 = __require("yjs");
28871
+ var Y4 = (init_yjs(), __toCommonJS(yjs_exports));
28859
28872
  var { unsignStored } = require_media_signing();
28860
28873
  var { errors } = __require("@strapi/utils");
28861
28874
  var { createLogger } = require_logger();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magic-editor-x",
3
- "version": "2.5.1",
3
+ "version": "2.5.3",
4
4
  "description": "Free, open-source block editor for Strapi 5: Editor.js custom field with Media Library uploads, custom blocks, version history, live collaboration across several servers and an optional AI assistant with your own provider.",
5
5
  "keywords": [
6
6
  "strapi",