front_end/
This directory contains all packages that are shipped in the DevTools front_end/
bundle. All third_party packages that are solely used for building DevTools should live in //third_party
instead. third_party packages included in this directory will be subject to additional security review and monitoring.
front_end/third_party/
packagesIf you would like to add a new third_party package to this directory, please perform the following steps:
[DevTools]
.front_end/
will be legacied in, but will receive post-inclusion security review.gwsq
bot will choose an appropriate reviewer for the CL.front_end/third_party/
packagesPackages must be updated on a suitable cadence (preferably monthly or weekly). Any breaking changes must be mitigated in a separate CL, before the package update CL is submitted. If breaking changes can not be mitigated in isolation, assess the overall impact on codebase and notify devtools-dev@ about the upcoming breaking change. That way, other code contributors are aware of potential merge conflicts and regression mitigations.
If the functionality of the package changed significantly in the update, you might have to obtain another security review. Ask devtools-dev+security@ for guidance if you are unsure.
Closure will try to type-check a third_party package as soon as it is imported by a DevTools module. This will fail should the third_party package not use JSDoc, or use it in way that is not supported by Closure. The workaround includes a couple of steps:
_types.js
file along-side it. For example, if the package foo
contains third_party/foo/package/foo.js
, create a file third_party/foo/package/foo_types.js
that exports the relevant types that Closure needs to know about.foo.js
to the run_type_check.py script. This tells our build system to use foo_types.js
instead of foo.js
for type-checking.README.chromium
of the third_party package to include the added _types.js
files in the “Local Modifications” section.module.json
that lists third_party/foo/package/foo.js
in its modules
section, needs to add the same file to the skip_compilation
section.