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

Implements scoped packages #679

Merged
merged 15 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/workflows/account-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
with:
node-version: '${{ matrix.node-version }}'
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-account --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run build --scope ethereumjs-account --include-dependencies
- run: npx lerna run lint --scope ethereumjs-account
- run: npx lerna bootstrap --scope @ethereumjs/account --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run build --scope @ethereumjs/account --include-dependencies
- run: npx lerna run lint --scope @ethereumjs/account
- run: npm test
env:
CI: true
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/block-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,10 @@ jobs:
with:
node-version: '${{ matrix.node-version }}'
- uses: actions/checkout@v1
- run: npm install
working-directory: '${{ env.cwd }}'
- run: npx lerna run lint --scope ethereumjs-block
- run: npm run test:node
env:
CI: true
working-directory: '${{ env.cwd }}'
- run: 'npm run test:browser'
env:
CI: true
working-directory: '${{ env.cwd }}'
- run: npx lerna bootstrap --scope @ethereumjs/block --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run build --scope @ethereumjs/block --include-dependencies
- run: npx lerna run lint --scope @ethereumjs/block
- run: npx lerna run test:node --scope @ethereumjs/block
- run: npx lerna run test:browser --scope @ethereumjs/block
Copy link
Member

Choose a reason for hiding this comment

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

Why are the test commands run in a lerna context here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to avoid repetition of working-directory: property of run:.

In GH actions, each run command is executed in a new context. That makes impossible to have: run: cd packages/vm at the beginning of the script, and run the remaining commands from that directory. GitHub's solution is the working-directory: property that you have to use for every run: command.

Lerna allows to run npm scripts straight from the repository root, so we don't need to mingle with cd or working-directory code.

On another track, I've been doing some work to improve the developer experience of this monorepo, and these very commands could be replaced by shorter versions as well.

From:
npx lerna bootstrap --scope @ethereumjs/block --ignore-scripts --include-dependencies --no-ci
to:
npm run bootstrap @ethereumjs/block

env:
cwd: '${{github.workspace}}/packages/block'
6 changes: 3 additions & 3 deletions .github/workflows/blockchain-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
with:
node-version: '${{ matrix.node-version }}'
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-blockchain --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-blockchain --include-dependencies build
- run: npx lerna run lint --scope ethereumjs-blockchain
- run: npx lerna bootstrap --scope @ethereumjs/blockchain --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/blockchain --include-dependencies build
evertonfraga marked this conversation as resolved.
Show resolved Hide resolved
- run: npx lerna run lint --scope @ethereumjs/blockchain
- run: npm test
env:
CI: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/common-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
with:
node-version: '${{ matrix.node-version }}'
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-common --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-common --include-dependencies build
- run: npx lerna run lint --scope ethereumjs-common
- run: npx lerna bootstrap --scope @ethereumjs/common --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/common --include-dependencies build
- run: npx lerna run lint --scope @ethereumjs/common
- run: npm test
env:
CI: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tx-bulid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
with:
node-version: '${{ matrix.node-version }}'
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-tx --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-tx --include-dependencies build
- run: npx lerna run lint --scope ethereumjs-tx
- run: npx lerna bootstrap --scope @ethereumjs/tx --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/tx --include-dependencies build
- run: npx lerna run lint --scope @ethereumjs/tx
- run: 'npm run test:node'
evertonfraga marked this conversation as resolved.
Show resolved Hide resolved
env:
CI: true
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/vm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
with:
node-version: 12.x
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-vm --include-dependencies build
- run: npx lerna run lint --scope ethereumjs-vm
- run: npx lerna bootstrap --scope @ethereumjs/vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/vm --include-dependencies build
- run: npx lerna run lint --scope @ethereumjs/vm
- run: 'npm run test:API'
env:
CI: true
Expand All @@ -47,8 +47,8 @@ jobs:
with:
node-version: 12.x
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-vm --include-dependencies build
- run: npx lerna bootstrap --scope @ethereumjs/vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/vm --include-dependencies build
- run: 'npm run test:state:selectedForks'
env:
CI: true
Expand All @@ -62,8 +62,8 @@ jobs:
with:
node-version: 12.x
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-vm --include-dependencies build
- run: npx lerna bootstrap --scope @ethereumjs/vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/vm --include-dependencies build
- run: 'npm run test:blockchain'
env:
CI: true
evertonfraga marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/vm-nightly-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
with:
node-version: 12.x
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-vm --include-dependencies build
- run: npx lerna bootstrap --scope @ethereumjs/vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/vm --include-dependencies build
- run: 'npm run test:API'
env:
CI: true
Expand All @@ -29,8 +29,8 @@ jobs:
with:
node-version: 12.x
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-vm --include-dependencies build
- run: npx lerna bootstrap --scope @ethereumjs/vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/vm --include-dependencies build
- run: 'npm run test:state:allForks'
env:
CI: true
Expand All @@ -43,8 +43,8 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npx lerna bootstrap --scope ethereumjs-vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-vm --include-dependencies build
- run: npx lerna bootstrap --scope @ethereumjs/vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/vm --include-dependencies build
working-directory: '${{ env.cwd }}'
- run: 'npm run test:blockchain'
env:
Expand All @@ -59,8 +59,8 @@ jobs:
with:
node-version: 12.x
- uses: actions/checkout@v1
- run: npx lerna bootstrap --scope ethereumjs-vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope ethereumjs-vm --include-dependencies build
- run: npx lerna bootstrap --scope @ethereumjs/vm --ignore-scripts --include-dependencies --no-ci
- run: npx lerna run --scope @ethereumjs/vm --include-dependencies build
- run: 'npm run test:state:slow'
evertonfraga marked this conversation as resolved.
Show resolved Hide resolved
env:
CI: true
Expand Down
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ This was originally the EthereumJS VM repository. On Q1 2020 we brought some of

