Migrate to yarn (#364)

* Migrate to yarn

* Remove package-lock.json

* v0.0.0

* Update yarn.lock

* Add .yarnrc.yml

* Add .yarn/releases

* Add .yarn/cache

* Print out error

* Resolving

* Remove file references

* remove cat

* Add .gitignore

* Add .gitignore

* Add prettier plugin

* Update yarn.lock

* Add .yarn/cache

* buist

* Add build script

* Add lint-prettier.sh

* Remove cache

* Remove env files

* Newlines

* Modify package.json

* Add typescript as devDependency
pull/372/head
Nam Chu Hoai 3 years ago committed by GitHub
parent cee9a2d8ef
commit 30888396c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 40
      .github/workflows/node.yml
  2. 3
      .gitignore
  3. 28
      .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
  4. 785
      .yarn/releases/yarn-3.2.0.cjs
  5. 7
      .yarnrc.yml
  6. 12
      build.sh
  7. 12
      lint-prettier.sh
  8. 49576
      package-lock.json
  9. 13
      package.json
  10. 4
      typescript/contract-metrics/package.json
  11. 9
      typescript/infra/package.json
  12. 2
      typescript/sdk/package.json
  13. 3
      typescript/utils/package.json
  14. 18507
      yarn.lock

@ -11,20 +11,20 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
npm-install: yarn-install:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/cache@v2 - uses: actions/cache@v2
with: with:
path: .//node_modules path: .//node_modules
key: ${{ runner.os }}-npm-cache-${{ hashFiles('./package-lock.json') }} key: ${{ runner.os }}-yarn-cache3-${{ hashFiles('./yarn.lock') }}
- name: npm-install - name: yarn-install
# Check out the lockfile from main, reinstall, and then # Check out the lockfile from main, reinstall, and then
# verify the lockfile matches what was committed. # verify the lockfile matches what was committed.
run: | run: |
npm install yarn install
CHANGES=$(git status -s) CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then if [[ ! -z $CHANGES ]]; then
echo "Changes found: $CHANGES" echo "Changes found: $CHANGES"
@ -33,17 +33,17 @@ jobs:
fi fi
npm-build: yarn-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [npm-install] needs: [yarn-install]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: npm-cache - name: yarn-cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: .//node_modules path: .//node_modules
key: ${{ runner.os }}-npm-cache-${{ hashFiles('./package-lock.json') }} key: ${{ runner.os }}-yarn-cache3-${{ hashFiles('./yarn.lock') }}
- name: build-cache - name: build-cache
uses: actions/cache@v2 uses: actions/cache@v2
@ -52,21 +52,21 @@ jobs:
key: ${{ github.sha }} key: ${{ github.sha }}
- name: build - name: build
run: npm run build run: ./build.sh
lint-prettier: lint-prettier:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [npm-install] needs: [yarn-install]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/cache@v2 - uses: actions/cache@v2
with: with:
path: .//node_modules path: .//node_modules
key: ${{ runner.os }}-npm-cache-${{ hashFiles('./package-lock.json') }} key: ${{ runner.os }}-yarn-cache3-${{ hashFiles('./yarn.lock') }}
- name: prettier - name: prettier
run: | run: |
npm run prettier ./lint-prettier.sh
CHANGES=$(git status -s) CHANGES=$(git status -s)
if [[ ! -z $CHANGES ]]; then if [[ ! -z $CHANGES ]]; then
echo "Changes found: $CHANGES" echo "Changes found: $CHANGES"
@ -75,7 +75,7 @@ jobs:
test-ts: test-ts:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [npm-build] needs: [yarn-build]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/cache@v2 - uses: actions/cache@v2
@ -84,18 +84,18 @@ jobs:
key: ${{ github.sha }} key: ${{ github.sha }}
- name: sdk - name: sdk
run: npm --prefix ./typescript/sdk run test run: yarn workspace @abacus-network/sdk run test
- name: infra - name: infra
run: npm --prefix ./typescript/infra run test run: yarn workspace @abacus-network/infra run test
- name: hardhat - name: hardhat
run: npm --prefix ./typescript/hardhat run test run: yarn workspace @abacus-network/hardhat run test
test-sol: test-sol:
env: env:
ETHERSCAN_API_KEY: "" ETHERSCAN_API_KEY: ""
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [npm-build] needs: [yarn-build]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -105,8 +105,8 @@ jobs:
key: ${{ github.sha }} key: ${{ github.sha }}
- name: core - name: core
run: npm --prefix ./solidity/core run test run: yarn workspace @abacus-network/core run test
- name: app - name: app
run: npm --prefix ./solidity/app run test run: yarn workspace @abacus-network/app run test
- name: apps - name: apps
run: npm --prefix ./solidity/apps run test run: yarn workspace @abacus-network/apps run test

3
.gitignore vendored

@ -18,3 +18,6 @@ typescript/*/.env
typescript/*/node_modules typescript/*/node_modules
typescript/**/tsconfig.tsbuildinfo typescript/**/tsconfig.tsbuildinfo
**/**/tsconfig.tsbuildinfo **/**/tsconfig.tsbuildinfo
.yarn/install-state.gz
.yarn/cache

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,7 @@
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
yarnPath: .yarn/releases/yarn-3.2.0.cjs

@ -0,0 +1,12 @@
#!/bin/bash
set -exuo pipefail
yarn workspace @abacus-network/utils run build
yarn workspace @abacus-network/core run build
yarn workspace @abacus-network/hardhat run build
yarn workspace @abacus-network/app run build
yarn workspace @abacus-network/apps run build
yarn workspace @abacus-network/sdk run build
yarn workspace @abacus-network/contract-metrics run build
yarn workspace @abacus-network/deploy run build
yarn workspace @abacus-network/infra run build

@ -0,0 +1,12 @@
#!/bin/bash
set -exuo pipefail
yarn workspace @abacus-network/utils run prettier
yarn workspace @abacus-network/core run prettier
yarn workspace @abacus-network/hardhat run prettier
yarn workspace @abacus-network/app run prettier
yarn workspace @abacus-network/apps run prettier
yarn workspace @abacus-network/sdk run prettier
yarn workspace @abacus-network/contract-metrics run prettier
yarn workspace @abacus-network/deploy run prettier
yarn workspace @abacus-network/infra run prettier

49576
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,9 +1,8 @@
{ {
"name": "@abacus-network/monorepo", "name": "@abacus-network/monorepo",
"scripts": { "scripts": {
"build": "npm run build --workspaces --if-present", "build": "./build.sh",
"test": "npm run test --workspaces --if-present", "prettier": "./lint-prettier.sh"
"prettier": "npm run prettier --workspaces --if-present"
}, },
"workspaces": [ "workspaces": [
"typescript/utils", "typescript/utils",
@ -15,5 +14,11 @@
"typescript/contract-metrics", "typescript/contract-metrics",
"typescript/deploy", "typescript/deploy",
"typescript/infra" "typescript/infra"
] ],
"private": true,
"version": "0.0.0",
"packageManager": "yarn@3.2.0",
"devDependencies": {
"typescript": "^4.3.5"
}
} }

@ -12,8 +12,8 @@
"prettier": "prettier --write ." "prettier": "prettier --write ."
}, },
"dependencies": { "dependencies": {
"@abacus-network/apps": "file:../../solidity/apps", "@abacus-network/apps": "0.0.2",
"@abacus-network/sdk": "file:../sdk", "@abacus-network/sdk": "0.0.4",
"@types/bunyan": "^1.8.7", "@types/bunyan": "^1.8.7",
"@types/express": "^4.17.13", "@types/express": "^4.17.13",
"@types/google-spreadsheet": "^3.1.5", "@types/google-spreadsheet": "^3.1.5",

@ -1,4 +1,5 @@
{ {
"name": "@abacus-network/infra",
"devDependencies": { "devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-ethers": "^2.0.5",
"@nomiclabs/hardhat-waffle": "^2.0.2", "@nomiclabs/hardhat-waffle": "^2.0.2",
@ -25,10 +26,10 @@
}, },
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"dependencies": { "dependencies": {
"@abacus-network/apps": "file:../../solidity/apps", "@abacus-network/apps": "0.0.2",
"@abacus-network/core": "file:../../solidity/core", "@abacus-network/core": "0.0.6",
"@abacus-network/deploy": "file:../deploy", "@abacus-network/deploy": "0.0.7",
"@abacus-network/sdk": "file:../sdk", "@abacus-network/sdk": "0.0.4",
"@aws-sdk/client-iam": "^3.74.0", "@aws-sdk/client-iam": "^3.74.0",
"@aws-sdk/client-kms": "3.48.0", "@aws-sdk/client-kms": "3.48.0",
"@aws-sdk/client-s3": "^3.74.0", "@aws-sdk/client-s3": "^3.74.0",

@ -21,8 +21,8 @@
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"prettier": "^2.4.1",
"mocha": "^9.2.2", "mocha": "^9.2.2",
"prettier": "^2.4.1",
"typescript": "^4.4.3" "typescript": "^4.4.3"
}, },
"dependencies": { "dependencies": {

@ -15,5 +15,8 @@
"dependencies": { "dependencies": {
"chai": "^4.3.0", "chai": "^4.3.0",
"ethers": "^5.4.7" "ethers": "^5.4.7"
},
"devDependencies": {
"prettier": "^2.2.1"
} }
} }

18507
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save