Skip to content

[DevTools] Improve type coverage for extension runtime API#35957

Merged
eps1lon merged 2 commits intofacebook:mainfrom
eps1lon:sebbie/03-04-_devtools_improve_type_coverage_for_extension_runtime_api
Mar 4, 2026
Merged

[DevTools] Improve type coverage for extension runtime API#35957
eps1lon merged 2 commits intofacebook:mainfrom
eps1lon:sebbie/03-04-_devtools_improve_type_coverage_for_extension_runtime_api

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Mar 4, 2026

Adds types for chrome.runtime.* and chrome.tabs.*. Types are based of off the version that's shared across browsers. We'll see if we need different versions for chrome and firefox.

devtools.panels, storage, permissions, and scripting are still typed as any. Main interest was runtime and tabs to investigate #35954

@meta-cla meta-cla bot added the CLA Signed label Mar 4, 2026
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Mar 4, 2026
@react-sizebot
Copy link

react-sizebot commented Mar 4, 2026

Comparing: 9c0323e...980903c

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB +0.11% 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 611.79 kB 611.79 kB = 108.12 kB 108.12 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB +0.05% 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 677.72 kB 677.72 kB = 119.08 kB 119.08 kB
facebook-www/ReactDOM-prod.classic.js = 697.67 kB 697.72 kB = 122.58 kB 122.59 kB
facebook-www/ReactDOM-prod.modern.js = 687.98 kB 688.03 kB +0.01% 120.96 kB 120.97 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
react-native/implementations/ReactFabric-profiling.fb.js = 466.17 kB 464.90 kB = 78.56 kB 78.23 kB
react-native/implementations/ReactFabric-profiling.js = 465.40 kB 463.94 kB = 78.28 kB 77.96 kB

Generated by 🚫 dangerJS against 980903c

@eps1lon eps1lon requested a review from hoxyq March 4, 2026 10:41
@eps1lon eps1lon marked this pull request as ready for review March 4, 2026 10:41
Copy link
Contributor

@hoxyq hoxyq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, please see my comment above, looks like you've accidentally added one change to this commit.

One important detail about browser extension APIs is that only subset of them is available to scripts from different environments: background, content script, main panel one. I can see 2 ways: we either define an API as optional, if it is only available in some environments, or we apply different flow configs for subfolders under react-devtools-extensions.

@eps1lon eps1lon force-pushed the sebbie/03-04-_devtools_improve_type_coverage_for_extension_runtime_api branch from 3c1d4f2 to 980903c Compare March 4, 2026 11:41
@eps1lon eps1lon merged commit 4b568a8 into facebook:main Mar 4, 2026
234 of 235 checks passed
@eps1lon eps1lon deleted the sebbie/03-04-_devtools_improve_type_coverage_for_extension_runtime_api branch March 4, 2026 11:47
github-actions bot pushed a commit to code/lib-react that referenced this pull request Mar 7, 2026
github-actions bot pushed a commit to code/lib-react that referenced this pull request Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants