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

Implements scoped packages #679

merged 15 commits into from
Jun 2, 2020

Conversation

evertonfraga
Copy link
Contributor

@evertonfraga evertonfraga commented Mar 25, 2020

This PR converts package names to scoped packages at every level of the monorepo project.

Note: It merges to vm/release-v5 branch.

@evertonfraga evertonfraga self-assigned this Mar 25, 2020
@evertonfraga evertonfraga changed the base branch from master to vm/release-v5 May 14, 2020 19:38
@evertonfraga evertonfraga mentioned this pull request Jun 1, 2020
5 tasks
@evertonfraga evertonfraga marked this pull request as ready for review June 2, 2020 02:26
@evertonfraga evertonfraga merged commit 3cc7500 into vm/release-v5 Jun 2, 2020
@evertonfraga evertonfraga deleted the scoped-packages branch June 2, 2020 03:03
@evertonfraga
Copy link
Contributor Author

(Merging to a branch other than master does not require any approval)

evertonfraga added a commit that referenced this pull request Jun 2, 2020
* Readme package renaming

* account: renaming package

* block: Migrating to scoped packages

* npm package URL

* block: updating dependencies to scoped packages

* blockchain: migrating to scoped packages

* common: migrating to scoped packages

* tx: migrating to scoped packages

* vm: migrating to scoped packages

* account,block: updating badges

* vm: updating patch to scoped packages

* fix: updating new occurrences of package names

* fix: updating new occurrences of package names

* fix: rebase re-touching

* ci: updating Block ci file
@evertonfraga evertonfraga mentioned this pull request Jun 6, 2020
evertonfraga added a commit that referenced this pull request Jun 9, 2020
* Readme package renaming

* account: renaming package

* block: Migrating to scoped packages

* npm package URL

* block: updating dependencies to scoped packages

* blockchain: migrating to scoped packages

* common: migrating to scoped packages

* tx: migrating to scoped packages

* vm: migrating to scoped packages

* account,block: updating badges

* vm: updating patch to scoped packages

* fix: updating new occurrences of package names

* fix: updating new occurrences of package names

* fix: rebase re-touching

* ci: updating Block ci file
evertonfraga added a commit that referenced this pull request Jun 10, 2020
* Readme package renaming

* account: renaming package

* block: Migrating to scoped packages

* npm package URL

* block: updating dependencies to scoped packages

* blockchain: migrating to scoped packages

* common: migrating to scoped packages

* tx: migrating to scoped packages

* vm: migrating to scoped packages

* account,block: updating badges

* vm: updating patch to scoped packages

* fix: updating new occurrences of package names

* fix: updating new occurrences of package names

* fix: rebase re-touching

* ci: updating Block ci file
evertonfraga added a commit that referenced this pull request Jun 10, 2020
* Readme package renaming

* account: renaming package

* block: Migrating to scoped packages

* npm package URL

* block: updating dependencies to scoped packages

* blockchain: migrating to scoped packages

* common: migrating to scoped packages

* tx: migrating to scoped packages

* vm: migrating to scoped packages

* account,block: updating badges

* vm: updating patch to scoped packages

* fix: updating new occurrences of package names

* fix: updating new occurrences of package names

* fix: rebase re-touching

* ci: updating Block ci file

downgrading nyc in block
Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Ah, sorry, I made the comments accidentally here on the PR and then did the review finalization on the other, so therefore the confusion. Should nevertheless be possible to take the comments from here I suppose. 😄

- 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

.github/workflows/blockchain-build.yml Show resolved Hide resolved
.github/workflows/tx-bulid.yml Show resolved Hide resolved
.github/workflows/vm-build.yml Show resolved Hide resolved
.github/workflows/vm-nightly-test.yml Show resolved Hide resolved
README.md Show resolved Hide resolved
packages/vm/lib/state/promisified.ts Show resolved Hide resolved
scripts/01-modify-require-dist-to-src.patch Show resolved Hide resolved
@evertonfraga evertonfraga added this to the VM v5 milestone Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants