Commit Graph
182 Commits
Author SHA1 Message Date
Paul Lewis 7b1e0f41ab Adds Puppeteer types
DISABLE_THIRD_PARTY_CHECK=Updates the deps list as well as the node_modules

Change-Id: Ia9a6d26a89d85c0ca24253892ec3aa2858fe034a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2009108
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-20 14:02:00 +00:00
Tim van der Lippe bcf142a3e1 Update TypeScript to latest version
DISABLE_THIRD_PARTY_CHECK=Updates the deps list as well as the node_modules

Bug: 1011811
Change-Id: I09c38caa2b60f8f291695a908a3363dd870f5625
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2009109
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2020-01-20 11:58:10 +00:00
Tim van der Lippe 9293af7230 Migrate sdk/ to ESM internally
Bug: 1006759
Change-Id: I2bb0c8eaa4fdc89edd8da2b12d9fd0e08d427174
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003327
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-17 15:17:17 +00:00
Tim van der Lippe f86acf8203 Remove Puppeteer installation
We can set the PUPPETEER_SKIP_CHROMIUM_DOWNLOAD environment variable to
not install a local Chromium installation. Update the preinstall script
to verify that this variable is set. If you want to update the deps, you
can now run `npm run install-deps` to get the update.

DISABLE_THIRD_PARTY_CHECK=Fixing node_modules

Change-Id: I6d77a77f343f8869a17434e7b83951b6380444d0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003319
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-16 13:32:46 +00:00
Tim van der Lippe 399a956776 Reland "Use typescript-eslint instead of tslint"
This reverts commit 72da1a51cb.

Reason for revert: Buildbots in Chromium no longer run the linter checks.

Original change's description:
> Revert "Use typescript-eslint instead of tslint"
> 
> This reverts commit d0e22da4db.
> 
> Reason for revert: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8891272266464063200/+/steps/devtools_lint_check__with_patch_/0/stdout
> 
> Original change's description:
> > Use typescript-eslint instead of tslint
> >
> > This will update our eslint configuration to use @typescript-eslint to
> > parse and lint TypeScript files. It integrates with the existing
> > infrastructure to lint our files
> >
> > Fixed: 1041811
> > Change-Id: I29f49a57229e3ee17524045b3905b9cc835271ab
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1998771
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
> 
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org
> 
> Change-Id: Ic0dfc585cd0ac08f1f4a72ce19d0bebc74f9cdb5
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2000795
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=aerotwist@chromium.org,tvanderlippe@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I623c9b873ac0af3157ff3b73c91e006f7db58e1e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2003315
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-16 10:58:49 +00:00
Tim van der Lippe 0cfd3dc2af Update remove global scripts to run on legacy files
Also make sure we take into account the layout tests

Bug: 1006759
Change-Id: I6b819876034aae7019e62b1b34ca6adeb50326b1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2002606
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-16 10:35:44 +00:00
Tim van der Lippe e6a9868686 Migrate javascript_metadata/ to ESM internally
Bug: 1006759
Change-Id: Ibb7c4fb15197431c37c485bd1a05b20acf2bf098
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1994967
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-15 15:27:13 +00:00
Tim van der Lippe 72da1a51cb Revert "Use typescript-eslint instead of tslint"
This reverts commit d0e22da4db.

Reason for revert: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8891272266464063200/+/steps/devtools_lint_check__with_patch_/0/stdout

Original change's description:
> Use typescript-eslint instead of tslint
>
> This will update our eslint configuration to use @typescript-eslint to
> parse and lint TypeScript files. It integrates with the existing
> infrastructure to lint our files
>
> Fixed: 1041811
> Change-Id: I29f49a57229e3ee17524045b3905b9cc835271ab
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1998771
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

TBR=aerotwist@chromium.org,tvanderlippe@chromium.org

Change-Id: Ic0dfc585cd0ac08f1f4a72ce19d0bebc74f9cdb5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2000795
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-14 17:57:10 +00:00
Paul Lewis 21fb34999d Adds PRESUBMIT check for .only calls in Karma tests
Change-Id: I9355592d74777c9136eb50edd3fd08bc1b9e2c3c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2000786
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-14 15:37:28 +00:00
Tim van der Lippe d0e22da4db Use typescript-eslint instead of tslint
This will update our eslint configuration to use @typescript-eslint to
parse and lint TypeScript files. It integrates with the existing
infrastructure to lint our files

Fixed: 1041811
Change-Id: I29f49a57229e3ee17524045b3905b9cc835271ab
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1998771
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-14 13:32:48 +00:00
Tim van der Lippe 984c7d7608 Add typescript-eslint to node_modules
Bug: 1041811
Change-Id: Id9820054e67f8402a4a1220035d8789f7cff5a0b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1998769
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-14 12:34:56 +00:00
Tim van der Lippe 383de766af Fix check for nested directories in check_gn
Any module.json that was listed in a nested folder (for example in
third_party/) was not properly being checked in the check_gn script. We
should traverse not only the direct directories of `front_end/`, but
also recurse into any of its subdirectories.

Bug: 1041415
Change-Id: I6c4adbf4315c30b3d90361329d726323020308a7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1997352
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
2020-01-14 10:20:07 +00:00
Rob Paveza 41120592d3 Refactor of the 'copy_all_modules' build step
I've sporadically seen the same CreateProcess failure in ninja recently
that we'd been seeing for the GRD script [1]. This failure is related to
the copy_devtools_modules script.

As part of this change I've also corrected some linting errors that I
had made with the previous fix.

[1] The previous fix can be found at
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1992319

Change-Id: Ic9a66160acddfc929fdd43f20572435ceff3724c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1997723
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-13 19:07:47 +00:00
Simon Zünd 5a8f4d89e1 Revert "Migrate accessibility/ to ESM internally"
This reverts commit 785c6a4f1c.

Reason for revert: Suspected to break "run_type_check.py" on the bot.
https://ci.chromium.org/p/chromium/builders/try/linux-rel/279842

Original change's description:
> Migrate accessibility/ to ESM internally
> 
> Bug: 1006759
> Change-Id: I9d801349fd73a06d7f72933acfa65b103531a278
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991511
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>

TBR=aerotwist@chromium.org,tvanderlippe@chromium.org

Change-Id: Ie4fe54b84cf91cd034bfdb21c20b97eaacdb3599
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1006759
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1994960
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2020-01-10 06:01:18 +00:00
Paul Lewis b4e2a0741b Check for self.X = self.X || {} in migration script
Bug: 1006759
Change-Id: I741093c412e6ef47b0154b0202bda56ffd07328c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1993460
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-09 17:11:01 +00:00
Paul Lewis 785c6a4f1c Migrate accessibility/ to ESM internally
Bug: 1006759
Change-Id: I9d801349fd73a06d7f72933acfa65b103531a278
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991511
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2020-01-09 17:06:11 +00:00
Tim van der Lippe 472675db85 Migrate data_grid/ to ESM internally
Bug: 1006759
Change-Id: Idb20304bcf3e72e4a0bba242e847e90ff9b8a8c8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1993342
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-09 15:04:51 +00:00
Liviu Rau e5cecd6c52 Revert "Whitespace to trigger builders"
This reverts commit 3aa0411a4c.

Reason for revert: To trigger builders

Original change's description:
> Whitespace to trigger builders
> 
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: I96ea4d7ba12b5b5e884f2fb7f5781afa4a9c1564
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991505
> Commit-Queue: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>

TBR=machenbach@chromium.org,sigurds@chromium.org,mathias@chromium.org,liviurau@chromium.org

Change-Id: I133c6f3e3bdb86884c13ab41b6c82be3064d882d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991509
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2020-01-09 12:05:43 +00:00
Liviu Rau 3aa0411a4c Whitespace to trigger builders
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I96ea4d7ba12b5b5e884f2fb7f5781afa4a9c1564
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991505
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2020-01-09 11:35:52 +00:00
Rob Paveza 4947355c94 Fix for too-long length of command line in Windows build.
Apparently related to the changes to ESM, the Windows build command
line has started to exceed 32kb. This is running into a fault within
ninja in which the call to CreateProcess fails as a result of the
command line being an invalid parameter.

This fix addresses it by dumping the file list into a GN "response
file" which is then fed into the corresponding Python script, as
indicated by the GN docs. See:
https://gn.googlesource.com/gn/+/master/docs/reference.md#var_response_file_contents

