From 2fd9116499167ae241f1d0204f7a82f583ed4e6c Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Mon, 1 Jul 2024 21:14:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20unwanted=20extra=20blank?= =?UTF-8?q?=20paragraphs=20when=20copy/pasting=20from=20Google=20Docs=20(#?= =?UTF-8?q?20505)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes https://linear.app/tryghost/issue/ENG-1255 - updated Koenig packages including: - addition of `/preview` for public preview card - fix for HTML import from Google Docs - fix for embed thumbnails being cut off in email - fix for wide image card width on medium screens - multiple fixes for unhandled (but non user-visible) errors causing noise in console and error logging --- apps/admin-x-settings/package.json | 2 +- ghost/admin/package.json | 2 +- ghost/core/package.json | 6 +- .../__snapshots__/cards.test.js.snap | 4 +- yarn.lock | 87 +++++++++++-------- 5 files changed, 59 insertions(+), 42 deletions(-) diff --git a/apps/admin-x-settings/package.json b/apps/admin-x-settings/package.json index 817b48dccf..63f09ab344 100644 --- a/apps/admin-x-settings/package.json +++ b/apps/admin-x-settings/package.json @@ -39,7 +39,7 @@ "dependencies": { "@codemirror/lang-html": "6.4.9", "@tryghost/color-utils": "0.2.2", - "@tryghost/kg-unsplash-selector": "0.2.0", + "@tryghost/kg-unsplash-selector": "0.2.1", "@tryghost/limit-service": "1.2.14", "@tryghost/nql": "0.12.3", "@tryghost/timezone-data": "0.4.3", diff --git a/ghost/admin/package.json b/ghost/admin/package.json index 2b9c53dd00..c1c2b045f6 100644 --- a/ghost/admin/package.json +++ b/ghost/admin/package.json @@ -49,7 +49,7 @@ "@tryghost/helpers": "1.1.90", "@tryghost/kg-clean-basic-html": "4.1.1", "@tryghost/kg-converters": "1.0.5", - "@tryghost/koenig-lexical": "1.3.1", + "@tryghost/koenig-lexical": "1.3.2", "@tryghost/limit-service": "1.2.14", "@tryghost/members-csv": "0.0.0", "@tryghost/nql": "0.12.3", diff --git a/ghost/core/package.json b/ghost/core/package.json index 1264d054e2..09e75e9dcb 100644 --- a/ghost/core/package.json +++ b/ghost/core/package.json @@ -111,9 +111,9 @@ "@tryghost/kg-converters": "1.0.5", "@tryghost/kg-default-atoms": "5.0.3", "@tryghost/kg-default-cards": "10.0.6", - "@tryghost/kg-default-nodes": "1.1.4", + "@tryghost/kg-default-nodes": "1.1.5", "@tryghost/kg-html-to-lexical": "1.1.5", - "@tryghost/kg-lexical-html-renderer": "1.1.5", + "@tryghost/kg-lexical-html-renderer": "1.1.6", "@tryghost/kg-mobiledoc-html-renderer": "7.0.4", "@tryghost/limit-service": "1.2.14", "@tryghost/link-redirects": "0.0.0", @@ -232,7 +232,7 @@ }, "optionalDependencies": { "@sentry/profiling-node": "7.118.0", - "@tryghost/html-to-mobiledoc": "3.1.0", + "@tryghost/html-to-mobiledoc": "3.1.2", "sqlite3": "5.1.7" }, "devDependencies": { diff --git a/ghost/core/test/integration/services/email-service/__snapshots__/cards.test.js.snap b/ghost/core/test/integration/services/email-service/__snapshots__/cards.test.js.snap index b55f71425b..7f1f855fa7 100644 --- a/ghost/core/test/integration/services/email-service/__snapshots__/cards.test.js.snap +++ b/ghost/core/test/integration/services/email-service/__snapshots__/cards.test.js.snap @@ -1758,7 +1758,7 @@ Ghost: Independent technology for modern publishingBeautiful, modern publishing
- +
@@ -1824,7 +1824,7 @@ Ghost: Independent technology for modern publishingBeautiful, modern publishing
- +
diff --git a/yarn.lock b/yarn.lock index 1e6f0ca775..85a9e95fee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7753,12 +7753,12 @@ dependencies: lodash-es "^4.17.11" -"@tryghost/html-to-mobiledoc@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@tryghost/html-to-mobiledoc/-/html-to-mobiledoc-3.1.0.tgz#64cb333c8f0b857f53edf289867a39d6113ccefb" - integrity sha512-CL1IAL3mRrWPs2LcDcPptN2O2w9EY0mb/ofkOycQYaHoPPt0JgPOPeJdmIwRfddzGkEK1WA1yWnqKa4zSyIGRw== +"@tryghost/html-to-mobiledoc@3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@tryghost/html-to-mobiledoc/-/html-to-mobiledoc-3.1.2.tgz#aded56f17df3d13824eb4e9a1aaeda6dd87b42e6" + integrity sha512-x6C69fA87QhHVO24GI7SPeyNyk7XCNf7tL1RPGzRwt/eiYLEgg/YzbBoSO89dvPIwhimaJUgCCN9+gg8Ll7T3A== dependencies: - "@tryghost/kg-parser-plugins" "4.1.0" + "@tryghost/kg-parser-plugins" "4.1.1" "@tryghost/mobiledoc-kit" "^0.12.4-ghost.1" jsdom "^24.0.0" @@ -7800,11 +7800,6 @@ resolved "https://registry.yarnpkg.com/@tryghost/kg-card-factory/-/kg-card-factory-5.0.4.tgz#b2de98eaf01edbd5629fb1f4b06eca3a5f95d0ad" integrity sha512-KcNM4QJONSSOJeQlv9no5wFx+uV2mESX3bYBL2y3c0DqB26NlMaUx0QIAFSbCSinUlCvRFOwEEBQyaACtCOvzQ== -"@tryghost/kg-clean-basic-html@4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@tryghost/kg-clean-basic-html/-/kg-clean-basic-html-4.1.0.tgz#f4979d99e65a9202e3d3376f90ff08de8ac56578" - integrity sha512-exXUpTA1z0zyk3F3ZXcT7oy8b3acbpuHWMqiowdb2HI0/6LTGaBdmm866fhBKedgB59lIWRt511djUnUIILh+A== - "@tryghost/kg-clean-basic-html@4.1.1": version "4.1.1" resolved "https://registry.yarnpkg.com/@tryghost/kg-clean-basic-html/-/kg-clean-basic-html-4.1.1.tgz#132a019abc6b6b6a0948c7e2d3e3ce37d18983b7" @@ -7852,6 +7847,23 @@ lodash "^4.17.21" luxon "^3.3.0" +"@tryghost/kg-default-nodes@1.1.5": + version "1.1.5" + resolved "https://registry.yarnpkg.com/@tryghost/kg-default-nodes/-/kg-default-nodes-1.1.5.tgz#d2b8452344173344cda6715b07500a00a1d9d4e7" + integrity sha512-bYCSTZR6oyHSA9iW4V5eRtmdb9ubdYu1y2K36NwmVLQBefFN9o//x32kL56+oNbQjspq9OSsyNgKwovBLks64w== + dependencies: + "@lexical/clipboard" "0.13.1" + "@lexical/rich-text" "0.13.1" + "@lexical/selection" "0.13.1" + "@lexical/utils" "0.13.1" + "@tryghost/kg-clean-basic-html" "4.1.1" + "@tryghost/kg-markdown-html-renderer" "7.0.5" + html-minifier "^4.0.0" + jsdom "^24.0.0" + lexical "0.13.1" + lodash "^4.17.21" + luxon "^3.3.0" + "@tryghost/kg-default-transforms@1.1.5": version "1.1.5" resolved "https://registry.yarnpkg.com/@tryghost/kg-default-transforms/-/kg-default-transforms-1.1.5.tgz#7ea7914ecc5090edf69ee780e5ba4ee905cde890" @@ -7863,6 +7875,17 @@ "@tryghost/kg-default-nodes" "1.1.4" lexical "0.13.1" +"@tryghost/kg-default-transforms@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@tryghost/kg-default-transforms/-/kg-default-transforms-1.1.6.tgz#44564988a57a9f9dabff18eecdd60484854d3d7e" + integrity sha512-DDOMKhJZ5f2GcsJGjOYMCv/LsV9yPjvv6ggxD3RYEua/NOaG9cVodkz2O1imrMdqimHrkP3mjiX8GkOcDqDOyw== + dependencies: + "@lexical/list" "0.13.1" + "@lexical/rich-text" "0.13.1" + "@lexical/utils" "0.13.1" + "@tryghost/kg-default-nodes" "1.1.5" + lexical "0.13.1" + "@tryghost/kg-html-to-lexical@1.1.5": version "1.1.5" resolved "https://registry.yarnpkg.com/@tryghost/kg-html-to-lexical/-/kg-html-to-lexical-1.1.5.tgz#8c502a1ee396a05c3d351150e91aaa7467a9ddda" @@ -7879,10 +7902,10 @@ jsdom "^24.0.0" lexical "0.13.1" -"@tryghost/kg-lexical-html-renderer@1.1.5": - version "1.1.5" - resolved "https://registry.yarnpkg.com/@tryghost/kg-lexical-html-renderer/-/kg-lexical-html-renderer-1.1.5.tgz#9163694889d2dd704bf9efc07304a46b6a386677" - integrity sha512-RNP7MKs1orWRsFSb5Cy0KYEF5ExQ8MQ0nKTW3jXiEnYRYVI1ClgUm2j6P9vm5uibF/GWlCM8H4JbTc/Bnl58mw== +"@tryghost/kg-lexical-html-renderer@1.1.6": + version "1.1.6" + resolved "https://registry.yarnpkg.com/@tryghost/kg-lexical-html-renderer/-/kg-lexical-html-renderer-1.1.6.tgz#738b81d0bf8f64fb5bb38530985c1f4ed458357e" + integrity sha512-9/DaQMqZDX9+PK71oOWX2dAeh2oMw/gMgyHeCQmUyjK1e/4rE3QXQOKVr/X8ytib/d/9kL9NLcVbCCJ+PYgOLQ== dependencies: "@lexical/clipboard" "0.13.1" "@lexical/code" "0.13.1" @@ -7890,11 +7913,10 @@ "@lexical/link" "0.13.1" "@lexical/list" "0.13.1" "@lexical/rich-text" "0.13.1" - "@tryghost/kg-default-nodes" "1.1.4" - "@tryghost/kg-default-transforms" "1.1.5" + "@tryghost/kg-default-nodes" "1.1.5" + "@tryghost/kg-default-transforms" "1.1.6" jsdom "^24.0.0" lexical "0.13.1" - prettier "3.2.5" "@tryghost/kg-markdown-html-renderer@7.0.5": version "7.0.5" @@ -7920,17 +7942,17 @@ mobiledoc-dom-renderer "^0.7.0" simple-dom "^1.4.0" -"@tryghost/kg-parser-plugins@4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@tryghost/kg-parser-plugins/-/kg-parser-plugins-4.1.0.tgz#60f6492d1b0d71558c51f7b0c45d905ae5aa8b0a" - integrity sha512-sHwOc+9ObNBFccgbSxnbdgygLTPLI0PpjUwGsVJ7NAPQBEISHsQzHMYpWTCGatgdB+B+KmwTtBeGcvn3DIXagw== +"@tryghost/kg-parser-plugins@4.1.1": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@tryghost/kg-parser-plugins/-/kg-parser-plugins-4.1.1.tgz#a1f74ad3c1de0c940f487145e84212021491681e" + integrity sha512-IRhX8k/iIdirSjAt3S4cjpasAQ6Rsspp1oeOP21781DJNlFG7Ld7xiI+f+3/cZzF2GlBgfka0dhcRp2a2MSzrA== dependencies: - "@tryghost/kg-clean-basic-html" "4.1.0" + "@tryghost/kg-clean-basic-html" "4.1.1" -"@tryghost/kg-unsplash-selector@0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@tryghost/kg-unsplash-selector/-/kg-unsplash-selector-0.2.0.tgz#e811612fd66f20182a1d7f06e48a86bf94896ce6" - integrity sha512-oVMUiKFwOk5bUwNmW2DrICfs9lRtqHIOrV2hnJF8cBrhKLPnTSDrYTrrz04FTkq1ApISJ0y9pLZA6eepZpzTUQ== +"@tryghost/kg-unsplash-selector@0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@tryghost/kg-unsplash-selector/-/kg-unsplash-selector-0.2.1.tgz#c9e1658ed8d9469a26ca78c1aec1848fd7d6007c" + integrity sha512-LzgKE7UJ24bvID0c94teXSCrfbAX2/jo8sKaxEKR9P4E4P8COlCme/aygdOUCTblCBgE4KxyO9a+bD3uYW2Qyg== "@tryghost/kg-utils@1.0.26": version "1.0.26" @@ -7939,10 +7961,10 @@ dependencies: semver "^7.3.5" -"@tryghost/koenig-lexical@1.3.1": - version "1.3.1" - resolved "https://registry.yarnpkg.com/@tryghost/koenig-lexical/-/koenig-lexical-1.3.1.tgz#27a49c796f2e892f6a7c5d114985ef2fafb7f3d2" - integrity sha512-j4+LefCJv4aUmM4207q/BsCHfNUE6yHPPzXCaxjMX0dCJLwURRpCbJ67CPV4+KGH8PJe4eHzktX0zJV/A9iHGg== +"@tryghost/koenig-lexical@1.3.2": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@tryghost/koenig-lexical/-/koenig-lexical-1.3.2.tgz#e285a5deef831b1f52cead6a2ad4f5a4ceb4cb9c" + integrity sha512-YJB6gK/RNvnthisXfkrpnLr2+xgqRwD80uU0VCC9CF+t25J7MvazxIY67WMeuToXl6J6ntiQp5pdFSeEzB4Rrg== "@tryghost/limit-service@1.2.14": version "1.2.14" @@ -26320,11 +26342,6 @@ pretender@3.4.7, pretender@^3.4.7: fake-xml-http-request "^2.1.2" route-recognizer "^0.3.3" -prettier@3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" - integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== - prettier@^2.8.0: version "2.8.8" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"