We want to make contributing to this project as easy and transparent as possible, but there are still some kinks to work out. We hope that this guide answers common questions you may have.
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
Some of the core team will be working directly on GitHub. These changes will be public from the beginning. Other changesets will come via a bridge with Facebook's internal source control. This is a necessity as it allows engineers at Facebook outside of the core team to move fast and contribute from an environment they are comfortable in.
We will do our best to keep master
in good shape, with tests passing at all
times. But in order to move fast, we will make API changes that your application
might not be compatible with. We will do our best to communicate these changes
and always version appropriately so you can lock into a specific version if need
be.
We actively welcome your pull requests. Changes will be imported and reviewed internally before being merged. To submit a PR:
- 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.
- If you haven't already, complete the Contributor License Agreement ("CLA").
In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.
Complete your CLA here: https://code.facebook.com/cla
We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.
Facebook has a bounty program for the safe disclosure of security bugs. In those cases, please go through the process outlined on that page and do not file a public issue.
We will eventually have a linter that will catch most styling issues that may exist in your code. Until then, looking at Airbnb's Style Guide will guide you in the right direction.
- 2 spaces for indentation (no tabs).
- 80 character line length strongly preferred.
- Prefer
'
over"
. - ES2015 syntax when possible.
'use strict';
.- Use Flow types.
- Use semicolons;
- Trailing commas,
- Avd abbr wrds.
All commands listed in this section should be run in the root of the directory.
Ensure that yarn or npm
is installed. Example
commands below are for yarn
.
Install dependencies with:
yarn
The following runs Jest (unit tests) and Flow (type checks):
yarn test
During development you may also run Jest in watch mode, re-executing tests automatically on file change (this requires Jest to be installed globally):
jest --watchAll
yarn run lint
The project is configured to format code to a uniform style (via
prettier
) with:
yarn run prettier
Note that this command reformats files in place.
yarn run build
Transforms all .js files in src/
and writes the output file-by-file to
lib/
, from which you can require them (or execute). This is necessary to
rewrite newer language features to be compatible in older browsers/node
versions.
The build is a work in progress.
With a TCK server running, the TCK client tests can be executed with default options via:
yarn run tck
The tests can also be run manually with:
yarn run build
node packages/rsocket-tck/build/index.js
Pass --help
to see configuration options.
By contributing to rsocket-js, you agree that your contributions will be licensed under the LICENSE file in the root directory of this source tree.