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>
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>
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>
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>
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>
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>
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>
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>
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>
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>