Bug: 1040233
Change-Id: Ie421a09d2a23756e9195e3ad84b941187de6e3c0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1992319
Reviewed-by: John Emau <John.Emau@microsoft.com>
Reviewed-by: Mike Jackson <mjackson@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Robert Paveza <Rob.Paveza@microsoft.com>
2020-01-08 22:17:55 +00:00
Tim van der Lippe 0c21af5553 Use module scope for workers
This changes the Common.Worker to create Workers that use the module
scope rather than the global scope. It allows us to use es-imports,
which consequently allows us to remove the bundling during the build
step. This should hopefully improve the Ninja non-determinism that we
were facing when making changes to files that are used in the various
workers.

Bug: 1006759
Change-Id: I7ac209817b1576d2accd790f1bf7ef6a658f5605
Fixed: 1013129
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1981615
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-08 15:12:05 +00:00
Liviu Rau 5dfaec1dad Whitespace to trigger builders
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Id2b4cab8b2f1176ff6c7221826c5ecbbb5315126
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1967164
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2020-01-08 09:46:13 +00:00
Paul Lewis 25b001799e Adds known errors to include expanded namespace
Dupes the known errors for the Common.UIString.UIString namespace to
match the existing Common.UIString case.

Bug: 1006759
Change-Id: Ibf5a7ec632d43fca56d198b05a93ca6e79621388
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1985675
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-06 16:25:44 +00:00
Paul Lewis d0015fb415 Adds support for additional localization calls
As part of the ESM migration, certain function needs to be renamed over
to a different namespace, e.g. Common.UIString becomes
Common.UIString.UIString. As such the script that looks for instances of
Common.UIString for localization fails to identify instances of the
updated calls to Common.UIString.UIString. This CL updates
localization_utils so that it is aware of the updated namespaces, but
treats them in the same way as their legacy counterparts.

Bug: 1006759
Change-Id: I0a7da9109ee969da4caac3283c4ff26f4589f68a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1985674
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2020-01-06 15:37:33 +00:00
Connor Moody 46dee06f38 Normalize excluded file paths in check_gn.js to fix presubmit checks on Windows
CL http://crrev.com/c/1969473 introduced the check_gn script to augment presubmit checks. The checks are currently failing on Windows because excluded file paths (formatter_worker/) are not normalized.

This CL normalizes excluded file paths so that all checks pass on Windows.

Change-Id: Ic5848d6eb9706934152445e4b5752be25ac84e07
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1974795
Reviewed-by: Brian Cui <brcui@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Connor Moody <connor.moody@microsoft.com>
2019-12-19 17:18:48 +00:00
Tim van der Lippe ac961dd56b Fix check_gn and add it to check script
check_gn will now properly check the contents of all_devtools_modules and copied_devtools_modules in the BUILD.gn.
We don't ship the wasm_source_map/types.js, as it only includes information for Closure.
Therefore, remove this file from the `modules` array and append it in Closure instead.

Fixed: 1033882
Change-Id: I3361096941869d39ce3b717327c4001d146a5286
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1969473
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-16 14:29:28 +00:00
Michael Achenbach ebb091f654 Whitespace change to test build numbers
Tbr: santa
Change-Id: Id86ddf8253e7269448d0170af4dd3c8fd71e14de
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1967165
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
2019-12-16 08:43:56 +00:00
Mathias Bynens f885d2e6f8 Prefer Brotli over gzip for compressing webui resources
This makes resources.pak another 228.1 kB smaller (from 7,070,021
bytes down to 6,841,901 bytes).

Bug: chromium:1025041
Change-Id: I0d45e3b40f5765bcb5c2266750698d33b6adcae2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1964350
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2019-12-12 14:36:14 +00:00
Mathias Bynens 4d4e51aa31 Set compress='gzip' for SVG resources
This saves some more bytes in the total image size, which is important for Chrome OS.

Follow-up to:
https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1918736

Bug: chromium:1025041
Change-Id: I01167d35ae6d693428dfd44252b7f86940f416b7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962301
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-12 13:41:04 +00:00
Steven Bennetts 457ff4a215 Set compress='gzip' for webui resources
This adds the compress="gzip" entry to webui (html, js, css) files in
devtools_resources.grd.

This will save 4.8 MB in the image size, which is critical for
Crhrome OS.

Bug: chromium:1025041
Change-Id: I0357fc1cc677f83f1f36fb39ca586543e37d124c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1918736
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
2019-12-12 12:54:23 +00:00
Liviu Rau 7ea9d9dd0f Whitespace to trigger builders
TBR:yangguo@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I25417f546ff76ad6b3a10a7d29ee823b0bc3fa73
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1962294
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2019-12-12 11:06:03 +00:00
Changhao Han b8b4fef645 Autogenerate CSS autocomplete values with extra manual entries.
Bug: chromium:1021810
Change-Id: Ifd6ed31b31c61fc5b509ffe049d961cc68e7bcc4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953616
Commit-Queue: Changhao Han <changhaohan@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2019-12-11 15:38:04 +00:00
Paul Lewis 26afc1e4f9 Adds migration script for refs
This script expects that -legacy.js files are in place for a
given module. So, for example, if migrating front_end/search
one would run move-side-effects-to-legacy for search, then follow
that with this script, replace-internal-references, which will
step through the files in front_end/search and update all globals
to refer to imports.

This script also supports cross-module rewrites, such that if a
namespace is passed through, the -legacy.js file for the namespace
will be loaded instead and used for the replacements.

Bug: 1006759
Change-Id: I7af5e1343a028aed82d5c3f536be886011cf9a2c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958525
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-10 13:47:05 +00:00
vidorteg 7a077810bd Updating paths on generate_devtools_ui_strings.js
Localization scripts got moved from localization_utils to
localization/utils, this script needs to be updated to reflect the
change.

Change-Id: I0a942d928687e3df767e508b25a286be026f0dcb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1959090
Reviewed-by: Mandy Chen <mandy.chen@microsoft.com>
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Commit-Queue: Vidal Diazleal <vidorteg@microsoft.com>
2019-12-10 00:11:50 +00:00
Liviu Rau a2b38b373d Whitespace to trigger builders
TBR:machenbach@chromium.org

No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ia6de0ba985089efa56580f40a1c28a89f77d8cdc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1958984
Commit-Queue: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
2019-12-09 21:46:42 +00:00
Mathias Bynens cdcfba01d1 Restore npm run check-json functionality
Without this patch:

```
$ npm run check-json

> chrome-devtools-frontend@ check-json ~/projects/devtools/devtools-frontend
> node scripts/json_validator/validate_module_json.js

schema id ignored http://json-schema.org/draft-04/schema#
schema id ignored http://json-schema.org/draft-04/schema#
~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:92
    if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
            ^

Error: no schema with key or ref "http://json-schema.org/draft-04/schema#"
    at Ajv.validate (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:92:19)
    at Ajv.validateSchema (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:173:20)
    at Ajv._addSchema (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:306:10)
    at Ajv.addSchema (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:136:29)
    at Ajv.addMetaSchema (~/projects/devtools/devtools-frontend/node_modules/ajv/lib/ajv.js:151:8)
    at Object.<anonymous> (~/projects/devtools/devtools-frontend/scripts/json_validator/validate_module_json.js:20:5)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
```

After applying this patch:

```
$ npm run check-json

> chrome-devtools-frontend@ check-json ~/projects/devtools/devtools-frontend
> node scripts/json_validator/validate_module_json.js

schema $id ignored http://json-schema.org/draft-07/schema#
schema $id ignored http://json-schema.org/draft-07/schema#
schema $id ignored http://json-schema.org/draft-07/schema#
```

Fixed: chromium:1030215
Change-Id: Ie799ffbc9dfe50bdfedb18a0d9ac2ce63a9e4439
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953774
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-09 14:28:12 +00:00
Paul Lewis da0fab38e1 Adds migration script to moving side-effects to legacy file
TBR=tvanderlippe@chromium.org
Bug: 1006759
Change-Id: I145e029b427900995468e86a522085553cb5c1cf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1953769
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-12-09 10:59:22 +00:00
Yang Guo a711c06b43 Remove outdated extract_module script
Change-Id: I1b9d525baf83398959ecf8df34ab50ca5c695ee0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1950168
Commit-Queue: Yang Guo <yangguo@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-04 14:49:15 +00:00
Yang Guo 6e99c7c542 Move test and localization scripts
R=tvanderlippe@chromium.org

Change-Id: I9bfa77ef2791638b07089e4faf405f834ff47148
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947525
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
2019-12-03 16:48:56 +00:00
Paul Lewis c523feb710 Updates unit tests to use new devtools_paths
Change-Id: Id076878f5f51348ff80ce1adc018b148246c087f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947527
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-12-03 10:53:56 +00:00
Paul Lewis e8d888e39d Defaults the number of boot perf runs to 37
Change-Id: Icb57c9b3c116f01eeeadeca184864085edd008db
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1947526
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
2019-12-03 10:44:46 +00:00
Paul Lewis 449ac187cb Adds manual boot perf script
This script loads the DevTools frontend in hosted mode and waits for the
elements panel to appear. After this it calculates the mean and median
boot times and logs them out.

