Commit Graph
147 Commits
Author SHA1 Message Date
Jack Franklin b5a63097ce Ensure ESBuild versions are in sync in PRESUBMIT
We have ESBuild as a dep in two places:

1. `DEPS`, managed by gclient
2. `manage_node_deps.py`, managed by npm

These versions need to match, otherwise any builds that use `esbuild`
will fail in Chrome land. This CL introduces a script and PRESUBMIT
check to ensure that the two versions are in sync.

Bug: none
Change-Id: I7ea9172ae386e4e21e1ac82c208d171b65b29e22
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4067299
Reviewed-by: Liviu Rau <liviurau@google.com>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-01 10:02:04 +00:00
Simon Zünd 9ff4da6ff0 [l10n] Replace collect-strings.js with check-strings.js for PRESUBMIT
Now that we generate en-US.json/en-XL.json at build time, we can
adjust the presubmit script to use "check-strings.js" instead.

R=alexrudenko@chromium.org

Bug: 1185727
Change-Id: I827112dd7059e817d230e0aa342d32128826adea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4046521
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-11-22 12:10:10 +00:00
Philip Pfaffe f4320aa3bc Run presubmit sub-scripts with python3
The presubmit script accidentally has been running sub-scripts using
python2. This not only stands in the way of the python3 migration, but
also causes the protocol resource generation script to add superfluous
trailing whitespaces during presubmit.

DISABLE_THIRD_PARTY_CHECK=Regenerate protocol resources with python3

Bug: none
Change-Id: I67feb8d48bc6c81706e65773693176a3a467ceff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3779542
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-07-21 12:15:15 +00:00
Changhao Han cb6885fe94 Remove unintentional line in PRESUBMIT script
Bug: None
Change-Id: I2cdb5a755d51c999db1b69e45946ac7069834d69
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3769847
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Auto-Submit: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2022-07-18 10:22:23 +00:00
Saba Khukhunashvili 0cdc5a9588 Added javascript_metadata as an exclusive change directory
Added javascript_metadata folder in the EXCLUSIVE_CHANGE_DIRECTORIES, as NativeFunction.js file is generated by roll_deps.py after running the generate-protocol-resoruces.

Bug: none
Change-Id: I80a1341f7de981397eec3f4a0c9b4f2568e167b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3762475
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Commit-Queue: Changhao Han <changhaohan@chromium.org>
2022-07-18 09:58:33 +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 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
Liviu Rau 07128d11d4 Cleanup dead code
Bug: 1130536
Change-Id: I2e3278384d997e315ec3615a61c44e0442b1b66c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3484195
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2022-02-25 09:57:51 +00:00
Tim van der Lippe 800d875627 Add build script tests
You can run these tests with `npm run build-test`, while we also run
them as part of our PRESUBMIT if we make any changes to the build
folder.

R=yangguo@chromium.org
CC=tikuta@chromium.org

Bug: 1293772
Change-Id: Id3b02c83398d2346a4ec5a06f3b938d33070d4f7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439987
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-02-04 13:25:10 +00:00
Tim van der Lippe c2756dca20 Consider all OWNERS changes as exclusive
I have verified locally that the check will error if you create a commit
that includes both a nested OWNERS file and any other change.

R=jacktfranklin@chromium.org

Fixed: 1029775
Change-Id: Ied7875aeb5b805594dc89107ff5e5a1827bf62e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3322832
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-12-08 13:05:28 +00:00
Tim van der Lippe 2ec9790ec5 Remove build_release_applications and friends
This script is now unused and fully replaced by GN. As such, this
concludes the full `module.json` migration and related scripts, which
means we can consider crbug.com/1127902 fixed.

R=jacktfranklin@chromium.org

Fixed: 1127902
Change-Id: I0fde9c4fede0cdc8649e5e455e025a70ed4d2a09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3310869
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-12-02 12:08:02 +00:00
Tim van der Lippe 8aeee41bc7 Remove module.json schema checks
We have now removed all module.json files, so these checks are obsolete.

