Comparing version 0.5.5 to 0.5.6
# Change Log | ||
## 0.5.6 | ||
### Bug Fixes | ||
* [#308] Fix stack tracing for deep stacks | ||
## 0.5.5 | ||
@@ -4,0 +10,0 @@ |
@@ -164,20 +164,6 @@ /** | ||
/* | ||
* We store the action's stack array on the `stack` property | ||
* of the actionContext interface. | ||
* You can access this in your actions with `context.stack`. | ||
* Use the `displayName` property on your actions for better | ||
* action tracing when your code gets minified in prod. | ||
* One action can execute multiple actions, so we need to create a shallow | ||
* clone with a new stack & new id every time a newActionContext is created. | ||
*/ | ||
var newActionContext = objectAssign({}, actionContext, { | ||
stack: (actionContext.stack || []).concat([displayName]), | ||
rootId: (actionContext.rootId) || generateUUID() | ||
}); | ||
newActionContext.executeAction = newActionContext.executeAction.bind(newActionContext); | ||
if (debug.enabled) { | ||
debug('Executing action ' + newActionContext.stack.join('.') + ' with payload', payload); | ||
debug('Executing action ' + actionContext.stack.join('.') + ' with payload', payload); | ||
} | ||
var executeActionPromise = callAction(newActionContext, action, payload); | ||
var executeActionPromise = callAction(actionContext, action, payload); | ||
@@ -198,3 +184,2 @@ if (done) { | ||
/** | ||
@@ -209,3 +194,4 @@ * Proxy function for executing an action. | ||
FluxContext.prototype.executeAction = function executeAction(action, payload, done) { | ||
return executeActionProxy(this, this.getActionContext(), action, payload, done); | ||
var subActionContext = this._createSubActionContext(this.getActionContext(), action); | ||
return executeActionProxy(this, subActionContext, action, payload, done); | ||
}; | ||
@@ -223,2 +209,31 @@ | ||
/** | ||
* Creates a subActionContext with new stack and rootID based on the action | ||
* that will be executed. | ||
* @private | ||
* @method _createSubActionContext | ||
* @param {Object} parentActionContext The action context that the stack should | ||
* extend from | ||
* @param {Function} action The action to be executed to get the name from | ||
* @returns {Object} | ||
*/ | ||
FluxContext.prototype._createSubActionContext = function createSubActionContext(parentActionContext, action) { | ||
var displayName = action.displayName || action.name; | ||
/* | ||
* We store the action's stack array on the `stack` property | ||
* of the actionContext interface. | ||
* You can access this in your actions with `context.stack`. | ||
* Use the `displayName` property on your actions for better | ||
* action tracing when your code gets minified in prod. | ||
* One action can execute multiple actions, so we need to create a shallow | ||
* clone with a new stack & new id every time a newActionContext is created. | ||
*/ | ||
var newActionContext = Object.assign({}, this.getActionContext(), { | ||
stack: (parentActionContext.stack || []).concat([displayName]), | ||
rootId: (parentActionContext.rootId) || generateUUID() | ||
}); | ||
newActionContext.executeAction = newActionContext.executeAction.bind(newActionContext); | ||
return newActionContext; | ||
}; | ||
/** | ||
* Returns the context for action controllers | ||
@@ -238,5 +253,6 @@ * @method getActionContext | ||
dispatch: self._dispatcher.dispatch.bind(self._dispatcher), | ||
executeAction: function actionExecuteAction (action, payload, callback) { | ||
executeAction: function executeAction (action, payload, callback) { | ||
// `this` will be the current action context | ||
return executeActionProxy(self, this, action, payload, callback); | ||
var subActionContext = self._createSubActionContext(this, action); | ||
return executeActionProxy(self, subActionContext, action, payload, callback); | ||
}, | ||
@@ -243,0 +259,0 @@ getStore: self._dispatcher.getStore.bind(self._dispatcher) |
{ | ||
"name": "fluxible", | ||
"version": "0.5.5", | ||
"version": "0.5.6", | ||
"description": "A pluggable container for isomorphic flux applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
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 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
9
1
45224
27
784