react-refresh
Advanced tools
Comparing version 0.0.0-10cc40018 to 0.0.0-12adaffef
@@ -1,2 +0,2 @@ | ||
/** @license React vundefined | ||
/** @license React v0.0.0-12adaffef | ||
* react-refresh-babel.development.js | ||
@@ -267,4 +267,4 @@ * | ||
case 'React.useContext': | ||
case 'useImperativeHandle': | ||
case 'React.useImperativeHandle': | ||
case 'useImperativeMethods': | ||
case 'React.useImperativeMethods': | ||
case 'useDebugValue': | ||
@@ -271,0 +271,0 @@ case 'React.useDebugValue': |
@@ -1,2 +0,2 @@ | ||
/** @license React vundefined | ||
/** @license React v0.0.0-12adaffef | ||
* react-refresh-babel.production.min.js | ||
@@ -12,3 +12,3 @@ * | ||
0===c.name.indexOf("import")))return!1;break;case "TaggedTemplateExpression":break;default:return!1}c=b.get("init");if(m(a,c,d))return!0;g=b.scope.getBinding(g);if(void 0===g)return;b=!1;g=g.referencePaths;for(e=0;e<g.length;e++){var h=g[e];if(!h.node||"JSXIdentifier"===h.node.type||"Identifier"===h.node.type){h=h.parent;if("JSXOpeningElement"===h.type)b=!0;else if("CallExpression"===h.type){h=h.callee;var k=void 0;switch(h.type){case "Identifier":k=h.name;break;case "MemberExpression":k=h.property.name}switch(k){case "createElement":case "jsx":case "jsxDEV":case "jsxs":b= | ||
!0}}if(b)return d(a,f,c),!0}}}}return!1}function w(a){a=n.get(a);return void 0===a?null:{key:a.map(function(a){return a.name+"{"+a.key+"}"}).join("\n"),customHooks:a.filter(function(a){a:switch(a.name){case "useState":case "React.useState":case "useReducer":case "React.useReducer":case "useEffect":case "React.useEffect":case "useLayoutEffect":case "React.useLayoutEffect":case "useMemo":case "React.useMemo":case "useCallback":case "React.useCallback":case "useRef":case "React.useRef":case "useContext":case "React.useContext":case "useImperativeHandle":case "React.useImperativeHandle":case "useDebugValue":case "React.useDebugValue":a= | ||
!0}}if(b)return d(a,f,c),!0}}}}return!1}function w(a){a=n.get(a);return void 0===a?null:{key:a.map(function(a){return a.name+"{"+a.key+"}"}).join("\n"),customHooks:a.filter(function(a){a:switch(a.name){case "useState":case "React.useState":case "useReducer":case "React.useReducer":case "useEffect":case "React.useEffect":case "useLayoutEffect":case "React.useLayoutEffect":case "useMemo":case "React.useMemo":case "useCallback":case "React.useCallback":case "useRef":case "React.useRef":case "useContext":case "React.useContext":case "useImperativeMethods":case "React.useImperativeMethods":case "useDebugValue":case "React.useDebugValue":a= | ||
!0;break a;default:a=!1}return!a}).map(function(a){return e.cloneDeep(a.callee)})}}function B(a){a=a.hub.file;var b=x.get(a);if(void 0!==b)return b;b=!1;for(var d=a.ast.comments,c=0;c<d.length;c++)if(-1!==d[c].value.indexOf("@refresh reset")){b=!0;break}x.set(a,b);return b}function v(a,b,d){var c=b.key;b=b.customHooks;var f=B(d.path),g=[];b.forEach(function(a){switch(a.type){case "MemberExpression":if("Identifier"===a.object.type)var b=a.object.name;break;case "Identifier":b=a.name}d.hasBinding(b)? | ||
@@ -15,0 +15,0 @@ g.push(a):f=!0});b=c;"function"!==typeof require||p.emitFullSignatures||(b=require("crypto").createHash("sha1").update(c).digest("base64"));a=[a,e.stringLiteral(b)];(f||0<g.length)&&a.push(e.booleanLiteral(f));0<g.length&&a.push(e.functionExpression(null,[],e.blockStatement([e.returnStatement(e.arrayExpression(g))])));return a}var p=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if("function"===typeof r.env){var y=r.env();if("development"!==y&&!p.skipEnvCheck)throw Error('React Refresh Babel transform should only be enabled in development environment. Instead, the environment is: "'+ |
@@ -1,2 +0,2 @@ | ||
/** @license React vundefined | ||
/** @license React v0.0.0-12adaffef | ||
* react-refresh-runtime.development.js | ||
@@ -33,2 +33,5 @@ * | ||
var REACT_LAZY_TYPE = 0xead4; | ||
var REACT_BLOCK_TYPE = 0xead9; | ||
var REACT_SERVER_BLOCK_TYPE = 0xeada; | ||
var REACT_FUNDAMENTAL_TYPE = 0xead5; | ||
var REACT_SCOPE_TYPE = 0xead7; | ||
@@ -39,3 +42,2 @@ var REACT_OPAQUE_ID_TYPE = 0xeae0; | ||
var REACT_LEGACY_HIDDEN_TYPE = 0xeae3; | ||
var REACT_CACHE_TYPE = 0xeae4; | ||
@@ -56,2 +58,5 @@ if (typeof Symbol === 'function' && Symbol.for) { | ||
REACT_LAZY_TYPE = symbolFor('react.lazy'); | ||
REACT_BLOCK_TYPE = symbolFor('react.block'); | ||
REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block'); | ||
REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental'); | ||
REACT_SCOPE_TYPE = symbolFor('react.scope'); | ||
@@ -62,3 +67,2 @@ REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id'); | ||
REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden'); | ||
REACT_CACHE_TYPE = symbolFor('react.cache'); | ||
} | ||
@@ -203,12 +207,2 @@ | ||
return clone; | ||
} // This is a safety mechanism to protect against rogue getters and Proxies. | ||
function getProperty(object, property) { | ||
try { | ||
return object[property]; | ||
} catch (err) { | ||
// Intentionally ignore. | ||
return undefined; | ||
} | ||
} | ||
@@ -364,3 +358,3 @@ | ||
if (typeof type === 'object' && type !== null) { | ||
switch (getProperty(type, '$$typeof')) { | ||
switch (type.$$typeof) { | ||
case REACT_FORWARD_REF_TYPE: | ||
@@ -454,10 +448,2 @@ register(type.render, id + '$render'); | ||
}; | ||
} | ||
if (hook.isDisabled) { | ||
// This isn't a real property on the hook, but it can be set to opt out | ||
// of DevTools integration and associated warnings and logs. | ||
// Using console['warn'] to evade Babel and ESLint | ||
console['warn']('Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' + 'Fast Refresh is not compatible with this shim and will be disabled.'); | ||
return; | ||
} // Here, we just want to get a reference to scheduleRefresh. | ||
@@ -510,40 +496,41 @@ | ||
if (helpers !== undefined) { | ||
helpersByRoot.set(root, helpers); | ||
var current = root.current; | ||
var alternate = current.alternate; // We need to determine whether this root has just (un)mounted. | ||
// This logic is copy-pasted from similar logic in the DevTools backend. | ||
// If this breaks with some refactoring, you'll want to update DevTools too. | ||
if (helpers === undefined) { | ||
return; | ||
} | ||
if (alternate !== null) { | ||
var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null; | ||
var isMounted = current.memoizedState != null && current.memoizedState.element != null; | ||
helpersByRoot.set(root, helpers); | ||
var current = root.current; | ||
var alternate = current.alternate; // We need to determine whether this root has just (un)mounted. | ||
// This logic is copy-pasted from similar logic in the DevTools backend. | ||
// If this breaks with some refactoring, you'll want to update DevTools too. | ||
if (!wasMounted && isMounted) { | ||
// Mount a new root. | ||
mountedRoots.add(root); | ||
failedRoots.delete(root); | ||
} else if (wasMounted && isMounted) ; else if (wasMounted && !isMounted) { | ||
// Unmount an existing root. | ||
mountedRoots.delete(root); | ||
if (alternate !== null) { | ||
var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null; | ||
var isMounted = current.memoizedState != null && current.memoizedState.element != null; | ||
if (didError) { | ||
// We'll remount it on future edits. | ||
failedRoots.add(root); | ||
} else { | ||
helpersByRoot.delete(root); | ||
} | ||
} else if (!wasMounted && !isMounted) { | ||
if (didError) { | ||
// We'll remount it on future edits. | ||
failedRoots.add(root); | ||
} | ||
} | ||
} else { | ||
if (!wasMounted && isMounted) { | ||
// Mount a new root. | ||
mountedRoots.add(root); | ||
failedRoots.delete(root); | ||
} else if (wasMounted && isMounted) ; else if (wasMounted && !isMounted) { | ||
// Unmount an existing root. | ||
mountedRoots.delete(root); | ||
if (didError) { | ||
// We'll remount it on future edits. | ||
failedRoots.add(root); | ||
} else { | ||
helpersByRoot.delete(root); | ||
} | ||
} else if (!wasMounted && !isMounted) { | ||
if (didError) { | ||
// We'll remount it on future edits. | ||
failedRoots.add(root); | ||
} | ||
} | ||
} // Always call the decorated DevTools hook. | ||
} else { | ||
// Mount a new root. | ||
mountedRoots.add(root); | ||
} | ||
return oldOnCommitFiberRoot.apply(this, arguments); | ||
@@ -657,3 +644,3 @@ }; | ||
if (type != null) { | ||
switch (getProperty(type, '$$typeof')) { | ||
switch (type.$$typeof) { | ||
case REACT_FORWARD_REF_TYPE: | ||
@@ -660,0 +647,0 @@ case REACT_MEMO_TYPE: |
@@ -1,2 +0,2 @@ | ||
/** @license React vundefined | ||
/** @license React v0.0.0-12adaffef | ||
* react-refresh-runtime.production.min.js | ||
@@ -3,0 +3,0 @@ * |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "0.0.0-10cc40018", | ||
"version": "0.0.0-12adaffef", | ||
"homepage": "https://reactjs.org/", | ||
@@ -29,7 +29,3 @@ "bugs": "https://github.com/facebook/react/issues", | ||
"node": ">=0.10.0" | ||
}, | ||
"devDependencies": { | ||
"react-16-8": "npm:react@16.8.0", | ||
"react-dom-16-8": "npm:react-dom@16.8.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
0
10
55516
1233