R=jacktfranklin@chromium.org

Bug: 1127902
Change-Id: Iefe8538474b77f78eed010b0fad9461873bad03c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3310603
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-12-02 11:28:37 +00:00
Tim van der Lippe 6509dba7ff Update lit-html to 2.0.2
R=jacktfranklin@chromium.org

Bug: none
Change-Id: I232931331d85cb3e17fa160d547fb084f8cd9200
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3297843
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-11-24 09:29:23 +00:00
Tim van der Lippe f9e565ef89 Add new run_lint_check_js.mjs
ESLint 8 removed CLIEngine. Therefore, we need to migrate away from
CLIEngine to the main ESLint class (which already exists in ESLint 7).
However, that class is based on promises, which means we can't use them
in a CommonJS context.

Therefore, introduce a new `.mjs` version that uses ES modules (which
can do as we are on a recent version of Node) and use the promise
versions. There are no other functional changes compared to the old
`.js` script.

The reason that we first have to add this file here, is that our CQ
directly refers to the `.js` version. That means we first land this CL,
we update our CQ configuration and only then can we remove the `.js`
file from our repository.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: Iad3656931ae09eb7f9f23b3e6ad7d39c8a761a31
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3268299
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-09 10:25:30 +00:00
Tim van der Lippe 16b822804c Reland "Reland "Update stylelint to 14.0.1""
This reverts commit 2b4a9df2d9.

Reason for revert: subsequent presubmit uploads should be fixed now.

Original change's description:
> Revert "Reland "Update stylelint to 14.0.1""
>
> This reverts commit f2ea2c940d.
>
> Reason for revert: https://ci.chromium.org/ui/p/devtools-frontend/builders/try/dtf_presubmit_linux/b8831129368825517985/overview
>
> Original change's description:
> > Reland "Update stylelint to 14.0.1"
> >
> > This reverts commit 6c0f161c95.
> >
> > Reason for revert: the prerequisite CL (https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259703) has landed
> >
> > Original change's description:
> > > Revert "Update stylelint to 14.0.1"
> > >
> > > This reverts commit 1e08ee816b.
> > >
> > > Reason for revert: tree is closed due to errors https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/8169/overview
> > >
> > > Original change's description:
> > > > Update stylelint to 14.0.1
> > > >
> > > > This also upgrades PostCSS to 8.3.11.
> > > >
> > > > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
> > > > R=​szuend@chromium.org
> > > >
> > > > Bug: none
> > > > Change-Id: I606540b03509d7c6e73f3d490327cd4174e03d31
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259541
> > > > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > >
> > > Bug: none
> > > Change-Id: Icb1c02b41dbccc3b4fc5760f5dd0b78eca078b61
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3263399
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > > Owners-Override: Alex Rudenko <alexrudenko@chromium.org>
> > > Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
> >
> > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
> >
> > Bug: none
> > Change-Id: If132a67ee4253d27114caedd66c5ee61c774a6c7
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264206
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
>
> Bug: none
> Change-Id: Idc6c9f5cc1e225c752799461eb0344e94b4ad1e5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264222
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration

Bug: none
Change-Id: I609941d48b46bfcf454b03dcc75a76d460fbe674
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264223
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-11-08 14:47:39 +00:00
Tim van der Lippe 2b4a9df2d9 Revert "Reland "Update stylelint to 14.0.1""
This reverts commit f2ea2c940d.

Reason for revert: https://ci.chromium.org/ui/p/devtools-frontend/builders/try/dtf_presubmit_linux/b8831129368825517985/overview

