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

react-perf-devtool

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-perf-devtool - npm Package Compare versions

Comparing version 3.1.3-beta.3 to 3.1.3-beta.4

206

lib/shared/parse.js
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
value: true
});

@@ -12,40 +12,40 @@ exports.getReactPerformanceData = undefined;

var createSchema = function createSchema() {
return {
// Phases
mount: {
timeSpent: []
},
unmount: {
timeSpent: []
},
update: {
timeSpent: []
},
render: {
timeSpent: []
},
return {
// Phases
mount: {
timeSpent: []
},
unmount: {
timeSpent: []
},
update: {
timeSpent: []
},
render: {
timeSpent: []
},
// Lifecycle hooks
componentWillMount: {
timeSpent: []
},
componentDidMount: {
timeSpent: []
},
componentWillReceiveProps: {
timeSpent: []
},
shouldComponentUpdate: {
timeSpent: []
},
componentWillUpdate: {
timeSpent: []
},
componentDidUpdate: {
timeSpent: []
},
componentWillUnmount: {
timeSpent: []
}
};
// Lifecycle hooks
componentWillMount: {
timeSpent: []
},
componentDidMount: {
timeSpent: []
},
componentWillReceiveProps: {
timeSpent: []
},
shouldComponentUpdate: {
timeSpent: []
},
componentWillUpdate: {
timeSpent: []
},
componentDidUpdate: {
timeSpent: []
},
componentWillUnmount: {
timeSpent: []
}
};
};

@@ -55,45 +55,45 @@

var updateTime = function updateTime(store, componentName, phase, measure) {
if (phase === '[mount]') {
store[componentName].mount.timeSpent.push(measure.duration);
}
if (phase === '[mount]') {
store[componentName].mount.timeSpent.push(measure.duration);
}
if (phase === '[unmount]') {
store[componentName].unmount.timeSpent.push(measure.duration);
}
if (phase === '[unmount]') {
store[componentName].unmount.timeSpent.push(measure.duration);
}
if (phase === '[update]') {
store[componentName].update.timeSpent.push(measure.duration);
}
if (phase === '[update]') {
store[componentName].update.timeSpent.push(measure.duration);
}
if (phase === '[render]') {
store[componentName].render.timeSpent.push(measure.duration);
}
if (phase === '[render]') {
store[componentName].render.timeSpent.push(measure.duration);
}
if (phase === 'componentWillMount') {
store[componentName].componentWillMount.timeSpent.push(measure.duration);
}
if (phase === 'componentWillMount') {
store[componentName].componentWillMount.timeSpent.push(measure.duration);
}
if (phase === 'componentWillUnmount') {
store[componentName].componentWillUnmount.timeSpent.push(measure.duration);
}
if (phase === 'componentWillUnmount') {
store[componentName].componentWillUnmount.timeSpent.push(measure.duration);
}
if (phase === 'componentDidMount') {
store[componentName].componentDidMount.timeSpent.push(measure.duration);
}
if (phase === 'componentDidMount') {
store[componentName].componentDidMount.timeSpent.push(measure.duration);
}
if (phase === 'componentWillReceiveProps') {
store[componentName].componentWillReceiveProps.timeSpent.push(measure.duration);
}
if (phase === 'componentWillReceiveProps') {
store[componentName].componentWillReceiveProps.timeSpent.push(measure.duration);
}
if (phase === 'shouldComponentUpdate') {
store[componentName].shouldComponentUpdate.timeSpent.push(measure.duration);
}
if (phase === 'shouldComponentUpdate') {
store[componentName].shouldComponentUpdate.timeSpent.push(measure.duration);
}
if (phase === 'componentWillUpdate') {
store[componentName].componentWillUpdate.timeSpent.push(measure.duration);
}
if (phase === 'componentWillUpdate') {
store[componentName].componentWillUpdate.timeSpent.push(measure.duration);
}
if (phase === 'componentDidUpdate') {
store[componentName].componentDidUpdate.timeSpent.push(measure.duration);
}
if (phase === 'componentDidUpdate') {
store[componentName].componentDidUpdate.timeSpent.push(measure.duration);
}
};

@@ -103,42 +103,42 @@

var getReactPerformanceData = function getReactPerformanceData(measures) {
var store = {};
var store = {};
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = measures[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var measure = _step.value;
try {
for (var _iterator = measures[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var measure = _step.value;
if ((0, _parseMeasures.getComponentAndPhaseName)(measure) !== null) {
var _getComponentAndPhase = (0, _parseMeasures.getComponentAndPhaseName)(measure),
componentName = _getComponentAndPhase.componentName,
phase = _getComponentAndPhase.phase;
if ((0, _parseMeasures.getComponentAndPhaseName)(measure) !== null) {
var _getComponentAndPhase = (0, _parseMeasures.getComponentAndPhaseName)(measure),
componentName = _getComponentAndPhase.componentName,
phase = _getComponentAndPhase.phase;
if (!store[componentName]) {
store[componentName] = createSchema();
}
if (!store[componentName]) {
store[componentName] = createSchema();
}
updateTime(store, componentName, phase, measure);
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
updateTime(store, componentName, phase, measure);
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return store;
return store;
};
exports.getReactPerformanceData = getReactPerformanceData;
{
"name": "react-perf-devtool",
"version": "3.1.3-beta.3",
"version": "3.1.3-beta.4",
"description": "A devtool for inspecting the performance of React Components",

@@ -41,3 +41,3 @@ "main": "index.js",

"build:watch": "rm -rf ./extension/build && NODE_ENV=production ./node_modules/.bin/webpack --watch --config ./webpack/webpack.config.js --progress",
"build": "rm -rf ./extension/build && NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack/webpack.config.js --progress",
"build": "rm -rf ./extension/build && NODE_ENV=production ./node_modules/.bin/webpack --config ./webpack/webpack.config.js --progress && yarn build:babel",
"precommit": "lint-staged",

@@ -53,6 +53,3 @@ "format": "find src -name '*.js' | xargs ./node_modules/.bin/prettier --write --no-semi --single-quote",

]
},
"dependencies": {
"react-chartjs-2": "^2.7.0"
}
}
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