New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mesosphere-shared-reactjs

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mesosphere-shared-reactjs - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

7

mixins/StoreMixin.js

@@ -174,2 +174,9 @@ var StringUtil = require('../utils/StringUtil');

if (listenerDetail.suppressUpdate !== true && typeof this.forceUpdate === 'function') {
if (process.env.NODE_ENV === 'performance') {
var warning = 'Forced upates are an antipattern. ';
if (this.saveState_key != null) {
warning += 'Check the render method of ' + this.saveState_key + '.';
}
console.warn(warning);
}
this.forceUpdate();

@@ -176,0 +183,0 @@ }

2

package.json
{
"name": "mesosphere-shared-reactjs",
"version": "0.0.23",
"version": "0.0.24",
"description": "Shared code from mesosphere web projects",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -8,2 +8,20 @@ var Reqwest = require("./Reqwest");

function createRequestID(request) {
var contentType = request.contentType || '';
var data = '';
var headers = '';
var method = request.method || '';
var url = request.url || '';
if (request.data != null) {
data = JSON.stringify(request.data);
}
if (request.headers != null) {
headers = JSON.stringify(request.headers);
}
return method + ':' + url + ':' + data + ':' + contentType + ':' + headers;
}
function createCallbackWrapper(callback, requestID) {

@@ -77,16 +95,19 @@ return function () {

options || (options = {});
var requestID = createRequestID(options);
var usingHangingRequest = Util.isFunction(options.hangingRequestCallback);
if (usingHangingRequest) {
var requestID = options.url;
options.success = createCallbackWrapper(options.success, requestID);
options.error = createCallbackWrapper(options.error, requestID);
// The proxied success and error methods mark the request as inactive when
// the request resolves.
options.success = createCallbackWrapper(options.success, requestID);
options.error = createCallbackWrapper(options.error, requestID);
if (isRequestActive(requestID)) {
// If request is currently active, we don't make another request.
if (isRequestActive(requestID)) {
if (Util.isFunction(options.hangingRequestCallback)) {
options.hangingRequestCallback();
return;
} else {
setRequestState(requestID, true);
delete options.hangingRequestCallback;
}
return;
} else {
setRequestState(requestID, true);
delete options.hangingRequestCallback;
}

@@ -106,12 +127,5 @@

// Only add timeout if it is not using hanging request
var timeout;
if (!usingHangingRequest) {
timeout = 2000;
}
options = Util.extend({}, {
contentType: "application/json; charset=utf-8",
type: "json",
timeout: timeout,
method: "GET"

@@ -118,0 +132,0 @@ }, options);

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