Repository navigation
Conversation
Allow callers to reject a rule result and continue to the next rule without throwing, so logo XSS fallthrough can skip hostile candidates. Co-authored-by: Cursor <[email protected]>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change adds synchronous and asynchronous rule validation, propagates validators through rule metadata, and continues rule evaluation after rejected candidates. A shared ChangesValidation-aware rule resolution
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Metascraper
participant withIframe
participant getIframeCached
participant findRule
participant Validate
Metascraper->>findRule: evaluate direct rules
findRule->>Validate: validate candidate
Validate-->>findRule: accept or reject
Metascraper->>withIframe: evaluate nested media rules
withIframe->>getIframeCached: fetch normalized iframe URL
getIframeCached-->>withIframe: nested metadata
withIframe->>findRule: evaluate nested rules
findRule->>Validate: validate nested candidate
Validate-->>findRule: accept or reject
findRule-->>withIframe: result or continue probing
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/metascraper/test/unit/validate.js (1)
24-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest the validator context contract.
This test only verifies the
valueargument. Record the second validator argument. AssertpropName,rule, andargsmatch the documented contract.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/metascraper/test/unit/validate.js` around lines 24 - 31, Update the scraper test’s validate callback to capture its second context argument, then assert that context.propName, context.rule, and context.args match the documented validator contract. Keep the existing value filtering and logo assertions unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/metascraper/test/unit/validate.js`:
- Around line 24-31: Update the scraper test’s validate callback to capture its
second context argument, then assert that context.propName, context.rule, and
context.args match the documented validator contract. Keep the existing value
filtering and logo assertions unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 87e95a1d-e3ea-47c0-86a1-5b3829da3434
📒 Files selected for processing (2)
packages/metascraper-helpers/src/index.jspackages/metascraper/test/unit/validate.js
`validate` applied to every property, so a validator written for one field silently nulled unrelated ones. It now accepts an object keyed by property name; the function form still runs for every property. A throwing validator aborted the whole property through get-data's catch. It now rejects only the candidate that triggered it and the search resumes at the next rule, with the error logged under DEBUG=metascraper:find-rule. metascraper-video and metascraper-audio rebuilt the args object for their nested findRule calls, so validate never reached rules behind an iframe and per-candidate fallthrough did not happen there. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VSEyFT3dw16tyvhRGVAWrx
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VSEyFT3dw16tyvhRGVAWrx
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/metascraper-audio/test/iframe.js (1)
71-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover property-specific and Twitter-player validation propagation.
The current tests use global validators and generic iframe sources only. A regression that removes the explicit property name, or drops validation arguments in the Twitter-player path, can still pass.
packages/metascraper-audio/test/iframe.js#L71-L89: Add a test with{ audio: validator }. Add coverage formeta[name="twitter:player"].packages/metascraper-video/test/iframe.js#L72-L91: Add a test with{ video: validator }. Add coverage formeta[name="twitter:player"].🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/metascraper-audio/test/iframe.js` around lines 71 - 89, Add regression coverage in packages/metascraper-audio/test/iframe.js:71-89 by changing the iframe validation test to use an explicit { audio: validator } configuration and include meta[name="twitter:player"] validation. Apply the same coverage in packages/metascraper-video/test/iframe.js:72-91 using { video: validator }, including the Twitter-player metadata path; ensure both tests verify hostile values are rejected and safe values are retained.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Around line 363-364: Update the validate example to check that value is a
string before calling startsWith, while preserving rejection of string values
beginning with "data:" and accepting non-string values without throwing.
---
Nitpick comments:
In `@packages/metascraper-audio/test/iframe.js`:
- Around line 71-89: Add regression coverage in
packages/metascraper-audio/test/iframe.js:71-89 by changing the iframe
validation test to use an explicit { audio: validator } configuration and
include meta[name="twitter:player"] validation. Apply the same coverage in
packages/metascraper-video/test/iframe.js:72-91 using { video: validator },
including the Twitter-player metadata path; ensure both tests verify hostile
values are rejected and safe values are retained.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 635fdb3f-8a82-4638-84e8-272753d16804
📒 Files selected for processing (10)
README.mdpackages/metascraper-audio/src/index.jspackages/metascraper-audio/test/iframe.jspackages/metascraper-helpers/src/index.jspackages/metascraper-helpers/test/find-rule.jspackages/metascraper-video/src/index.jspackages/metascraper-video/test/iframe.jspackages/metascraper/src/index.d.tspackages/metascraper/test/types/index.test-d.tspackages/metascraper/test/unit/validate.js
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/metascraper-helpers/src/index.js
Deduplicate nested iframe probing so validate keeps one code path, and tighten docs/tests from review feedback. Co-authored-by: Cursor <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/metascraper-helpers/src/index.js`:
- Around line 661-665: Update the iframe wrapper flow around findRule so
candidates already validated by the nested findRule call are not validated again
by the outer findRule. Preserve the nested validation context, including rule
and htmlDom, by carrying an internal validated-result state through the wrapper
return path. Add coverage asserting an accepted iframe candidate invokes its
validator exactly once.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: eed0265c-0a0f-4a1a-a611-495d2f22cab4
📒 Files selected for processing (7)
README.mdpackages/metascraper-audio/src/index.jspackages/metascraper-audio/test/iframe.jspackages/metascraper-helpers/src/index.jspackages/metascraper-video/src/index.jspackages/metascraper-video/test/iframe.jspackages/metascraper/src/index.d.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- README.md
- packages/metascraper-video/src/index.js
- packages/metascraper/src/index.d.ts
Scrape-time validate mixed a second control plane into the call. Bundle/rule validate matches test and needs no args forwarding. Co-authored-by: Cursor <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/metascraper/src/rules.js`:
- Around line 65-70: Update mergeRules so pkgName is retained when destructuring
each rule and ruleSet, then pass the parent package name to attachRuleMeta for
every processed inline rule. Preserve the existing test and validate metadata
while ensuring inline rules keep their originating package name.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1f52a48f-f20e-4281-9123-64435eaba283
📒 Files selected for processing (10)
CONTRIBUTING.mdpackages/metascraper-audio/test/iframe.jspackages/metascraper-helpers/src/index.jspackages/metascraper-helpers/test/find-rule.jspackages/metascraper-video/test/iframe.jspackages/metascraper/src/index.d.tspackages/metascraper/src/rules.jspackages/metascraper/test/types/index.test-d.tspackages/metascraper/test/unit/merge-rules.jspackages/metascraper/test/unit/validate.js
🚧 Files skipped from review as they are similar to previous changes (4)
- packages/metascraper-helpers/test/find-rule.js
- packages/metascraper-audio/test/iframe.js
- packages/metascraper-video/test/iframe.js
- packages/metascraper-helpers/src/index.js
loadRules already copied bundle pkgName; mergeRules dropped it so inline bundles lost debug names and pkgName could become a prop key. Co-authored-by: Cursor <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VSEyFT3dw16tyvhRGVAWrx
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VSEyFT3dw16tyvhRGVAWrx
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VSEyFT3dw16tyvhRGVAWrx
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VSEyFT3dw16tyvhRGVAWrx
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [metascraper](https://metascraper.js.org) ([source](https://github.com/microlinkhq/metascraper)) | [`5.51.1` → `5.58.4`](https://renovatebot.com/diffs/npm/metascraper/5.51.1/5.58.4) |  |  | --- ### Release Notes <details> <summary>microlinkhq/metascraper (metascraper)</summary> ### [`v5.58.4`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5584-2026-10-09) [Compare Source](microlinkhq/metascraper@v5.58.1...v5.58.4) **Note:** Version bump only for package metascraper ### [`v5.58.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5581-2026-09-17) [Compare Source](microlinkhq/metascraper@v5.56.2...v5.58.1) ##### Bug Fixes - **metascraper-instagram:** prefer 180px apple-touch logo ([#​882](microlinkhq/metascraper#882)) ([a586af5](microlinkhq/metascraper@a586af5)) - use [@​kikobeats/got](https://github.com/kikobeats/got) to support Node.js 24.20 ([#​881](microlinkhq/metascraper#881)) ([41a626b](microlinkhq/metascraper@41a626b)), closes [nodejs/node#64847](nodejs/node#64847) ### [`v5.56.2`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5570-2026-08-19) [Compare Source](microlinkhq/metascraper@v5.56.1...v5.56.2) ##### Features - add metascraper-imdb ([#​876](microlinkhq/metascraper#876)) ([b10eabb](microlinkhq/metascraper@b10eabb)) #### [5.56.2](microlinkhq/metascraper@v5.56.1...v5.56.2) (2026-08-17) **Note:** Version bump only for package metascraper #### [5.56.1](microlinkhq/metascraper@v5.56.0...v5.56.1) (2026-08-17) ##### Bug Fixes - **author:** fall back to twitter:creator ([#​874](microlinkhq/metascraper#874)) ([d1ec557](microlinkhq/metascraper@d1ec557)), closes [#author-group](https://github.com/microlinkhq/metascraper/issues/author-group) [#author-group](https://github.com/microlinkhq/metascraper/issues/author-group) ### [`v5.56.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5570-2026-08-19) [Compare Source](microlinkhq/metascraper@v5.55.2...v5.56.1) ##### Features - add metascraper-imdb ([#​876](microlinkhq/metascraper#876)) ([b10eabb](microlinkhq/metascraper@b10eabb)) #### [5.56.2](microlinkhq/metascraper@v5.56.1...v5.56.2) (2026-08-17) **Note:** Version bump only for package metascraper #### [5.56.1](microlinkhq/metascraper@v5.56.0...v5.56.1) (2026-08-17) ##### Bug Fixes - **author:** fall back to twitter:creator ([#​874](microlinkhq/metascraper#874)) ([d1ec557](microlinkhq/metascraper@d1ec557)), closes [#author-group](https://github.com/microlinkhq/metascraper/issues/author-group) [#author-group](https://github.com/microlinkhq/metascraper/issues/author-group) ### [`v5.55.2`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5560-2026-08-15) [Compare Source](microlinkhq/metascraper@v5.55.1...v5.55.2) ##### Features - add metascraper-citation ([#​873](microlinkhq/metascraper#873)) ([31bceb1](microlinkhq/metascraper@31bceb1)) #### [5.55.2](microlinkhq/metascraper@v5.55.1...v5.55.2) (2026-08-13) ##### Bug Fixes - **helpers:** keep CGI + in query strings ([#​872](microlinkhq/metascraper#872)) ([4743562](microlinkhq/metascraper@4743562)) #### [5.55.1](microlinkhq/metascraper@v5.55.0...v5.55.1) (2026-08-10) ##### Bug Fixes - **youtube:** date a video by its upload date ([#​869](microlinkhq/metascraper#869)) ([7040d5c](microlinkhq/metascraper@7040d5c)) ### [`v5.55.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5560-2026-08-15) [Compare Source](microlinkhq/metascraper@v5.55.0...v5.55.1) ##### Features - add metascraper-citation ([#​873](microlinkhq/metascraper#873)) ([31bceb1](microlinkhq/metascraper@31bceb1)) #### [5.55.2](microlinkhq/metascraper@v5.55.1...v5.55.2) (2026-08-13) ##### Bug Fixes - **helpers:** keep CGI + in query strings ([#​872](microlinkhq/metascraper#872)) ([4743562](microlinkhq/metascraper@4743562)) #### [5.55.1](microlinkhq/metascraper@v5.55.0...v5.55.1) (2026-08-10) ##### Bug Fixes - **youtube:** date a video by its upload date ([#​869](microlinkhq/metascraper#869)) ([7040d5c](microlinkhq/metascraper@7040d5c)) ### [`v5.55.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5560-2026-08-15) [Compare Source](microlinkhq/metascraper@v5.54.1...v5.55.0) ##### Features - add metascraper-citation ([#​873](microlinkhq/metascraper#873)) ([31bceb1](microlinkhq/metascraper@31bceb1)) #### [5.55.2](microlinkhq/metascraper@v5.55.1...v5.55.2) (2026-08-13) ##### Bug Fixes - **helpers:** keep CGI + in query strings ([#​872](microlinkhq/metascraper#872)) ([4743562](microlinkhq/metascraper@4743562)) #### [5.55.1](microlinkhq/metascraper@v5.55.0...v5.55.1) (2026-08-10) ##### Bug Fixes - **youtube:** date a video by its upload date ([#​869](microlinkhq/metascraper#869)) ([7040d5c](microlinkhq/metascraper@7040d5c)) ### [`v5.54.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5550-2026-08-09) [Compare Source](microlinkhq/metascraper@v5.54.0...v5.54.1) ##### Features - **helpers:** pass propName to validate ([#​868](microlinkhq/metascraper#868)) ([8e0a75f](microlinkhq/metascraper@8e0a75f)) #### [5.54.1](microlinkhq/metascraper@v5.54.0...v5.54.1) (2026-08-07) **Note:** Version bump only for package metascraper ### [`v5.54.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5550-2026-08-09) [Compare Source](microlinkhq/metascraper@v5.53.0...v5.54.0) ##### Features - **helpers:** pass propName to validate ([#​868](microlinkhq/metascraper#868)) ([8e0a75f](microlinkhq/metascraper@8e0a75f)) #### [5.54.1](microlinkhq/metascraper@v5.54.0...v5.54.1) (2026-08-07) **Note:** Version bump only for package metascraper ### [`v5.53.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5540-2026-08-07) [Compare Source](microlinkhq/metascraper@v5.52.1...v5.53.0) ##### Features - **helpers:** add rule-level validate (like test) ([#​866](microlinkhq/metascraper#866)) ([d40856b](microlinkhq/metascraper@d40856b)) #### [5.53.1](microlinkhq/metascraper@v5.53.0...v5.53.1) (2026-08-02) ##### Bug Fixes - keep the favicon body under reachable-url v2 ([#​865](microlinkhq/metascraper#865)) ([ce4536f](microlinkhq/metascraper@ce4536f)) ### [`v5.52.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5530-2026-07-30) [Compare Source](microlinkhq/metascraper@v5.52.0...v5.52.1) ##### Features - **helpers:** read the declared protocol instead of resolving it ([#​864](microlinkhq/metascraper#864)) ([2d72298](microlinkhq/metascraper@2d72298)) #### [5.52.1](microlinkhq/metascraper@v5.52.0...v5.52.1) (2026-07-29) **Note:** Version bump only for package metascraper ### [`v5.52.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5530-2026-07-30) [Compare Source](microlinkhq/metascraper@v5.51.1...v5.52.0) ##### Features - **helpers:** read the declared protocol instead of resolving it ([#​864](microlinkhq/metascraper#864)) ([2d72298](microlinkhq/metascraper@2d72298)) #### [5.52.1](microlinkhq/metascraper@v5.52.0...v5.52.1) (2026-07-29) **Note:** Version bump only for package metascraper </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMy4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/1815
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [metascraper-title](https://metascraper.js.org) ([source](https://github.com/microlinkhq/metascraper)) | [`5.51.1` → `5.58.4`](https://renovatebot.com/diffs/npm/metascraper-title/5.51.1/5.58.4) |  |  | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/99) for more information. --- ### Release Notes <details> <summary>microlinkhq/metascraper (metascraper-title)</summary> ### [`v5.58.4`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5584-2026-10-09) [Compare Source](microlinkhq/metascraper@v5.56.2...v5.58.4) **Note:** Version bump only for package metascraper ### [`v5.56.2`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5562-2026-08-17) [Compare Source](microlinkhq/metascraper@v5.55.2...v5.56.2) **Note:** Version bump only for package metascraper ### [`v5.55.2`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5552-2026-08-13) [Compare Source](microlinkhq/metascraper@v5.55.0...v5.55.2) ##### Bug Fixes - **helpers:** keep CGI + in query strings ([#​872](microlinkhq/metascraper#872)) ([4743562](microlinkhq/metascraper@4743562)) ### [`v5.55.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5550-2026-08-09) [Compare Source](microlinkhq/metascraper@v5.54.1...v5.55.0) ##### Features - **helpers:** pass propName to validate ([#​868](microlinkhq/metascraper#868)) ([8e0a75f](microlinkhq/metascraper@8e0a75f)) #### [5.54.1](microlinkhq/metascraper@v5.54.0...v5.54.1) (2026-08-07) **Note:** Version bump only for package metascraper ### [`v5.54.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5541-2026-08-07) [Compare Source](microlinkhq/metascraper@v5.54.0...v5.54.1) **Note:** Version bump only for package metascraper ### [`v5.54.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5540-2026-08-07) [Compare Source](microlinkhq/metascraper@v5.53.0...v5.54.0) ##### Features - **helpers:** add rule-level validate (like test) ([#​866](microlinkhq/metascraper#866)) ([d40856b](microlinkhq/metascraper@d40856b)) #### [5.53.1](microlinkhq/metascraper@v5.53.0...v5.53.1) (2026-08-02) ##### Bug Fixes - keep the favicon body under reachable-url v2 ([#​865](microlinkhq/metascraper#865)) ([ce4536f](microlinkhq/metascraper@ce4536f)) ### [`v5.53.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5530-2026-07-30) [Compare Source](microlinkhq/metascraper@v5.52.0...v5.53.0) ##### Features - **helpers:** read the declared protocol instead of resolving it ([#​864](microlinkhq/metascraper#864)) ([2d72298](microlinkhq/metascraper@2d72298)) #### [5.52.1](microlinkhq/metascraper@v5.52.0...v5.52.1) (2026-07-29) **Note:** Version bump only for package metascraper ### [`v5.52.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5520-2026-07-29) [Compare Source](microlinkhq/metascraper@v5.51.1...v5.52.0) ##### Features - add metascraper-logo-bimi ([#​861](microlinkhq/metascraper#861)) ([b178b76](microlinkhq/metascraper@b178b76)) #### [5.51.2](microlinkhq/metascraper@v5.51.1...v5.51.2) (2026-06-30) ##### Bug Fixes - **metascraper-amazon:** match Amazon domains via PSL hostname, not substring regex ([#​852](microlinkhq/metascraper#852)) ([ec0d494](microlinkhq/metascraper@ec0d494)), closes [#​851](microlinkhq/metascraper#851) #### [5.51.1](microlinkhq/metascraper@v5.51.0...v5.51.1) (2026-06-19) **Note:** Version bump only for package metascraper </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE2NC41IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/1818
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [metascraper-url](https://metascraper.js.org) ([source](https://github.com/microlinkhq/metascraper)) | [`5.51.1` → `5.58.4`](https://renovatebot.com/diffs/npm/metascraper-url/5.51.1/5.58.4) |  |  | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/99) for more information. --- ### Release Notes <details> <summary>microlinkhq/metascraper (metascraper-url)</summary> ### [`v5.58.4`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5584-2026-10-09) [Compare Source](microlinkhq/metascraper@v5.56.2...v5.58.4) **Note:** Version bump only for package metascraper ### [`v5.56.2`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5562-2026-08-17) [Compare Source](microlinkhq/metascraper@v5.55.2...v5.56.2) **Note:** Version bump only for package metascraper ### [`v5.55.2`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5552-2026-08-13) [Compare Source](microlinkhq/metascraper@v5.55.0...v5.55.2) ##### Bug Fixes - **helpers:** keep CGI + in query strings ([#​872](microlinkhq/metascraper#872)) ([4743562](microlinkhq/metascraper@4743562)) ### [`v5.55.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5550-2026-08-09) [Compare Source](microlinkhq/metascraper@v5.54.1...v5.55.0) ##### Features - **helpers:** pass propName to validate ([#​868](microlinkhq/metascraper#868)) ([8e0a75f](microlinkhq/metascraper@8e0a75f)) #### [5.54.1](microlinkhq/metascraper@v5.54.0...v5.54.1) (2026-08-07) **Note:** Version bump only for package metascraper ### [`v5.54.1`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5541-2026-08-07) [Compare Source](microlinkhq/metascraper@v5.54.0...v5.54.1) **Note:** Version bump only for package metascraper ### [`v5.54.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5540-2026-08-07) [Compare Source](microlinkhq/metascraper@v5.53.0...v5.54.0) ##### Features - **helpers:** add rule-level validate (like test) ([#​866](microlinkhq/metascraper#866)) ([d40856b](microlinkhq/metascraper@d40856b)) #### [5.53.1](microlinkhq/metascraper@v5.53.0...v5.53.1) (2026-08-02) ##### Bug Fixes - keep the favicon body under reachable-url v2 ([#​865](microlinkhq/metascraper#865)) ([ce4536f](microlinkhq/metascraper@ce4536f)) ### [`v5.53.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5530-2026-07-30) [Compare Source](microlinkhq/metascraper@v5.52.0...v5.53.0) ##### Features - **helpers:** read the declared protocol instead of resolving it ([#​864](microlinkhq/metascraper#864)) ([2d72298](microlinkhq/metascraper@2d72298)) #### [5.52.1](microlinkhq/metascraper@v5.52.0...v5.52.1) (2026-07-29) **Note:** Version bump only for package metascraper ### [`v5.52.0`](https://github.com/microlinkhq/metascraper/blob/HEAD/CHANGELOG.md#5520-2026-07-29) [Compare Source](microlinkhq/metascraper@v5.51.1...v5.52.0) ##### Features - add metascraper-logo-bimi ([#​861](microlinkhq/metascraper#861)) ([b178b76](microlinkhq/metascraper@b178b76)) #### [5.51.2](microlinkhq/metascraper@v5.51.1...v5.51.2) (2026-06-30) ##### Bug Fixes - **metascraper-amazon:** match Amazon domains via PSL hostname, not substring regex ([#​852](microlinkhq/metascraper#852)) ([ec0d494](microlinkhq/metascraper@ec0d494)), closes [#​851](microlinkhq/metascraper#851) #### [5.51.1](microlinkhq/metascraper@v5.51.0...v5.51.1) (2026-06-19) **Note:** Version bump only for package metascraper </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - "before 9am on tuesday" - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjE2NC41IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==--> Reviewed-on: https://code.futo.org/harbor/harbor/pulls/1819
Summary
validateon a rule or rules bundle (same shape astest): after a rule returns a value,validate(value, args)may return falsy or throw to reject that candidate and continue to the next rule.loadRules/mergeRulescopy bundlevalidateonto each rule;findRulereadsrule.validate.withIframeinto@metascraper/helpersso audio/video nested iframe probing (and validate) share one path.metascraper({ validate })option.Unblocks Microlink API logo XSS fallthrough (hostile candidate → next rule) by setting
validateon logo rule bundles.Test plan
avaon helpersfind-rule, metascrapervalidate/merge-rules, audio/videoiframenext@metascraper/helpersand setrules.validateon logo / logo-favicon / logo-bimiNote
Medium Risk
Changes core
findRuleresolution used on every scrape property, but behavior is backward-compatible whenvalidateis omitted and is covered by new unit/integration tests.Overview
Introduces optional
validateon individual rules or whole rule bundles (mirroringtest): after a rule returns a value,validate(value, args, debug)can reject it sofindRuletries the next rule; if all fail, the property isnull. Bundle-levelvalidateis copied onto each rule vialoadRules/mergeRules, with TypeScript types and CONTRIBUTING docs.Moves duplicated iframe /
twitter:playerprobing from metascraper-audio and metascraper-video into sharedwithIframein@metascraper/helpers, includingpropNamefor debug timing and coverage thatvalidateapplies to values found inside iframes.Reviewed by Cursor Bugbot for commit 27f1adc. Bugbot is set up for automated code reviews on this repo. Configure here.