25 Commits
Author SHA1 Message Date
Eric Leese 5f7e033b32 Fix npm run start and build scripts to work in full Chromium checkout
Also simplified code for test script to use devtools_paths.js

Bug: none
Change-Id: I699808267782f55150eabaacf9f86298ab3741d1
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6403238
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2025-03-28 03:39:01 -07:00
Benedikt Meurer 6b1b791739 [npm] Port npm start to JavaScript.
There's no point in writing this one script in Python. It's much better
to have it in JavaScript, just like `npm run build`.

Bug: 404192426
Change-Id: Ic19eaeb5b1d97ca750ae4253963b8434072d00fd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6387801
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
2025-03-25 05:33:21 -07:00
Nikolay Vitkov 41c69115b8 [eslint] Enable import/sort rule
This provides consistency of how imports are order,
reducing differences in authored files.

Bug: none
Change-Id: I45ddd71e3e0004aca32f101cb926101544a34157
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6218490
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2025-01-31 07:48:10 -08:00
Nikolay Vitkov 2a1b3b34b1 Update StyleLint to v16
Stylelint v16 deprecated CJS so I moved our lint script to ESM,
and fixed all the deprecation warning.
The only place I needed to silence them were tests,
as we import CJS there.

Bug: none
Change-Id: Iae4d2df76c855a9738b774a2d035f22509770215
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6138610
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2025-01-03 02:57:06 -08:00
Nikolay Vitkov 55adf677d3 [eslint] Migrate to Flat config
A necessary step to adopt EsLint v9.
More can be read at - https://eslint.org/blog/2022/08/new-config-system-part-2/
In short - only a single configuration is used a cross the whole repo.

Bug: none
Change-Id: I74cd613fba25b94cee92e4b7c1b525471bcbe44b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6059264
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2025-01-02 04:58:36 -08:00
Benedikt Meurer 0d4dbaeca9 [lint] Read lit-analyzer options from toplevel tsconfig.json.
This way the config is in a central place and can be reused for
ts-lit-plugin.

Bug: 375149136
Change-Id: Ic3805b059b5c9b0d103a152e1ff36b3c9c5245b6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5953717
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2024-10-23 14:10:30 +00:00
Joshua Thomas e2625e34dc Fix node path for arm macs
Bug: 370734442
Change-Id: Ia3a0f63970e302a735b507467e843846a2159f98
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5920518
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Shuran Huang <shuuran@chromium.org>
Commit-Queue: Joshua Thomas <masnoble@chromium.org>
2024-10-10 17:33:29 +00:00
Danil Somsikov 058b9d879d Add lit-analyzer and run it as a part of lint check
Bug: 370734442
No-Presubmit: true
Change-Id: I7021b801e5bacd4ed33643651a53b8db20ccf8b0
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5898986
Commit-Queue: Danil Somsikov <dsv@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
2024-10-07 12:41:05 +00:00
Nikolay Vitkov 47310242ac [Cleanup] Enable EsLint quote-props
Enable a EsLint rule to enforce code-style

Bug: none
Change-Id: I4fa6d09a744999dc2967fe989a2339423bb78c86
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5833497
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2024-09-04 11:57:11 +00:00
Benedikt Meurer e6a39dc688 [scripts] Provide a single npm run lint command.
This unifies the current set of two dedicated scripts for running ESLint
and stylelint into a single script, with a single npm run-script
command. We need to migrate the Infra and devtools-internal before we
can fully remove the old scripts.

Bug: 360832181
Change-Id: Ifb98d882d951fb3e1c9d7ff8aae22c8d844ced55
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5796886
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
2024-08-19 16:04:20 +00:00
Wolfgang Beyer 21656cbc83 Fix path for running e2e-tests
Fixed: 1478914
Change-Id: Ibde4d22aa87779ed7ab0f257710f47fa6aa80569
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4840335
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-09-05 10:36:09 +00:00
Mathias Bynens a017ced955 Use Chrome for Testing instead of Chromium binaries
To reduce complexity, the folder names within the CfT archives are
simplified as follows:

- chrome-win64 → chrome-win
- chrome-mac-{arm64,x64} → chrome-mac
- chrome-linux64 → chrome-linux

Bug: chromium:1465312
Change-Id: I984e818d58ef6dd16b44db022eefcb55b5afce50
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4724028
Auto-Submit: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Liviu Rau <liviurau@chromium.org>
2023-07-27 12:13:35 +00:00
Mathias Bynens 5c9b5f1ea9 Add chrome to DEPS alongside chromium_*
This patch prepares the relevant entries and scripts to version-pin and
download Chrome for Testing alongside Chromium. Consuming these new
binaries instead of Chromium is planned for a separate CL.

Bug: chromium:1465312
Change-Id: Ic1fca66b7a213e10c7200fc6f5f2ba6aeaa225cd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4685561
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2023-07-18 15:16:39 +00:00
Alex Rudenko 09215f4648 Add node for arm64 to DEPS
sha1 taken from https://source.chromium.org/chromium/chromium/src/+/main:third_party/node/mac/node-darwin-arm64.tar.gz.sha1

DISABLE_THIRD_PARTY_CHECK=related changes
Bug: none
Change-Id: Ib3e7cbdb1604300277f481676f5ce5ca12ad534e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4436920
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-04-18 15:11:32 +00:00
John Emau 254c8dd221 Fix for devtools-frontend full checkout paths on Windows
Currently calculating the path to chromium's root directory returns an empty string on Windows because the path used to compare against the executable path is not normalized.

