Commit Graph
1327 Commits
Author SHA1 Message Date
Liviu Rau 005e716799 Update screenshots directly from failing CQ builders
This improves the process of updating screenshots in Interaction tests by collecting the screenshots already generated when devtools_frontend* builders fail.

Deprecates scripts/tools/update_goldens.py (v1) which need to be kept here until we update other impacted projects.

Bug: chromium:1413723
Change-Id: I37ba934d37d2287f105c76fe5bca5018078a9031
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4286875
Commit-Queue: Liviu Rau <liviurau@google.com>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2023-03-06 16:48:38 +00:00
Philip Pfaffe 75e3ab637d Fix debug-test script and add it to workflow docs
Bug: none
Change-Id: Ie09da21bc697643f3b62e52c27310f8af4a5e38f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4294987
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
2023-03-01 12:17:55 +00:00
Al Muthanna Athamina 40d1b8a912 Add parallel execution command for E2E testing
Bug: none
Change-Id: Id5a960dfb19aa3629a44f8d4a5e874551cf2e1b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4274348
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@google.com>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2023-02-23 10:57:26 +00:00
Liviu Rau 5d2ee7226b Support custom platform names
The platform name `win64` is tight to infra/config branch and hard to modify to `win`, as it is by default in the other projects. As a followup cleanup I will reverse the default to `win64` and update the other projects.

Bug: chromium:1413723
Change-Id: I5359b74c224d00e1bf05d7f694af4669bdd63984
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4282201
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2023-02-23 09:29:58 +00:00
Jack Franklin 1a8d0b7d88 Make no_only_eslint_tests autofixable
Small annoyance I wanted to fix :). For clarity, this only applies to
the use of `only: true` in ESLint tests

Bug: none
Change-Id: I9393784dfd7ec4163a4fc9714714b5eb8cb74ee9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4280824
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2023-02-22 15:40:27 +00:00
Jack Franklin 677c2657d0 Make eslint no_only rule autofixable
It has annoyed me for a while that I have to manually do this, with this
change it will be done automatically when running ESLint with fixes
turned on.

Bug: none
Change-Id: I7afc47bf9d28f85ca8d48e3c33e2448346812a07
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4280822
Commit-Queue: Simon Zünd <szuend@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-02-22 14:42:55 +00:00
Jack Franklin 84f48b20ac Fix false positive in enforce_custom_event_names lint rule
The issue here was that in SDK we have an actual class called Event,
which was messing with the rule which assumed that any extending of
Event was extending the built in HTML Event class. The rule is now
updated to detect locally declared Event classes, and not run the rule
in this instance.

Bug: none
Change-Id: Ib90054728566cb55d367a241130d70b81aeb1e79
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4262676
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2023-02-17 11:42:58 +00:00
Jack Franklin c8db49a9f2 Add ConstructedEvent and PayloadEvent to TracingModel
This is the first step in differentiating between events that map 1-1
onto a trace event payload and those that we construct.

Also includes a drive-by fix to the ESLint custom naming rule to fix an
error when the class it is trying to lint does not have a constructor
and does not call super(). A further fix for the fact that this custom
events rule flags false positives in this file is implemented in
crrev.com/c/4259791, at which point we will not have to disable the rule
in this file.

Bug: 1416836
Change-Id: Ia943fa95aeed74b6dc5e51d240a92cc945d02a89
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4259796
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2023-02-16 13:24:01 +00:00
Jack Franklin 145cf30076 Fix ESLint custom names not respecting custom Event class
This ESLint rule assumes that if a class extends an Event class, it is
extending the built in class and applies checks accordingly. However, if
we are in code that has a local Event class defined, then we should not
apply this check.

