@typescript-eslint/no-inferrable-types Simplifies the code and makes
type be more specific.
@typescript-eslint/return-await In theory more performant, but also
provides better debugging experience.
@typescript-eslint/ban-ts-comment Disallow all but ts-expect-error, as
else the error may get fixed not remove and later mask unrelated issues
Bug: 397260638
Change-Id: I09f268eb9157336635c378fa76546a4196e448e9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6281149
Reviewed-by: Victor Porof <victorporof@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
The code generator embeds the last n entries of its own filename into
the generated InspectorBackendCommands. It used to be n=4, which
happens to create a different filename depending on whether the
script is run from a chromium or a standalone devtools-frontend
checkout. So set n=3.
DISABLE_THIRD_PARTY_CHECK=Updating code genrator
Bug: none
Change-Id: I09fad6d43377c8558709cbe41dba106f9c813caf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4852085
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
We need access to the typeRef for array parameters. At the moment string type was not supported.
Moreover, the registerType only contains types relating to objects. This CL adds support as well for types directly relating to arrays.
DISABLE_THIRD_PARTY_CHECK=needed to build
Bug: 1462270
Change-Id: I0375228a9315e35819c93e7deeb149121765f52b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4665825
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
The protocol Monitor needs to know the type of array parameters. To do this, the CL will add type reference to registerType inside the InspectorBackendCommands.js file. It is then possible to know what type of parameters array parameters accept.
DISABLE_THIRD_PARTY_CHECK=needed to build
Bug: 1462096
Change-Id: I623ef4fef1f49f7618f2a874490a515ce22ce1cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4660370
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
This CL adds the ability to have access to a map enabling the user to have access to all the keys of object parameters. To do that, this CL modifies code_generator_frontend.py to generate a new command called RegisterType.
DISABLE_THIRD_PARTY_CHECK=make build work
Bug: 1458788
Change-Id: I28bf0baf3841cf3120d103e40925698d3c8114b2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4650362
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Hadrien Jaubert <hadrienjaubert@google.com>
depot_tools ships a "vpython" binary that is added to the $PATH
for all Chromium engineers. This binary is versioned by depot_tools
which we roll in ourselves as part of `gclient sync`.
By using `vpython` instead of `python`, we are no longer depended
on the Python version installed locally and instead use the version
we pull in from DEPS.
R=liviurau@chromium.org
Change-Id: If49a54c24b6cf129ff843cd9ca1140a723a78afb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2571462
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
This checks in the InspectorBackendCommands in the source tree file
and ensures that it is kept in sync whenever the third_party
location has been updated.
In the process, I discovered multiple misconfigurations in the formatting
presubmit check. First of all, it was never running, because the
.eslintignore had an empty line. Second of all, it was running twice,
which is unnecessary since we now check for changed files at the end
of the presubmit. Lastly, it was only formatting JS files, while it
should check all files.
I have also updated the _CheckGeneratedFiles check to only run if it
is actually necessary. If there are no changes made to any affected of
the files, it will skip the step. This should thus reduce the presubmit
time and we will only pay the cost if we actually update any of the
files.
Lastly, it will now properly format and lint the generated files. This
makes reading the code a lot easier and makes it easier to digest the
diff when a protocol update goes through. I have verified that, in a
full build, the files are still minified. Thus, this has no impact on
the loading performance.
DISABLE_THIRD_PARTY_CHECK=Updating protocol generation
Fixed: 1056614
Change-Id: If49b0e749978ea1a7838992ec13507ee761ad76c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2087765
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>