Add type stubs for generated modules#2696
Conversation
Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
[Beta] Generated file diffTime updated: Fri, 22 May 2026 10:13:38 GMT New Files
❌ File only exists in new changeset |
Co-authored-by: Jonathan Kingston <jonathanKingston@users.noreply.github.com>
Dismissing stale approval — new commits pushed, awaiting Cursor re-review.
Build Branch
Static preview entry points
QR codes (mobile preview)
Integration commandsnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", branch: "pr-releases/jkt/auto/bundler-generated-module-shims-f384")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/jkt/auto/bundler-generated-module-shims-f384
git -C submodules/content-scope-scripts checkout origin/pr-releases/jkt/auto/bundler-generated-module-shims-f384Pin to exact commitnpm (Android / Extension): Swift Package Manager (Apple): .package(url: "https://github.com/duckduckgo/content-scope-scripts.git", revision: "cbc0541a3c3c1e0fa04a86ad2c77e2de82d6388e")git submodule (Windows): git -C submodules/content-scope-scripts fetch origin pr-releases/jkt/auto/bundler-generated-module-shims-f384
git -C submodules/content-scope-scripts checkout cbc0541a3c3c1e0fa04a86ad2c77e2de82d6388e |
There was a problem hiding this comment.
Web Compatibility Assessment
No warning/error findings.
Info: .gitignore and the new declaration stubs in build/locales/*.d.ts and injected/src/features/tracker-protection/surrogates-generated.d.ts do not change injected runtime behavior, API wrapping, DOM interaction, platform entry points, or feature config gating.
Security Assessment
No warning/error/critical findings.
Info: The PR adds type-only module declarations and ignore-rule exceptions only. It does not introduce new global reads, messaging paths, origin handling, postMessage, network requests, iframe access, or changes to captured-globals.js, message-bridge, wrapper-utils.js, or DDGProxy.
Risk Level
Low Risk: type stubs and .gitignore changes only; the generated module shapes match the existing generators/import sites, and npm run tsc passes.
Recommendations
No blocking changes recommended. Keep the stubs synchronized with injected/scripts/buildLocales.js and injected/scripts/buildSurrogates.js if those generators change export shapes later.
Sent by Cursor Automation: Web compat and sec
|
This PR requires a manual review and approval from a member of one of the following teams:
|


Asana Task/Github Issue:
Description
Testing Steps
Checklist
Please tick all that apply:
Note
Low Risk
Adds TypeScript declaration stubs for build-generated modules and adjusts
.gitignoreto track only those.d.tsfiles; no runtime logic changes.Overview
Adds TypeScript declaration stubs for build-generated artifacts (
build/locales/*-locales.d.tsandinjected/.../surrogates-generated.d.ts) so imports type-check without committing generated JS.Updates
.gitignoreto ignore thebuild/output while explicitly allowingbuild/locales/*.d.tsto be tracked.Reviewed by Cursor Bugbot for commit a07a041. Bugbot is set up for automated code reviews on this repo. Configure here.