```
PATH_TO_EXECUTED_FILE.indexOf(devtoolsPath)
```
Becomes
```
'D:\\drive\chromium\src\third_party\devtool-frontend\src\...'.indexOf('src/third_party/devtools-frontend'); -> -1 on Windows
```

The fix is to use the normalizedPath variable to return the correct substring.

Change-Id: Ia12232f3746466f3257975d652342ac8b9ed2578
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3703315
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: John Emau <John.Emau@microsoft.com>
2022-06-14 07:03:15 +00:00
Takuto Ikuta 5bfd102f96 use __dirname
Bug: 1294413
Change-Id: I10fff9f43c9354e424d88f2a1eb47f9bc064f99b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439243
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-02-07 12:18:16 +00:00
Takuto Ikuta 1595cda8b6 fix devtoolsRootPath for internal build
See https://crbug.com/1294413#c5 for explanation.

Bug: 1294413
Change-Id: Id6461f1830b62eb9e5a14fccfd2229b6b64c8161
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3439235
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-02-07 11:00:53 +00:00
Takuto Ikuta afe8b8e716 fix isInChromiumDirectory
Checkout of chromium directory may not have 'chromium'.
e.g.
https://ci.chromium.org/p/devtools-frontend/builders/try/devtools_frontend_linux_blink_light_rel
has chromium checkout under 'builder' dir.

Bug: 1278663
Change-Id: Icaef7e58ba93e30528ae23d352842abd3d0f3055
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3414935
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Tim Van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
2022-01-26 10:44:45 +00:00
Kriti Sapra 56daf78ddb Updated no-multiple-empty-lines to only have 1 as max
DISABLE_THIRD_PARTY_CHECK=updated linting formatting
Bug: 1106746
Change-Id: I371bca95b7cf1e8b7eaa4f9e7c3860af4eedee3e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3057042
Commit-Queue: Kriti Sapra <kritisapra@google.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-07-28 14:10:15 +00:00
Patrick Brosset 5d02bbd8c7 Make isInChromiumDirectory also work when inside chromium
I use the standalone devtools-frontend checkout process like most people
working on devtools, however I placed this repo inside chromium here:
D:\dev\chromium\devtools\devtools-frontend
This way I have both src and devtools-frontend side by side.

I just realized that this prevented me from running the css linter.
Indeed, run_lint_check_css.js tries to find the path to stylelint exe
file based on whether devtools is standalone or integrated in
chromium.src.
If it sees a directory named chromium inside the path, it assumes
devtools is integrated in chromium.src which, in my case, is wrong.

The change attempts to make this logic a little bit more safe by
checking a longer part of the path.
This resolves my issue.

Bug: 1198532
Change-Id: I872429da0751280bef5a4ec68602001421f55056
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2821855
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Brandon Walderman <brwalder@microsoft.com>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2021-04-14 09:42:02 +00:00
Jack Franklin 29bb6314ce [TestRunner] create new test runner that takes configuration file
This CL lands the initial new run_test_suite.js that can take its
configuration from a config JSON file, or from flags.

This new script is only used to run `npm run auto-interactionstest`
and nothing more; I want to roll it out slowly and ensure that
everyone is aware of it before removing the old Python script. I will
create a doc with all the various steps, and required documentation,
as I've taken the chance to rename some options to make them clearer.

Bug: chromium:1186163
Change-Id: I5a199f82ac7ab0f323988acacaa7aae2d64e6349
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2763866
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-03-16 10:35:54 +00:00
Tim van der Lippe 51257fc619 Update CodeMirror to 5.59.4
This pulls in the fix for
https://github.com/codemirror/CodeMirror/issues/6599

It also fixes an issue with the darkmode sheet generation that
had the wrong path for Chrome binaries on Mac.

R=jacktfranklin@chromium.org

Bug: 1180740
Change-Id: I8b879bdefb0567c4d44b457255c88ef4395924c9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2716287
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-02-24 12:34:38 +00:00
Jack Franklin 40b5fb67b3 Remove python script for generating dark mode CSS
Now devtools_paths.js exists, we can use JS and remove the Python
version completely. This unblocks further work to enforce that
`.darkmode.css` files are up to date as part of a PRESUBMIT.

Bug: chromium:1164945
Change-Id: Ie9e8fa1cd5287d8e444085d7f036a4b17c99eda9
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2662976
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-02-01 14:51:37 +00:00
Jack Franklin bc30234f61 Migrate run_lint_check_css to JS script
As part of the work to move more scripts to Node, not Python, over time,
picked this one as the starting point. I changed its API slightly to
allow more flags to be taken in, as we'll need that to do a stylelint
pass against TypeScript files, but I will do that in a subsequent CL.

I had to make quite a few changes to devtools_paths.js, but I think it's
now calculating paths correctly. It took a bit of messing to get the
equivalent of Python's path.abspath(__file__), as you'll see from the
large comment that tries to explain what's going on!

Bug: chromium:1166108, chromium:1166572
Change-Id: Ia0b19ff8956b2ede2447530be57876a88046887e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2631113
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-18 10:30:12 +00:00
Jack Franklin 65c824b5ad Create Node version of devtools_paths.py
This is not complete in that it doesn't expose all the same paths, but
I'd rather have people add to them as they go. I've defined the main
paths we'll need - third_party, node and devtools root.

I tested this locally by having it print out the paths and I updated the Python
equivalent to do the same. I ran the commands both locally in my devtools repo
and from the Chromium repository.

Bug: chromium:1166572
Change-Id: Ia0403b9b861d5cf58234bcf16d7ad247184233a4
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2626301
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-14 15:02:15 +00:00