react-perf-devtool
Advanced tools
Comparing version 3.1.3-beta.3 to 3.1.3-beta.4
'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" | ||
} | ||
} |
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
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
41006
2
- Removedreact-chartjs-2@^2.7.0
- Removedchart.js@2.9.4(transitive)
- Removedchartjs-color@2.4.1(transitive)
- Removedchartjs-color-string@0.6.0(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.31.1.4(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmoment@2.30.1(transitive)
- Removedreact-chartjs-2@2.11.2(transitive)