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

Dependencies update #223

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Dependencies update #223

wants to merge 4 commits into from

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Apr 11, 2023

Context: when installing the npm packages using the Python version 3.11 , the command fails with the error nodejs/node-gyp#2219

Screenshot from 2023-04-11 10-13-58

What: this PR updates the dependencies in order to fix the error.

  1. Update "@lavamoat/allow-scripts": "^2.0.3", using the same version from metamask-extension
  2. Update configuration from packages using the command yarn allow-scripts auto
  3. Update node version, to fix error The engine "node" is incompatible with this module. Expected version ">=14.0.0". Got "12.22.12"
test-dapp.webm

@seaona seaona requested a review from a team as a code owner April 11, 2023 08:22
@socket-security
Copy link

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


🚨 Potential security issues found in this pull request. To accept the risk, merge this PR and you will not be notified again.

Bot Commands

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 [email protected] bar@* or ignore all packages with @SocketSecurity ignore-all

📜 Install scripts

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Package Script field Source
@lavamoat/[email protected] (added) preinstall package.json via @lavamoat/[email protected]
@lavamoat/[email protected] (added) preinstall package.json via @lavamoat/[email protected]
@lavamoat/[email protected] (added) preinstall package.json via @lavamoat/[email protected]
@lavamoat/[email protected] (upgraded) preinstall package.json
@lavamoat/[email protected] (upgraded) preinstall package.json
@lavamoat/[email protected] (upgraded) preinstall package.json
@lavamoat/[email protected] (added) preinstall package.json via @lavamoat/[email protected]
@lavamoat/[email protected] (added) preinstall package.json via @lavamoat/[email protected]
@lavamoat/[email protected] (upgraded) preinstall package.json
@lavamoat/[email protected] (upgraded) preinstall package.json
Pull request alert summary
Issue Status
Install scripts ⚠️ 10 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

⬆️ Updated Package Version Diff Added Capability Access +/- Transitive Count Publisher
@lavamoat/[email protected] 1.0.6...2.3.0 shell, environment +7/-3 kumavis

legobeat
legobeat previously approved these changes Apr 11, 2023
Copy link
Member

@ritave ritave left a comment

Choose a reason for hiding this comment

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

Please update .nvmrc file to v14 as well

@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
node-version: [14.x, 16.x]
node-version: [14.x, 16.x, 18.x]

@ritave
Copy link
Member

ritave commented Apr 11, 2023

Actually, just checked metamask-extension's .nvmrc, and it's set to v16, which is the minimal version we officially support for our packages.

Might as well upgrade to that one.

@legobeat legobeat self-requested a review April 11, 2023 10:14
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
node-version: [14.x, 16.x]
Copy link
Member

Choose a reason for hiding this comment

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

If we're updating the minimum supported Node.js version, we should update the version of Node.js referenced in the README, in package.json, and in .nvmrc as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

aw great catch! I've updated them @Gudahtt thank you!

Copy link
Contributor

@legobeat legobeat left a comment

Choose a reason for hiding this comment

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

This breaks in nodejs v18 due to webpack/webpack#14532:

  • Proper solution: upgrade to webpack 5. upgrade webpack plugins, webpack-dev-server, webpack-cli
  • Temporary workaround 1: restrict engines.node to v16.x, disable v18 in ci
  • Temporary workaround 2: use NODE_OPTIONS=--openssl-legacy-provider
    • As this is intended as a sample dapp, this is something I'd avoid
    • Note: I did not get the suggested output.hashFunction: 'xxhash64' working (it yields a different error message Digest not supported)

@Gudahtt
Copy link
Member

Gudahtt commented Apr 24, 2023

I have resolved just the Node.js update in #225 to unblock further publishing

legobeat added a commit to legobeat/test-dapp that referenced this pull request Apr 28, 2023
Due to dependency being broken on 18.x.
MetaMask#223 (review)
@legobeat legobeat mentioned this pull request Apr 28, 2023
@legobeat
Copy link
Contributor

I just took a new stab at this in #264

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.

4 participants