| package | npm | issues | tests | coverage |
| ------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------- | ---------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [ethereumjs-account][account-package] | [![NPM Package][account-npm-badge]][account-npm-link] | [![Account Issues][account-issues-badge]][account-issues-link] | [![Actions Status][account-actions-badge]][account-actions-link] | [![Code Coverage][account-coverage-badge]][account-coverage-link] |
| [ethereumjs-block][block-package] | [![NPM Package][block-npm-badge]][block-npm-link] | [![Block Issues][block-issues-badge]][block-issues-link] | [![Actions Status][block-actions-badge]][block-actions-link] | [![Code Coverage][block-coverage-badge]][block-coverage-link] |
| [ethereumjs-blockchain][blockchain-package] | [![NPM Package][blockchain-npm-badge]][blockchain-npm-link] | [![Blockchain Issues][blockchain-issues-badge]][blockchain-issues-link] | [![Actions Status][blockchain-actions-badge]][blockchain-actions-link] | [![Code Coverage][blockchain-coverage-badge]][blockchain-coverage-link] |
| [ethereumjs-common][common-package] | [![NPM Package][common-npm-badge]][common-npm-link] | [![Common Issues][common-issues-badge]][common-issues-link] | [![Actions Status][common-actions-badge]][common-actions-link] | [![Code Coverage][common-coverage-badge]][common-coverage-link] |
| [ethereumjs-tx][tx-package] | [![NPM Package][tx-npm-badge]][tx-npm-link] | [![Tx Issues][tx-issues-badge]][tx-issues-link] | [![Actions Status][tx-actions-badge]][tx-actions-link] | [![Code Coverage][tx-coverage-badge]][tx-coverage-link] |
| [ethereumjs-vm][vm-package] | [![NPM Package][vm-npm-badge]][vm-npm-link] | [![VM Issues][vm-issues-badge]][vm-issues-link] | [![Actions Status][vm-actions-badge]][vm-actions-link] | [![Code Coverage][vm-coverage-badge]][vm-coverage-link] |
| [@ethereumjs/account][account-package] | [![NPM Package][account-npm-badge]][account-npm-link] | [![Account Issues][account-issues-badge]][account-issues-link] | [![Actions Status][account-actions-badge]][account-actions-link] | [![Code Coverage][account-coverage-badge]][account-coverage-link] |
| [@ethereumjs/block][block-package] | [![NPM Package][block-npm-badge]][block-npm-link] | [![Block Issues][block-issues-badge]][block-issues-link] | [![Actions Status][block-actions-badge]][block-actions-link] | [![Code Coverage][block-coverage-badge]][block-coverage-link] |
| [@ethereumjs/blockchain][blockchain-package] | [![NPM Package][blockchain-npm-badge]][blockchain-npm-link] | [![Blockchain Issues][blockchain-issues-badge]][blockchain-issues-link] | [![Actions Status][blockchain-actions-badge]][blockchain-actions-link] | [![Code Coverage][blockchain-coverage-badge]][blockchain-coverage-link] |
| [@ethereumjs/common][common-package] | [![NPM Package][common-npm-badge]][common-npm-link] | [![Common Issues][common-issues-badge]][common-issues-link] | [![Actions Status][common-actions-badge]][common-actions-link] | [![Code Coverage][common-coverage-badge]][common-coverage-link] |
| [@ethereumjs/tx][tx-package] | [![NPM Package][tx-npm-badge]][tx-npm-link] | [![Tx Issues][tx-issues-badge]][tx-issues-link] | [![Actions Status][tx-actions-badge]][tx-actions-link] | [![Code Coverage][tx-coverage-badge]][tx-coverage-link] |
| [@ethereumjs/vm][vm-package] | [![NPM Package][vm-npm-badge]][vm-npm-link] | [![VM Issues][vm-issues-badge]][vm-issues-link] | [![Actions Status][vm-actions-badge]][vm-actions-link] | [![Code Coverage][vm-coverage-badge]][vm-coverage-link] |

## Coverage report

Expand Down Expand Up @@ -72,53 +72,53 @@ If you want to join for work or do improvements on the libraries have a look at
[js-standard-style-badge]: https://cdn.rawgit.com/feross/standard/master/badge.svg
[js-standard-style-link]: https://github.com/feross/standard
[account-package]: ./packages/account
[account-npm-badge]: https://img.shields.io/npm/v/ethereumjs-account.svg
[account-npm-link]: https://www.npmjs.org/package/ethereumjs-account
[account-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/account.svg
[account-npm-link]: https://www.npmjs.org/package/@ethereumjs/account
[account-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20account?label=issues
[account-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+account"
[account-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Account%20Test/badge.svg
[account-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Account+Test%22
[account-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=account
[account-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/account
[block-package]: ./packages/block
[block-npm-badge]: https://img.shields.io/npm/v/ethereumjs-block.svg
[block-npm-link]: https://www.npmjs.org/package/ethereumjs-block
[block-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/block.svg
[block-npm-link]: https://www.npmjs.org/package/@ethereumjs/block
evertonfraga marked this conversation as resolved.
Show resolved Hide resolved
[block-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20block?label=issues
[block-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+block"
[block-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Block%20Test/badge.svg
[block-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Block+Test%22
[block-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=block
[block-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/block
[blockchain-package]: ./packages/blockchain
[blockchain-npm-badge]: https://img.shields.io/npm/v/ethereumjs-blockchain.svg
[blockchain-npm-link]: https://www.npmjs.org/package/ethereumjs-blockchain
[blockchain-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/blockchain.svg
[blockchain-npm-link]: https://www.npmjs.org/package/@ethereumjs/blockchain
[blockchain-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20blockchain?label=issues
[blockchain-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+blockchain"
[blockchain-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Blockchain%20Test/badge.svg
[blockchain-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Blockchain+Test%22
[blockchain-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=blockchain
[blockchain-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/blockchain
[common-package]: ./packages/common
[common-npm-badge]: https://img.shields.io/npm/v/ethereumjs-common.svg
[common-npm-link]: https://www.npmjs.org/package/ethereumjs-common
[common-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/common.svg
[common-npm-link]: https://www.npmjs.org/package/@ethereumjs/common
[common-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20common?label=issues
[common-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+common"
[common-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Common%20Test/badge.svg
[common-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Common+Test%22
[common-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=common
[common-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/common
[tx-package]: ./packages/tx
[tx-npm-badge]: https://img.shields.io/npm/v/ethereumjs-tx.svg
[tx-npm-link]: https://www.npmjs.org/package/ethereumjs-tx
[tx-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/tx.svg
[tx-npm-link]: https://www.npmjs.org/package/@ethereumjs/tx
[tx-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20tx?label=issues
[tx-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+tx"
[tx-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Tx%20Test/badge.svg
[tx-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Tx+Test%22
[tx-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=tx
[tx-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/tx
[vm-package]: ./packages/vm
[vm-npm-badge]: https://img.shields.io/npm/v/ethereumjs-vm.svg
[vm-npm-link]: https://www.npmjs.org/package/ethereumjs-vm
[vm-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/vm.svg
[vm-npm-link]: https://www.npmjs.org/package/@ethereumjs/vm
[vm-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20vm?label=issues
[vm-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+vm"
[vm-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/VM%20Test/badge.svg
Expand Down
4 changes: 2 additions & 2 deletions packages/account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ If you want to join for work or do improvements on the libraries have a look at
[gitter-link]: https://gitter.im/ethereum/ethereumjs
[js-standard-style-badge]: https://cdn.rawgit.com/feross/standard/master/badge.svg
[js-standard-style-link]: https://github.com/feross/standard
[account-npm-badge]: https://img.shields.io/npm/v/ethereumjs-account.svg
[account-npm-link]: https://www.npmjs.org/package/ethereumjs-account
[account-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/account.svg
[account-npm-link]: https://www.npmjs.org/package/@ethereumjs/account
[account-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20account?label=issues
[account-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A"package%3A+account"
[account-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Account%20Test/badge.svg
Expand Down
8 changes: 4 additions & 4 deletions packages/account/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ethereumjs-account",
"name": "@ethereumjs/account",
"version": "3.0.0",
"description": "Encoding, decoding and validation of Ethereum's Account schema",
"main": "./dist/index.js",
Expand All @@ -9,7 +9,7 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/ethereumjs/ethereumjs-account.git"
"url": "git+https://github.com/ethereumjs/ethereumjs-vm.git"
},
"scripts": {
"build": "ethereumjs-config-build",
Expand All @@ -32,9 +32,9 @@
"author": "mjbecze (mjbecze@gmail.com)",
"license": "MPL-2.0",
"bugs": {
"url": "https://github.com/ethereumjs/ethereumjs-account/issues"
"url": "https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aissue+label%3A\"package%3A+account\""
},
"homepage": "https://github.com/ethereumjs/ethereumjs-account#readme",
"homepage": "https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/account#synopsis",
"dependencies": {
"ethereumjs-util": "^7.0.2",
"rlp": "^2.2.1",
Expand Down
Loading