8000 Merge remote-tracking branch 'facebook/master' into efficient-trie-diff · errendir/immutable-js@94e6e46 · GitHub
[go: up one dir, main page]

Skip to content

Commit 94e6e46

Browse files
committed
Merge remote-tracking branch 'facebook/master' into efficient-trie-diff
* facebook/master: (305 commits) Reduce repetition in COC link `CONTRIBUTING.md` Add CODE_OF_CONDUCT.md fix typo Add link to Code of Conduct in CONTRIBUTING Improved Flow support for Record subclasses (immutable-js#1414) Improve asImmutable() docs (immutable-js#1415) Only include version in require statement in Runkit instances. (immutable-js#1411) Add example for OrderedSet subtract. (immutable-js#1410) Fix code samples in Immutable.d.ts docs (immutable-js#1408) Adds perf tests for `Map.merge`. (immutable-js#1407) Move gulpfile into resources/ Prettier: perf tests Prettier: include resources Prettify: Use es5 trailing commas Merge immutable-js#1403 Document regression test steps. (immutable-js#1405) Demonstrates correct handling of Symbol keys in Map.mergeDeep when the Maps are nested, and initialized with Symbol KV tuples instead of plain JS object literals. (immutable-js#1404) Fix Map#concat (immutable-js#1402) test(ts-definitions): test Immutable.d.ts validity using tsc (immutable-js#1401) 4.0.0-rc.9 ...
2 parents a6e57cd + 7f4e616 commit 94e6e46

File tree

240 files changed

+26820
-106591
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+26820
-106591
lines changed

.eslintrc

Lines changed: 0 additions & 19 deletions
This file was deleted.

.eslintrc.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
"root": true,
3+
"parserOptions": {
4+
"ecmaVersion": 6,
5+
"sourceType": "module"
6+
},
7+
"extends": [
8+
"airbnb",
9+
"prettier",
10+
"prettier/react"
11+
],
12+
"plugins": [
13+
"react",
14+
"prettier"
15+
],
16+
"rules": {
17+
"array-callback-return": "off",
18+
"block-scoped-var": "off",
19+
"class-methods-use-this": "off",
20+
"consistent-return": "off",
21+
"constructor-super": "off",
22+
"default-case": "off",
23+
"func-names": "off",
24+
"no-bitwise": "off",
25+
"no-cond-assign": "off",
26+
"no-constant-condition": "off",
27+
"no-continue": "off",
28+
"no-else-return": "error",
29+
"no-empty": "error",
30+
"no-lonely-if": "error",
31+
"no-multi-assign": "off",
32+
"no-nested-ternary": "off",
33+
"no-param-reassign": "off",
34+
"no-plusplus": "off",
35+
"no-prototype-builtins": "off",
36+
"no-restricted-syntax": "off",
37+
"no-return-assign": "off",
38+
"no-self-compare": "off",
39+
"no-sequences": "off",
40+
"no-shadow": "off",
41+
"no-this-before-super": "off",
42+
"no-underscore-dangle": "off",
43+
"no-unused-expressions": "off",
44+
"no-unused-vars": "error",
45+
"no-use-before-define": "off",
46+
"no-useless-concat": "error",
47+
"no-var": "error",
48+
"object-shorthand": "off",
49+
"one-var": "error",
50+
"operator-assignment": "error",
51+
"prefer-rest-params": "off",
52+
"prefer-spread": "off",
53+
"prefer-template": "off",
54+
"spaced-comment": "off",
55+
"vars-on-top": "off",
56+
"react/jsx-boolean-value": "off",
57+
"react/jsx-filename-extension": "off",
58+
"react/no-array-index-key": "off",
59+
"react/no-danger": "off",
60+
"react/no-multi-comp": "off",
61+
"react/prefer-es6-class": "off",
62+
"react/prefer-stateless-function": "off",
63+
"react/prop-types": "off",
64+
"react/self-closing-comp": "error",
65+
"react/sort-comp": "off",
66+
"import/newline-after-import": "error",
67+
"import/no-extraneous-dependencies": "off",
68+
"import/no-mutable-exports": "error",
69+
"import/no-unresolved": "error",
70+
"import/prefer-default-export": "off",
71+
"jsx-a11y/no-static-element-interactions": "off",
72+
"prettier/prettier": [
73+
"error",
74+
{
75+
"singleQuote": true,
76+
"trailingComma": "es5"
77+
}
78+
]
79+
}
80+
}

.github/CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
Facebook has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://code.facebook.com/pages/876921332402685/open-source-code-of-conduct) so that you can understand what actions will and will not be tolerated.

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Have a question?
22

3-
Please ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/immutable.js) instead of opening a Github Issue. There are more people on Stack Overflow who
3+
Please ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/immutable.js) instead of opening a Github Issue. There are more people on Stack Overflow who
44
can answer questions, and good answers can be searchable and canonical.
55

66
# Issues
@@ -19,6 +19,10 @@ Facebook has a [bounty program](https://www.facebook.com/whitehat/) for the safe
1919
disclosure of security bugs. In those cases, please go through the process
2020
outlined on that page and do not file a public issue.
2121

22+
# Code of Conduct
23+
24+
The code of conduct is described in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md)
25+
2226
# Pull Requests
2327

