@react-navigation/devtools
Advanced tools
Comparing version 6.0.2 to 6.0.3
@@ -12,2 +12,4 @@ "use strict"; | ||
var _parseErrorStack = _interopRequireDefault(require("./parseErrorStack")); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -35,17 +37,3 @@ | ||
const frames = stack.split('\n').slice(2).map(line => { | ||
const partMatch = line.match(/^((.+)@)?(.+):(\d+):(\d+)$/); | ||
if (!partMatch) { | ||
return null; | ||
} | ||
const [,, methodName, file, lineNumber, column] = partMatch; | ||
return { | ||
methodName, | ||
file, | ||
lineNumber: Number(lineNumber), | ||
column: Number(column) | ||
}; | ||
}).filter(Boolean); | ||
const frames = (0, _parseErrorStack.default)(stack).slice(2).filter(frame => frame.file !== '[native code]'); | ||
const urlMatch = (_frames$ = frames[0]) === null || _frames$ === void 0 ? void 0 : (_frames$$file = _frames$.file) === null || _frames$$file === void 0 ? void 0 : _frames$$file.match(/^https?:\/\/.+(:\d+)?\//); | ||
@@ -52,0 +40,0 @@ |
import deepEqual from 'deep-equal'; | ||
import * as React from 'react'; | ||
import parseErrorStack from './parseErrorStack'; | ||
export default function useDevToolsBase(ref, callback) { | ||
@@ -19,17 +20,3 @@ const lastStateRef = React.useRef(); | ||
const frames = stack.split('\n').slice(2).map(line => { | ||
const partMatch = line.match(/^((.+)@)?(.+):(\d+):(\d+)$/); | ||
if (!partMatch) { | ||
return null; | ||
} | ||
const [,, methodName, file, lineNumber, column] = partMatch; | ||
return { | ||
methodName, | ||
file, | ||
lineNumber: Number(lineNumber), | ||
column: Number(column) | ||
}; | ||
}).filter(Boolean); | ||
const frames = parseErrorStack(stack).slice(2).filter(frame => frame.file !== '[native code]'); | ||
const urlMatch = (_frames$ = frames[0]) === null || _frames$ === void 0 ? void 0 : (_frames$$file = _frames$.file) === null || _frames$$file === void 0 ? void 0 : _frames$$file.match(/^https?:\/\/.+(:\d+)?\//); | ||
@@ -36,0 +23,0 @@ |
{ | ||
"name": "@react-navigation/devtools", | ||
"description": "Developer tools for React Navigation", | ||
"version": "6.0.2", | ||
"version": "6.0.3", | ||
"keywords": [ | ||
@@ -40,6 +40,7 @@ "react", | ||
"deep-equal": "^2.0.5", | ||
"nanoid": "^3.1.23" | ||
"nanoid": "^3.1.23", | ||
"stacktrace-parser": "^0.1.10" | ||
}, | ||
"devDependencies": { | ||
"@react-navigation/core": "^6.0.2", | ||
"@react-navigation/core": "^6.0.3", | ||
"@testing-library/react-native": "^7.2.0", | ||
@@ -71,3 +72,3 @@ "@types/deep-equal": "^1.0.1", | ||
}, | ||
"gitHead": "38ac69f17ee314f96d3d4bcee02349fa4a02d422" | ||
"gitHead": "66a007b0649e443b528e6875df292563d0ed426c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
112082
39
1398
4
+ Addedstacktrace-parser@^0.1.10
+ Addedstacktrace-parser@0.1.10(transitive)
+ Addedtype-fest@0.7.1(transitive)