The following rules will make easier to review PR's. Please, follow them so we all can have a better developer experience.
Thank you!
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally
- Follow https://conventionalcommits.org/. Is not mandatory for everyone except those who can merge to master.
When is not necessary to execute the CI in a commit it needs be added [ci skip]
to the commit description or title.
This project uses Yarn and lerna to manage this repo and each of the packages. It's mandatory to use Yarn instead of NPM, since we are using Yarn's workspaces to manage this monorepo.
- NodeJS 8 or superior.
- Yarn latest stable.
- Fork the repo: https://help.github.com/articles/fork-a-repo/
- Clone your new forked repo in your computer.
git checkout -b new_branch_name
. Replacenew_branch_name
with the name you like.- Make your changes.
- Commit your changes.
- Push your changes (the first time, git will ask you if you want to create the new branch remotely).
- Create the PR: https://help.github.com/articles/creating-a-pull-request-from-a-fork/
Things to take into account:
-
PR's don't have to be merged by themself. The user with merge permissions will do it once the PR is approved.
-
Don't use your master branch (from your fork). Instead: Develop your PR in there. Why?
You do not want to issue pull requests from your fork’s master branch on Github.com to the parent repisitory because any new changes you add to the master branch will automatically show up in the pull request. That means changes you did not intend to be there, would now be there.
https://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/
yarn run lerna add {dependency-name} [--dev] --scope={@validate-me/package-name}
For contribuitors with publish permissions, follow this steps:
[One time only]
Login permanently into NPM with this command:npm login
.yarn lerna publish [--npm-tag=next]
.
NOTE: Use --npm-tag=next
only for alpha/beta releases. Without the tag uses latest.
If, for some reason, lerna fails, but the commit was made, do the following:
- Report the bug and copy the
lerna-debug.log
file. - Try to publish with the command that lerna tried to do (it will be written in the
lerna-debug.log
file). If for some reason that fails too:- Add the console log to the issue.
- Revert the commits made by lerna.
To be able to use the yarn run changelog
command, you'll need to set GITHUB_AUTH
env variable with a GitHub API personal access token configured with the repo
scope for private repositories or just public_repo
scope for public repositories. Follow this steps:
- Access to https://github.com/settings/tokens.
- Generate a new token with the
repo
scope for private repositories or justpublic_repo
scope for public repositories. - Copy the new token.
- Create an .env file in the root folder of this project.
- Add the
GITHUB_AUTH
variable with the value of the token.