Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fluxible

Package Overview
Dependencies
Maintainers
5
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluxible - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

6

CHANGELOG.md
# Change Log
## 0.5.6
### Bug Fixes
* [#308] Fix stack tracing for deep stacks
## 0.5.5

@@ -4,0 +10,0 @@

56

lib/FluxibleContext.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc