Skip to content

[all] Update Rollup packages#4681

Merged
justinfagnani merged 8 commits intomainfrom
update-rollup
Jun 24, 2024
Merged

[all] Update Rollup packages#4681
justinfagnani merged 8 commits intomainfrom
update-rollup

Conversation

@justinfagnani
Copy link
Copy Markdown
Collaborator

Updating Rollup and related packages, initially to try to get rid of this error message we have on npm install:

npm install error
➜  lit git:(main) ✗ npm ci
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @rollup/pluginutils@3.1.0
npm warn Found: rollup@4.18.0
npm warn node_modules/rollup
npm warn   dev rollup@"^4.18.0" from the root project
npm warn   11 more (@rollup/plugin-commonjs, @rollup/plugin-inject, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer rollup@"^1.20.0||^2.0.0" from @rollup/pluginutils@3.1.0
npm warn node_modules/rollup-plugin-sourcemaps/node_modules/@rollup/pluginutils
npm warn   @rollup/pluginutils@"^3.0.9" from rollup-plugin-sourcemaps@0.6.3
npm warn   node_modules/rollup-plugin-sourcemaps
npm warn
npm warn Conflicting peer dependency: rollup@2.79.1
npm warn node_modules/rollup
npm warn   peer rollup@"^1.20.0||^2.0.0" from @rollup/pluginutils@3.1.0
npm warn   node_modules/rollup-plugin-sourcemaps/node_modules/@rollup/pluginutils
npm warn     @rollup/pluginutils@"^3.0.9" from rollup-plugin-sourcemaps@0.6.3
npm warn     node_modules/rollup-plugin-sourcemaps
npm warn deprecated glob@8.1.0: Glob versions prior to v9 are no longer supported

It turns out that rollup-plugin-sourcemaps is seemingly unmaintained right now and has this issue open for Rollup 3 and 4 compatibility. A user reported that an npm override for @rollup/pluginutils fixed the error though, so I applied that as well.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jun 23, 2024

🦋 Changeset detected

Latest commit: 3a7d6cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@lit/localize Patch
@lit/lit-starter-js Patch
@lit/lit-starter-ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 23, 2024

📊 Tachometer Benchmark Results

Summary

nop-update

  • this-change, tip-of-tree, previous-release: unsure 🔍 -11% - -0% (-1.28ms - +0.02ms)
    this-change vs tip-of-tree

render

  • this-change: 45.45ms - 46.92ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -4% - +1% (-0.82ms - +0.17ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +1% (-0.81ms - +0.28ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +2% (-0.59ms - +0.53ms)
    this-change vs tip-of-tree

update

  • this-change: 488.49ms - 496.57ms
  • this-change, tip-of-tree, previous-release: faster ✔ 3% - 14% (1.19ms - 5.44ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +2% (-1.58ms - +1.73ms)
    this-change vs tip-of-tree
  • this-change, tip-of-tree, previous-release: unsure 🔍 -2% - +1% (-9.31ms - +6.28ms)
    this-change vs tip-of-tree

update-reflect

  • this-change: 491.44ms - 498.02ms
  • this-change, tip-of-tree, previous-release: unsure 🔍 -1% - +2% (-5.93ms - +10.04ms)
    this-change vs tip-of-tree

Results

this-change

render

VersionAvg timevs
45.45ms - 46.92ms-

update

VersionAvg timevs
488.49ms - 496.57ms-

update-reflect

VersionAvg timevs
491.44ms - 498.02ms-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
17.90ms - 18.62ms-unsure 🔍
-4% - +1%
-0.82ms - +0.17ms
unsure 🔍
-5% - +1%
-1.01ms - +0.14ms
tip-of-tree
tip-of-tree
18.25ms - 18.92msunsure 🔍
-1% - +4%
-0.17ms - +0.82ms
-unsure 🔍
-4% - +2%
-0.67ms - +0.44ms
previous-release
previous-release
18.25ms - 19.14msunsure 🔍
-1% - +6%
-0.14ms - +1.01ms
unsure 🔍
-2% - +4%
-0.44ms - +0.67ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
34.69ms - 37.46ms-faster ✔
3% - 14%
1.19ms - 5.44ms
unsure 🔍
-11% - +1%
-4.19ms - +0.28ms
tip-of-tree
tip-of-tree
37.78ms - 41.00msslower ❌
3% - 15%
1.19ms - 5.44ms
-unsure 🔍
-3% - +10%
-1.03ms - +3.75ms
previous-release
previous-release
36.27ms - 39.79msunsure 🔍
-1% - +12%
-0.28ms - +4.19ms
unsure 🔍
-9% - +3%
-3.75ms - +1.03ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.75ms - 11.42ms-unsure 🔍
-11% - -0%
-1.28ms - +0.02ms
unsure 🔍
-5% - +3%
-0.62ms - +0.37ms
tip-of-tree
tip-of-tree
11.16ms - 12.27msunsure 🔍
-0% - +12%
-0.02ms - +1.28ms
-unsure 🔍
-1% - +10%
-0.16ms - +1.17ms
previous-release
previous-release
10.85ms - 11.57msunsure 🔍
-3% - +6%
-0.37ms - +0.62ms
unsure 🔍
-10% - +1%
-1.17ms - +0.16ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
33.36ms - 34.06ms-unsure 🔍
-2% - +1%
-0.81ms - +0.28ms
unsure 🔍
-2% - +1%
-0.64ms - +0.24ms
tip-of-tree
tip-of-tree
33.56ms - 34.39msunsure 🔍
-1% - +2%
-0.28ms - +0.81ms
-unsure 🔍
-1% - +2%
-0.42ms - +0.56ms
previous-release
previous-release
33.64ms - 34.17msunsure 🔍
-1% - +2%
-0.24ms - +0.64ms
unsure 🔍
-2% - +1%
-0.56ms - +0.42ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
69.34ms - 71.82ms-unsure 🔍
-2% - +2%
-1.58ms - +1.73ms
unsure 🔍
-2% - +2%
-1.60ms - +1.57ms
tip-of-tree
tip-of-tree
69.42ms - 71.60msunsure 🔍
-2% - +2%
-1.73ms - +1.58ms
-unsure 🔍
-2% - +2%
-1.56ms - +1.38ms
previous-release
previous-release
69.61ms - 71.58msunsure 🔍
-2% - +2%
-1.57ms - +1.60ms
unsure 🔍
-2% - +2%
-1.38ms - +1.56ms
-
this-change, tip-of-tree, previous-release

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
30.40ms - 31.19ms-unsure 🔍
-2% - +2%
-0.59ms - +0.53ms
unsure 🔍
-2% - +2%
-0.53ms - +0.64ms
tip-of-tree
tip-of-tree
30.42ms - 31.22msunsure 🔍
-2% - +2%
-0.53ms - +0.59ms
-unsure 🔍
-2% - +2%
-0.51ms - +0.67ms
previous-release
previous-release
30.31ms - 31.17msunsure 🔍
-2% - +2%
-0.64ms - +0.53ms
unsure 🔍
-2% - +2%
-0.67ms - +0.51ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
472.23ms - 483.42ms-unsure 🔍
-2% - +1%
-9.31ms - +6.28ms
unsure 🔍
-2% - +1%
-11.76ms - +4.91ms
tip-of-tree
tip-of-tree
473.91ms - 484.77msunsure 🔍
-1% - +2%
-6.28ms - +9.31ms
-unsure 🔍
-2% - +1%
-10.14ms - +6.32ms
previous-release
previous-release
475.07ms - 487.43msunsure 🔍
-1% - +2%
-4.91ms - +11.76ms
unsure 🔍
-1% - +2%
-6.32ms - +10.14ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
512.63ms - 524.20ms-unsure 🔍
-1% - +2%
-5.93ms - +10.04ms
unsure 🔍
-2% - +2%
-8.31ms - +8.21ms
tip-of-tree
tip-of-tree
510.85ms - 521.86msunsure 🔍
-2% - +1%
-10.04ms - +5.93ms
-unsure 🔍
-2% - +1%
-10.17ms - +5.96ms
previous-release
previous-release
512.57ms - 524.36msunsure 🔍
-2% - +2%
-8.21ms - +8.31ms
unsure 🔍
-1% - +2%
-5.96ms - +10.17ms
-

tachometer-reporter-action v2 for Benchmarks

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 23, 2024

The size of lit-html.js and lit-core.min.js are as expected.

@justinfagnani
Copy link
Copy Markdown
Collaborator Author

Interesting - this adds 231 to lit-core.min.js. I think we'll still want to update dependencies, but understand what's going on here. Maybe @rollup/plugin-terser has some different defaults than rollup-plugin-terser did?

// Windows cannot find file `npx` and it's no longer possible to specify
// `npx.cmd` https://github.com/nodejs/node/commit/9095c914ed
if (/^win/.test(process.platform)) {
execSync(`npx ${args.join(' ')}`);

Check warning

Code scanning / CodeQL

Shell command built from environment values

This shell command depends on an uncontrolled [absolute path](1).
@augustjk
Copy link
Copy Markdown
Member

Manual inspection of the bundle shows the difference in bytes are due to some variable names being minified to 2 chars instead of 1. It seems to be variation from the change in the version of the terser packaged used by the rollup plugin. I updated the underlying terser package to latest as well which reduced the size gain a bit to 217 bytes instead of 231.

The failing tests were due to the @rollup/plugin-place not actually replacing the DEV_MODE flag for the bundled polyfill-support.js. Setting preventAssignment: false seems to make it work again. Not entirely sure why, maybe related to it being declared with var, but I didn't want to dig too further.

I also updated the rollup and related packages for the localize examples and starter kits.

@@ -0,0 +1,2 @@
---
---
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@augustjk I suppose we should include the starter kits here, since updating dev dependencies is more relevant than for our own packages.

I so wonder if we should mention the rollup and terser updates for our packages as well though, since conceivably they could effect people if something goes wrong. wdyt?

Copy link
Copy Markdown
Collaborator Author

@justinfagnani justinfagnani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your changes LGTM @augustjk. Thanks!

augustjk and others added 7 commits June 24, 2024 15:02
* Fixes #4655 -- Move localize setup to resolve import loop

Localize has an import loop, because submodules are importing
from their root. To resolve this `msg`, `installed` and `_installMsgImplementation`
have moved to a new submodule.

Imports to `msg` stay intact, through an explicit export.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants