Repository navigation
[Bug fix] JS SDK v2: forward ignoreRobotsTxt in crawl payload - #5473
Open
Ratanlavate wants to merge 1 commit into
Open
Ratanlavate wants to merge 1 commit into
Ratanlavate wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Summary
The Firecrawl JS SDK v2
crawl()silently drops theignoreRobotsTxtoption.CrawlOptions(inapps/js-sdk/firecrawl/src/v2/types.ts) declares:but
prepareCrawlPayload()inapps/js-sdk/firecrawl/src/v2/methods/crawl.tsbuilds the request body from a hand-rolled whitelist of options and never forwardsignoreRobotsTxt. So a caller settingignoreRobotsTxt: truegets server-side default robots behaviour anyway — the client-side flag is accepted in the type, then discarded, and the documented behaviour diverges from reality.Changes
apps/js-sdk/firecrawl/src/v2/methods/crawl.ts— forwardrequest.ignoreRobotsTxtinto the/v2/crawlpayload when set.Testing
git apply --checkagainst pristinemainpasses (patch is minimal, single-line addition).Fixes #3940
Summary by cubic
Fixes the JS SDK v2
crawl()silently dropping theignoreRobotsTxtoption. Previously the flag was accepted in theCrawlOptionstype but never forwarded to the request body, so callers got server-side default robots behavior; nowignoreRobotsTxtis included in the/v2/crawlpayload when set.Written for commit 059aae8. Summary will update on new commits.