Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: Update rollup to 3.x, from the last 2.x #5894

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Sep 24, 2024

This is a library we use in tools/generate-webview-js , for producing the generated JS code to go in the message-list webview based on our several source files for it.

This upgrade gets us a large number of changes that don't matter to us because they have no effect on the output JS. One of those is to fix an XSS vulnerability, CVE-2024-47068:
GHSA-gcx4-mw62-g8wm
which we learned about from Dependabot:
#5893

Even though the vulnerability doesn't affect us, it's good to upgrade past the fix to avoid having to ever re-evaluate whether it affects us. The fix is only in 3.x+, so go to the latest 3.x.

There's also one change affecting the output, which is that the __esModule marker goes away. Seems fine. That happened in 3.0.0:
https://github.com/rollup/rollup/blob/master/CHANGELOG.md#300

This is a library we use in tools/generate-webview-js , for
producing the generated JS code to go in the message-list webview
based on our several source files for it.

This upgrade gets us a large number of changes that don't matter to us
because they have no effect on the output JS.  One of those is to fix
an XSS vulnerability, CVE-2024-47068:
  GHSA-gcx4-mw62-g8wm
which we learned about from Dependabot:
  zulip#5893

Even though the vulnerability doesn't affect us, it's good to upgrade
past the fix to avoid having to ever re-evaluate whether it affects us.
The fix is only in 3.x+, so go to the latest 3.x.

There's also one change affecting the output, which is that the
`__esModule` marker goes away.  Seems fine.  That happened in 3.0.0:
  https://github.com/rollup/rollup/blob/master/CHANGELOG.md#300
@gnprice
Copy link
Member Author

gnprice commented Sep 24, 2024

I should add: I manually tested this version in a message list, and it worked. Long-pressing a message brought up the message action sheet, so the webview JS was indeed working.

@chrisbobbe
Copy link
Contributor

Sure, LGTM! Thanks; merging.

@chrisbobbe chrisbobbe merged commit a361394 into zulip:main Sep 24, 2024
1 check passed
@gnprice gnprice deleted the pr-rollup branch September 24, 2024 23:29
@chrisbobbe
Copy link
Contributor

When I cleared out node_modules and ran yarn, to prepare for making a v27.231 release, I saw some peer-dep warnings:

warning " > @rollup/plugin-babel@5.3.1" has incorrect peer dependency "rollup@^1.20.0||^2.0.0".
warning "@rollup/plugin-babel > @rollup/pluginutils@3.1.0" has incorrect peer dependency "rollup@^1.20.0||^2.0.0".
warning " > @rollup/plugin-node-resolve@13.3.0" has incorrect peer dependency "rollup@^2.42.0".

Normally we would tidy those away, but I'm comfortable leaving them there in this legacy codebase.

@gnprice
Copy link
Member Author

gnprice commented Sep 30, 2024

Yeah, agreed.

(I saw similar warnings when developing this change, but forgot to mention them.)

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.

2 participants