Repository navigation
types: trim challenges.d.ts to the public detectBotChallenge surface - #216
Closed
devin-ai-integration[bot] wants to merge 1 commit into
Closed
devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Contributor
Author
9 tasks done
Collaborator
|
Landed on main via #224 (consolidated dead-code cleanup). |
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.
What and why
types/challenges.d.tsis not in theexportsmap andtypes/index.d.tsonly re-exportsdetectBotChallengefrom it, so the other declarations (PUBLIC_SEARCH_BLOCK_ADVICE,SEARCH_CHALLENGE_ADVICE,CHALLENGE_BLOCK_WINDOW_MS,CHALLENGE_UNREAD_FRAME_BUDGET,challengeScanNeeded,frameUrlLooksLikeChallenge,isPublicSearchNavigation, and theChallengeScanStateinterface onlychallengeScanNeededused) described internal helpers ofsrc/challenges.tsno consumer could import. This trims the file todetectBotChallenge+BotChallenge. Runtime code is untouched; the file itself stays becausescripts/check-package.tsrequires it in the tarball. Dead-code scan finding sfind-119f44ac63044683b9f3a023a1d92e35.Checklist
bun run release:checkpasses locally — rantest:types,check:package, andlint(see below); full release:check not run.types/*.d.tsin this same commit. No public API changed; only unreachable declarations removed.bun run test:typespasses.How it was verified
bun run test:types,bun run check:package(tarball smoke test passed),bun run lint(only pre-existing unrelated warnings).Link to Devin session: https://app.devin.ai/sessions/445b367e389b4229ae1ea25130a8ff09
Open in Devin Desktop: https://app.devin.ai/desktop/session/445b367e389b4229ae1ea25130a8ff09?variant=devin
Requested by: @CuriosityOS