backbone-publication
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -178,7 +178,5 @@ import _ from 'underscore'; | ||
// If the new attributes were all nested objects, trigger a general `change` event too. | ||
var allObjects = _.every(newAttributes, function (v) { | ||
return _.isObject(v); | ||
}); | ||
if (allObjects) this.trigger('change', this, newAttributes, options); | ||
if (!_.isEmpty(newAttributes)) { | ||
this.trigger('change', this, newAttributes, options); | ||
} | ||
} | ||
@@ -185,0 +183,0 @@ |
{ | ||
"name": "backbone-publication", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Supports backbone classes backed by `publication-client` reactive queries.", | ||
@@ -11,7 +11,8 @@ "main": "dist/browser/index.js", | ||
"scripts": { | ||
"build": "[ \"$WATCH\" == 'true' ] && rollup -cw || rollup -c", | ||
"build": "gulp", | ||
"watch": "WATCH=true npm run build", | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"test": "gulp erik", | ||
"prebuild": "rm -rf dist", | ||
"prepublish": "npm run build" | ||
"pretest": "rm -f spec/tests.js", | ||
"prepublish": "npm test && npm run build" | ||
}, | ||
@@ -36,5 +37,13 @@ "repository": { | ||
"babel-preset-es2015": "^6.22.0", | ||
"erik": "^1.1.1", | ||
"gulp": "^3.9.1", | ||
"jasmine": "^2.5.3", | ||
"multibuild": "^2.1.0", | ||
"rollup": "^0.41.4", | ||
"rollup-plugin-babel": "^2.7.1" | ||
"rollup-plugin-babel": "^2.7.1", | ||
"rollup-plugin-multi-entry": "^2.0.1", | ||
"rollup-plugin-node-resolve": "^2.0.0", | ||
"rollup-plugin-root-import": "^0.2.2", | ||
"underscore": "^1.8.3" | ||
} | ||
} |
# backbone-publication | ||
[![Build Status](https://travis-ci.org/mixmaxhq/backbone-publication.svg?branch=master)](https://travis-ci.org/mixmaxhq/backbone-publication) | ||
`backbone-publication` implements the boilerplate code that is required to make | ||
@@ -36,4 +38,5 @@ `backbone` and our publication based system (through | ||
### Changelog | ||
* 1.0.3 - Fixed issue with `PublicationModel.set` not firing `change` event. | ||
* 1.0.2 - Util function name typo (`isObject` -> `isPlainObject`). | ||
* 1.0.1 - Use our own local utils instead of external underscore extensions. | ||
* 1.0.0 - Initial release. |
@@ -88,7 +88,5 @@ import _ from 'underscore'; | ||
// If the new attributes were all nested objects, trigger a general `change` event too. | ||
var allObjects = _.every(newAttributes, function(v) { | ||
return _.isObject(v); | ||
}); | ||
if (allObjects) this.trigger('change', this, newAttributes, options); | ||
if (!_.isEmpty(newAttributes)) { | ||
this.trigger('change', this, newAttributes, options); | ||
} | ||
} | ||
@@ -95,0 +93,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
29141
0
42
12
662
1