@tryghost/mg-tinynews 0.0.27 → 0.0.28

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2013-2025 Ghost Foundation
3
+ Copyright (c) 2013-2026 Ghost Foundation
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -100,4 +100,4 @@ yarn dev tinynews [options]
100
100
 
101
101
  # Copyright & License
102
102
 
103
- Copyright (c) 2013-2025 Ghost Foundation - Released under the [MIT license](LICENSE).
103
+ Copyright (c) 2013-2026 Ghost Foundation - Released under the [MIT license](LICENSE).
package/lib/mapper.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {readFile} from 'node:fs/promises';
2
2
  import sanitizeHtml from 'sanitize-html';
3
- import $ from 'cheerio';
3
+ import * as cheerio from 'cheerio';
4
4
  import {slugify} from '@tryghost/string';
5
5
  import {_base as debugFactory} from '@tryghost/debug';
6
6
  import {jsonToHtml} from './json-to-html.js';
@@ -202,19 +202,21 @@ const processNewsletterContent = (html, options) => { // eslint-disable-line no-
202
202
  }
203
203
  });
204
204
 
205
- const $html = $.load(cleanedContent, {
206
- decodeEntities: false
205
+ const $html = cheerio.load(cleanedContent, {
206
+ xml: {
207
+ decodeEntities: false
208
+ }
207
209
  });
208
210
 
209
211
  $html('p').each((i, el) => {
210
212
  const innerHtml = $html(el).html().trim();
211
213
  if (!innerHtml.length || innerHtml === '<br>' || innerHtml === '<br/>') {
212
- $(el).remove();
214
+ $html(el).remove();
213
215
  }
214
216
  });
215
217
 
216
218
  $html('a:contains("Made with Letterhead")').each((i, el) => {
217
- $(el).remove();
219
+ $html(el).remove();
218
220
  });
219
221
 
220
222
  const cleanedHTML = $html.html().trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/mg-tinynews",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "repository": "https://github.com/TryGhost/migrate/tree/main/packages/mg-tinynews",
5
5
  "author": "Ghost Foundation",
6
6
  "license": "MIT",
@@ -27,11 +27,11 @@
27
27
  "dependencies": {
28
28
  "@tryghost/debug": "0.1.35",
29
29
  "@tryghost/errors": "1.3.8",
30
- "@tryghost/kg-default-cards": "10.2.0",
31
- "@tryghost/string": "0.2.17",
32
- "cheerio": "1.0.0-rc.12",
30
+ "@tryghost/kg-default-cards": "10.2.3",
31
+ "@tryghost/string": "0.2.21",
32
+ "cheerio": "1.1.2",
33
33
  "sanitize-html": "2.17.0",
34
34
  "simple-dom": "1.4.0"
35
35
  },
36
- "gitHead": "93b72e5f4374d9f097876b71e78fdc920af364ff"
36
+ "gitHead": "027225930710c0643603f6ae346dc76504d9bb7a"
37
37
  }