Original change's description:
> Reland "Update stylelint to 14.0.1"
>
> This reverts commit 6c0f161c95.
>
> Reason for revert: the prerequisite CL (https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259703) has landed
>
> Original change's description:
> > Revert "Update stylelint to 14.0.1"
> >
> > This reverts commit 1e08ee816b.
> >
> > Reason for revert: tree is closed due to errors https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/8169/overview
> >
> > Original change's description:
> > > Update stylelint to 14.0.1
> > >
> > > This also upgrades PostCSS to 8.3.11.
> > >
> > > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
> > > R=​szuend@chromium.org
> > >
> > > Bug: none
> > > Change-Id: I606540b03509d7c6e73f3d490327cd4174e03d31
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259541
> > > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> >
> > Bug: none
> > Change-Id: Icb1c02b41dbccc3b4fc5760f5dd0b78eca078b61
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3263399
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> > Owners-Override: Alex Rudenko <alexrudenko@chromium.org>
> > Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
>
> DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
>
> Bug: none
> Change-Id: If132a67ee4253d27114caedd66c5ee61c774a6c7
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264206
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>

Bug: none
Change-Id: Idc6c9f5cc1e225c752799461eb0344e94b4ad1e5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264222
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-11-08 12:59:31 +00:00
Tim van der Lippe f2ea2c940d Reland "Update stylelint to 14.0.1"
This reverts commit 6c0f161c95.

Reason for revert: the prerequisite CL (https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259703) has landed

Original change's description:
> Revert "Update stylelint to 14.0.1"
>
> This reverts commit 1e08ee816b.
>
> Reason for revert: tree is closed due to errors https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Linux/8169/overview
>
> Original change's description:
> > Update stylelint to 14.0.1
> >
> > This also upgrades PostCSS to 8.3.11.
> >
> > DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration
> > R=​szuend@chromium.org
> >
> > Bug: none
> > Change-Id: I606540b03509d7c6e73f3d490327cd4174e03d31
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259541
> > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
>
> Bug: none
> Change-Id: Icb1c02b41dbccc3b4fc5760f5dd0b78eca078b61
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3263399
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Owners-Override: Alex Rudenko <alexrudenko@chromium.org>
> Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>

DISABLE_THIRD_PARTY_CHECK=Updating Stylelint configuration

Bug: none
Change-Id: If132a67ee4253d27114caedd66c5ee61c774a6c7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3264206
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-11-08 11:24:28 +00:00
Tim van der Lippe f746fe4a57 Revert "Fix all issues found by StyleLint 14"
This reverts commit fb8852321b.

Reason for revert: breaks the presubmit. Since the tree is closed,
a fix forward is not landing soon. Therefore, let's pre-emptively revert.

Original change's description:
> Fix all issues found by StyleLint 14
>
> These are mostly auto-fixed by Stylelint 14 with a couple of manual
> fixes (adding quotes around urls and fixing some shorthand properties).
>
> A follow-up CL will update us to Stylelint 14, at which point they will
> be enforced.
>
> R=​szuend@chromium.org
>
> Bug: none
> Change-Id: Ia813854accd1eb86eccea64a5fbf1f8534563964
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259540
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Simon Zünd <szuend@chromium.org>
> Reviewed-by: Simon Zünd <szuend@chromium.org>

Bug: none
Change-Id: I155ef7e0633cba15b47439a37a71158b6dcb8f91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259702
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-11-04 16:13:19 +00:00
Tim van der Lippe fb8852321b Fix all issues found by StyleLint 14
These are mostly auto-fixed by Stylelint 14 with a couple of manual
fixes (adding quotes around urls and fixing some shorthand properties).

A follow-up CL will update us to Stylelint 14, at which point they will
be enforced.

R=szuend@chromium.org

Bug: none
Change-Id: Ia813854accd1eb86eccea64a5fbf1f8534563964
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3259540
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-11-04 15:20:38 +00:00
Jack Franklin 03db63a826 Use mocha_path() from devtools_paths in PRESUBMIT
Cleaner and uses a path that is happy on Windows.

