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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable npm configuration parameter engine-strict when installing dependencies of Jetpack #5689

Merged
merged 1 commit into from
Apr 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion bin/install-jetpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,23 @@ nvm install
listed_pnpm_version=$(npx -c 'echo $npm_package_engines_pnpm')
pnpm_version=$(npx semver -c "$listed_pnpm_version")

cd projects/plugins/jetpack
# Disable `engine-strict` parameter
#
# The `node` version required by Jetpack will be used to install the dependencies. However, we can't
# ensure that the `node` version used by `npm` to check the `engines` parameter is the expected one.
# More information in: https://github.com/wordpress-mobile/gutenberg-mobile/issues/5688
sed -i.bak 's/^engine-strict = true/engine-strict = false/' .npmrc

# Install dependecies of Jetpack plugin
pushd projects/plugins/jetpack

# npx might prompt to install pnpm at the requested version. Let's just agree and carry on.
( yes || true ) | npx --cache /tmp/empty-cache pnpm@"$pnpm_version" install --ignore-scripts

popd

# Revert `engine-strict` parameter back
sed -i.bak 's/^engine-strict = false/engine-strict = true/' .npmrc
rm .npmrc.bak

popd
Loading