Replace npm by yarn

This commit is contained in:
Rodrigo Q. Saramago 2022-10-20 20:32:36 -03:00
parent af257408e4
commit 11e13f5a41
No known key found for this signature in database
GPG Key ID: 9B36B2525704A359

View File

@ -31,12 +31,12 @@ BINARY_TYPE="$1"
BINARY_PATH="$(realpath "$2")" BINARY_PATH="$(realpath "$2")"
SELECTED_PRESETS="$3" SELECTED_PRESETS="$3"
function compile_fn { npm run build; } function compile_fn { yarn run build; }
function test_fn { npm test; } function test_fn { yarn test; }
function gp2_test function gp2_test
{ {
local repo="https://github.com/gnosis/gp-v2-contracts.git" local repo="https://github.com/cowprotocol/contracts.git"
local ref_type=branch local ref_type=branch
local ref=main local ref=main
local config_file="hardhat.config.ts" local config_file="hardhat.config.ts"
@ -67,11 +67,11 @@ function gp2_test
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH" force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"
force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")" "$config_var" force_hardhat_compiler_settings "$config_file" "$(first_word "$SELECTED_PRESETS")" "$config_var"
force_hardhat_unlimited_contract_size "$config_file" "$config_var" force_hardhat_unlimited_contract_size "$config_file" "$config_var"
npm install yarn
# New hardhat release breaks GP2 tests, and since GP2 repository has been archived, we are pinning hardhat # New hardhat release breaks GP2 tests, and since GP2 repository has been archived, we are pinning hardhat
# to the previous stable version. See https://github.com/ethereum/solidity/pull/13485 # to the previous stable version. See https://github.com/ethereum/solidity/pull/13485
npm install hardhat@2.10.2 yarn add hardhat@2.10.2
# Some dependencies come with pre-built artifacts. We want to build from scratch. # Some dependencies come with pre-built artifacts. We want to build from scratch.
rm -r node_modules/@gnosis.pm/safe-contracts/build/ rm -r node_modules/@gnosis.pm/safe-contracts/build/