Jack Franklin
fc495906c3
Enforce no TS non-null bang assertions
...
This CL bans the TS `!` operator which is used to assert not null.
Typically when we use this we are making errors harder to track down
should the value actually end up being null. Checking it takes more work
but will give nicer errors.
Fixed: 1154182
Change-Id: I11599541c199204e4ca21c9fd81a256614d70389
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566804
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2020-12-02 14:46:50 +00:00
Tim van der Lippe
bfcaca046e
Update remaining outdated packages
...
- Update yargs to 16.1.1
- Update @rollup/plugin-commonjs to 17.0.0
- Update @types/codemirror to 0.0.100
- Update Puppeteer to 5.5.0
- Update Rollup to 2.34.0
DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org
Change-Id: Ie3ed95b7c83ec615122643769ff5c53ac4111c09
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567910
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-12-02 13:07:39 +00:00
Christy Chen
5d7848d54d
Reland "[Loc] Migrate changes tool to localization V2"
...
This reverts commit 9e5ab71e50 .
Reason for revert: The Cl was reverted due to devtools pak file limitation. That issue has been fixed in https://chromium-review.googlesource.com/c/chromium/src/+/2558341
Original change's description:
> Revert "[Loc] Migrate changes tool to localization V2"
>
> This reverts commit abcb8f7aa8 .
>
> Reason for revert: Consistently causing autoroll issues when rolling devtools-frontend into Chromium - see https://chromium-review.googlesource.com/c/chromium/src/+/2554521 for an example.
>
> To recreate this, do a debug build of Chromium with this patch applied to DevTools. It's causing an issue with duplicate keys in the pak files. No DevTools Frontend builds do a debug build of Chromium with the DevTools frontend patch applied so our CQ will be green despite causing an issue.
>
> You can run this locally in Chromium to reproduce via:
>
> autoninja -C out/Default chrome:packed_resources_extra
>
> Which will show the error.
>
> Original change's description:
> > [Loc] Migrate changes tool to localization V2
> >
> > Migrate changes tool
> > Tested with en-XL: https://imgur.com/a/hFDBjQV
> >
> >
> > Bug: 1136655
> > Change-Id: Ic434c3085b9e2f2cf44583cca7ee1ce8f1d412f2
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2548688
> > Commit-Queue: Christy Chen <chrche@microsoft.com >
> > Reviewed-by: Simon Zünd <szuend@chromium.org >
>
> TBR=szuend@chromium.org ,chrche@microsoft.com
>
> Change-Id: I94b27434562f6a6bff3be381ab8a5802bd8b03f9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1136655
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2557044
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
TBR=szuend@chromium.org ,chrche@microsoft.com ,jacktfranklin@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 1136655
Change-Id: I35166a6f4f38462073b933c01c169b3c8d14311b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567344
Reviewed-by: Simon Zünd <szuend@chromium.org >
Reviewed-by: Christy Chen <chrche@microsoft.com >
Commit-Queue: Christy Chen <chrche@microsoft.com >
2020-12-02 06:13:17 +00:00
Kalon Hinds
de5da1203d
[Loc] Migrate snippets to Localization V2
...
Bug: 1136655
Change-Id: I724747d248b047ce85761b9ec7c6ae512c939ddb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2548691
Commit-Queue: Kalon Hinds <kahinds@microsoft.com >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2020-12-01 21:54:27 +00:00
Tim van der Lippe
efb716af67
Update linter packages
...
- Updates stylelint to 13.8.0
- Updates ESLint to 7.14.0
- Updates @typescript-eslint to 4.9.0
DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org
Change-Id: I207e204607ede782710e042c17d6510c7f696905
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566806
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2020-12-01 16:04:40 +00:00
Tim van der Lippe
e44bf09b3c
Speed up running NPM analysis commands
...
Whenever we do NPM package upgrades, we run `npm run install-deps -- outdated`
or `npm run install-deps -- audit`. However, this would then always
reinstall all packages with `npm ci`, which is timeconsuming, yet
unnecessary as the analysis does not change the installation output.
Therefore, we check if the custom command starts with either outdated
or audit and bail out of unnecessarily reinstalling.
R=jacktfranklin@chromium.org
Change-Id: I475e74ebe626e1c1973399ea65a31ea57f4b6fb5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566805
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 >
2020-12-01 12:47:56 +00:00
Jack Franklin
c4492956ad
Remove component bridges generation
...
Now Closure is gone we don't need bridges and this removes all the code
and tests for them.
All relevant checks we wanted to keep around have been moved to ESLint
rules (see attached bug).
Fixed: 1130536
Change-Id: I82a7b8e5e7b047b36f42c5c76ddb9dfbd0742d45
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2565377
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2020-11-30 17:33:11 +00:00
Jack Franklin
dd3be2e786
Enforce const enum via ESLint rule.
...
R=andoli@chromium.org
Bug: 1130536
Change-Id: I2304b32f1f0c9f4a6713156c9218ec9d0c9270ae
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562854
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Andres Olivares <andoli@chromium.org >
2020-11-30 15:56:41 +00:00
Tim van der Lippe
03097b0349
Fix running layout tests
...
In crrev.com/c/2520088 the blink web_tests infrastructure started using
a module that is in Python 3, but not 2. This started crashing our `npm
run test`, since we force the python version. Based on the comments on
the original CL, we should call the Python script directly and then
everything works as expected.
R=aerotwist@chromium.org
Change-Id: Iafe123e6adf792da940d3ca605e2eddd49ee5eba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2563820
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-30 13:55:39 +00:00
Jack Franklin
086ccd5a7a
Enable test_suite to take a configurable server type.
...
As part of the work to enable Puppeteer component tests, we need to
configure the test suite to run either the hosted mode server or the
component docs server. This CL updates it to take a flag, and makes some
updates to the component docs server, which now has to run either
directly or in the out/Default/gen directory depending on how it is run.
I suspect I'll make a follow up CL to always run the component server in
out/Default/gen, but for now enabling it to detect its context is the
quickest way to unblock running it in tests. The next CL will add a
component test suite that can run a basic test against the component doc
server, but I have manually verified locally that I can run tests
against that server.
Bug: 1153281
Change-Id: I55bda4edd0a983d03bfecff0446b0f3e3a008b52
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562707
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2020-11-27 12:00:26 +00:00
Paul Lewis
ab73c6f594
[unit test] Improve watcher & karma multirun
...
To date the Karma singleRun option has been set based on whether the
developer sets the DEBUG environment variable. This CL adds support for
an additional REPEAT environment variable, such that someone can run
multiple, non-debug (i.e., headless) test runs.
In order to make this more convenient, this CL also improves the watcher
script (`npm run watch`) such that it restarts autoninja whenever files
are changed.
Therefore a developer can now run:
`REPEAT=1 npm run auto-unittest` and `npm run watch` in conjunction, and
have the code be recompiled automatically, and the unit tests
(re)started.
R=jacktfranklin@chromium.org
Change-Id: I8cff9eb7d223a5325e952413ddd5c1f55dd8aec2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562709
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
2020-11-27 11:51:19 +00:00
Jack Franklin
3077c439b5
[ESLint] rule for .data=${{} as X}
...
This rule enforces that within a LitHtml template when we bind to the
`.data=` property we provide an explicit type cast that must be a type
reference.
This is one of the checks that the component bridges used to make, but
now we need to port them to ESLint rules.
Bug: 1130536
Change-Id: I401661289a829fd181bf91943fffe162b87de8b8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562345
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-27 10:37:14 +00:00
Paul Lewis
40e2867bb7
[deps] Adds sinon
...
R=jacktfranklin@chromium.org
DISABLE_THIRD_PARTY_CHECK=Adding sinon to deps
Change-Id: If47962332a4d9a4b4f0edbe637bca4f9894545ba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562704
Auto-Submit: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-11-27 10:25:34 +00:00
Jack Franklin
65cfd29d84
[ESLint] enforce set data methods use a type reference
...
And not a literal type. Again, was enforced by the component bridges
code.
Bug: 1130536
Change-Id: I766015ef69470df06443a71035dd04037104f85b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562351
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-26 17:59:13 +00:00
Sigurd Schneider
66497ccc5f
Generate inlined enums for protocol events in Protocol.<domain>
...
Previously, only inlined enums for commands were generated. This allows
several twin definitions to be removed from the front-end code, easing
the maintainance burdon of having to keep them in sync. See e.g.
https://crrev.com/c/2562339
Change-Id: I48ad1082ae8ecd3a657f61530e1795c61792ac56
Bug: chromium:1153099
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2562338
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-26 14:39:54 +00:00
Jack Franklin
b599716ad0
[Component Docs]: fix bad server listing
...
Now the component docs have some TS that gets compiled, the docs server
was listing out tsconfig and build files when it was supposed to only
list component directories. This fixes that and also tidies up the list
of links by removing underscores - a quick drive by fix to make it nicer
to look at!
Change-Id: Id9f05894a235f376cfd8a7ea98c5bf179c006869
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560945
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-26 11:30:53 +00:00
Jack Franklin
3642900e6d
Load new theme colours in the component docs.
...
This CL updates the component docs server so it automatically injects the new
colour variables (which are part of the dark mode work) into the server. It
contains the following changes:
1. Pulling out the new colours into a new CSS file,
`ui/themeColors.css`, which contain all the new definitions.
2. Injecting that new file where we inject `inspectorStyles.css`
currently.
3. Updating the component docs server to intercept any requests to load
an HTML example file, read the HTML contents and inject a `<style>`
tag to load in the theme colours.
4. Additionally we now provide a small bit of JS that adds a handy
button to toggle light/dark mode without needing to dive into the dev
tools.
Fixed: 1152774
Change-Id: Ia2df0e00315dfeb532570ea5634fa54677337f76
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560941
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-25 16:26:10 +00:00
Simon Zünd
3870f46933
Update TypeScript to latest stable version 4.1.2
...
DISABLE_THIRD_PARTY_CHECK="TypeScript update"
R=tvanderlippe@chromium.org
Change-Id: I515d7ffddd47b29740cc96059239a1054a3158b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2558300
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
2020-11-25 14:33:57 +00:00
Tim van der Lippe
073eb33a7e
Remove custom Closure Compiler integration
...
R=aerotwist@chromium.org
Bug: 1011811
Change-Id: I00cc258b5daee70432d3e949e98f26ca8062ec1d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560249
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
2020-11-25 13:34:57 +00:00
Tim van der Lippe
7dcef88d8b
Remove skip_compilation from module.json files
...
R=aerotwist@chromium.org
Bug: 1011811
Change-Id: I4c4fd280adb4f5f7b327239d08d80b2cb98b203b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560248
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-25 13:19:08 +00:00
Tim van der Lippe
4f84af44c7
Remove JSDoc validator
...
R=aerotwist@chromium.org
Bug: 1011811
Change-Id: Ibdbf2ec417348ccf1f9165ab85d91ffb7198064f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560246
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-25 12:56:57 +00:00
Tim van der Lippe
16534e267d
Remove Python infrastructure for the Closure Compiler
...
R=aerotwist@chromium.org
Bug: 1011811
Change-Id: I2ae75adec9fc47eedc410b4f066342ed3fb0a136
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2560245
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-25 12:39:37 +00:00
Kalon Hinds
1f437b9488
[Loc] Migrate performance_monitor to Localization V2
...
Bug: 1136655
Change-Id: I281da13c70cc56a92679064d122873b406d54377
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2553935
Commit-Queue: Kalon Hinds <kahinds@microsoft.com >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-25 08:31:14 +00:00
Jack Franklin
9e5ab71e50
Revert "[Loc] Migrate changes tool to localization V2"
...
This reverts commit abcb8f7aa8 .
Reason for revert: Consistently causing autoroll issues when rolling devtools-frontend into Chromium - see https://chromium-review.googlesource.com/c/chromium/src/+/2554521 for an example.
To recreate this, do a debug build of Chromium with this patch applied to DevTools. It's causing an issue with duplicate keys in the pak files. No DevTools Frontend builds do a debug build of Chromium with the DevTools frontend patch applied so our CQ will be green despite causing an issue.
You can run this locally in Chromium to reproduce via:
autoninja -C out/Default chrome:packed_resources_extra
Which will show the error.
Original change's description:
> [Loc] Migrate changes tool to localization V2
>
> Migrate changes tool
> Tested with en-XL: https://imgur.com/a/hFDBjQV
>
>
> Bug: 1136655
> Change-Id: Ic434c3085b9e2f2cf44583cca7ee1ce8f1d412f2
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2548688
> Commit-Queue: Christy Chen <chrche@microsoft.com >
> Reviewed-by: Simon Zünd <szuend@chromium.org >
TBR=szuend@chromium.org ,chrche@microsoft.com
Change-Id: I94b27434562f6a6bff3be381ab8a5802bd8b03f9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1136655
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2557044
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-11-24 10:54:09 +00:00
Christy Chen
abcb8f7aa8
[Loc] Migrate changes tool to localization V2
...
Migrate changes tool
Tested with en-XL: https://imgur.com/a/hFDBjQV
Bug: 1136655
Change-Id: Ic434c3085b9e2f2cf44583cca7ee1ce8f1d412f2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2548688
Commit-Queue: Christy Chen <chrche@microsoft.com >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2020-11-23 18:46:16 +00:00
Paul Lewis
34a1660229
Bumps bl to 4.0.3, adds karma-spec-reporter
...
R=jacktfranklin@chromium.org
DISABLE_THIRD_PARTY_CHECK=Updating 3P deps.
Change-Id: I34a3b906769d1ec19465ec404bc5c9f0c6e1a821
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2552513
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Auto-Submit: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-11-23 08:19:25 +00:00
vidorteg
068400262b
[Loc] Migrate lighthouse panel to Localization V2
...
- Migrate lighthouse panel to use Localization V2 APIs.
- Does not migrate lighthouse-worker yet (which builds the report)
- Removed lighthouse grdps
Tested with en-XL.json
https://imgur.com/a/sjbn3C5
Bug: 1136655
Change-Id: Ib55fabf941e4c0ae7ef5e1beb3cf4726b836386e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2548696
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2020-11-21 05:39:03 +00:00
vidorteg
af634bcc6c
[Loc] Migrate animation panel to Localization V2
...
- Migrate animation panel to use Localization V2 APIs.
- Removed animation grdps
Tested with en-XL.json
https://imgur.com/a/eVERZjZ
Bug: 1136655
Change-Id: I71fdcff68757b13ed72d735644ef09c6609f54d3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2548263
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2020-11-21 02:28:13 +00:00
Kalon Hinds
361d02972a
[Loc] Migrate developer_resources to Localization V2
...
Bug: 1136655
Change-Id: I01278b1c215dd7efa7255223a520df3524c53897
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2552105
Commit-Queue: Kalon Hinds <kahinds@microsoft.com >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-20 19:47:24 +00:00
Christy Chen
d0b25f6e31
[Loc] Migrate search to localization V2
...
Migrate search tool
Tested with en-XL: https://imgur.com/a/3Nv2hWE
Bug: 1136655
Change-Id: Icd29a61f4bc7df220a03f3d17c2a2f79c0ba0572
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2548220
Commit-Queue: Christy Chen <chrche@microsoft.com >
Reviewed-by: Kalon Hinds <kahinds@microsoft.com >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-19 19:21:46 +00:00
Christy Chen
0a48864e1e
[Loc] Migrate text_editor to localization V2
...
Migrate text_editor folder
Bug: 1136655
Change-Id: Ib67eb334eaf4cf25cc07b077ce6aa7c9b29e77f5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2548275
Commit-Queue: Christy Chen <chrche@microsoft.com >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-19 18:13:13 +00:00
Benedikt Meurer
1ca30ea08a
[refactor] Remove orphaned generate_devtools_extension_api.
...
This was generating devtools_extension_api.js file, which was clearly
broken, and unused.
Bug: chromium:1011811
Change-Id: I2981e681e7a3ee34732f4c0d61e8dee8554604df
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2550073
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2020-11-19 16:22:18 +00:00
Kalon Hinds
438d44197a
[Loc] Migrate security to Localization V2
...
Bug: 1136655
Change-Id: I77e776f00249eb97f49e24681d19722f500c4c86
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2546327
Commit-Queue: Kalon Hinds <kahinds@microsoft.com >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-19 01:34:11 +00:00
vidorteg
5c2ea4d80c
[Loc] Migrate layer_viewer to Loc V2
...
- Migrate layer_viewer panel to use Localization V2 APIs.
- Removed layer_viewer grdps
Tested with en-XL.json
https://imgur.com/a/nYe4KRL
Bug: 1136655
Change-Id: Iebcb0c125a73b6eab6a24ff91f2a39440155e768
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2546322
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-18 20:04:22 +00:00
Jack Franklin
6c3b0937fe
Remove LitHtml and Marked exemption from ESLint modules rule.
...
We do now import third-party properly and with the heuristics update they are
now correctly detected as a bundle.
Bug: 1147888
Change-Id: Ibb68f391258c001c16784a32b64f957217af4905
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534951
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-18 15:38:48 +00:00
Jack Franklin
b14dbe3426
Fix heuristic for determining external bundles in Release
...
The current bundling system with Rollup tries to determine when given a
file if it’s an entry point (e.g. ui/ui.js) or not (e.g ui/someFile.js).
If it’s not an entry point, it will bundle that file into the entry
point JS file. So when we go to bundle ui/ui.js, it’ll find files like
ui/someFile.js, and pull them into ui/ui.js, which ends up being a fully
“rolled up” version of the ui folder.
The problem comes when you nest these folders;
ui/components/components.js is an entry point but the logic that the
Rollup bundling code uses incorrectly detects it as a regular file. So
you end up with ui/ui.js including a rolled-up version of
ui/components/components.js, which itself is a rolled-up file. We then
ship ui/ui.js and ui/components/components.js, meaning we’ve shipped
components.js twice - once as a standalone file, and once because it was
rolled up into ui.js.
This CL fixes this by changing how we detect bundles, we now look for
importing files whose parent directory is the same, so:
- components/components.js is a bundle
- but components/foo.js is not a bundle
By making this change we also now correctly detect third_party bundles,
with the exception of Acorn which is a special case, so we can lose the
checks for that in our Rollup config.
The logic here is somewhat duplicated between Rollup's config and the
ESLint rule plugin that we have; I plan on making a follow-up CL that
tries to define this logic in one place so if it changes in the future
we can update the code in one place and have the linting & rollup
update, plus we'll be able to use the ESLint tests as coverage to ensure
we've not broken our bundling.
Fixed: 1144123
Change-Id: Idd82a3ef69a09871867626a0d74266e25801243f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2534202
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-18 14:19:58 +00:00
Paul Lewis
d14436f822
[unit test] Add flag for HTML report generation
...
R=liviurau@chromium.org
Change-Id: I5628f4754d502e67615df0b0a2fe09981d4dc52b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2545819
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Auto-Submit: Paul Lewis <aerotwist@chromium.org >
2020-11-18 13:02:38 +00:00
Jan Scheffler
f74777559c
[e2etest] Move hosted mode server to https
...
This allows testing things that require secure connections
like thrid party cookies.
Change-Id: Id7f6dc672f8a2e701f2baad22fa035826a8d7b2a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537951
Commit-Queue: Jan Scheffler <janscheffler@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-18 12:58:43 +00:00
Changhao Han
45bd77db91
TypeScriptify StylesSidebarPane.js: final part
...
DISABLE_THIRD_PARTY_CHECK=adding new TypeScript definition file
Bug: chromium:1011811, chromium:1093296
Change-Id: Ifb03cf74d98ab4c3aeba40bdce19051e85ffdd38
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2544482
Commit-Queue: Changhao Han <changhaohan@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-17 21:13:27 +00:00
vidorteg
0527ac564a
[Loc] Migrate layers to Loc V2
...
- Migrate layers panel to use Localization V2 APIs.
- Removed layers grdps
Tested with en-XL.json
https://imgur.com/a/13R1mXF
Bug: 1136655
Change-Id: I255b1edbc265aab11728f78905c55d77a5fb3bb9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2543113
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com >
Reviewed-by: Simon Zünd <szuend@chromium.org >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-17 20:02:06 +00:00
Christy Chen
14a913c836
[Loc] Migrate webauthn to localization V2
...
Migrate webAuthn tool
Tested with en-XL: https://imgur.com/a/medKsEq
Bug: 1136655
Change-Id: Id44fc298fb38f09467eedb77a3a2d50493462ac1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2543102
Commit-Queue: Christy Chen <chrche@microsoft.com >
Reviewed-by: Simon Zünd <szuend@chromium.org >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-17 19:02:27 +00:00
Christy Chen
598b98fe2b
[Loc] Migrate web_audio to localization V2
...
Migrate web_audio tool
Tested with en-XL: https://imgur.com/0eEBFqM
Bug: 1136655
Change-Id: Ibef905a1302eb807de78296bccaadc1559d5f642
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2538490
Commit-Queue: Christy Chen <chrche@microsoft.com >
Reviewed-by: Peter Marshall <petermarshall@chromium.org >
2020-11-16 19:32:49 +00:00
Tim van der Lippe
afe76b65c9
Update @typescript-eslint packages
...
https://github.com/typescript-eslint/typescript-eslint/releases/tag/v4.0.0
none of the breaking changes apply to us.
DISABLE_THIRD_PARTY_CHECK=NPM updates
R=jacktfranklin@chromium.org
Change-Id: Id61788dc65d352f7ecffaea9cf1918141ae3f842
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537959
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-11-16 15:53:09 +00:00
Tim van der Lippe
59b55bbc11
Update Rollup and rollup-plugin-terser
...
Rollup-plugin-terser dropped Node <10 and Rollup <2 support
(https://github.com/TrySound/rollup-plugin-terser/releases/tag/v6.0.0 )
and upgraded to Terser 5
(https://github.com/TrySound/rollup-plugin-terser/releases/tag/v7.0.0 )
DISABLE_THIRD_PARTY_CHECK=NPM update
R=jacktfranklin@chromium.org
Change-Id: Ifa0085fe5daa052bdfea40720d1852549f4bf316
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537956
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-11-16 14:46:18 +00:00
Tim van der Lippe
dc4637c1a9
Update escodegen and recast
...
- Escodegen drops Node 6 support (unaffected) and introduces support
for optional chaining
- Recast drops Node <9 support (unaffected)
DISABLE_THIRD_PARTY_CHECK=NPM updates
R=jacktfranklin@chromium.org
Change-Id: I9eb8d294d3ad87a6469da9e0bc1114563abd4f07
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537955
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2020-11-16 14:13:28 +00:00
Tim van der Lippe
66f80d99ca
Fix ESLint tests
...
The upgrade to ESLint 7.0.0 broke our custom rule tests. It seems
we were affected by https://github.com/eslint/eslint/issues/13293
after all.
R=jacktfranklin@chromium.org
Change-Id: I3dcf8b7e15f1bc6a26c2fa069f24241e87f07627
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2538840
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 >
2020-11-16 12:15:09 +00:00
Tim van der Lippe
97868bd80a
Update @types packages
...
DISABLE_THIRD_PARTY_CHECK=NPM updates
R=jacktfranklin@chromium.org
Bug: 1011811
Change-Id: I16c3891ec647f9e7e9ede59713a5e3b10ebf2c7a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537952
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 >
2020-11-16 12:02:39 +00:00
Jack Franklin
b5920ca458
Enforce kebab-case naming of custom events
...
Fixed: 1145972
Change-Id: Id16bd5d28e77f0d37b543e0366257bbf84b5d4a0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2536399
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-16 10:12:09 +00:00
Paul Lewis
be466dc7ac
[eslint] Change es_modules_import rule to also check unit test files
...
This is a clone of https://crrev.com/c/2323191 .
Bug: 1148296
Change-Id: Ia49ccdb2ba253f0c9fe2138b07ca19f082501522
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2537957
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2020-11-13 17:48:19 +00:00
Peter Marshall
580bbf4bbc
tests: Add final changes for parallel e2e tests
...
Only set the unhandled rejection handler once per process.
We run the setup and teardown multiple times per-process now.
Add clearPuppeteerState() to unset the state between runs on
a parallel test runner. This is because the port changes
between successive runs in the same process.
Remove the hasShutdown logic from mocha_hooks. Also remove the
beforeExit hook which was causing this to get called at least
twice for every process. It already gets called in the ordinary
shutdown case via the afterAll() hook. We only need to call it
in the extraordinary case which is the SIGINT case. Now that we
do the shutdown multiple times per process, we don't care if we
already shutdown on this process or not. The only issue could be
if ctrl+c is sent during the shutdown, but then we are crashing
anyway.
Right now the default # of jobs is 1, so out bots will still run
in serial mode. We want to add parallel mode as an options for
local development while we iron out any last problems with this
approach.
You can test this locally with npm run e2etests -- --jobs=8.
We make use of global setup fixtures to only run one hosted
mode server and share it between all parallel runners. Each
runner still starts its own chrome and restarts it between
files, which is a bit inefficient but still a big improvement
compared to serial mode.
Split the hosted mode server out into its own file inside
conductor as it can be dealt with entirely separately, and
its state is not per-process like the chrome state, but only
per-main-process which launches the test runner sub-processes.
Bug: 1101784
Change-Id: Ic0c9be3559708fd5403a88882b9fb93257633de9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2288694
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Peter Marshall <petermarshall@chromium.org >
2020-11-13 15:20:27 +00:00