Commit Graph
21 Commits
Author SHA1 Message Date
Nikolay Vitkov a175b3fd0d Use correct package for JavaScript natives
We never install the packages mentioned in that package json
but rely on the node_modules one, so removed.
Also update the packages and types

Bug: none
Change-Id: I0676c36621f39bff7408c5b910f5e4461f3f0158
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6394480
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
2025-03-27 00:19:13 -07:00
Jack Franklin c10b497bff ESLint: lint *.d.ts files
Bug: none
Change-Id: Ie91dbdc6ed1533c2c58cdb2eafa6d5f23632d243
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6311457
Reviewed-by: Nikolay Vitkov <nvitkov@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
2025-02-28 11:35:14 -08:00
Nikolay Vitkov b4e8dc7ac2 Update EsLint v9
Bug: none
Change-Id: Iebcc53c0f70a51242f22e4df167cd588b08cefcd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6140633
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org>
2025-01-07 05:41:31 -08:00
Yuan Kang d60d33e9f3 Add NPM Lockfiles:
Adds corresponding NPM lockfiles to package.json files. This enumerates dependencies, including transitive ones, and their versions, to avoid using vulnerable ones. For more details, see go/npm-lockfile-cl-guide

Bug: none
Change-Id: Ia1e5a33ef6adfe017b93e0fdb0265af04c22adfd
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5632127
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2024-06-19 04:40:09 +00:00
Ergun Erdogmus f12c052fc7 [Autoroller] Add // clang-format off to scripts generated by roll_deps and remove outdated .eslintignore comment
Using `.eslintignore` file for `clang-format` is removed in crrev.com/c/2091445 but the comment was still there.

Bug: 40272289
Change-Id: Iad48d3b7414eb373fdc24917ffac79dd331f08ca
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5285880
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
2024-02-13 05:13:09 +00:00
Johan Bay 4ae584d7a4 Forward mixin interface methods to their includers
This ensures that we have argument hints for things such as
`window.clearTimeout` where `clearTimeout` is defined in a mixin
`WindowOrWorkerGlobalScope` and `Window` includes the mixin.

Bug: 1255619
Change-Id: I8fe2434f0b88bc39454feed3900639f5edc05305
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3660423
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-05-24 08:35:50 +00:00
Johan Bay ebb70e3356 Change JavaScriptMetadata to contain list of receivers
Bug: 1255619, 1327573
Change-Id: I8fbe5a041b1ef5aef519d1b0b76f1bded237bd6f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3580497
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-05-24 07:56:40 +00:00
Simon Zünd 41c626075a Don't prepend PWD to file paths for natives generation
roll_deps.py was upgraded to Python3 in https://crrev.com/c/3521887.
This changed the paths that are passed to the natives generation script
to be absolute and no longer relative.

To account for this, we no longer prepend the working directory to
calculated paths.

R=jobay@chromium.org

Bug: None
Change-Id: Ia0a0f946e27d61fa64e7856daef0f709fb058365
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3607830
Reviewed-by: Johan Bay <jobay@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2022-04-26 09:43:17 +00:00
Johan Bay 8d8c684c22 Update roll_deps.py to also run javascript_natives/ script
With this change, we also update the argument hints for javascript
functions defined in .idl files when we roll Chromium deps.

DISABLE_THIRD_PARTY_CHECK=changes to roll_deps.py and javascript_natives/
are related

Change-Id: I0544acbe82a0292e486cfb3fac47b683438c3759
Bug: 1255619
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3431347
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-02-02 18:18:51 +00:00
Johan Bay 49f681ae20 Update javascript_natives/index.js script
This change also includes a manual run of the script to update
NativeFunctions.js.

Change-Id: I9ce1c4979674d9513cb7259e3e311e30b13de9ed
Bug: 1255619
Doc: https://goo.gle/devtools-js-argument-hints
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3399837
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Johan Bay <jobay@chromium.org>
2022-01-27 10:06:25 +00:00
Mathias Bynens b1b64fc1be Fix broken paths in NativeFunctions.js generator
`scripts/javascript_natives/index.js` expects `NativeFunctions.js` to
reside at a specific path, and broke when a CL [1] moved it to another
location, and broke (in another way) when the DevTools front-end
codebase moved to a separate repository. Similarly, the script expects
a Chromium checkout at a specific location relative to itself, which
hasn’t been correct since the DevTools front-end codebase moved to a
separate repository.

This patch updates the expected locations, but does not re-generate
the output since the script requires additional follow-up fixes.

[1]: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2814662

Bug: chromium:1255619
Change-Id: I066fb4349f045df5a12edd1378d7acdaa733a61b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3201677
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
2021-10-08 12:40:54 +00:00
Tim van der Lippe c2cb4301c9 Add missing license headers
In a follow-up CL we will be porting the license header check to ESLint.
This allows us to add missing license headers for TypeScript-authored
files. The script found some missing license headers already, which this
CL adds.

Change-Id: Id5041813281d2a7151297f9ed29baabc1cfd85af
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2097991
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
2020-03-12 14:53:52 +00:00
Tim van der Lippe ba26b2b503 Run ESLint on the scripts directory
We weren't running ESLint on this directory and, as it turns out, there
are quite a few linter errors in this folder.