Bug: none
Change-Id: Ia1f7952adb7b8a6591a8abc145ad321463f1e6e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3165096
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2021-09-16 14:12:05 +00:00
Jack Franklin 1aa212ddfe Run ESLint tests in PRESUBMIT if changes in eslint_rules folder
Ensures that if a CL touches files in scripts/eslint_rules, we will run
the tests as part of the PRESUBMIT. We have so many rules now and rely
on them to enforce a lot, so it's important we ensure they don't get
broken; currently they are never run on CQ at all so it's easily to
accidentally break it and not realise.


Bug: None
Change-Id: Ic56166404f56787b60eb18b5b375c61dc00ba1df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3151806
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-09-10 15:07:14 +00:00
Simon Zünd fb7befcb75 [i18n] Remove i18n-bundle, the bundling script and the PRESUBMIT check
No users of the bundle left, so it can safely be removed. A last
cleanup step will remove the NPM packages necessary for bundling.

R=tvanderlippe@chromium.org

Bug: 1231873
Change-Id: I372f66339131a280c78514326d3527cbaa6cb6ea
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3055246
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-07-27 14:56:29 +00:00
Tim van der Lippe a53672de83 Check license headers for CSS files during PRESUBMIT
This mirrors the license header checks we perform for
Python-like files and apply the same logic for CSS.

To do so, we modify the relevant regexes and patch
function to use the correct version of comment structure
for CSS files (which use `/*` rather than `#` as delimiters).

R=jacktfranklin@chromium.org

Bug: 1106746
Change-Id: I51d51e9b793a1015aeb20a3b3a55e075c2ee748f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3014756
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-13 12:28:56 +00:00
Christy Chen ab9a44d9de Fix devtools experiment UserMetrics and presubmit check
There are missing entries for DevTools experiment in the UserMetrics emun, and the presubmit check has been broken so the issue didnt get caught.
This CL fix the DevTools experiment userMetrics and presubmit check

Bug: 1226082
Change-Id: I881a846b3d988746fb96ffd91eb16789198c2e3a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3002943
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2021-07-05 13:19:15 +00:00
Jack Franklin 6c391a0969 [DarkMode] remove cmdevtools.darkmode.css
This CL re-writes `cmdevtools.css` to migrate all the colors over to
CSS variables, and defines those colors in dark mode also. To generate
this CSS I wrote a very hacky script that parsed the original CSS,
found all the colors, and then generated the variable names and
values. It used the original legacy color patching code to generate
the dark mode values.

Given `cmdevtools.css` now contains all dark mode overrides, this CL
removes the darkmode stylesheet for `cmdevtools.css`. Given that it's
the only dark mode CSS sheet, this CL also removes all the
infrastructure for generating and checking these sheets are up to
date.

The motivation for doing this work is that maintaining the darkmode
CSS stylesheets means we have to keep the legacy patching around in
order to (re)generate the stylesheets. Doing this one off script to
move all the overrides into the original file means we don't need to
keep the legacy patching around.



Bug: chromium:1152736
Change-Id: I0cf07d54370716299819478356b42728e0e3aadb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982137
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-06-25 10:53:26 +00:00
Tim van der Lippe 25f1108994 Reland "Cleanup path handling in collect-strings"
This reverts commit 29fe69257e.

Reason for revert:
1. Fix Windows compatibility by fixing the various
path separators to use UNIX when they need to be UNIX.
2. Ensure that whenever we change this script, we run the corresponding
PRESUBMIT. Otherwise, you can submit a CL that passes presubmit, but
starts failing on a later CL.
3. Lastly, let's output the full `git diff` so that it makes it easier
to investigate these kind of problems. Example git diff I used:
https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8843531480879659408/+/u/presubmit_py3/stdout

DISABLE_THIRD_PARTY_CHECK=Fixes in presubmit and presubmit script

