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: replace webextension-polyfill-ts with webextension-polyfill + @types/webextension-polyfill #43

Merged
merged 1 commit into from
Jun 19, 2023

Conversation

legobeat
Copy link
Contributor

@legobeat legobeat commented May 11, 2023

This is a follow-up on #37 .

As can be seen in the lockfile diff, this implies a bump of webextension-polyfill from 0.8.0 to 0.10.0.

Keeping webextension-polyfill as a runtime dependency is intended as an intermediary measure to keep this change non-breaking, making it a peerDependency in a future update.

@socket-security
Copy link

socket-security bot commented May 11, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

@legobeat legobeat force-pushed the deps-types-webextension-polyfill branch 2 times, most recently from e202d0f to a1fa06d Compare May 11, 2023 02:34
@legobeat legobeat marked this pull request as ready for review May 11, 2023 02:34
@legobeat legobeat requested a review from a team as a code owner May 11, 2023 02:34
@legobeat legobeat added the dependencies Pull requests that update a dependency file label May 11, 2023
@legobeat
Copy link
Contributor Author

At the point of this comment, the most recent release 2.0.2 has not been published, blocked by #44 .

The intention here is that 2.0.2 should go out as-is, with this coming in a subsequent release.

@legobeat legobeat requested review from a team and Gtonizuka and removed request for a team June 7, 2023 17:31
@legobeat legobeat force-pushed the deps-types-webextension-polyfill branch from a1fa06d to 6b563f6 Compare June 14, 2023 11:23
@legobeat legobeat requested review from weizman and mcmire June 14, 2023 11:23
@socket-security
Copy link

New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives1 Size Publisher
webextension-polyfill 🆕 0.10.0 None +0 198 kB addons-robot
@types/webextension-polyfill 🆕 0.10.0 None +0 472 kB types

🚮 Removed packages: webextension-polyfill-ts@0.26.0

Footnotes

  1. https://docs.socket.dev

package.json Outdated
Comment on lines 34 to 38
"webextension-polyfill": ">=0.10.0"
},
"devDependencies": {
"@metamask/eslint-config": "^4.1.0",
"@types/webextension-polyfill": ">=0.10.0",
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Could we use a ^ range here instead? Seems more conventional and avoids post-v1 breaking changes in theory.

Suggested change
"webextension-polyfill": ">=0.10.0"
},
"devDependencies": {
"@metamask/eslint-config": "^4.1.0",
"@types/webextension-polyfill": ">=0.10.0",
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@metamask/eslint-config": "^4.1.0",
"@types/webextension-polyfill": "^0.10.0",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated both to >=0.10.0 <1.0 to keep it sub-1.0 (very reasonable) but open to bringing it down to ^0.10.0 only if still preferred.

Copy link
Member

Choose a reason for hiding this comment

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

This seems OK to me, though I'm not sure why this would be preferable to the more conventional ^0.10.0 range

Gudahtt
Gudahtt previously approved these changes Jun 14, 2023
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM, though I did have one suggestion

@legobeat legobeat force-pushed the deps-types-webextension-polyfill branch from 6b563f6 to 4358fe5 Compare June 15, 2023 09:18
@legobeat legobeat requested a review from Gudahtt June 15, 2023 09:21
…types/webextension-polyfill

As can be seen in the lockfile diff, this implies a bump from
webextension-polyfill to ^0.10.0.

Keeping webextension-polyfill as a runtime dependency is intended as an
intermediary measure, making it a peerDependency in a future update.
@legobeat legobeat force-pushed the deps-types-webextension-polyfill branch from 4358fe5 to 79debb2 Compare June 16, 2023 15:26
@legobeat legobeat requested a review from a team June 16, 2023 15:26
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Makes sense.

@legobeat legobeat merged commit 6029108 into MetaMask:main Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants