Skip to content

Handle extension_types "all" like Chrome does - #111

Open
patrickkettner wants to merge 2 commits into
mainfrom
extension-types-all-fix
Open

patrickkettner wants to merge 2 commits into
mainfrom
extension-types-all-fix

Conversation

@patrickkettner

Copy link
Copy Markdown
Collaborator

Chrome's feature files can set extension_types to the string "all" instead
of a list. includes() on that runs as a substring test, so "all" was read as
excluding every type, and chrome.runtime.lastError has been missing from the
MV3+ bundle since. That is the runtime.lastError part of #19, which also asks
for a sendMessage overload and chrome on Window, so it stays open.

_all.d.ts does not change, so the documentation bundle is unaffected.

ExtensionType was also missing chromeos_system_extension.

Chrome's feature files can set extension_types to the string "all"
instead of a list. includes() on that runs as a substring test, so
"all" was read as excluding every type, and runtime.lastError has
been missing from the MV3+ bundle since.

ExtensionType was also missing chromeos_system_extension.
@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.23404% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.03%. Comparing base (9de4fa4) to head (80d29fc).

Files with missing lines Patch % Lines
tools/lib/feature-query.js 90.69% 4 Missing ⚠️
tools/override.js 66.66% 1 Missing ⚠️
tools/render-tsd.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
+ Coverage   44.41%   45.03%   +0.62%     
==========================================
  Files          21       21              
  Lines        4215     4232      +17     
  Branches      293      301       +8     
==========================================
+ Hits         1872     1906      +34     
+ Misses       2343     2326      -17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

render-tsd.js has a top-level await run(), so
importing it runs the tool. Move the class so
its filter() method is testable, and add a test
for the extension_types "all" case that caused
the original bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant