react-refresh
Advanced tools
Comparing version 0.0.0-experimental-57333ca33 to 0.0.0-experimental-5de5b6150
{ | ||
"branch": "master", | ||
"buildNumber": "80519", | ||
"checksum": "fcf66d8", | ||
"commit": "57333ca33", | ||
"buildNumber": "89106", | ||
"checksum": "17cceb6", | ||
"commit": "5de5b6150", | ||
"environment": "ci", | ||
"reactVersion": "16.12.0-experimental-57333ca33" | ||
"reactVersion": "16.12.0-experimental-5de5b6150" | ||
} |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-experimental-57333ca33 | ||
/** @license React v0.0.0-experimental-5de5b6150 | ||
* react-refresh-babel.development.js | ||
@@ -18,3 +18,3 @@ * | ||
var ReactFreshBabelPlugin = function (babel) { | ||
function ReactFreshBabelPlugin (babel) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
@@ -174,5 +174,3 @@ | ||
} else if (calleeType === 'MemberExpression') {// Could be something like React.forwardRef(...) | ||
// Pass through. | ||
} else { | ||
} else if (calleeType === 'MemberExpression') ; else { | ||
// More complicated call. | ||
@@ -760,14 +758,8 @@ return false; | ||
}; | ||
}; | ||
} | ||
var ReactFreshBabelPlugin$1 = Object.freeze({ | ||
default: ReactFreshBabelPlugin | ||
}); | ||
var ReactFreshBabelPlugin$2 = ( ReactFreshBabelPlugin$1 && ReactFreshBabelPlugin ) || ReactFreshBabelPlugin$1; | ||
// This is hacky but makes it work with both Rollup and Jest. | ||
var babel = ReactFreshBabelPlugin$2.default || ReactFreshBabelPlugin$2; | ||
var babel = ReactFreshBabelPlugin.default || ReactFreshBabelPlugin; | ||
@@ -774,0 +766,0 @@ module.exports = babel; |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-experimental-57333ca33 | ||
/** @license React v0.0.0-experimental-5de5b6150 | ||
* react-refresh-babel.production.min.js | ||
@@ -14,5 +14,5 @@ * | ||
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 x(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 E(a){a=a.hub.file;var b=y.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}y.set(a,b);return b}function v(a,b,d){var c=b.key;b=b.customHooks;var f=E(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)? | ||
!0;break a;default:a=!1}return!a}).map(function(a){return e.cloneDeep(a.callee)})}}function C(a){a=a.hub.file;var b=y.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}y.set(a,b);return b}function v(a,b,d){var c=b.key;b=b.customHooks;var f=C(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)? | ||
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.getEnv){var z=r.getEnv();if("development"!==z&&!p.skipEnvCheck)throw Error('React Refresh Babel transform should only be enabled in development environment. Instead, the environment is: "'+ | ||
z+'". If you want to override this check, pass {skipEnvCheck: true} as plugin options.');}var e=r.types,F=e.identifier(p.refreshReg||"$RefreshReg$"),A=e.identifier(p.refreshSig||"$RefreshSig$"),l=new Map,y=new WeakMap,k=new WeakSet,q=new WeakSet,B=new WeakSet,n=new WeakMap,G={CallExpression:function(a){var b=a.node.callee,d=null;switch(b.type){case "Identifier":d=b.name;break;case "MemberExpression":d=b.property.name}if(null!==d&&/^use[A-Z]/.test(d)&&(b=a.scope.getFunctionParent(),null!==b)){b=b.block; | ||
z+'". If you want to override this check, pass {skipEnvCheck: true} as plugin options.');}var e=r.types,D=e.identifier(p.refreshReg||"$RefreshReg$"),A=e.identifier(p.refreshSig||"$RefreshSig$"),l=new Map,y=new WeakMap,k=new WeakSet,q=new WeakSet,B=new WeakSet,n=new WeakMap,E={CallExpression:function(a){var b=a.node.callee,d=null;switch(b.type){case "Identifier":d=b.name;break;case "MemberExpression":d=b.property.name}if(null!==d&&/^use[A-Z]/.test(d)&&(b=a.scope.getFunctionParent(),null!==b)){b=b.block; | ||
n.has(b)||n.set(b,[]);b=n.get(b);var c="";"VariableDeclarator"===a.parent.type&&(c=a.parentPath.get("id").getSource());var f=a.get("arguments");"useState"===d&&0<f.length?c+="("+f[0].getSource()+")":"useReducer"===d&&1<f.length&&(c+="("+f[1].getSource()+")");b.push({callee:a.node.callee,name:d,key:c})}}};return{visitor:{ExportDefaultDeclaration:function(a){var b=a.node,d=b.declaration,c=a.get("declaration");if("CallExpression"===d.type&&!k.has(b)){k.add(b);var f=a.parentPath;m("%default%",c,function(a, | ||
@@ -23,3 +23,3 @@ b,c){null!==c&&(a=t(f,a),c.replaceWith(e.assignmentExpression("=",a,b)))})}},FunctionDeclaration:{enter:function(a){var b=a.node;switch(a.parent.type){case "Program":var d=a;var c=a.parentPath;break;case "ExportNamedDeclaration":d=a.parentPath;c=d.parentPath;break;case "ExportDefaultDeclaration":d=a.parentPath;c=d.parentPath;break;default:return}var f=b.id;null!==f&&(f=f.name,u(f)&&!k.has(b)&&(k.add(b),m(f,a,function(a,b){a=t(c,a);d.insertAfter(e.expressionStatement(e.assignmentExpression("=",a,b)))})))}, | ||
v(a.parent.id,d,f.scope))))}else a.replaceWith(e.callExpression(c,v(b,d,a.scope)))}}},VariableDeclaration:function(a){var b=a.node;switch(a.parent.type){case "Program":var d=a;var c=a.parentPath;break;case "ExportNamedDeclaration":d=a.parentPath;c=d.parentPath;break;case "ExportDefaultDeclaration":d=a.parentPath;c=d.parentPath;break;default:return}if(!k.has(b)&&(k.add(b),a=a.get("declarations"),1===a.length)){var f=a[0];m(f.node.id.name,f,function(a,b,h){null!==h&&(a=t(c,a),"ArrowFunctionExpression"!== | ||
b.type&&"FunctionExpression"!==b.type||"VariableDeclarator"!==h.parent.type?h.replaceWith(e.assignmentExpression("=",a,b)):d.insertAfter(e.expressionStatement(e.assignmentExpression("=",a,f.node.id))))})}},Program:{enter:function(a){a.traverse(G)},exit:function(a){var b=l.get(a);if(void 0!==b){var d=a.node;if(!B.has(d)){B.add(d);l.delete(a);var c=[];a.pushContainer("body",e.variableDeclaration("var",c));b.forEach(function(b){var d=b.handle;a.pushContainer("body",e.expressionStatement(e.callExpression(F, | ||
[d,e.stringLiteral(b.persistentID)])));c.push(e.variableDeclarator(d))})}}}}}}}var C={default:w},D=C&&w||C;module.exports=D.default||D; | ||
b.type&&"FunctionExpression"!==b.type||"VariableDeclarator"!==h.parent.type?h.replaceWith(e.assignmentExpression("=",a,b)):d.insertAfter(e.expressionStatement(e.assignmentExpression("=",a,f.node.id))))})}},Program:{enter:function(a){a.traverse(E)},exit:function(a){var b=l.get(a);if(void 0!==b){var d=a.node;if(!B.has(d)){B.add(d);l.delete(a);var c=[];a.pushContainer("body",e.variableDeclaration("var",c));b.forEach(function(b){var d=b.handle;a.pushContainer("body",e.expressionStatement(e.callExpression(D, | ||
[d,e.stringLiteral(b.persistentID)])));c.push(e.variableDeclarator(d))})}}}}}}}module.exports=w.default||w; |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-experimental-57333ca33 | ||
/** @license React v0.0.0-experimental-5de5b6150 | ||
* react-refresh-runtime.development.js | ||
@@ -21,16 +21,3 @@ * | ||
var hasSymbol = typeof Symbol === 'function' && Symbol.for; | ||
// TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | ||
// (unstable) APIs that have been removed. Can we remove the symbols? | ||
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | ||
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | ||
@@ -178,2 +165,3 @@ | ||
function performReactRefresh() { | ||
if (pendingUpdates.length === 0) { | ||
@@ -479,5 +467,3 @@ return null; | ||
failedRoots.delete(root); | ||
} else if (wasMounted && isMounted) {// Update an existing root. | ||
// This doesn't affect our mounted root Set. | ||
} else if (wasMounted && !isMounted) { | ||
} else if (wasMounted && isMounted) ; else if (wasMounted && !isMounted) { | ||
// Unmount an existing root. | ||
@@ -569,6 +555,2 @@ mountedRoots.delete(root); | ||
break; | ||
case 'resolved': | ||
// Do nothing. Fast path for all future renders. | ||
break; | ||
} | ||
@@ -638,15 +620,16 @@ | ||
var ReactFreshRuntime = Object.freeze({ | ||
performReactRefresh: performReactRefresh, | ||
register: register, | ||
setSignature: setSignature, | ||
collectCustomHooksForSignature: collectCustomHooksForSignature, | ||
getFamilyByID: getFamilyByID, | ||
getFamilyByType: getFamilyByType, | ||
findAffectedHostInstances: findAffectedHostInstances, | ||
injectIntoGlobalHook: injectIntoGlobalHook, | ||
hasUnrecoverableErrors: hasUnrecoverableErrors, | ||
_getMountedRootCount: _getMountedRootCount, | ||
createSignatureFunctionForTransform: createSignatureFunctionForTransform, | ||
isLikelyComponentType: isLikelyComponentType | ||
var ReactFreshRuntime = /*#__PURE__*/Object.freeze({ | ||
__proto__: null, | ||
performReactRefresh: performReactRefresh, | ||
register: register, | ||
setSignature: setSignature, | ||
collectCustomHooksForSignature: collectCustomHooksForSignature, | ||
getFamilyByID: getFamilyByID, | ||
getFamilyByType: getFamilyByType, | ||
findAffectedHostInstances: findAffectedHostInstances, | ||
injectIntoGlobalHook: injectIntoGlobalHook, | ||
hasUnrecoverableErrors: hasUnrecoverableErrors, | ||
_getMountedRootCount: _getMountedRootCount, | ||
createSignatureFunctionForTransform: createSignatureFunctionForTransform, | ||
isLikelyComponentType: isLikelyComponentType | ||
}); | ||
@@ -653,0 +636,0 @@ |
@@ -1,2 +0,2 @@ | ||
/** @license React v0.0.0-experimental-57333ca33 | ||
/** @license React v0.0.0-experimental-5de5b6150 | ||
* react-refresh-runtime.production.min.js | ||
@@ -3,0 +3,0 @@ * |
@@ -7,3 +7,3 @@ { | ||
], | ||
"version": "0.0.0-experimental-57333ca33", | ||
"version": "0.0.0-experimental-5de5b6150", | ||
"homepage": "https://reactjs.org/", | ||
@@ -10,0 +10,0 @@ "bugs": "https://github.com/facebook/react/issues", |
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
53909
1199