Sigurd Schneider
73d92ec33f
Ensure DOM.NodeId is type-annotated consistently
...
DISABLE_THIRD_PARTY_CHECK=disable
Bug: chromium:1226471
Change-Id: I6ce261be75eec735d818cdf258cfa484b7e82dc5
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3003252
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2021-07-06 09:30:46 +00:00
Sigurd Schneider
8d9cf0d99e
Ensure CacheId is treated opaquely via type system
...
CacheIds must be treated opaquely by the front-end (they shouldn't be
analyzed or cooked up). This CL modifies the type emitted for CacheId
such that this is checked by the type system.
DISABLE_THIRD_PARTY_CHECK=disable
Bug: chromium:1226471
Change-Id: Id3188bbaabf1d6554e8c412ab42f4877e262a173
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3003251
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2021-07-06 08:36:36 +00:00
Sigurd Schneider
6fdf2da9db
Teach check_experiments.js to recognize Root.Runtime.ExperimentName
...
This modifies check_experiments.js such that it recognizes the use
of Root.Runtime.ExperimentName enum members, e.g. it allows to
write
Root.Runtime.experiments.register(
Root.Runtime.ExperimentName.LOCALIZED_DEVTOOLS,
'Enable localized DevTools');
Bug: chromium:1226082
Change-Id: Iac0bd394a739562df7e7ce0b06f0a8ede3fdfbd7
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3003255
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2021-07-05 14:31:23 +00:00
Christy Chen
ab9a44d9de
Fix devtools experiment UserMetrics and presubmit check
...
There are missing entries for DevTools experiment in the UserMetrics emun, and the presubmit check has been broken so the issue didnt get caught.
This CL fix the DevTools experiment userMetrics and presubmit check
Bug: 1226082
Change-Id: I881a846b3d988746fb96ffd91eb16789198c2e3a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3002943
Reviewed-by: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
2021-07-05 13:19:15 +00:00
Sigurd Schneider
297b80bd3c
Distinguish qualified and unqualified names
...
This change distinguishes qualified and unqualified names in
the inspector backend to avoid programming mistakes.
DISABLE_THIRD_PARTY_CHECK=disable
Bug: chromium:1172300
Change-Id: I0e0bdd82e9a4f7ce4feff459159bc18d124a949a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3003258
Commit-Queue: Sigurd Schneider <sigurds@chromium.org >
Reviewed-by: Mathias Bynens <mathias@chromium.org >
2021-07-05 13:08:18 +00:00
Jack Franklin
af799b35b5
Ensure all web components have a litTagName defined
...
I discovered that the ESLint rule that enforced static tag names
wouldn't detect components that were defined as `export class ...`.
This CL fixes that rule and then subsequently fixes all the following
violations that were found now the rule is correct.
Fixed: 1225550
Change-Id: I2753659af9ba9e7280c0a212bfaaa42a1f1e849b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2999487
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 >
2021-07-01 09:14:08 +00:00
Jack Franklin
41aa9f2369
Update + enforce all litTagNames are readonly
...
Bug: 1225263
Change-Id: I3f22d7521229d9659fd546daeb5d776de2571500
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2997502
Reviewed-by: Sigurd Schneider <sigurds@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
2021-07-01 07:24:59 +00:00
Kriti Sapra
b2b29f2cc7
[CSS Migration]: Enabled wasShown esLint rule
...
Bug: 1106746
Change-Id: I373793016ce59308d1cde1b8cb7f15989d298ecc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2988318
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Kriti Sapra <kritisapra@google.com >
2021-06-29 14:00:57 +00:00
Kriti Sapra
9bd71c44f5
[CSS Migration]: Enabling lint rule to prevent <style> tags in LitHTML tempaltes
...
Bug: 1106746
Change-Id: Idce7b8c0993695efa9b71402282f4deeaf10d7ff
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2988914
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Kriti Sapra <kritisapra@google.com >
2021-06-29 13:08:51 +00:00
Kriti Sapra
ef6988a729
[CSS Migration]: Added ESLint rule to ensure wasShown methods contain call to super.wasShown()
...
Bug: 1106746
Change-Id: I7c1289f29e8b8c40e25ba37098d8c7d69e781d50
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2988310
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-29 09:22:02 +00:00
Kriti Sapra
5c3434c51b
[CSS Migration] Added ESLint rule that bans <style> tags being used in LitHtml templates
...
Bug: 1106746
Change-Id: I0701fdb0c38c2fdb43df60bb80f54075ad58f592
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2988306
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Kriti Sapra <kritisapra@google.com >
2021-06-28 11:35:20 +00:00
Jack Franklin
6c391a0969
[DarkMode] remove cmdevtools.darkmode.css
...
This CL re-writes `cmdevtools.css` to migrate all the colors over to
CSS variables, and defines those colors in dark mode also. To generate
this CSS I wrote a very hacky script that parsed the original CSS,
found all the colors, and then generated the variable names and
values. It used the original legacy color patching code to generate
the dark mode values.
Given `cmdevtools.css` now contains all dark mode overrides, this CL
removes the darkmode stylesheet for `cmdevtools.css`. Given that it's
the only dark mode CSS sheet, this CL also removes all the
infrastructure for generating and checking these sheets are up to
date.
The motivation for doing this work is that maintaining the darkmode
CSS stylesheets means we have to keep the legacy patching around in
order to (re)generate the stylesheets. Doing this one off script to
move all the overrides into the original file means we don't need to
keep the legacy patching around.
Bug: chromium:1152736
Change-Id: I0cf07d54370716299819478356b42728e0e3aadb
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2982137
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-06-25 10:53:26 +00:00
Kriti Sapra
1d765a5fdf
Added new .css.js files to grd_files_debug_sources
...
We got alerted that DevTools was not loading in chrome due to .css.js
files not being listed in the grd_files_debug_sources. This CL has the
fix for that. It adds all the migrated CSS files so far to the
debug grd files.
Bug: 1106746
Change-Id: I9b75581e59ecd3290b4fd4eecf1ddbcd46954e18
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2979698
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-23 09:44:29 +00:00
Simon Zünd
918e280504
Revert "Added grd_files_sources to generate_css template"
...
This reverts commit d2b207117a .
Reason for revert: Seems to break debug compilation step:
https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Linux%20Compile%20Debug/3919/overview
Also confirmed locally.
Original change's description:
> Added grd_files_sources to generate_css template
>
> Bug: 1106746
> Change-Id: I4bbfc0b577248e810521460c9fb35f9dcb320f9b
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2978357
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
> Commit-Queue: Kriti Sapra <kritisapra@google.com >
Bug: 1106746
Change-Id: Iddd80ce81fb74092d7852b3e4f93bafa5bf7b0bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2979696
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org >
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org >
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org >
Auto-Submit: Simon Zünd <szuend@chromium.org >
2021-06-23 06:28:50 +00:00
Kriti Sapra
d2b207117a
Added grd_files_sources to generate_css template
...
Bug: 1106746
Change-Id: I4bbfc0b577248e810521460c9fb35f9dcb320f9b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2978357
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Kriti Sapra <kritisapra@google.com >
2021-06-22 16:28:21 +00:00
Tim van der Lippe
4b99b80a80
Update Terser to mangle private class fields
...
Using a regex to denote all properties that can be mangled, we
can mangle all private class fields. Since we know that private
class fields are only accessed in a class, we know that terser
can safely mangle the properties in a single rolled up bundle.
Mangling of private class fields on `core/sdk/` has shown an
expected 8.6% bundle size improvement.
R=aerotwist@chromium.org
Doc: https://docs.google.com/document/d/13yeJuvIq8JYFXSOsjRgcXzQVrIviJmukvxj27rn1Ab8/preview
Bug: 1222126
Change-Id: Id3bb3f4ff4af295eddaa4bce3bff4fabe4d87794
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2975285
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-06-22 13:39:19 +00:00
Tim van der Lippe
2af52cb561
Explicitly add terser to node_modules/
...
While we were already including terser as a transitive dependency
via rollup-plugin-terser, the resolved version was quite old.
By explicitly adding terser to our node_modules deps, we can ensure
we are using a recent version.
R=aerotwist@chromium.org
Bug: none
Change-Id: Ie10a808ce3cbe80138183a9704816aa966a01f16
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2975283
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-22 11:16:28 +00:00
Tim van der Lippe
324d60372c
Update Mocha to 9.0.0
...
The breaking changes in 9.0.0 (
https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#900--2021-06-07 )
do not affect us, as we are running Node 14+ and are compatible
with ESM-first loading.
R=szuend@chromium.org
Bug: none
Change-Id: I53dbfdd492ddded2e0a41676606471240bb4b129
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2975286
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-06-22 05:00:22 +00:00
Kriti Sapra
15269c4cf5
Created script to create .css.js files for CSS files
...
Bug: 1106746
Change-Id: I7612419d19815ce5ad67c842215f65f93ca90769
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2960177
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-18 11:18:54 +00:00
Alex Rudenko
fd136e001e
Rename DEBUG env var to DEBUG_TEST
...
Currently, you cannot run tests in non-debug mode
and turn on debug logging from Puppeteer that relies
on https://www.npmjs.com/package/debug .
Running `DEBUG=puppeteer.* ...` would also start the
test runner in a debug and non headless mode. This
CL renames the DEBUG variable that DevTools test runner
relies on so that debug logging is independent from the
debug mode we have for tests.
Bug: none
Change-Id: I8b8476f7c26c07eea1db29bfae74d4fb61afd42c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2963755
Reviewed-by: Simon Zünd <szuend@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jan Scheffler <janscheffler@chromium.org >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
2021-06-16 12:47:15 +00:00
Simon Zünd
52e202093a
[deps] Upgrade eslint to 7.28.0 and typescript-eslint to 4.27.0
...
R=tvanderlippe@chromium.org
Bug: 1057042
Change-Id: I0c658894c7c75a773e39314c66862c7af76d876c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2963817
Auto-Submit: Simon Zünd <szuend@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-16 09:10:18 +00:00
Tim van der Lippe
465ceddbdb
Update assertNotNull to also check for undefined
...
The `NonNullable` type in TypeScript already excludes `undefined`
from the possible types, but we weren't properly checking for
it in the if-statement.
R=szuend@chromium.org
CC=pfaffe@chromium.org
Bug: none
Change-Id: I9320f0c7662d46d562d6544f35d45380043d4409
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2960173
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-14 13:56:44 +00:00
Kriti Sapra
3937e6f1f8
Added ESLint rule to ensure all .css.js files that are being
...
imported exist in the file system.
Initally, we wanted to create a `.d.ts` file for each CSS file to
ensure that the file being imported actually exists. However, when
ninja is building `tsc` uses the generated `tsconfig` file in `gen`.
In the `tsconfig.json` `files` list it will see the original TS file
that's in the source tree. When it goes to see the TS file and sees
the `import styles from 'foo.css.js'`. However, that file does not
exist in the files list of the entrypoint or the source tree, so TS
never finds it.
Instead we went with the approach of adding a `declare module` to type
all `.css.js` files and then use a lint rule to ensure that if you
import `foo.css.js` that there is a `foo.css` file in the tree.
Bug: 1106746
Change-Id: I8a65734bf4a9b359f8210b0011f14800c5d9426b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2953260
Commit-Queue: Kriti Sapra <kritisapra@google.com >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-14 10:49:33 +00:00
Jan Scheffler
9245dae50b
[ESLint] Add rule to prevent self closing custom elements
...
Bug: None
Change-Id: I082b787fb56159ef9465fe8f0b5c3d5623ab9890
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2955365
Commit-Queue: Jan Scheffler <janscheffler@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-11 15:55:55 +00:00
Jan Scheffler
551be57016
Update puppeteer to v10.0.0
...
DISABLE_THIRD_PARTY_CHECK=Update puppeteer requires type changes
Bug: None
Change-Id: Ifda85d161fc94567e4cfaaab0acc2da2f2c29d30
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2953266
Auto-Submit: Jan Scheffler <janscheffler@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-11 09:22:36 +00:00
Tim van der Lippe
0b2df65238
Update @web/rollup-plugin-import-meta-assets to pull in upstream fix
...
This update contains the same fix as we had locally applied in
https://crrev.com/c/2939994/4/node_modules/%2540web/rollup-plugin-import-meta-assets/src/rollup-plugin-import-meta-assets.js
R=aerotwist@chromium.org
Bug: 1216402
Change-Id: Ie8cabe55a1beac1c06c25c73d43b6f00fac12732
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2951129
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Paul Lewis <aerotwist@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-06-10 10:23:00 +00:00
Tim van der Lippe
727227900c
Dynamically optimize svgs
...
Currently, we optimize our SVGs out-of-sync and have a Python
script and PRESUBMIT check to make sure that the SVGs are correctly
optimized. This means that the SVGs are duplicated in the Images
folder and requires developers to install `svgo` on their command
line, which could be using differing versions.
Instead, we can optimize the SVG images (which is computationally
cheap) during build time using the rollup-plugin-import-meta-assets
and svgo packages. The rollup plugin traverses the required SVG
image files and puts them and rewrites them to the Images/ folder
(rather than in src/), while also allowing us to optimize them
along the way.
DISABLE_THIRD_PARTY_CHECK=Removing script from package.json
R=jacktfranklin@chromium.org
Bug: 1216402
Change-Id: Ieb6932b9a81753be5ecbccd00a5d84bd0efa23f8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2939994
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-10 10:09:30 +00:00
Tim van der Lippe
4de48df446
Add rule to enforce deep equality comparisons for array assertions
...
Not every chai assertion uses deep comparisons. For arrays, we need
to make sure that not just the array itself, but also its contents
and its members are equal. There are only a subset of assertions
in chai that do that, so allow only these in our test assertions.
R=dsv@chromium.org
Fixed: 1218015
Change-Id: Ib7eb5864cf65a54ef17b9d637cd8e3b94323edb6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2950163
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Danil Somsikov <dsv@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Danil Somsikov <dsv@chromium.org >
2021-06-09 16:13:08 +00:00
Danil Somsikov
73839bd1b0
Mark resource from the WebBundle as such and show WebBundle-specific errors.
...
Bug: 1182537
Change-Id: I1a35a676005cf60d725f23fac0a3900c1a1c21bc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2949050
Commit-Queue: Danil Somsikov <dsv@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-09 15:31:48 +00:00
Danil Somsikov
9ac07f536e
Support .headers files in devtools hosted mode server.
...
This is similar to what WPT does (https://source.chromium.org/search?q=f:third_party%2Fblink%2Fweb_tests%2Fexternal%2Fwpt%2Fresources.*%5C.headers$ )
and is needed to support binary resources with custom headers, such as
webbunles.
Bug: 1182537
Change-Id: I0e089a9a3ff43cd5082d0cd20f7c89ceec42c60e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2944947
Commit-Queue: Danil Somsikov <dsv@chromium.org >
Reviewed-by: Paul Lewis <aerotwist@chromium.org >
2021-06-08 14:55:34 +00:00
Tim van der Lippe
706ec965fb
Add packages to optimize svgs dynamically
...
These packages will be used to dynamically optimize SVG images
during the build.
R=jacktfranklin@chromium.org
Bug: 1216402
Change-Id: I04e95aa7d79c9d67beaf8a7861182c52b16b7d0f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2939992
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-06-04 13:32:16 +00:00
Tim van der Lippe
0005b80576
Minify html template literals in release mode
...
Because of https://github.com/asyncLiz/minify-html-literals/issues/37
we are unable to minify CSS in template literals. However,
since we are moving CSS over into separate files, we can minify
these CSS files separately.
This also caught two issues with our templates, one of which was missing
the closing tag name whereas the other was missing the closing angle
bracket. As such, in release mode, we are now fully validating our
HTML structure.
R=jacktfranklin@chromium.org
Fixed: 1213034
Change-Id: Ieb4708334e627d368cb94db541b545b9dea5e895
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2922503
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-03 11:23:07 +00:00
Tim van der Lippe
4965ccdd03
Update types packages
...
This includes the fixes for istanbul-reports and ESTree.
Some functional changes were required to make the type checker
happy again.
DISABLE_THIRD_PARTY_CHECK=Functional changes for types
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I57964301d51b5e94cd6ca8a5453bdc51ca6d9758
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2933803
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-02 16:36:54 +00:00
Philip Pfaffe
3ae8373dda
Mark crashpad_handler binary as executable on download
...
Bug: none
Change-Id: If57b662eea0ff99ecbf6cbc3c57a685e77edaad1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2931812
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Yang Guo <yangguo@chromium.org >
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org >
2021-06-02 11:36:24 +00:00
Tim van der Lippe
652ccb7ac2
Add rollup-plugin-minify-html-template-literals to node_modules
...
R=jacktfranklin@chromium.org
Bug: 1213034
Change-Id: I5da8225f60b53870a1c67d6b5d02a464c08f4eb2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2917088
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-06-02 11:00:34 +00:00
Tim van der Lippe
69775386db
Update TypeScript to 4.3.2
...
Also fix the presubmit bug that prevents us from uploading
any new updates to the node_modules from Mac, as that installs
`fsevents`, which has a binary file that can't be checked.
For more information on that, see
https://bugs.chromium.org/p/chromium/issues/detail?id=1210746#c32
DISABLE_THIRD_PARTY_CHECK=PRESUBMIT fix
R=szuend@chromium.org
Bug: 1210746
Change-Id: Ie1a62698456384be2298adfd8deaa6735bf76337
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2922502
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
Reviewed-by: Simon Zünd <szuend@chromium.org >
2021-05-27 18:52:33 +00:00
Tim van der Lippe
8b929548c0
Also add license headers for .gni files
...
R=jacktfranklin@chromium.org
Bug: 1213449
Change-Id: I3228629bbaa1c3824a721a93782356ec71855513
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2919951
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-05-26 16:19:23 +00:00
Tim van der Lippe
81752507db
Integrate license header check in PRESUBMIT
...
Also fix the script to only allow absolute paths, since the presubmit
script handles absolute paths only.
R=jacktfranklin@chromium.org
Bug: 1213449
Change-Id: Id1c0c55ec1c039eadd343445645655910b06da8c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2919950
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-26 15:06:53 +00:00
Tim van der Lippe
1dc9ecb63c
Add script to check license headers for BUILD.gn files
...
The script currently processes all BUILD.gn files in the
top level directories and automatically adds the required
license header if missing.
In a follow-up CL the script will be integrated in the
PRESUBMIT.py.
R=jacktfranklin@chromium.org
Bug: 1213449
Change-Id: Ifea17b0fd3301158c098513d0cc9d7d7c50e3fe3
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2919948
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-05-26 14:38:55 +00:00
Jack Franklin
8425afc1eb
[DarkMode] filter.css
...
Also discovered that the stylelint rule needs to allow
`rgb(var(...))`, so fixed that as a drive-by. This will change in time
but was the easiest path to getting the first migration stage done.
Bug: chromium:1152736
Change-Id: I70816edee5217dc3f52804877b04dd479a6edb15
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2909588
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 >
2021-05-25 14:28:17 +00:00
Alex Rudenko
7c94b5f29e
Compress md files
...
This CL adds compression for md files resulting in ~16KB reduction
in binary size of chromium resources.
Bug: chromium:1211337
Change-Id: I5f5482ae0bc297adea4c4bea0c911b4303877484
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2916384
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
2021-05-25 13:37:47 +00:00
Jan Scheffler
0f14e2b82c
[Unit tests] Show html coverage results location
...
This cl informs developers where they can find the result when running
unittests with the html coverage report enabled.
Bug: None
Change-Id: Id6784d9070fc2ad1f1be2a1da58b0d5baf174f8a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2912102
Commit-Queue: Jan Scheffler <janscheffler@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
2021-05-25 08:58:53 +00:00
Jan Scheffler
ef7787df1a
[Unit tests] Improve output for unit tests
...
This change replaces the 'spec' report with a 'mocha' report in karma
when the '--expanded-reporting' flag is set. If it is not set and the
tests fail, a hint is added to the console to enable the flag to get a
more verbose output of why the tests are failing.
Bug:None
Change-Id: Ia41615362332459a4d89aef0440cea0ec266157b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2912098
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jan Scheffler <janscheffler@chromium.org >
2021-05-25 08:26:23 +00:00
Alex Rudenko
8505e32b7b
Implement caching for file compression during builds
...
This CL adds a new script to compress files using brotli. The new script
maintains a cache of compressed files so if the file was previously
compressed and has not been changed, it is not compressed again.
The compression happens only in release builds. Also, this CL
includes JSON into the compression list saving ~0.7MB in binary size.
Bug: chromium:1211337
Change-Id: I8ed8189d762f5532a261d748cbc2eb8a4be9a25e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2905507
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-25 06:45:43 +00:00
Tim van der Lippe
4fb02b1c0b
Add support for depending on non-TS targets
...
Currently, we have the dependencies on the generated locales
scattered into `front_end/` and the `test/unittests/`. However,
i18n should typically be the only folder that should know about
the locales. The reason we split these off, is that we don't want
to rebuild all of DevTools whenever somebody changes a localization
string.
That said, with the recent updates to the build system, it is
now possible to add them to `public_deps`, to ensure we don't
need to rebuild all of DevTools.
R=szuend@chromium.org
Bug: none
Change-Id: I9892362032c80862cc224682fe5dc73fde91af21
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2912720
Reviewed-by: Simon Zünd <szuend@chromium.org >
Commit-Queue: Simon Zünd <szuend@chromium.org >
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-25 04:43:53 +00:00
Tim van der Lippe
e902a9ea64
Type check Rollup configuration with TypeScript
...
By moving the configuration file to `scripts/build`, we are correctly
using the `moduleResolution = 'node'`. Then, we enable TypeScript with
`// @ts-check`, we get warnings in VS Code. There were some small fixes.
Mostly that it removed an unnnecessary closure and `buildStart` hook,
which we no longer require. Additionally, the `output` format now
conforms to what Rollup expects.
R=jacktfranklin@chromium.org
Bug: none
Change-Id: I55daf8e6f3e32f81afd9e0b13ffc7b49bddfedfc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2910110
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org >
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org >
2021-05-24 11:57:57 +00:00
Takuto Ikuta
0e87680f36
Reland "Reland "use python3 in devtools-frontend by default""
...
This reverts commit 7c57958680 .
Reason for revert:
This uses dict instead of set in modular_build.py for deterministic
output.
ref: https://softwaremaniacs.org/blog/2020/02/05/dicts-ordered/en/
I confirmed that devtools_app.js is the same in repeated builds.
Original change's description:
> Revert "Reland "use python3 in devtools-frontend by default""
>
> This reverts commit 0d4947c37e .
>
> Reason for revert: https://crbug.com/1211770
>
> Original change's description:
> > Reland "use python3 in devtools-frontend by default"
> >
> > This reverts commit a8336c1e58 .
> >
> > Reason for revert:
> > use universal_newlines instead of text for
> > https://docs.python.org/3/library/subprocess.html#subprocess.Popen
> >
> > I tried to divide this CL in to make py2/3 compatible and switch in
> > another CL. But that hit another issue due to the difference of string
> > type around io.StringIO and cStringIO.StringIO like
> > https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8846743161604002304/+/u/compile/raw_io.output_failure_summary_
> >
> > So decided to re-land the switch with fix for known issue.
> >
> > I confirmed this works for python3.6 too.
> >
> > Original change's description:
> > > Revert "use python3 in devtools-frontend by default"
> > >
> > > This reverts commit 37c0bf698d .
> > >
> > > Reason for revert:
> > > Compatibility issues with python 3.6.
> > >
> > > Original change's description:
> > > > use python3 in devtools-frontend by default
> > > >
> > > > Fixed: 1205624, 1205625
> > > > Change-Id: Iddaf2a49bffd92140d1877784ffd9f5dd83ac3de
> > > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902988
> > > > Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
> > > > Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> > > > Reviewed-by: Michael Achenbach <machenbach@chromium.org >
> > > > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
> > >
> > > Change-Id: Ic426154f58798dd8631f9bac101521f0b25ea54c
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2906060
> > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
> > > Commit-Queue: Michael Achenbach <machenbach@chromium.org >
> >
> > Bug: 1210939, 1205624, 1205625
> > Change-Id: Ia7ddf5ab37c8df3e2f682bf89cb55ef30e663341
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2909053
> > Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> > Reviewed-by: Michael Achenbach <machenbach@chromium.org >
>
> Bug: 1210939
> Bug: 1205624
> Bug: 1205625
> Bug: 1211770
> No-Tree-Checks: true
> No-Presubmit: true
> Change-Id: Ic3a6add15b4126dfe818b445a5227253d296ee96
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2910016
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
> Reviewed-by: Michael Achenbach <machenbach@chromium.org >
Bug: 1210939
Bug: 1205624
Bug: 1205625
Bug: 1211770
Change-Id: I2acb2968e68f55a663cd5221c1c92b16301392cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2910020
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
2021-05-24 09:58:37 +00:00
Paul Lewis
2afe8be656
Skip VSCode settings update on error
...
I had a rogue comma in my settings.json file. This prevented the require
from running correctly, which in turn stopped gclient sync from running.
This CL adds a try-catch around the code so that on any error, the
update is skipped.
This CL also adds a bypass option, so that people can opt out of syncing
their VSCode settings entirely.
R=jacktfranklin@chromium.org
Bug: None
Change-Id: I3d90dc0546fcc145c881cb1aa49964e79db3f24f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2914873
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org >
Auto-Submit: Paul Lewis <aerotwist@chromium.org >
2021-05-24 09:12:16 +00:00
Jan Scheffler
c53174b651
Add karma-mocha-reporter to node_modules
...
Bug:None
Change-Id: I35b9113b8e8191e2e76dbd9fdd20e88137ef8d6f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2912097
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org >
Commit-Queue: Jan Scheffler <janscheffler@chromium.org >
2021-05-21 21:26:23 +00:00
Takuto Ikuta
7c57958680
Revert "Reland "use python3 in devtools-frontend by default""
...
This reverts commit 0d4947c37e .
Reason for revert: https://crbug.com/1211770
Original change's description:
> Reland "use python3 in devtools-frontend by default"
>
> This reverts commit a8336c1e58 .
>
> Reason for revert:
> use universal_newlines instead of text for
> https://docs.python.org/3/library/subprocess.html#subprocess.Popen
>
> I tried to divide this CL in to make py2/3 compatible and switch in
> another CL. But that hit another issue due to the difference of string
> type around io.StringIO and cStringIO.StringIO like
> https://logs.chromium.org/logs/devtools-frontend/buildbucket/cr-buildbucket.appspot.com/8846743161604002304/+/u/compile/raw_io.output_failure_summary_
>
> So decided to re-land the switch with fix for known issue.
>
> I confirmed this works for python3.6 too.
>
> Original change's description:
> > Revert "use python3 in devtools-frontend by default"
> >
> > This reverts commit 37c0bf698d .
> >
> > Reason for revert:
> > Compatibility issues with python 3.6.
> >
> > Original change's description:
> > > use python3 in devtools-frontend by default
> > >
> > > Fixed: 1205624, 1205625
> > > Change-Id: Iddaf2a49bffd92140d1877784ffd9f5dd83ac3de
> > > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2902988
> > > Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
> > > Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> > > Reviewed-by: Michael Achenbach <machenbach@chromium.org >
> > > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org >
> >
> > Change-Id: Ic426154f58798dd8631f9bac101521f0b25ea54c
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2906060
> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com >
> > Commit-Queue: Michael Achenbach <machenbach@chromium.org >
>
> Bug: 1210939, 1205624, 1205625
> Change-Id: Ia7ddf5ab37c8df3e2f682bf89cb55ef30e663341
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2909053
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
> Reviewed-by: Michael Achenbach <machenbach@chromium.org >
Bug: 1210939
Bug: 1205624
Bug: 1205625
Bug: 1211770
No-Tree-Checks: true
No-Presubmit: true
Change-Id: Ic3a6add15b4126dfe818b445a5227253d296ee96
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2910016
Commit-Queue: Takuto Ikuta <tikuta@chromium.org >
Auto-Submit: Takuto Ikuta <tikuta@chromium.org >
Reviewed-by: Michael Achenbach <machenbach@chromium.org >
2021-05-21 13:19:43 +00:00