Skip to content

Commit 24acf89

Browse files
committed
Merge remote-tracking branch 'origin/master' into rest-api-example
2 parents 329cbbe + f4d61c9 commit 24acf89

31 files changed

+1767
-1216
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules/
2+
coverage/

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: node_js
2+
node_js:
3+
- '0.10'
4+
branches:
5+
only:
6+
- master
7+
before_install:
8+
- npm install -g grunt-cli
9+
env:
10+
global:
11+
- secure: E7YHPSZtpjm4I20DB3j3uhkLIeyUGH5Hmos6dynTqoasHo5Z7LIixZaAMRGQitN03rWszrtaV6BRoYmFfjXK39H2LfJxHcCo+3eROZLad8I2tG6ClpsrOy//4xIEg82MGd3wJv81GasIr6kTwm1l4bFZMdj0O5Vb0Y7DGy63f1g=
12+
- secure: i+uPD/Jvg83JWDh+ohdG7oWV7f0JftH3hpVdbg4cqHdKdqjSwH0900F4CuYg6+L8wygZ3nn8hW43kyuX980AF2v1Mij2TL/LcBk434l8qGJUylPChPd0XTIKiXfmTsNphil+weAzLnSYUCGIHlJKP1rAVg6NvoKcRHciufZO+aQ=
13+
- secure: dCTV/Hki4Pm5aQoAwg9HSMkan8rBeJWLaLsZ3q+gUvk3chVEtVglxjWpHf/4lI9M28qFlOhiKk4rF3zQ1tWvfHjHJTUNFYjAzS9RIyDVm26T4DckW13DrNdayz0EYIuhgl6Yx7AUQSnjVm+QaNazhFTXrGzpGA352gftAwhAYsY=
14+
- secure: iuX9onV4MB88li/e+RBf7jYLhpBj2Uru4gM8E/5CSeZZFLP6xugkDrL3Wmi70VtCYf4eVBtMqsLaACh9zQ9Z0TL7zuo5wxIjzHMzKSSqrWYt9amH7hXnANvp+ej3zVnsFvdj6VSF1Dad3G2RJSg1ZYZ5//4mW4jFAS4IPYmI4n0=
15+
addons:
16+
sauce_connect: true

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## 1.0.2
2+
3+
- **deprecated** `reactor.registerStore` will be deprecated in 1.1.x - use `reactor.registerStores` instead. Add deprecation warning.
4+
- **fixed** properly observe getters when passing `silent=true` for `registerStores` - this option no longer makes sense as it makes future observations unreliable.
5+
- **fixed** support `Utils.isFunction` in all browsers (#57)
6+
- **improvement** in Evaluator dont evaluate getter args twice when there is a stale value
7+
8+
## 1.0.1
9+
10+
- **added** Expose createReactMixin functionality on Nuclear singleton
11+
- **fixed** Fix new Store() from throwing error when not passed a config object
12+
13+
## 1.0.0
14+
- **Huge optimizations for `Reactor.evaluate` and `Reactor.observe`** - These values are now very efficiently memoized by leveraging that fact that getters are pure functions and are transforming immutable data. This means that complex transformations wont be reevaluated unless its direct dependencies or underlying state change.
15+
- **Built in support for React** - No need for the NuclearReactMixin, simply use `reactor.ReactMixin`
16+
- **breaking** `Reactor.get( ...getters, transformFn )` -> `Reactor.evaluate( getter )`
17+
- **breaking** `Reactor.getJS( ...getters, transformFn )` -> `Reactor.evaluateToJS( getter )`
18+
- **breaking** keypaths must always be arrays, no more support for 'foo.bar' style keypaths
19+
- **breaking** Getters are no longer a constructor, instead they are plain arrays of the form:

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Contributing to NuclearJS
2+
3+
Welcome to NuclearJS!
4+
If you are reading this, it probably means that you are interested in contributing to this awesome open source project.
5+
To make the process of contributing more straightforward, we have prepared this guideline for you.
6+
7+
## Development Setup
8+
9+
First of all, you will want to [fork](https://help.github.com/articles/fork-a-repo/) this repo and then clone it locally.
10+
11+
Next, you will need to have the following technologies installed: Node, grunt and all the other dependencies.
12+
13+
1. Install [Node.](https://nodejs.org/download/)
14+
2. Install [Grunt](http://gruntjs.com/getting-started) to run the unit tests. `npm install -g grunt-cli`
15+
3. Install all the other dependencies by running: `npm install` in the nuclear-js directory.
16+
17+
## Testing
18+
19+
`grunt test`
20+
21+
To test using Chrome, run: `grunt karma:chrome`
22+
23+
To run unit tests in PhantomJS + Coverage run: `grunt karma:coverage`
24+
25+
## Style Guide
26+
27+
Nothing special here. Just write good, clean JavaScript. Some general rules:
28+
29+
- 2 space indentation (no tabs).
30+
- Prefer `'` over `"`.
31+
- No semicolons unless necessary.
32+
- Last element in an array should be followed with a comma.
33+
- Always use brackets for functions even if it is a one-liner.
34+
- When in doubt, refer to the source code and follow that styling.
35+
36+
## Submitting Issues and Pull Requests
37+
38+
### Issue Reporting Checklist
39+
40+
- [ ] Make sure that you are using the latest version of NuclearJS.
41+
- [ ] Before submitting an issue, try to search around as it may have already been answered or even fixed.
42+
- [ ] If you still can not find a valid answer, feel free to open up an issue and we will happy take a look for you.
43+
44+
### Sending in a Pull Request Checklist
45+
46+
- [ ] Work only in the `src` folder and please DO NOT check in anything in the `dist` folder.
47+
- [ ] Follow the [Style Guide.](https://github.com/optimizely/nuclear-js/blob/master/CONTRIBUTING.md#style-guide)
48+
- [ ] Squash commits that are very small and redundant.
49+
- [ ] Make sure all tests pass.
50+
- [ ] If you are implementing a new feature, be sure to add new tests for that feature.
51+
- [ ] Provide us with a detailed description of commits and changes.

Gruntfile.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = function (grunt) {
2+
require('load-grunt-config')(grunt)
3+
// load npm tasks
4+
grunt.loadNpmTasks('grunt-karma')
5+
grunt.loadNpmTasks('grunt-karma-coveralls')
6+
}

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Optimizely
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

NEXT.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
- [x] Document module pattern and prescribed way of testing NuclearJS modules
99
- [x] Document util methods such as `toImmutable`
1010
- [x] Ensure that flux.observe is called correctly when using mutable POJO data
11-
- [ ] Create release documentation with API breaking changes and migration guide
11+
- [x] Create release documentation with API breaking changes and migration guide
1212

1313
## Planned for 0.6.1
1414
- [ ] Implement code coverage and add badge
15-
- [ ] Implement travis CI and add test passing badge
15+
- [x] Implement travis CI and add test passing badge
1616
- [ ] Add npm badge
1717
- [ ] Explain `getters` with diagram as functional lenses
18-
- [ ] Polyfill all lodash methods in `utils` taken from 0.5.0 (only need `deepClone` and `isObject`)
18+
- [x] Polyfill all lodash methods in `utils` taken from 0.5.0 (only need `deepClone` and `isObject`)

0 commit comments

Comments
 (0)