Original change's description:
> Revert "Cleanup path handling in collect-strings"
>
> This reverts commit 7b72fbf5d6.
>
> Reason for revert: speculative revert based on https://ci.chromium.org/ui/p/devtools-frontend/builders/try/dtf_presubmit_win64/b8843551589142089360/overview
>
> Original change's description:
> > Cleanup path handling in collect-strings
> >
> > While reading through this script I spotted a lot of duplication
> > of `front_end` in its path handling. Since we assume that all
> > strings are collected from `front_end/`, we can pass in that
> > path and use that, cleaning up most of the path concatenation
> > in the script.
> >
> > DISABLE_THIRD_PARTY_CHECK=Path handling fixes in collect-strings
> > R=​szuend@chromium.org
> >
> > Bug: none
> > Change-Id: I0e7d004ad4d1d16f92cd88f3fed94dfe4c4108b0
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982134
> > Reviewed-by: Simon Zünd <szuend@chromium.org>
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
>
> Bug: none
> Change-Id: I6e1ac7046950f78aa7339efb21559ff60f3d50f7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982147
> Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>

Bug: none
Change-Id: Ia42890a67e53abdc9bacfb9e98cf06a975148bde
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2983032
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-06-25 04:52:17 +00:00
Tim van der Lippe 29fe69257e Revert "Cleanup path handling in collect-strings"
This reverts commit 7b72fbf5d6.

Reason for revert: speculative revert based on https://ci.chromium.org/ui/p/devtools-frontend/builders/try/dtf_presubmit_win64/b8843551589142089360/overview

Original change's description:
> Cleanup path handling in collect-strings
>
> While reading through this script I spotted a lot of duplication
> of `front_end` in its path handling. Since we assume that all
> strings are collected from `front_end/`, we can pass in that
> path and use that, cleaning up most of the path concatenation
> in the script.
>
> DISABLE_THIRD_PARTY_CHECK=Path handling fixes in collect-strings
> R=​szuend@chromium.org
>
> Bug: none
> Change-Id: I0e7d004ad4d1d16f92cd88f3fed94dfe4c4108b0
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982134
> Reviewed-by: Simon Zünd <szuend@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

Bug: none
Change-Id: I6e1ac7046950f78aa7339efb21559ff60f3d50f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982147
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2021-06-24 10:18:18 +00:00
Tim van der Lippe 7b72fbf5d6 Cleanup path handling in collect-strings
While reading through this script I spotted a lot of duplication
of `front_end` in its path handling. Since we assume that all
strings are collected from `front_end/`, we can pass in that
path and use that, cleaning up most of the path concatenation
in the script.

DISABLE_THIRD_PARTY_CHECK=Path handling fixes in collect-strings
R=szuend@chromium.org

Bug: none
Change-Id: I0e7d004ad4d1d16f92cd88f3fed94dfe4c4108b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982134
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-06-24 09:34:57 +00:00
Tim van der Lippe 727227900c Dynamically optimize svgs
Currently, we optimize our SVGs out-of-sync and have a Python
script and PRESUBMIT check to make sure that the SVGs are correctly
optimized. This means that the SVGs are duplicated in the Images
folder and requires developers to install `svgo` on their command
line, which could be using differing versions.

Instead, we can optimize the SVG images (which is computationally
cheap) during build time using the rollup-plugin-import-meta-assets
and svgo packages. The rollup plugin traverses the required SVG
image files and puts them and rewrites them to the Images/ folder
(rather than in src/), while also allowing us to optimize them
along the way.

DISABLE_THIRD_PARTY_CHECK=Removing script from package.json
R=jacktfranklin@chromium.org

