Commit Graph
706 Commits
Author SHA1 Message Date
Christy Chen 87d9ffc323 [Loc] Migrate input to Localization V2
Bug: 1136655
Change-Id: I7d8b1c34aaea07b896ec913faf141381422c3bd6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2580848
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-09 17:59:07 +00:00
Jack Franklin 75b0efc9b9 Ban "front_end" imports from front_end directory.
If you're in the front_end directory and you mistakenly include
front_end in an import, e.g:

import * as UI from '../../front_end/ui/ui.js';

instead of:

import * as UI from '../ui/ui.js';

It will cause problems in a release build. This CL lands an ESLint rule
to ban these, but still allows it for unit tests.

Fixed: 1157057
Change-Id: Ia49279794616568f9e88241152e3412fcd9a8b36
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2581547
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-09 15:00:16 +00:00
Christy Chen 19739b881b [Loc] Migrate help to localization V2
migrate help directory

Bug: 1136655
Change-Id: Ib361747d53faa0a5cc860d331238e08d327031cc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577943
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-12-08 21:25:02 +00:00
Christy Chen cebafe7ed6 [Loc] Migrate workspace to localization V2
Bug: 1136655
Change-Id: Ia6a4ff1c043f1b02656a9d7edf640f04f2f1e9a1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2577936
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-12-08 20:19:22 +00:00
Sigurd Schneider c870c46ba4 Don't generate types for deprecated Console domain
The runtime definitions are explicitly skipped here:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/devtools-frontend/src/scripts/build/code_generator_frontend.py;l=202;drc=8e12f92229028121fd0cfa1a3c39825a228f341c

This means that if someone tries to access the values at runtime,
an error occurs. Removing the definition altogether is the
safest option.

Bug: chromium:1153099
Change-Id: Icc17caa99ebc68e4466ea309bf2a06b4c8cd71fe
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2575092
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
2020-12-07 12:20:01 +00:00
Jack Franklin b36ad7e1d1 [Interaction tests] fix running in out/Release
On the bots these tests will run in out/Release but the component server
logic for figuring out the path to the gen directory was wrong; it
navigated up from its position into the root dir, and then back in to
`out/TARGET`. Rather than do that, we instead just walk up from the
scripts dir until we end up in the out/TARGET directory. That way
regardless of if we run in out/Default or out/Release, the script will
find the right directory.

Bug: 1153281
Change-Id: I1d369e47b9931ade60bc86ff52aea7105f10cefd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2575086
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-07 10:35:50 +00:00
Christy Chen b97d85b7ca [Loc] Migrate protocol monitor tool to localization V2
Migrate protocol monitor tool
Tested with en-XL: https://imgur.com/a/IPT8ly2


Bug: 1136655
Change-Id: I538590b76e8511cc539d3b4770790db34c2ec5f9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2572872
Commit-Queue: Christy Chen <chrche@microsoft.com>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
2020-12-04 22:22:17 +00:00
Tim van der Lippe e0596215e1 Fix permissions for test scripts
In https://crrev.com/c/2571462 we no longer invoke these scripts
with the locally installed Python version. However, on Unix systems,
this requires the scripts themselves to be executable.

Most of the scripts we have are already executable, but these specific
scripts were not and therefore the NPM run invocations would fail.

R=liviurau@chromium.org

Change-Id: I06bf6823aa12528ce85d9e25ba241c1cab80604a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2574459
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
2020-12-04 16:02:34 +00:00
Tim van der Lippe 8e12f92229 Use Python version bundled with depot_tools for all scripts
depot_tools ships a "vpython" binary that is added to the $PATH
for all Chromium engineers. This binary is versioned by depot_tools
which we roll in ourselves as part of `gclient sync`.

By using `vpython` instead of `python`, we are no longer depended
on the Python version installed locally and instead use the version
we pull in from DEPS.

R=liviurau@chromium.org

Change-Id: If49a54c24b6cf129ff843cd9ca1140a723a78afb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2571462
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-04 14:08:59 +00:00
vidorteg d083f4ab10 [Loc] Migrate media panel to Localization V2
- Migrate media panel to use Localization V2 APIs.
- Removed media grdps

Tested with en-XL.json
https://imgur.com/a/j3MxnLu

Bug: 1136655
Change-Id: Iebcce7e991db19cda8477f75b180390e1e7f5a78
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2570496
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2020-12-03 17:28:01 +00:00
Tim van der Lippe d18c704c60 Cleanup devtools_module_entrypoints.gni
Both front_end_devtools_module_entrypoint_sources and
generated_devtools_module_entrypoint_sources were unused, since
the `devtools_entrypoint` migration has finished.

Secondly, we can rename generated_typescript_entrypoint_sources to
generated_module_entrypoint_sources, since we no longer need to
distinguish between JavaScript and TypeScript entrypoints.

Lastly, we can clean up the definition of
devtools_module_entrypoint_sources to no longer include the
$resources_out_dir line, which saves some duplication.

R=aerotwist@chromium.org

Change-Id: I1a327cf40cec6630b3be7ac53e2c87f7e179c895
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566802
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>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-03 11:43:03 +00:00
Jack Franklin 92fe8ff0c7 Enforce readonly string[] over ReadonlyArray<string>
A stylistic choice we've made and now are enforcing.

Fixed: 1152710
Change-Id: If84b8adbc872d12517b7a6b38f0e5049b94f286e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2571114
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2020-12-03 11:26:43 +00:00
Jack Franklin 3b3a782f3a Enable interaction tests
This CL introduces the infrastructure and first test for what we're calling
"Interaction tests". These are tests that can be used to test component
behaviour that cannot be tested via Karma unit tests but don't require an e2e
test either.

The best example here is complex user interactions: clicking and dragging a
mouse, or doing multiple tabs to navigate through the UI.

Note that the one interaction test added here for theme_colors isn't the best
example of a complex test, but it's a test that's good enough for now whilst we
get everything set up on infrastructure and make sure it runs without flaking.

Bug: 1153281
Change-Id: Ifb37639a557c459974f703b8954ae68a93d5d368
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2566808
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-03 10:44:22 +00:00
Jack Franklin 01d09b0089 Ban underscored methods and properties in TS files
With one exception: if a class with private property _foo has a public
foo() method, we'll allow it.

Change-Id: Ie89ce5661e49e78abc0ab9f41db14743b1690aa0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2567956
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-12-03 10:07:33 +00:00
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