R=jacktfranklin@chromium.org

Change-Id: Ic6cb9f6ad4858f69114e0c433a954041215b49e2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2096705
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-03-11 14:47:51 +00:00
Brandon Goddard 53faba1c7d Reland "Add script that checks license headers of JavaScript files"
This reverts commit 27f15d113a.

Reason for revert: script is fixed on Windows

Original change's description:
> Revert "Add script that checks license headers of JavaScript files"
>
> This reverts commit 6122ebd2f9.
>
> Reason for revert: Presubmit fails on windows due to relative
> path comparison with excluded files
>
> Original change's description:
> > Add script that checks license headers of JavaScript files
> >
> > The script checks if the license header is the BSD-3 license header that
> > DevTools is licensed under. It excludes files that have license headers
> > that reference non-Google/non-Chromium authors or are third_party
> > bundles that are checked into a non-third_party folder.
> >
> > Change-Id: I35f78036b48d3d7b7dcb9db1e070691282e27a02
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016747
> > Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> > Reviewed-by: Liviu Rau <liviurau@chromium.org>
> > Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
>
> TBR=bmeurer@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org,liviurau@chromium.org
>
> Change-Id: Idc27e9b78d5ac314176c71f8f4a7a2257da08be9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019019
> Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
> Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
> Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>

TBR=bmeurer@chromium.org,aerotwist@chromium.org,lomitch@microsoft.com,brgoddar@microsoft.com,tvanderlippe@chromium.org,liviurau@chromium.org

Change-Id: I191665c8e3fdbee7f3c5c312b5ba00513502e080
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019021
Reviewed-by: Fabio Rocha <fabio.rocha@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2020-01-24 18:16:35 +00:00
Brandon Goddard 27f15d113a Revert "Add script that checks license headers of JavaScript files"
This reverts commit 6122ebd2f9.

Reason for revert: Presubmit fails on windows due to relative
path comparison with excluded files

Original change's description:
> Add script that checks license headers of JavaScript files
> 
> The script checks if the license header is the BSD-3 license header that
> DevTools is licensed under. It excludes files that have license headers
> that reference non-Google/non-Chromium authors or are third_party
> bundles that are checked into a non-third_party folder.
> 
> Change-Id: I35f78036b48d3d7b7dcb9db1e070691282e27a02
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016747
> Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Liviu Rau <liviurau@chromium.org>
> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>

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

Change-Id: Idc27e9b78d5ac314176c71f8f4a7a2257da08be9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2019019
Reviewed-by: Lorne Mitchell <lomitch@microsoft.com>
Reviewed-by: Brandon Goddard <brgoddar@microsoft.com>
Commit-Queue: Brandon Goddard <brgoddar@microsoft.com>
2020-01-24 16:50:05 +00:00
Tim van der Lippe 6122ebd2f9 Add script that checks license headers of JavaScript files
The script checks if the license header is the BSD-3 license header that
DevTools is licensed under. It excludes files that have license headers
that reference non-Google/non-Chromium authors or are third_party
bundles that are checked into a non-third_party folder.

Change-Id: I35f78036b48d3d7b7dcb9db1e070691282e27a02
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2016747
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
2020-01-24 11:51:49 +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
Paul Lewis ea12f14458 Migrates javascript_metadata/ to esm
Bug: 1006759
Change-Id: I91c9f30d63e36995e7fa14b49072f2dcc6c37af6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1937028
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2019-11-26 17:16:06 +00:00
Joel Einbinder 75bb433138 DevTools: Fix argument hints for static constructor methods
The constructor name was not being passed correctly into the JSON,
which was causing static methods to be incorrectly parsed as
unique top level functions.

Bug: 913363
Change-Id: If0a94184cceef0c16b8755fe375aad3e2e48de0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1501495
Reviewed-by: Erik Luo <luoe@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#637852}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 02ae595073a7336412d333ff58c4b4b3f144c736
2019-03-05 22:33:55 +00:00
Joel Einbinder 705daf04ca DevTools: Deduplicate more function signatures for argument hints
Sometimes a function would have multiple signatures in the IDL files
with the difference just being some of the arguments are optional.
This patch improves the deduplication logic to correctly support
array.splice(start, ?deleteCount, ...items)

Change-Id: Ie9230d54dadd1c8c7cadbb92afc37fbfa87ea857
Reviewed-on: https://chromium-review.googlesource.com/1062885
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#559342}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ddcb027a039f212e0701f7118ea7dd8b8cea65b4
2018-05-16 23:57:41 +00:00
Joel Einbinder 3f23eb2bdd DevTools: Argument hints for native functions
Change-Id: Ia0e9f3c98735d64a1188b4373c90b7ef2684ea48
Reviewed-on: https://chromium-review.googlesource.com/1054582
Commit-Queue: Joel Einbinder <einbinder@chromium.org>
Reviewed-by: Andrey Lushnikov <lushnikov@chromium.org>
Reviewed-by: Erik Luo <luoe@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#558527}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a5be1a79f122d4496aa4a09ddfad0b475d878248
2018-05-14 23:27:51 +00:00