Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Sep 12, 2024

This PR contains the following updates:

Package Change Age Confidence
truncate-html 1.0.41.2.2 age confidence

Release Notes

oe/truncate-html (truncate-html)

v1.2.2

Compare Source

v1.2.1

Compare Source

v1.2.0: custom truncate strategy

Compare Source

A new option customNodeStrategy has been added. Check readme for details.

For your requirements, the following code may achieve your needs:

import truncate, { type IOptions, type ICustomNodeStrategy } from 'truncate-html'

// argument node is a cheerio instance
const customNodeStrategy: ICustomNodeStrategy = node => {
  // keep details and treat it as nothing inside
  if (node.is('details')) {
    return 'keep'
  }
}

const html = '<div><details><summary>Click me</summary><p>Some details</p></details>other things</div>'

const options: IOptions = {
  length: 3,
  customNodeStrategy
}

truncate(html, options)
// => <div><details><summary>Click me</summary><p>Some details</p></details>oth...</div>

ref: #​41

v1.1.2: Fix Cheerio's break changes

Compare Source

Cheerio released stable v1.0 a few days ago, but its APIs are very different from the latest beta version 1.0.0-rc.12, which breaks this lib.

The v1.1.2 release has pinned the cheerio version to 1.0.0-rc.12 to fix the cheerio problem.

Reference:

  1. Cheerio 1.0 released, batteries included 🔋
  2. cheerio#4024, more issues about cheerio

Cheerio spent years on beta version of 1.0, and then bring so many break changes in stable version? Unbelievable!

v1.1.1

Compare Source

v1.1.0: update cheerio to v1.0.0-rc.12

Compare Source

There are several changes:

  1. no vulnerabilities
    CleanShot 2023-06-17 at 20 37 48
  2. cheerio can now handle CJK characters correctly
  3. if you are using custom cheerio instance with this library, you should set the third parameter of cheerio.load to false to get rid of extra wrappers, see load for details.
  4. better support for typescript

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codecov
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.18%. Comparing base (630e843) to head (a910ba5).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1475   +/-   ##
=======================================
  Coverage   91.18%   91.18%           
=======================================
  Files         349      349           
  Lines        5831     5831           
  Branches     1376     1376           
=======================================
  Hits         5317     5317           
  Misses        497      497           
  Partials       17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 9 times, most recently from 33b922e to 90202b0 Compare September 19, 2024 16:57
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 9 times, most recently from ecfce68 to 3e3841e Compare September 23, 2024 19:16
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 3 times, most recently from d6a0fd8 to 8991202 Compare October 3, 2024 21:38
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 3 times, most recently from 17506c8 to c1288e7 Compare October 11, 2024 09:42
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 2 times, most recently from 5efb3fe to bb19e39 Compare October 21, 2024 18:09
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 3 times, most recently from 1b65b94 to 6e7fca5 Compare October 28, 2024 14:33
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 2 times, most recently from a317023 to 744dc66 Compare September 13, 2025 02:28
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 3 times, most recently from 140a2aa to 1c044d2 Compare September 22, 2025 00:42
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 3 times, most recently from 1167895 to 757aac3 Compare September 29, 2025 00:41
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 5 times, most recently from 6eaed04 to ea1653d Compare October 13, 2025 00:42
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 3 times, most recently from f71e434 to 2fe9fbb Compare October 20, 2025 16:04
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 2 times, most recently from e98b93e to 2176c07 Compare October 28, 2025 15:14
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 3 times, most recently from 89d9a91 to d527a6b Compare November 10, 2025 00:43
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 3 times, most recently from c20d1f3 to f837bac Compare November 19, 2025 03:20
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch from f837bac to e9e1e7a Compare December 1, 2025 00:50
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 2 times, most recently from 5b503c2 to 2840c63 Compare December 15, 2025 20:24
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch from 2840c63 to 64b9310 Compare January 5, 2026 00:48
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch from 64b9310 to a910ba5 Compare January 12, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant