Comparing version 0.3.2 to 0.3.3
@@ -8,3 +8,3 @@ /** | ||
var inherits = require('inherits'); | ||
var EventEmitter = require('eventemitter3').EventEmitter; | ||
var EventEmitter = require('eventemitter3'); | ||
var CHANGE_EVENT = 'change'; | ||
@@ -11,0 +11,0 @@ |
@@ -23,5 +23,7 @@ /** | ||
this.handlers[DEFAULT] = []; | ||
this.hasWarnedAboutNameProperty = false; | ||
options.stores.forEach(function (store) { | ||
this.registerStore(store); | ||
}, this); | ||
} | ||
@@ -101,3 +103,18 @@ | ||
} | ||
return store.storeName || store.name; | ||
if (store.storeName) { | ||
return store.storeName; | ||
} | ||
if (process.env.NODE_ENV !== 'production') { | ||
if (store.name && !this.hasWarnedAboutNameProperty) { | ||
console.warn('A store has been registered that relies on the ' + | ||
'constructor\'s name property. This name may change when you ' + | ||
'minify your stores during build time and could break string ' + | ||
'references to your store. It is advised that you add a ' + | ||
'static `storeName` property to your store to ensure the ' + | ||
'store name does not change during your build.'); | ||
this.hasWarnedAboutNameProperty = true; | ||
} | ||
} | ||
return store.name; | ||
}; | ||
@@ -104,0 +121,0 @@ |
{ | ||
"name": "dispatchr", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "A Flux dispatcher for applications that run on the server and the client.", | ||
@@ -24,3 +24,3 @@ "main": "index.js", | ||
"debug": "^2.0.0", | ||
"eventemitter3": "^0.1.6", | ||
"eventemitter3": "^1.0.0", | ||
"inherits": "^2.0.1" | ||
@@ -27,0 +27,0 @@ }, |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
73552
510
1
+ Addedeventemitter3@1.2.0(transitive)
- Removedeventemitter3@0.1.6(transitive)
Updatedeventemitter3@^1.0.0