贡献
Contributions are always welcome, no matter how large or small. Before contributing, please read the code of conduct.
Find things to work on
We label issues that we need help with the help wanted
tag. We also categorize them with the following tags:
- cat-bug
- cat-feature
- cat-chore
- cat-performance
These are the main categories that you can work on. We further mark issues with a high-priority
tag or a good first issue
tag to indicate their importance to the project and subjective level of easiness to get started on respectively. If you don’t see the triaged
tag or you see any of the needs-confirmation
, needs-repro-script
, needs-discussion
tags, it may not be wise to start working on these issues.
Here are a few quick links to get you started:
- Good first bugs
- Good first features
- High impact issue that need help
- Issues need reproduction scripts
- Issues need triaging
If you would like to start triaging issues, one easy way to get started is to subscribe to yarn on CodeTriage.
Setup
- Ensure Node.js 4+ and a non-development version of Yarn are installed.
- Git clone the Yarn repository.
- From the root of the repository, run
yarn
to install the dependencies required for development.
Building
Perform a one-off build using:
yarn build
Or to automatically rebuild as changes are made, use:
yarn watch
Testing Your Changes Locally
You can modify the following command to allow you to test your changes locally such that it doesn’t override an existing installation of yarn
.
- Navigate to the folder for yarn that you cloned from GitHub
- Run
alias yarn-local="node $PWD/lib/cli/index.js"
. This will mapyarn-local
to theindex.js
file in your current working directory.
You can now proceed to run yarn watch
in one tab, and test with yarn-local
in the other.
Testing
First follow the building instructions above.
Then to run both the linters and tests, use:
yarn test
Or to run them separately, use:
yarn lint
yarn test-only
Pull Requests
We actively welcome your pull requests.
- Fork the repo and create your branch from
master
. - If you’ve added code that should be tested, add tests.
- If you’ve changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints.
License
By contributing to Yarn, you agree that your contributions will be licensed under its BSD license.