Bug: 1027519
Change-Id: I01094a95d5178bbf60f964a5c26e92efa604b1e3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942287
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-03 10:32:56 +00:00
Michael Achenbach 75ba8e350e Add some infra ownership
DISABLE_THIRD_PARTY_CHECK=true

Bug: 1026215
Change-Id: I068203abb73369aab71c2b9869b984373fe0f8c5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1946474
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-12-02 20:34:58 +00:00
Paul Lewis e184c4c207 Adds license checker
This CL adds license-checker to manage_node_deps.

Change-Id: Ia525e9c2380fc2654e9903ecc7fd4e94cdce1f9a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1944866
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-02 12:39:54 +00:00
Paul Lewis 66e1206c8b Updates manage_node_deps to install missing deps; adds yargs
The `npm ci` call in the script will fail due to any mismatch between
the DEPS declared and those listed in the package-lock.json file.

This CL updates the script to install any missing deps by comparing the
list in package-lock.json with the DEPS, and adding any that are
missing.

Yargs is needed for the boot perf benchmark, so adding its DEP here
and will update the node_modules directly in a future CL.

Bug: 1027519
Change-Id: Ifbc69b242d0cfc4d79d23f756f267a5a2f45039f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1944861
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Auto-Submit: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-12-02 12:09:24 +00:00
Tim van der Lippe 5e2f45a379 Add script to remove unused globals
It Traverses all expression statements that put stuff on the global
scope and checks if it is only used once (e.g. in that particular
assignment). Anything that is only exported but never used is deleted.

This works for extensions declared in the module.json as well.

Change-Id: Ie3d9759da8593f8c66f1c12ba2e8ee1724f240d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1942289
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-28 17:40:34 +00:00
Mathias Bynens 98669996bf Fix npm test when run from the devtools/devtools-frontend repo
The script previously assumed it would always be run from within the
chromium/src/third_party/devtools-frontend/src folder. It would fail
when run from the standalone repository at devtools/devtools-frontend.

This patch makes it work even in that case, as long as the `devtools`
directory in `devtools/devtools-frontend` lives on the same level as
the `chromium` repository.

Change-Id: I3cf81c8144fd3f03389a4ec395b8ec3acdbb8e55
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1939798
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-28 11:43:53 +00:00
Paul Lewis d903909f9c Updates deps script; adds Puppeteer
This is a prequisite for loading DevTools in hosted mode and track how
long it takes for the FE to boot up. This CL adds Puppeteer to the deps
as well as tidying the manage_node_deps script some.

Bug: 1027519
Change-Id: Ie5f3ef47f481972c721f7382f9b0ed99d287d07c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1939800
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2019-11-28 10:40:33 +00:00
Tim van der Lippe e6974cd0ab Fix duplicate skip_compilation files
modular_build can compute all skip_compilation files, which saves us
some duplication run_type_check

Bug:1006759
Change-Id: Id8eff10fa716f7cb17d36aa18b54605f26dba713
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1934219
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-27 16:16:43 +00:00
Tim van der Lippe 5958eb836f Migrate cm_modes/ to ESM
This also makes cm_modes/ non-remote and uses proper dynamic imports to
load the code (rather than an `eval`). This increases the binary size by
104 KB from 11756K to 11860K which is an increase of 0.8%.

The stylus cm_mode has been removed. This mode was the largest mode
(30KB), seems unmaintained [1] and this syntax is likely rarely used (if
at all). It is unclear how often the other modes are installed and used.

Additionally, I discovered a promise race in the plugin installation. In
the full application this is not noticeable, as by default all code
mirror modes are lazily loaded (verified they still work with Markdown,
Java file and the regular js/cc files). However, in the test it was not
properly awaiting the plugin loading.

Perform the async-await plumbing to make sure the promise is resolved
before the test continues execution.

roll CodeMirror

[1]: https://github.com/codemirror/CodeMirror/commits/master/mode/stylus

Bug:1006759,1011466
Change-Id: If4d81d01318e08a63faaffee8b0cc9ab5954d4c6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1928924
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2019-11-27 14:58:02 +00:00