2428
All active development of Immutable JS happens on GitHub. We actively welcome
@@ -28,9 +32,14 @@ your [pull requests](https://help.github.com/articles/creating-a-pull-request).
2832
2. Install all dependencies. (`npm install`)
2933
3. If you've added code, add tests.
3034
4. If you've changed APIs, update the documentation.
31-
5. Build generated JS, run tests and ensure your code passes lint. (`npm run build && npm run test`)
32-
6. Be sure to commit the generated JS in `/dist`.
33-
7. If you haven't already, complete the Contributor License Agreement ("CLA").
35+
5. Build generated JS, run tests and ensure your code passes lint. (`npm run test`)
36+
6. If you haven't already, complete the Contributor License Agreement ("CLA").
37+
38+
## Documentation
39+
40+
Documentation for Immutable.js (hosted at http://facebook.github.io/immutable-js)
41+
is developed in `pages/`. Run `npm start` to get a local copy in your browser
42+
while making edits.
3443

3544
## Contributor License Agreement ("CLA")
3645

@@ -49,7 +58,51 @@ Complete your CLA here: <https://code.facebook.com/cla>
4958
* Trailing commas,
5059
* Avd abbr wrds.
5160

61+
# Functionality Testing
62+
63+
Run the following command to build the library and test functionality:
64+
```bash
65+
npm run test
66+
```
67+
68+
## Performance Regression Testing
69+
70+
Performance tests run against master and your feature branch.
71+
Make sure to commit your changes in your local feature branch before proceeding.
72+
73+
These commands assume you have a remote named `upstream` amd that you do not already have a local `master` branch:
74+
```bash
75+
git fetch upstream
76+
git checkout -b master upstream/master
77+
```
78+
79+
These commands build `dist` and commit `dist/immutable.js` to `master` so that the regression tests can run.
80+
```bash
81+
npm run test
82+
git add dist/immutable.js -f
83+
git commit -m 'perf test prerequisite.'
84+
```
85+
86+
Switch back to your feature branch, and run the following command to run regression tests:
87+
```bash
88+
npm run test
89+
npm run perf
90+
```
91+
92+
Sample output:
93+
```bash
94+
> immutable@4.0.0-rc.9 perf ~/github.com/facebook/immutable-js
95+
> node ./resources/bench.js
96+
97+
List > builds from array of 2
98+
Old: 678,974 683,071 687,218 ops/sec
99+
New: 669,012 673,553 678,157 ops/sec
100+
compare: 1 -1
101+
diff: -1.4%
102+
rme: 0.64%
103+
```
104+
52105
## License
53106

54107
By contributing to Immutable.js, you agree that your contributions will be
55-
licensed under its BSD license.
108+
licensed under its MIT license.

.github/ISSUE_TEMPLATE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!--
2+
3+
4+
STOP AND READ THIS BEFORE POSTING YOUR ISSUE
5+
6+
7+
--- Have a general question? ---
8+
9+
First check out the Docs: https://facebook.github.io/immutable-js/docs/
10+
And check out the Wiki: https://github.com/facebook/immutable-js/wiki/
11+
Search existing issues: https://github.com/facebook/immutable-js/search?type=Issues&q=question
12+
Ask on Stack Overflow!: https://stackoverflow.com/questions/tagged/immutable.js?sort=votes
13+
14+
* Stack Overflow gets more attention
15+
* Answered questions are searchable
16+
* A whole community can answer
17+
18+
--- Feature request? ---
19+
20+
This library attempts to be as stable as possible so features have to meet a
21+
high bar to be added. This library also prefers interoperability with other
22+
libraries over continuous additions. Here are some tips to get your feature added:
23+
24+
* Search existing issues and pull requests first.
25+
* Send a Pull Request! Start with API design and post for review early.
26+
27+
--- Found a bug? ---
28+
29+
Search existing issues first: https://github.com/facebook/immutable-js/search?type=Issues&q=bug
30+
Please ensure you're using the latest version, and provide some information below.
31+
32+
-->
33+
### What happened
34+
35+
<!-- Shortly summarize what went wrong. Be sure to include not just what
36+
happened, but what you expected to happen as well. -->
37+
38+
### How to reproduce
39+
40+
<!-- Provide enough information that someone else could produce the same error.
41+
Share code or even better, send a Pull Request with a new failing test case! -->

.gitignore

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
.*.haste_cache.*
22
node_modules
3-
old
43
npm-debug.log
4+
yarn-error.log
55
.DS_Store
66
*~
77
*.swp
8+
.idea
89
TODO
9-
build
10-
immutable.d.json
11-
readme.json
1210
/pages/out
13-
/pages/resources/immutable.d.json
14-
/pages/resources/readme.json
15-
.idea
11+
/pages/generated
12+
/gh-pages
13+
/npm
14+
/dist

.travis.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
sudo: false
22
language: node_js
3-
node_js:
4-
- '6'
3+
node_js: 7
4+
5+
cache: yarn
6+
script: npm run test:travis
57

68
env:
79
global:
8-
- CXX=g++-4.9
910
- secure: "VDsxy30sE9ivdqoXkaKXo0czbS4brNpwKEIblu7f1gVLx7OD9pjTc78cdwrVbZDBYroSiYVYuUrLDjpVjH88lL/LxRrru3V0CIlAqqa+ssXcqycCaT/6ds+ZymuTTGRh+Mf12pIKO+yc8jTov2M7AzPJdpS+ORP5dImYyE3ex9s="
1011

11-
addons:
12-
apt:
13-
sources:
14-
- ubuntu-toolchain-r-test
15-
packages:
16-
- g++-4.9
17-
18-
after_success: npm run deploy
12+
deploy:
13+
- provider: script
14+
script: npm run gitpublish
15+
skip_cleanup: true
16+
on:
17+
branch: master
18+
repo: facebook/immutable-js
19+
- provider: script
20+
skip_cleanup: true
21+
script: npm run deploy
22+
on:
23+
branch: master
24+
repo: facebook/immutable-js
25+
tags: true

0 commit comments

Comments
 (0)
0