Have a question?
Please ask questions on Stack Overflow instead of opening a Github Issue. There are more people on Stack Overflow who can answer questions, and good answers can be searchable and canonical.
We use GitHub issues to track bugs. Please ensure your bug description is clear and has sufficient instructions to be able to reproduce the issue.
The absolute best way to report a bug is to submit a pull request including a new failing test which describes the bug. When the bug is fixed, your pull request can then be merged!
The next best way to report a bug is to provide a reduced test case on jsFiddle or jsBin or produce exact code inline in the issue which will reproduce the bug.
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.
Code of Conduct
The code of conduct is described in
All active development of Immutable JS happens on GitHub. We actively welcome your pull requests.
- Fork the repo and create your branch from
- Install all dependencies. (
- If you've added code, add tests.
- If you've changed APIs, update the documentation.
- Build generated JS, run tests and ensure your code passes lint. (
npm run test)
- If you haven't already, complete the Contributor License Agreement ("CLA").
Documentation for Immutable.js (hosted at http://facebook.github.io/immutable-js)
is developed in
npm start to get a local copy in your browser
while making edits.
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
- 2 spaces for indentation (no tabs)
- 80 character line length strongly preferred.
- ES6 Harmony when possible.
- Use semicolons;
- Trailing commas,
- Avd abbr wrds.
Run the following command to build the library and test functionality:
npm run test
Performance Regression Testing
Performance tests run against master and your feature branch. Make sure to commit your changes in your local feature branch before proceeding.
These commands assume you have a remote named
upstream amd that you do not already have a local
git fetch upstream git checkout -b master upstream/master
These commands build
dist and commit
master so that the regression tests can run.
npm run test git add dist/immutable.js -f git commit -m 'perf test prerequisite.'
Switch back to your feature branch, and run the following command to run regression tests:
npm run test npm run perf
> email@example.com perf ~/github.com/facebook/immutable-js > node ./resources/bench.js List > builds from array of 2 Old: 678,974 683,071 687,218 ops/sec New: 669,012 673,553 678,157 ops/sec compare: 1 -1 diff: -1.4% rme: 0.64%
By contributing to Immutable.js, you agree that your contributions will be licensed under its MIT license.