Repository navigation
feat(helpers): pass propName to validate - #868
Merged
Merged
Conversation
`findRule` already receives the property it is resolving and used it only for a debug label. A validate could not see it, so a consumer gating on value shape had no way to scope itself — and the same bytes want opposite answers depending on the property: a script-bearing HTML document is a hostile `logo` candidate and the expected `url` result. Without it, callers substitute proxies. Comparing the value against the page URL stands in for "this is the url property", which mismatches both ways: a `logo` that happens to equal the page URL goes ungated, and a `url` rule returning a canonicalised variant gets rejected. Exempting a content type stands in for "this might be a page", which then applies to every property. `propName` rides on the options object, so the documented `(value, options, debug)` signature is unchanged and existing validates keep working. The object is built once per property rather than per candidate, and only when a validate is present. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01YKVuh1R8HtB7SX7eKa7UsJ
📝 WalkthroughWalkthroughValidation callbacks now receive the current metadata property name. The TypeScript contract documents the required context, and type-level and unit tests verify property-specific validation. ChangesProperty-aware validation
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 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 |
markharding
pushed a commit
to futo-org/Harbor
that referenced
this pull request
Oct 13, 2026
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
markharding
pushed a commit
to futo-org/Harbor
that referenced
this pull request
Oct 15, 2026
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
markharding
pushed a commit
to futo-org/Harbor
that referenced
this pull request
Oct 16, 2026
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
findRulealready receives the property it is resolving and uses it only for a debug label.validatenever sees it, so a consumer cannot scope itself by property — and the same bytes want opposite answers depending on which one it is: a script-bearing HTML document is a hostilelogocandidate and the expectedurlresult.Without
propName, callers reach for proxies, and both of the obvious ones are wrong:urlproperty". Mismatches both ways: alogothat happens to equal the page URL goes ungated, and aurlrule returning a canonicalised variant (trailing slash) gets rejected.We hit exactly this downstream: an executable-markup gate for
logocould not be scoped, so atext/htmlexemption had to live in the byte-level predicate, where any origin serving that content type passes.What
propNamerides on the options object:The documented
(value, options, debug)signature is unchanged, so existing validates keep working — this is additive.The options object is built once per property inside
findRule, not per candidate, and only when a validate is present, so a scrape without one allocates nothing new.Test plan
validate receives the property name it is judging— asserts both properties are seen and that rejecting onlylogonulls it whiletitlesurvives. Verified to fail without the change.tsdpasses with a new case exercisingpropName.metascraperunit 29 passing;metascraper-helpers80 passing underTZ=UTC.Note:
.datefails on a non-UTC machine on master as well (Jun 20with no year) — pre-existing and unrelated.Note
Low Risk
Additive API and a small options copy only when validate is set; no change to default validation behavior.
Overview
Scrape-level
validatecallbacks now receivepropNameon the options object (alongside existing fields likeurl), so consumers can accept or reject the same candidate value differently per metadata field—for example blocking atext/htmlURL forlogowhile allowing it forurl.In
findRule, when a validate is configured, options are shallow-copied once per property withpropNameset beforeisValidValueruns; scrapes without validate avoid the extra object. Type definitions andtsdcover the new field; a unit test confirms each property is validated independently.Reviewed by Cursor Bugbot for commit b488d44. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Bug Fixes
Documentation