mobservable
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -0,1 +1,8 @@ | ||
# 1.2.4 | ||
* Fixed: observable arrays didn't properly apply modifiers if created using `asFlat([])` or `fastArray([])` | ||
* Don't try to make frozen objects observable (by @andykog) | ||
* `observableArray.reverse` no longer mutates the arry but just returns a sorted copy | ||
* Updated tests to use babel6 | ||
# 1.2.3 | ||
@@ -2,0 +9,0 @@ |
@@ -437,5 +437,5 @@ var dnode_1 = require('./dnode'); | ||
} | ||
if (Array.isArray(value)) | ||
if (Array.isArray(value) && Object.isExtensible(value)) | ||
return observablearray_1.createObservableArray(value, childMode, true, context); | ||
if (utils_1.isPlainObject(value)) | ||
if (utils_1.isPlainObject(value) && Object.isExtensible(value)) | ||
return extendObservableHelper(value, value, childMode, context); | ||
@@ -442,0 +442,0 @@ return value; |
@@ -92,2 +92,4 @@ var __extends = (this && this.__extends) || function (d, b) { | ||
core_1.assertUnwrapped(value, "Array values cannot have modifiers"); | ||
if (this.mode === core_1.ValueMode.Flat || this.mode === core_1.ValueMode.Reference) | ||
return value; | ||
return core_1.makeChildObservable(value, this.mode, { | ||
@@ -207,3 +209,5 @@ object: this.context.object, | ||
ObservableArray.prototype.reverse = function () { | ||
return this.replace(this.$mobservable.values.reverse()); | ||
this.$mobservable.notifyObserved(); | ||
var clone = this.slice(); | ||
return clone.reverse.apply(clone, arguments); | ||
}; | ||
@@ -210,0 +214,0 @@ ObservableArray.prototype.sort = function (compareFn) { |
{ | ||
"name": "mobservable", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Observable data. Reactive functions. Simple code.", | ||
@@ -20,3 +20,3 @@ "main": "lib/index.js", | ||
"build-typescript-tests": "tsc -m commonjs -t es5 --experimentalDecorators --noImplicitAny --outDir test test/typescript-tests.ts", | ||
"build-babel-tests": "babel --stage 0 test/babel/babel-tests.js -o test/babel-tests.js" | ||
"build-babel-tests": "babel test/babel/babel-tests.js -o test/babel-tests.js" | ||
}, | ||
@@ -34,3 +34,8 @@ "repository": { | ||
"devDependencies": { | ||
"babel": "^5.8.23", | ||
"babel-cli": "^6.4.5", | ||
"babel-core": "^6.4.5", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.4", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-preset-react": "^6.3.13", | ||
"babel-preset-stage-1": "^6.3.13", | ||
"browserify": "^12.0.1", | ||
@@ -37,0 +42,0 @@ "coveralls": "^2.11.4", |
@@ -75,3 +75,3 @@ # mobservable | ||
* For (Native) React apps `npm install mobservable-react --save` as well. You might also be interested in the [dev tools for React and Mobservable](https://github.com/mweststrate/mobservable-react-devtools). | ||
* [Five minute interactive introducton to Mobservable and React](https://mweststrate.github.io/mobservable/getting-started.html) | ||
* [Five minute interactive introduction to Mobservable and React](https://mweststrate.github.io/mobservable/getting-started.html) | ||
@@ -78,0 +78,0 @@ ## Top level api |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
184964
2231
15