Bug: none
Change-Id: I1ce94299074c44812fd2845fe7e487a2c14b140c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4259791
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2023-02-16 12:54:27 +00:00
Ari Chivukula 52c774ad47 [Deprecations] Fix devtools string escaping
I noticed that in c++ I had to manually add an extra backslash to escape
the message in codegen, so I checked and saw that in:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/generated/Deprecation.ts;drc=6b47192b2e719a562ef1a88e19bc7572e6a187ab;l=16
CanRequestURLHTTPContainingNewline had `\(n|r|t)` as part of the
message, but that once the string was extracted in:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/devtools-frontend/src/front_end/third_party/lighthouse/locales/en-US.json;drc=de6c4e5973980ad98d7d1699faa4e1059f102c4d;l=2120
it became `(n|r|t)` because \( isn't a valid javascript escape.

I added the same fix I did in c++ and replaced \ with \\ in the codegen
to preserve the intended escape that's lost in the python string decode.

Bug: 1411444
Change-Id: Iead1a2909a63eba3ea39c5f0524c63fb532534de
DISABLE_THIRD_PARTY_CHECK=Fixing codegen
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4240938
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
2023-02-10 20:17:24 +00:00
Liviu Rau a9e61a6ed5 Add support for project configurations
Bug: chromium:1413723
Change-Id: Ie18a59e9794a7d13a024ec9076d51f5432b2ef39
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4236123
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Liviu Rau <liviurau@google.com>
2023-02-09 12:07:33 +00:00
Ari Chivukula 6b47192b2e [Deprecations] (5) Replace browser_protocol.pdl enum {DEVTOOLS}
This is a reaction to the change from
https://chromium-review.googlesource.com/c/chromium/src/+/4226621

If you want to wait for
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4227697
To go in and have me rebase that's fine.

This CL is part of a series:
(1) Add deprecation.json5 file
(2) Add existing deprecations to deprecation.json5
(3) Copy deprecation.json5 into devtools_frontend via update flow
(4) Update README to reflect devtools codegen
(5) Replace browser_protocol.pdl enum
(6) Codegen c++ code

Bug: 1411444
Change-Id: Ia38af483be2ec52cd5a709deb69313271c1c9464
DISABLE_THIRD_PARTY_CHECK=The protocol changes force codegen changes
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4231800
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
2023-02-08 18:15:29 +00:00
Liviu Rau 3fd21361b6 Add script to update screenshots
This prepares the necessary tools for updating screenshots on multiple platforms at once. The actual screenshot builders will be added later on infra.

Bug: chromium:1413723
Change-Id: Iad17ff1a3e26064dc8831343c9a71acac21742c3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4228073
Commit-Queue: Liviu Rau <liviurau@google.com>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-02-08 09:28:26 +00:00
Simon Zünd 2ce6754100 Auto-generate deprecation info from rolled blink file
We now roll a "deprecation.json5" file from blink into DevTools that
serves as the canonical source for deprecations: It contains the
english message + note for translators as well as additional
metadata such as milestone and chrome feature number.

To use the .json5 in a somewhat type-safe way, we generate
TypeScript that is type-checked against the DeprecationIssueType
from CDP.

Note that we also generate a standard UIStrings structure that
we'll import in "DeprecationIssue.ts". An alternative would be to
collect to strings directly from the .json5 but that would
complicate "npm run collect-strings" as we'd have to teach those
scripts how to parse the .json5.

DISABLE_THIRD_PARTY_CHECK=Add newly generated file
R=alexrudenko@chromium.org

Bug: 1411444
Change-Id: Ifcfd4291ebfc3a70c100ba4a5fbefc485d4a5493
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4227691
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-02-07 11:06:16 +00:00
Randolf 51ffdadc72 Update @puppeteer/replay to 2.9.0
Bug: none
Change-Id: I0372a04e8714f11338d7df7c2b2ce21b24f3048a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4226464
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Randolf Jung <jrandolf@chromium.org>
2023-02-07 04:50:44 +00:00
keno deacf6fa7a Enable roll_deps.py to use working tree of Chromium repository
Currently, roll_deps.py only supports to roll up ToT of Chromium
repository. If working tree is dirty, it fails in
`git checkout origin/main`.

This CL adds to it a --ref option to control which of ToT or working
tree is used. This enables a new development flow: Write CDP changes
and backend code, and check it using frontend before CL lands.

Bug: none
Change-Id: Ic386d62addec124e9c4c01c3a0bb4469e9193de9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4197025
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ken Okada <kenoss@chromium.org>
2023-02-02 13:08:56 +00:00
Alex Rudenko 71be973357 Use correct autoninja filename on Windows
See https://docs.python.org/3/library/os.html#os.name

Fixed: 1411728
Change-Id: I57498dace944d655cfd6cc1f4423dfc8cfd415e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4217072
Reviewed-by: Simon Zünd <szuend@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-02-02 11:00:16 +00:00
Ari Chivukula 4cea92544d [Deprecations] (3) Copy deprecation.json5 into devtools_frontend via update flow
We need a way to roll the new deprecations file into devtools via the
standard update flow as follows:
./scripts/deps/roll_deps.py ~/chromium/src ~/devtools/devtools-frontend
npm run generate-protocol-resources

Design Doc:
https://docs.google.com/document/d/1oFiM_GFXX4VKI5L6k78Lvh1fItJgmN2LheEGoh9QuSY/edit#

This CL is part of a series:
(1) Add deprecation.json5 file
(2) Add existing deprecations to deprecation.json5
(3) Copy deprecation.json5 into devtools_frontend via update flow
(4) Codegen c++ deprecations code

DISABLE_THIRD_PARTY_CHECK=Adding new file to roll
Bug: 1411444
Change-Id: I9124555f4e499283ecc7f9aa79a4e289021e3458
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4213711
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Ari Chivukula <arichiv@chromium.org>
Auto-Submit: Ari Chivukula <arichiv@chromium.org>
2023-02-02 10:04:16 +00:00
Andrés Olivares 205bf68542 Check for obsolete screenshot test goldens on PRESUBMIT
Porting the internal script to devtools-frontend. Folders are created for each platform to prevent file not found errors.

The implementation is almost identical to the internal version, except:

  - Support for windows presubmit bots, on which this didn't run before.
  - Interactions root folder is passed as an argument to the script.

Bug: 1407638
Change-Id: Ia373ad258071cdcc0f7e5b417fcc2301d43084ce
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207837
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2023-02-01 12:59:59 +00:00
Andrés Olivares b0384e77be Lint against screenshot tests outside perf panel interaction test base
A new rule is added that checks that calls to itScreenshot are only made
within the newly added directory for the Performance Panel interactions
tests. This plus the rule that ensures screenshots are asserted in an
itScreenshot block, restrict using the screenshot test API outside of
the mentioned directory.

Bug: 1407638
Change-Id: I6cff308e9c150bfa231bd65b6190aa293273910a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207836
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-01-31 15:01:42 +00:00
Andrés Olivares 839c2883b1 Add eslint rules for screenshot tests
Bug: 1407638
Change-Id: Ib5dad1c48dda4bfd34eaaf069d1c4d46205071dc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4203273
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2023-01-31 13:34:18 +00:00
Randolf 3ec89ccf6b Add @puppeteer/replay to test dependencies
This PR adds @puppeteer/replay for dogfooding in replay E2E test.

Bug: 1411188
Change-Id: I4c65fce494df70c01d862e99c5f355d578ae0bfa
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4206547
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-01-31 12:47:43 +00:00
Randolf cc8925401c Update puppeteer to 19.6.2
DISABLE_THIRD_PARTY_CHECK=Files need updating

Bug: 1410437
Change-Id: I510c33a2435e03a6d0bcc389b062741490161083
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196856
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2023-01-28 00:27:27 +00:00
Simon Zünd 9e2c759bea Revert "Update puppeteer to v19.5.0"
This reverts commit 7f8017513a.

Reason for revert: Suspected to increase overall flakiness of our e2e suite. As a precaution we'll roll back and get the tree into a green state first.

Original change's description:
> Update `puppeteer` to v19.5.0
>
> DISABLE_THIRD_PARTY_CHECK=Need to patch files for update
>
> Bug: none
> Change-Id: I6bbde8b41ba99bfb797a03595a709d56d95cb04d
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4146170
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Randolf Jung <jrandolf@chromium.org>

Bug: none
Change-Id: Ic1fb9df3a160f553e62f1df2ade6e0ba523663c5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4172908
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-01-17 08:05:38 +00:00
Randolf 7f8017513a Update puppeteer to v19.5.0
DISABLE_THIRD_PARTY_CHECK=Need to patch files for update

Bug: none
Change-Id: I6bbde8b41ba99bfb797a03595a709d56d95cb04d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4146170
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
2023-01-16 21:08:51 +00:00
Dustin J. Mitchell 1526a1b58a Add an error message when chrome binary is not found
This avoids confusion (such as I just encountered!) when trying to run
tests just exits immediately with no information.

Change-Id: I369f0082948f2deae5e90e24aa68d57bfb608a9b
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4166281
Auto-Submit: Dustin Mitchell <djmitche@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2023-01-16 08:10:32 +00:00
Jack Franklin 37d35582c9 Add BUILD.gn DEP validation
This CL adds a script that takes a directory and will validate that all
JavaScript dependencies that are imported are also defined in BUILD.gn,
and vice-versa.

=> node scripts/deps/sync-build-gn-imports.js\
    --directory=front_end/models/trace

The script is non recursive.

You can also execute the tests: `./node_modules/.bin/mocha
scripts/deps/tests`. These are only run locally and not yet run on CQ,
although I suspect we should have them run automatically.

This CL doesn't enable this script to run in anyway; the long term goal
is to have it run in a PRESUBMIT, however testing it locally has
uncovered quite a few invalid BUILD.gn files, so we'll need to fix them
one by one and enable the script incrementally.

Bug: 1402989
Change-Id: I587ba1a18a2edf7a126bda651cab79862e9ba525
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4115751
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-22 15:13:54 +00:00
Jack Franklin c8d5dd2e7c Apply JSDoc alignment rule to scripts/ directory
I mistakenly applied this rule only to `*.ts` files, but we should apply
it to JavaScript files also.

Bug: none
Change-Id: I6c7af0e897e06a7a04ec3dea83fcbd9719744705
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4111459
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2022-12-21 16:26:37 +00:00
Jack Franklin fd72c071cc Enforce alignment of JSDoc comments
This CL adds the eslint-plugin-jsdoc plugin and enables just one rule,
`jsdoc/check-alignment`, which ensures that all the lines in a comment
are correctly aligned. For example:

```
/**
* foo
 * bar
*/
```

Would fail the check and be corrected to:

```
/**
 * foo
 * bar
 */
```

DISABLE_THIRD_PARTY_CHECK=deliberate install + use of
eslint-plugin-jsdoc node_module

Bug: none
Change-Id: I969983cd550653654a334ede3409b8c850467245
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4110906
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-21 12:30:47 +00:00
Jack Franklin 0ad9b52d3f Create rule to ban certain imports in directories
Created because to enable certain code to run in workers you need to ban
certain modules from being used - in this case, SDK. We can enable this
rule in directories as required.

Bug: 1399455
Change-Id: I129838897127532743167d4b09ccbd6fb2b43b9b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4114281
Commit-Queue: Andres Olivares <andoli@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-19 15:41:50 +00:00
Jack Franklin a682d93584 Re-enable cssnano with "lite" preset
We had to disable CSSNano because it was causing broken fonts in release
builds (exact reason TBC). This CL installs the `cssnano-preset-lite`
package which applies only the following optimisations:

1. remove whitespace
2. remove empty rules (e.g. `div{}`).
3. remove comments

This should be far less risky and unlikely to cause unexpected
breakages.

DISABLE_THIRD_PARTY_CHECK=installed & used cssnano-preset-lite in the
same CL.

Bug: 1399763
Change-Id: I7fdd8b70b02a2c1a5e1c71a87c7ba145114e6e4b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4111923
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-16 12:38:30 +00:00
Alex Rudenko e477438529 Disable CSS minification
The new minifier seems to break CSS in the subtle way (different font is used in release builds) and it prevents the roll [1]. changhaohan@ bisected the failure to css-nano rollout. I think a potentially increased binary size is better than a broken roll or bugs, so I suggest we disable CSS min for now.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/4105761

Bug: none
Change-Id: Ie663f4d3b048b9e1e5e6f84bce296e169a5a3203
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4104382
Reviewed-by: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2022-12-14 11:33:47 +00:00
Jack Franklin b57f569bc2 Remove clean-css from manage_node_deps
Bug: 1399763
Change-Id: If226ddc2469fbd3c65e3b71e50003b99f08f8bf0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092735
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-12 10:58:53 +00:00
Jack Franklin 5e0a670680 Fix generate_css Ninja input
Now we are using CSSNano, not clean-css, this input needs to be updated
before we remove clean-css from the build.

Bug: 1399763
Change-Id: I2adc192d9f79bc99df7dd1a178e4bdb3c5e3feeb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092736
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-12-09 15:17:11 +00:00
Jack Franklin c712a3e629 Move generate_css_js_files to use cssnano
Bug: 1399763
Change-Id: I96964df8eb6c8979d5f208aa442687c439acaa7b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092364
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2022-12-09 12:57:29 +00:00
Jack Franklin a5fd0a412d Add cssnano
The CSS minifier we currently use (clean-css) is not maintained and
lacks support for new CSS features. CSSNano is a replacement that
supports features we need (primarily container queries).

This CL only adds the relevant dependencies, and does not use it. I will
do that (and remove clean-css) in a follow-up.

Bug: 1399763
Change-Id: I899ecc4482164404dd5ac2fd13f92fb797978e29
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092305
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-12-09 12:08:23 +00:00
Jack Franklin 43f33bfab5 Add tests for generate_css_js_files script
No functional changes here - but we will be making changes in the future
to this script, so I think adding a few tests is a good idea.

The changes to the source code are purely to allow the relevant function
to be tested easily, and there are no actual output changes here.

Bug: 1399763
Change-Id: I7fec01f62ea2b034b175071aa1dd92a9d3df51b6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4092303
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
2022-12-09 10:58:02 +00:00
Jack Franklin df0e9312aa Add ESLint rule for commented out import statements
This is something I've been caught out with a few times when moving code
round, and thought it would be a good ESLint rule. I've enabled the rule
as part of this CL as we currently have few issues that need fixes.

Bug: none
Change-Id: I72c6aad3e4258fbda280e062f98823a068c6bfc8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4076326
Reviewed-by: Andres Olivares <andoli@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-05 11:24:51 +00:00
Jack Franklin 5ee20e32de Revert "Update ESBuild to 0.15.16"
This reverts commit 4b5ea512d3.

Reason for revert: causing failures on waterfall

Original change's description:
> Update ESBuild to 0.15.16
>
> A reland of my failed CL yesterday that caused issues; these were caused
> by me updating the DEPS version but not the node_modules version, which
> I have now updated in this CL.
>
> DISABLE_THIRD_PARTY_CHECK=purposeful update of ESBuild in two places.
>
> Bug: none
> Change-Id: I0a59296d7ad7a276e7f807d8154eb68a05d75451
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4061716
> Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@google.com>
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>

Bug: none
Change-Id: Ia26c87ec87a6160f268c2e7455621099b4c2784e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4067325
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2022-12-01 10:38:13 +00:00
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
Jack Franklin 4b5ea512d3 Update ESBuild to 0.15.16
A reland of my failed CL yesterday that caused issues; these were caused
by me updating the DEPS version but not the node_modules version, which
I have now updated in this CL.

DISABLE_THIRD_PARTY_CHECK=purposeful update of ESBuild in two places.

Bug: none
Change-Id: I0a59296d7ad7a276e7f807d8154eb68a05d75451
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4061716
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Liviu Rau <liviurau@google.com>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2022-12-01 09:52:59 +00:00
Jack Franklin cc58dfaae4 Add npm run install-deps note to manage node deps script
Bug: none
Change-Id: I61ccd40e837c4c5b2a440e229c143bc302cec6e4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4061692
Reviewed-by: Nancy Li <nancyly@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2022-11-29 10:46:11 +00:00
Jack Franklin 2703ce56ba Upgrade @typescript-eslint packages
After upgrading TS to 4.9, we need to upgrade these packages so they can
parse the new TS features (such as the `satisfies` keyword).

Bug: 1392651
Change-Id: I85466727628e37b5b63c0f1e45484324fd05b8fb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4046522
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
2022-11-28 11:31:39 +00:00
Nancy Li 6403713b4d Update types
- Update `@types/node` packages to the latest version

Bug: none
Change-Id: I0caaa8c1a889e0ce593da6458563e305101e44af
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4048320
Auto-Submit: Nancy Li <nancyly@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
2022-11-22 16:47:17 +00:00
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