Skip to content

fix(deps): update dependency truncate-html to v1.2.1 #1475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 12, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
truncate-html 1.0.4 -> 1.2.1 age adoption passing confidence

Release Notes

oe/truncate-html (truncate-html)

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.

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.18%. Comparing base (4cc716b) to head (0c425fd).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1475   +/-   ##
=======================================
  Coverage   90.18%   90.18%           
=======================================
  Files         338      338           
  Lines        5726     5726           
  Branches     1382     1342   -40     
=======================================
  Hits         5164     5164           
- Misses        543      545    +2     
+ Partials       19       17    -2     

☔ 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 from 15a3f38 to 7f08044 Compare March 18, 2025 15:44
@renovate renovate bot changed the title fix(deps): update dependency truncate-html to v1.2.0 fix(deps): update dependency truncate-html to v1.2.1 Mar 18, 2025
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 9 times, most recently from ff57fda to 6474db2 Compare March 25, 2025 17:04
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch from 6474db2 to 3521453 Compare March 26, 2025 12:15
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 9 times, most recently from 517c51d to 16b9e65 Compare April 7, 2025 18:59
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch 7 times, most recently from 09860cf to f06b6de Compare April 15, 2025 18:57
@renovate renovate bot force-pushed the renovate/truncate-html-1.x branch from f06b6de to 0c425fd Compare April 16, 2025 19:39
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.

0 participants