Bug: 1216402
Change-Id: Ieb6932b9a81753be5ecbccd00a5d84bd0efa23f8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2939994
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-06-10 10:09:30 +00:00
Tim van der Lippe fa6dd1ce97 Remove package.json from exclusivity check
When we update node_modules, we don't modify the package.json
file. Therefore, this file should not be included in the
exclusivity check.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: I353efdd415ff1288268ee8724d64da6ed1de762f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2939995
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-06-04 13:02:06 +00:00
Tim van der Lippe 69775386db Update TypeScript to 4.3.2
Also fix the presubmit bug that prevents us from uploading
any new updates to the node_modules from Mac, as that installs
`fsevents`, which has a binary file that can't be checked.
For more information on that, see
https://bugs.chromium.org/p/chromium/issues/detail?id=1210746#c32

DISABLE_THIRD_PARTY_CHECK=PRESUBMIT fix
R=szuend@chromium.org

Bug: 1210746
Change-Id: Ie1a62698456384be2298adfd8deaa6735bf76337
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2922502
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2021-05-27 18:52:33 +00:00
Tim van der Lippe 8b929548c0 Also add license headers for .gni files
R=jacktfranklin@chromium.org

Bug: 1213449
Change-Id: I3228629bbaa1c3824a721a93782356ec71855513
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2919951
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-26 16:19:23 +00:00
Tim van der Lippe 81752507db Integrate license header check in PRESUBMIT
Also fix the script to only allow absolute paths, since the presubmit
script handles absolute paths only.

R=jacktfranklin@chromium.org

Bug: 1213449
Change-Id: Id1c0c55ec1c039eadd343445645655910b06da8c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2919950
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-05-26 15:06:53 +00:00
Tim van der Lippe 2a1eac282b Remove leftover from protocol-proxy-api global removal
This should have been included in https://crrev.com/c/2891760

R=jacktfranklin@chromium.org

Bug: 1208357
Change-Id: I27c9bbadad03a20f62bb2fdd97f844dc4852096f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2894392
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-13 16:22:04 +00:00
Tim van der Lippe fb1dc17ed6 Run PRESUBMIT with Python 3
By specifying USE_PYTHON3 = True at the top of the file,
we run the presubmit checks with Python 3. Most of the
required fixes are related to handling the subprocess
output (which changed from str to bytes) and handling
`len` on the output of `filter`.

R=dpranke@google.com,jacktfranklin@chromium.org

Bug: none
Change-Id: I8740b2a035cf7015cfb972c9b147bd53d49f1bd6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886934
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
2021-05-11 16:27:57 +00:00
Tim van der Lippe e622f55864 Move component_docs to ui/components/docs
R=jacktfranklin@chromium.org

Bug: 1187573
Change-Id: I2f8225ba1b9fc9848cf497ec0235756ace0f4831
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2826290
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-14 15:08:31 +00:00
Brandon Goddard e34e94f8f7 Presubmit: Limit number of files in JS style check
On very large CLs, it's possible that we can run into the same windows
command line length issues for the _CheckDevToolsStyleJS as _CheckDevToolsStyleCSS.

This CL imposes the same 50 file limit as the CSS style check.

Bug: 1198243
Change-Id: I84561dcd37c88c00ceb141cfc21adc050a9544cf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2821307
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-13 14:52:58 +00:00
Tim van der Lippe 4050a30a11 Fix path separators for Windows in presubmit
This should now properly support autoroll CLs to no longer having
to disable this check.

R=alexrudenko@chromium.org

Bug: none
Change-Id: I079b76db2e8cc3e2990894d1e58227ca01e8c578
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2822644
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2021-04-13 09:49:37 +00:00
Tim van der Lippe 90b9cac6dd Add front_end generated to exclusive change directories
This should allow DevTools protocol rolls to no longer require
disabling this check and should also catch other CLs that make
changes to the generated source to be blocked if required.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: I704ec03c7e89b2076adc4f733abf1695575035a7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2817812
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-12 12:03:13 +00:00
Tim van der Lippe 239963b301 Add unexpected files to presubmit error
This makes it easier to debug which files are incorrectly bundled
with other changes.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: Ifdf56da22a164cc2bbc762f79d80f70122f6057e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2817078
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2021-04-09 15:23:23 +00:00
Jack Franklin a5840547ae Ensure dark mode CSS files are regenerated if scripts change
Fixed: 1197060
Change-Id: Id34e0da87a35af780655c233e0d5622408205803
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2814661
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-04-09 09:32:04 +00:00
Tim van der Lippe 2b488033ba Fix exclusive directory change check for NPM updates
Whenever we update packages, we update all of these files in one
CL. Therefore, allow them to be exclusive with each other, so that
we don't have to disable the check for any NPM update we do.

R=jacktfranklin@chromium.org

Bug: none
Change-Id: If4827366e2ca3419794d78cf8c083eec30f6c534
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2815122
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-04-09 08:46:03 +00:00
Tim van der Lippe 2e143870f7 Move owners files into config/owners
The separate *_OWNERS files are related and can be grouped together
in a folder to make this distinction clear. This will allow us
to update the PRESUBMIT script to explicitly mark them as
exclusive change directory.

Note that the directory is named "owner", as we can't name it
"owners" as that is case-insensitive equivalent to "OWNERS",
which Windows can't handle in its presubmits.

DISABLE_THIRD_PARTY_CHECK=OWNERS update
R=yangguo@chromium.org

Bug: 1187573
Change-Id: Ib94a544c9dc01f788a8b75a5c8111ab52fbc27b8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2814658
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2021-04-08 12:25:52 +00:00
Jan Scheffler b4eb22da3a [JSDOC2TS]: Migrate main
Bug: chromium:1158760
Change-Id: Ibe9b0fe480794bb788253a3b9902d4cc42a5ca2e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2789347
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-04-05 21:15:07 +00:00
Tim van der Lippe e0247311ec Move host to core/host
R=aerotwist@chromium.org

No-Presubmit: true
Bug: 1187573
Change-Id: I836c98bbd5b05f4595e28cedfaf957a6f47c7807
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2799755
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-04-01 15:00:23 +00:00
Jack Franklin d34cf33f8d Re-enable dark mode CSS PRESUBMIT check
Bug: chromium:1188524
Change-Id: Ic599036e5c861c016574665fbd1b419d9e1cd0b9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2782552
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-03-24 11:03:11 +00:00
Jack Franklin b10193ff1f Disable dark mode presubmit.
Whilst the dark mode CSS files are not being used, we don't need to
check them.

Bug: chromium:1188524
Change-Id: I670392e3a0d30fc57351c4561c0d89f76953fb61
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2773235
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
2021-03-19 12:18:08 +00:00
Christy Chen 5e32bcbcf7 [Loc] Un-hook presubmit scripts
The Localization presubmit steps include checking Loc V1 and V2:
V1: Done with migration, safe to remove
V2:
- check unused string in UIStrings (Moved to ESLint)
- check migrated directory (Done with migration, safe to remove)
- check the shape of API calls (Done by typescript or ESLint)

Since all checks are obsolete or moved, this CL removes the presubmit step to unhook the scripts inside scripts/localization. I will follow up a CL to remove the actual scripts.
The CL that introduced this step https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1931279


Bug: 1136655
Change-Id: If203607588896693a6331de606c873458b74cd6e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2746919
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Christy Chen <chrche@microsoft.com>
2021-03-11 03:32:57 +00:00
Sigurd Schneider f3a1ecdeec Don't check file-by-file in presubmit if there are more than 50..
..changed files. Otherwise changes have a max-size because on Windows
the command-line length is limiting. This allows large CLs such as
https://crrev.com/c/2720369/1 to land.

Bug: chromium:1166108
Change-Id: I87c871a77e46ee8b300aab0acf748755ea165f1a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2727708
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-03-02 15:57:57 +00:00
Jan Scheffler 9aca8c7402 [JSDOC2TS]: Migrate host
Bug: chromium:1158760
Change-Id: I86a4477d44617adac598f107755fbd3db49d7bf2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2718291
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-26 17:18:55 +00:00