Skip to content

Commit abf0cd1

Browse files
szuendDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
[deps] Update rollup to 4.24.3 (and update plugins)
Since we have the major version jump, we needed to update quite a few things to make this work: 1. rollup4 ships with native binaries. We can't check them into our node_modules for all platforms. Luckily they also ship a a wasm version. This requires us to adjust the 'binary' path to `node_modules/@rollup/wasm-node/dist/bin/rollup` instead. 2. rollup4 is more strict when it comes to ES modules vs CommonJS. We adjust this by renaming the rollup config files. 3. Some plugins got deprecated so we had to replace them with the newer versions (source maps and terser). Bug: None Change-Id: If13d590c8185db6ad85b3992d0a869111909dc8c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5999255 Commit-Queue: Simon Zünd <[email protected]> Reviewed-by: Alex Rudenko <[email protected]>
1 parent 6c24f89 commit abf0cd1

File tree

485 files changed

+160184
-84530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

485 files changed

+160184
-84530
lines changed

front_end/Images/BUILD.gn

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ node_action("generate_css_vars") {
2828
}
2929

3030
node_action("optimize_images") {
31-
script = "node_modules/rollup/dist/bin/rollup"
31+
script = "node_modules/@rollup/wasm-node/dist/bin/rollup"
3232

3333
_bundled_entrypoint = target_gen_dir + "/Images.prebundle.js"
3434
_output_file_location = target_gen_dir + "/Images.js"
3535

3636
inputs = [
3737
_bundled_entrypoint,
38-
"rollup.config.js",
38+
"rollup.config.mjs",
3939
devtools_location_prepend + "node_modules/svgo/package.json",
4040
]
4141
foreach(svg_image, devtools_src_svg_files) {
@@ -53,7 +53,7 @@ node_action("optimize_images") {
5353
# and instead looks if `stderr` is empty.
5454
"--silent",
5555
"--config",
56-
rebase_path("rollup.config.js", root_build_dir),
56+
rebase_path("rollup.config.mjs", root_build_dir),
5757
"--input",
5858
rebase_path(_bundled_entrypoint, root_build_dir),
5959
"--file",

front_end/models/live-metrics/web-vitals-injected/BUILD.gn

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ devtools_module("web-vitals-injected") {
2424
}
2525

2626
node_action("bundled_library") {
27-
script = "node_modules/rollup/dist/bin/rollup"
27+
script = "node_modules/@rollup/wasm-node/dist/bin/rollup"
2828

2929
_bundled_entrypoint = target_gen_dir + "/web-vitals-injected.js"
3030
_output_file_location = target_gen_dir + "/web-vitals-injected.generated.js"
3131

3232
inputs = [
3333
_bundled_entrypoint,
34-
"rollup.config.js",
34+
"rollup.config.mjs",
3535
]
3636

3737
deps = [ ":web-vitals-injected" ]
@@ -42,7 +42,7 @@ node_action("bundled_library") {
4242
# and instead looks if `stderr` is empty.
4343
"--silent",
4444
"--config",
45-
rebase_path("rollup.config.js", root_build_dir),
45+
rebase_path("rollup.config.mjs", root_build_dir),
4646
"--input",
4747
rebase_path(_bundled_entrypoint, root_build_dir),
4848
"--file",

front_end/models/live-metrics/web-vitals-injected/rollup.config.js renamed to front_end/models/live-metrics/web-vitals-injected/rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
const {terser} = require('../../../../node_modules/rollup-plugin-terser/rollup-plugin-terser.js');
5+
import terser from '@rollup/plugin-terser';
66

77
/**
88
* Checks if an env variable is true.

front_end/panels/recorder/injected/BUILD.gn

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ devtools_entrypoint("bundle") {
5555
}
5656

5757
node_action("bundled_library") {
58-
script = "node_modules/rollup/dist/bin/rollup"
58+
script = "node_modules/@rollup/wasm-node/dist/bin/rollup"
5959

6060
_bundled_entrypoint = target_gen_dir + "/injected.js"
6161
_output_file_location = target_gen_dir + "/injected.generated.js"
6262

6363
inputs = [
6464
_bundled_entrypoint,
65-
"rollup.config.js",
65+
"rollup.config.mjs",
6666
]
6767

6868
deps = [ ":bundle" ]
@@ -73,7 +73,7 @@ node_action("bundled_library") {
7373
# and instead looks if `stderr` is empty.
7474
"--silent",
7575
"--config",
76-
rebase_path("rollup.config.js", root_build_dir),
76+
rebase_path("rollup.config.mjs", root_build_dir),
7777
"--input",
7878
rebase_path(_bundled_entrypoint, root_build_dir),
7979
"--file",

front_end/panels/recorder/injected/rollup.config.js renamed to front_end/panels/recorder/injected/rollup.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
const {terser} = require('../../../../node_modules/rollup-plugin-terser/rollup-plugin-terser.js');
5+
import terser from '@rollup/plugin-terser';
66

77
/**
88
* Checks if an env variable is true.

inspector_overlay/BUILD.gn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ action("build_inspector_overlay") {
3737
"$target_gen_dir/tool_window_controls.css",
3838
"$target_gen_dir/main.js",
3939
devtools_location_prepend + "inspector_overlay/loadCSS.rollup.js",
40-
devtools_location_prepend + "node_modules/rollup/dist/bin/rollup",
40+
devtools_location_prepend +
41+
"node_modules/@rollup/wasm-node/dist/bin/rollup",
4142
]
4243

4344
outputs = [ "$resources_out_dir/main.js" ]

node_modules/.bin/astring

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/atob

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/.bin/resolve

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/.bin/rollup

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)