Commit Graph
1283 Commits
Author SHA1 Message Date
Simon Zünd 50dcea80fa [l10n] Use generated en-US.json/en-XL.json
This CL switches out the in-tree versions of en-US.json/en-XL.json
in favor of the versions generated at build time. They are identical.

The implementation is straight-forward. On the minification step, we
exclude the in-tree en-US.json/en-XL.json and instead add the
outputs of the "collect_strings" action (aka the generated en-US.json/
en-XL.json).

R=kimanh@chromium.org

Bug: 1185727
Change-Id: I923fba50033305a7df6bedccf65c657ecc8e5235
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4043247
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-11-22 08:51:46 +00:00
Simon Zünd d481608a05 [l10n] Remove src directory parameter for minification script
Instead the input sources should specify their path completely.
This allows us to also include generated inputs.

Note that all sources will still be put into a single output
directory, namely $target_gen_dir/core/i18n/locales.

R=kimanh@chromium.org

Bug: 1185727
Change-Id: I203f284f74cb468ebe44c22e5d594f1b6cb182e0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4042782
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-11-22 08:17:39 +00:00
Jack Franklin 2204d75049 Upgrade TS to 4.9
DISABLE_THIRD_PARTY_CHECK=TS upgrade.

Bug: 1392092
Change-Id: I3a5f352b12914ea6f908118fe6fda8ca3286cae5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4041404
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-11-21 15:14:06 +00:00
Simon Zünd c6be86815b [l10n] Don't comma separate files passed to the minification script
Just a small refactoring to go with the standard way of passing
each file as a separate argument instead of doing a join + split.

R=kimanh@chromium.org

Bug: 1185727
Change-Id: I5a292053e1138448e8a1e7a09162b248d6851a25
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4042209
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2022-11-21 12:14:02 +00:00
Jack Franklin 28918fb831 Fix ESLint rule typo
"exlcusive" => "exclusive"

Bug: none
Change-Id: Ieb920b8898efdd048b908051a6cf0c14d1a918be
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4028068
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-11-15 12:37:29 +00:00
Randolf 72c60af2e8 [Recorder] Update puppeteer to v19.2.0
Bug: none
Change-Id: Ic5ce2be0e86463593b2e663cf8c982b1ea1a92f8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3999013
Auto-Submit: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2022-11-02 13:32:05 +00:00
Andrés Olivares 763593787a [ESLint] Report all .only expressions in DevTools' tests
At the moment, we use the no-exclusive-tests plugin to ban exclusive
tests in the test/ repo. This is problematic because the rule doesn't
work for the mocha extensions we use in DevTools (like
describeWithMockConnection, etc.), meaning that exclusive tests like [1]
can slip through the lint check.

This CL adds a new rule that prevents call statements with the shape
statement.only in the test base to account for this. The rule is applied
to files ending with _test.ts and the previous rule is removed.

[1] https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3898961/23/test/unittests/front_end/panels/timeline/SourceMaps_test.ts#80
 (line 80)

 Bug: none
Change-Id: If0e6ac9810c80da067faa1f2158b8bd45f8417f8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3963115
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2022-10-18 15:13:38 +00:00
Jack Franklin 0752134a5d Add --log-level to unit tests.
This CL adds a `--log-level` flag to the unit test runner that will
allow the log level to be configured. This flag is passed right through
to Karma, but is also respected by the logs output by our test runner
before initialising Karma.

The default value for `--log-level` is `info`, so this CL doesn't change
the built in functionality; but you can now pass `debug`, `info`, `warn`
or `error` to configure it.

Bug: none
Change-Id: I82006a1a8283c3d93389f124317a37bac69b5038
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3963112
Commit-Queue: Thiago Perrotta <tperrotta@chromium.org>
Reviewed-by: Thiago Perrotta <tperrotta@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-10-18 14:14:35 +00:00
Jack Franklin 08c207dcfd Remove render_coordinator_write rule
It was never enabled, and now with our ScheduledRender helper, any new
rule should enforce that. But given that we've not felt a need for this
rule directly, I don't think it's a worthwhile investment at the moment.

Bug: none
Change-Id: I36c6e8c9411a035aff4f028f01fd08054387955c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3936844
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2022-10-07 10:43:45 +00:00
Jack Franklin 5445f5cf5f Update eslint node_module
Bug: none
Change-Id: I07591be5189d93085d49ace61ec030291af12b9f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3757654
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-07-15 09:09:49 +00:00
Jack Franklin e7a4dd0e8a Upgrade ESLint+TypeScript node_modules
Bug: none
Change-Id: I1f99b10bc418d589cb11adba64ef2211bede5cd8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3757653
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-07-13 11:51:00 +00:00
Jack Franklin 3a80260722 Inline type imports in front_end
This CL enables the `inline_type_imports` rule for devtools-frontend,
and is the result of running the auto-fixer to update all imports
accordingly.

Bug: 1319340
Change-Id: I303256476fd4e94f4505bbf4355c0070ac101aa9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3752799
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-07-13 09:26:00 +00:00
Jack Franklin 061f09c304 Upgrade TypeScript to 4.7.4
There are a couple of code changes for us that are relevant:

1.The accuracy of `lib.d.ts` (DOM definitions) has improved, so we have
  to update a type in `Button.ts`. This changes the type from
  `X|undefined` to `X|null` so this is very minor.

2. TypeScript got better at understanding conditionals that will always
  return `true`, and caught a case where we were doing:

  ```
  addEventListener(e => e.key === 'Enter' && Common.Revealer.reveal(...)
  && false)
  ```

  TS errored because the `reveal()` call is a promise and therefore will
  always return true, causing the entire expression to return the final
  `false`. Returning `false` from an event listener doesn't do anything,
  so I've removed it.

DISABLE_THIRD_PARTY_CHECK=required updates to land TS upgrade

Bug: none
Change-Id: I89ab2ad730d40308da173bd7788c17daf0b4a511
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3757623
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2022-07-12 15:22:50 +00:00
Jack Franklin 130d2ae03b Disable clang/eslint in front_end/generated
This CL disables formatting within the `generated` directory, which is
all code that is programatically generated. Previously we disabled
eslint for `protocol.ts`, but now we are being consistent and disabling
it (and clang) for all files.

I also re-generated the files in the generated folder, so we avoid any
confusion if/when the generated scripts get re-run and suddenly the
format drastically changes.

DISABLE_THIRD_PARTY_CHECK=changing generated files + config

Bug: none
Change-Id: I714ada8bf7d85020e3be71b35c9db98840bf3ef2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3755163
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-07-12 10:51:50 +00:00
Jack Franklin 66c2bf52b7 [ESLint] allow nested components within a components/ folder
Without this fix lint rule was complaining about
`front_end/panels/foo/bar/components/X.ts`. In some situations we do
nest components further within panels, so let's check that the component
is within a `components` folder regardless of the nesting.

Bug:1206616
Change-Id: Ib6ae6252a517f6d5756fd37f51e130df1c7d5014
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3752797
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-07-08 14:58:37 +00:00
Jack Franklin cc2dbce19a [ESLint] allow custom element rule to configure frontend directory
Bug: 1206616
Change-Id: I33d2e5db33e617370eabab1a01f59e49eb7d2767
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3751200
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-07-07 14:47:41 +00:00
Jack Franklin cf56966bc3 [ESLint] lint front_end/third_party
In crrev.com/c/3748106 we noticed that a CL was able to land that
imported a file without the `.js` extension.

This is because `.eslintignore` listed `front_end/third_party`, so that
folder wasn't linted at all. This is an issue because whilst most of the
code in that directory is not authored by us, the entry points usually
are, and we want to apply our lint rules there.

This CL removes the blanket ignore, instead preferring to ignore
`third_party/X/package/`, and a few other special cases, ensuring that
devtools-frontend authored files in `third_party/` do get linted.

The CL updates the `es_modules_import` rule to not apply the import
checks to files in `third_party` (as they cannot apply the same
conventions we use in DevTools), but it will still check for file
extensions on imports.

The remaining changes are small stylistic changes to align to our ESLint
rules.

Fixed: 1342530
Change-Id: I4ce438499b8c9c77c3fe661576a58bad59d9b061
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3749191
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2022-07-07 10:55:21 +00:00
Randolf J 26e9ff964e Update puppeteer to 15.3.1
Also disables reviewer lookup and fixes boolean arguments for the `roll_front_end_third_party.py` script.

Bug: none
Change-Id: I3fb3538352841551048520f1f1e85f60d91afe24
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3747780
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2022-07-06 17:03:25 +00:00
Jack Franklin 3ceef987a2 [Lint] fix pathing rules for inject_checkbox_styles
I'd made a mistake in the pathing logic for resolving imports; I needed
the _directory_ of the TS file being linted, not the filename itself.

I then also had to update all the tests as they contained incorrect
filepaths which caused me to miss the bug in the first place.

Bug: 1316297
Change-Id: Ie8303291b23d078a9ea1937d28ab3bef73deb258
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3747779
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2022-07-06 12:11:55 +00:00
Jack Franklin 8f8ec22bb3 Update karma to 6.4.0
No changes in the changelog
(https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) to
concern ourselves about, but one useful change is they upgraded the
log4js dependency which was spitting out console messages on each test
run. This is fixed with this version of Karma.

Bug: none
Change-Id: Ic49618cbda7a079cacb9813f5129692a83508a92
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3745621
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-07-05 10:46:37 +00:00
Victor Porof 7e0446e7ad Include applicable state information alongside all the other other property information
This makes it easier to consume the data in the frontend.

Bug: 1325812
Change-Id: I37979a7266af728399a9c4938bf97f77e5781b5b
Signed-off-by: Victor Porof <victorporof@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3702682
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2022-06-15 13:05:36 +00:00
Victor Porof 93f266f30a Eslint-ignore generated DOM pinned properties dataset
This follows the example of the other generated files.
Avoids having to fight the presubmit check on regeneration.

Bug: 1325812
Change-Id: Ia925628fd5025a03b42aaf9e147e43ff752d2764
Signed-off-by: Victor Porof <victorporof@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3702268
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2022-06-15 12:51:46 +00:00
Jack Franklin 06218d9b3c [Lint] fix component naming bug
I had an issue where I'd copied/pasted a component definition but
forgotten to change the litTagName property. I then realised that this
rule wasn't detecting the case where we have duplicate `litTagName`
items and should be, so we now check if we've seen a tag before and
error if so. This ensures no duplicate tag names can exist in any single
file.

Bug: none
Change-Id: I2fe5bdfe3bee6a2d2f52e90f9b80e5c82737f416
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3702263
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2022-06-14 08:59:45 +00:00
John Emau 254c8dd221 Fix for devtools-frontend full checkout paths on Windows
Currently calculating the path to chromium's root directory returns an empty string on Windows because the path used to compare against the executable path is not normalized.

```
PATH_TO_EXECUTED_FILE.indexOf(devtoolsPath)
```
Becomes
```
'D:\\drive\chromium\src\third_party\devtool-frontend\src\...'.indexOf('src/third_party/devtools-frontend'); -> -1 on Windows
```

The fix is to use the normalizedPath variable to return the correct substring.

Change-Id: Ia12232f3746466f3257975d652342ac8b9ed2578
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3703315
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: John Emau <John.Emau@microsoft.com>
2022-06-14 07:03:15 +00:00
Victor Porof d8a8db74c8 Improve in-place array merges when generating the DOM pinned properties dataset
Array#includes is O(n) whereas set lookups are O(1).
We still O(n) to generate the set, but only happens once.

Signed-off-by: Victor Porof <victorporof@chromium.org>
Bug: 1325812
Change-Id: I29da73edf5e42ad4d088fd9018e505d0e787744a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3702261
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2022-06-13 16:48:05 +00:00
Victor Porof 1a8a30d6b4 Add a DOM pinned properties dataset generator
Signed-off-by: Victor Porof <victorporof@chromium.org>
Bug: 1325812
Change-Id: I292d49d273d74d33a82e25179478405395159537
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3695372
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2022-06-13 14:07:20 +00:00
Victor Porof 6e09692deb Add @webref/idl dependency
Signed-off-by: Victor Porof <victorporof@chromium.org>
Bug: 1325812
Change-Id: I044170880d20ce0402062755787cccafd63c6a42
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3695370
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2022-06-13 10:23:45 +00:00
Richard Wang efcbd38590 typescript: Fully replace devtools_use_rbe with devtools_use_remoteexec
BUG=chromium:1247781
DISABLE_THIRD_PARTY_CHECK=Update devtools_entrypoint simultaneously rather than making yet another CL

Change-Id: Id85a820f0ab30a46d0631c6e5581a88c206fa8f9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3694875
Commit-Queue: Richard Wang <richardwa@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2022-06-10 12:01:23 +00:00
Philip Pfaffe 17a9f74a71 Don't build wasm module test inputs in the chromium tree
We currently don't check out emscripten in the chromium tree, so disable
inclusion of the modules that would call emscripten tools in that case.

Bug: none
Change-Id: I7e69d87da6af7a198f6a509a1d2a2b02d6d94341
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3695365
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
2022-06-10 09:55:03 +00:00
Philip Pfaffe e29b186fe5 Generate inputs to wasm tests from wasm text
This CL introduces support for writing inputs to wasm tests in wat
format. This will allow removing dependencies on opaque binary resources
that can't be regenerated without changing hardcoded offsets in all
tests. Referencing binary and/or source file offsets will now be
possible through special comments left in the wat source.

Bug: 1328729
Change-Id: I6369c86ca57860fd9803b894797f63c36c65d554
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3666419
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2022-06-09 17:12:02 +00:00
Eric Leese ed8fe6a3c5 UI polish for authored/deployed grouping
Bug: 1334536
Change-Id: I97a45377ec48f4852e792925771b0790a0415311
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3695547
Reviewed-by: Victor Porof <victorporof@chromium.org>
Reviewed-by: Jecelyn Yeen <jec@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2022-06-09 16:00:02 +00:00
Jack Franklin c03b4c8493 Add undefined checks to lit_template_result_or_nothing rule
My editor errored at me because it tried to lint some code and an
exception was thrown in this rule. I tracked it down to some fields that
we need to ensure exist before continuing. If they don't exist, we can
bail early and not check further.

Bug: none
Change-Id: I32d9a37a7e588e07885f2ba3fa52f2292b9754a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3695546
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-06-09 11:17:34 +00:00
Danil Somsikov b46acf27bd Added tests for the size of chunked response.
These would replace flaky browser tests.

Bug: 1307734
Change-Id: I7812c29de230072b94b3ef097e60de902154551b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3657457
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2022-05-24 11:59:01 +00:00
Johan Bay 4ae584d7a4 Forward mixin interface methods to their includers
This ensures that we have argument hints for things such as
`window.clearTimeout` where `clearTimeout` is defined in a mixin
`WindowOrWorkerGlobalScope` and `Window` includes the mixin.

Bug: 1255619
Change-Id: I8fe2434f0b88bc39454feed3900639f5edc05305
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3660423
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-05-24 08:35:50 +00:00
Johan Bay ebb70e3356 Change JavaScriptMetadata to contain list of receivers
Bug: 1255619, 1327573
Change-Id: I8fbe5a041b1ef5aef519d1b0b76f1bded237bd6f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3580497
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-05-24 07:56:40 +00:00
Randolf J 87999eee8a Update puppeteer to 14.1.1
R=mathias@chromium.org, sadym@chromium.org

Bug: none
Change-Id: I0c0dd6481bcc1814cc293212952c4dd5b2ead0b6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3655470
Commit-Queue: Randolf Jung <jrandolf@google.com>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
2022-05-20 10:20:06 +00:00
Randolf J 5c18744742 [Infra] Add script for auto-rolling front_end/third_party deps
Bug: 1324875
Change-Id: I1160e12382845d67b6bae56787208927db16de52
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3652203
Commit-Queue: Randolf Jung <jrandolf@google.com>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2022-05-18 13:03:26 +00:00
Alex Rudenko ce49c72ced add a whitespace 2022-05-12 11:08:38 +02:00
Randolf J 5cbcb68e9a Update puppeteer from 13.1.1 to 14.0.0
Bug: none
Change-Id: I157e7f5ddff43eb17fe371cc1437a636ad42cd4f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3641417
Commit-Queue: Randolf Jung <jrandolf@google.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2022-05-11 13:38:33 +00:00
Jack Franklin d7508305f9 Enable ESLint rule for LitHtml.LitTemplate
Bug: 1320753
Change-Id: If7e442d3250508c9be9199f1706e73847782197d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3629865
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-05-09 15:06:40 +00:00
Ergün Erdoğmuş 5f638bacef Add eslint rule for binding scheduleRender render argument
Bug: NO_BUG
Change-Id: I64d643a65d0cf4bc3546ed4f75adde7a53c83c4e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3624641
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
2022-05-05 11:06:21 +00:00
Jack Franklin aa70334697 Script to reformat js/ts files with clang-format
During my work to update JS import wrapping, I wrote up a hacky script
to auto-run clang on all JS and TS files. This CL is that script, but
tidied up and made a bit neater. I think it's worth landing as I can
easily imagine us needing to use it again in the future if clang
releases new config options we want to apply.

Bug: none
Change-Id: I43240c0ffab912d77950cb76540ccdfe8fed556c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3627330
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-05-04 11:37:00 +00:00
Jack Franklin a00b89c22a Lint against TemplateResult|typeof nothing
We have a common pattern in our codebase where a function might return a
lit template, or the result of `Lit.nothing` (which is equivalent to
`{}`). Therefore we have a fair amount of code that looks like:

```
foo(): LitHtml.TemplateResult|{}
// or
foo(): LitHtml.TemplateResult|typeof LitHtml.nothing
```

I'd like us to be consistent over which we prefer, but also this feels
like a little bit of an implementation detail that's leaking out - to a
person using our components system, a Lit template result or `{}` are
really equivalent - and we shouldn't have code that cares.

Therefore I'm proposing we expose (this will be done in a separate CL):

```
type LitTemplate = TemplateResult|typeof nothing
```

And then use this ESLint rule to:

1) update existing code to use the new type
2) ban future code from not using the new type

Both of those steps will also be done in a follow-up CL, this CL
introduces the basic rule.

Bug: 1320753
Change-Id: I2f3d5029a695922c9a71334e34259597eaebfcc0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613881
Commit-Queue: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-04-29 16:07:23 +00:00
Mathias Bynens 54303dcc64 Unify developer-facing and user-facing short URLs
For any shortened URLs:

- Use goo.gle for Google Docs and chromium.org target URLs.
- Use g.co for everything else.

Bug: chromium:1321016
Change-Id: I09099dc62b92a14fa68d62155953262328476db2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3613872
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2022-04-29 10:46:23 +00:00
Jack Franklin c70d2688e1 ESLint rule for inlined type imports
This rule is able to merge imports such as:

```
import type {Crumb} from './breadcrumbs.js';
import {BreadcrumbComponent} from './breadcrumbs.js';
```

Into:

```
import {BreadcrumbComponent, type Crumb} from './breadcrumbs.js';
```

It can also inline standalone type imports:

```
import type {X, Y} from './foo.js';
```

Into:

```
import {type X, type Y} from './foo.js';
```

Note: this CL only lands the rule and does not enable it.

Bug: 1319340
Change-Id: I0f7d9e8a6833f836a0e4581d68ee7fd1b27c0edc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3605262
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-04-26 11:54:37 +00:00
Simon Zünd 41c626075a Don't prepend PWD to file paths for natives generation
roll_deps.py was upgraded to Python3 in https://crrev.com/c/3521887.
This changed the paths that are passed to the natives generation script
to be absolute and no longer relative.

To account for this, we no longer prepend the working directory to
calculated paths.

R=jobay@chromium.org

Bug: None
Change-Id: Ia0a0f946e27d61fa64e7856daef0f709fb058365
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3607830
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-04-26 09:43:17 +00:00
Jack Franklin 38391d47f5 Land --no-fix flag to ESLint runner
This is useful sometimes if debugging a new ESLint rule - I've found
myself manually updating the script to disable fixing whilst I figure
something out.

Adding this flag and a separate `lint-check-js` script will make this
easier.

Bug: none
Change-Id: I929b13b09ece40690d630620da162986ed01e790
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3605263
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-04-25 13:00:57 +00:00
Jack Franklin 40a72b0ca0 Remove run_lint_check_js.js
We have run_lint_check_js.mjs which is used in PRESUBMIT, package.json
and on the bots. I think we just forgot to delete the old version.

Bug: none
Change-Id: I91179c3d30c306968774981678a044f3249c1d18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598880
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-04-22 08:22:47 +00:00
Alex Rudenko d990ae300a Improve handling of .spawnSync errors
Fixed: 1198532
Change-Id: Id299bb7700f7a78aad97ad77eee23e4bd0c5b5f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598878
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2022-04-21 15:37:27 +00:00
Jack Franklin 3710bbf933 Upgrade eslint to 8.13.0
Bug: none
Change-Id: I438ea7b8e1c69e85939b1ed60578aa10fe87b821
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598874
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-04-21 10:20:38 +00:00