Socket
Socket
Sign inDemoInstall

react-refresh

Package Overview
Dependencies
Maintainers
8
Versions
1755
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-refresh - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

29

cjs/react-refresh-runtime.development.js

@@ -465,14 +465,24 @@ /** @license React vundefined

{
var call = 0;
// We'll fill in the signature in two steps.
// First, we'll know the signature itself. This happens outside the component.
// Then, we'll know the references to custom Hooks. This happens inside the component.
// After that, the returned function will be a fast path no-op.
var status = 'needsSignature';
var savedType;
var hasCustomHooks;
return function (type, key, forceReset, getCustomHooks) {
switch (call++) {
case 0:
savedType = type;
hasCustomHooks = typeof getCustomHooks === 'function';
setSignature(type, key, forceReset, getCustomHooks);
switch (status) {
case 'needsSignature':
if (type !== undefined) {
// If we received an argument, this is the initial registration call.
savedType = type;
hasCustomHooks = typeof getCustomHooks === 'function';
setSignature(type, key, forceReset, getCustomHooks); // The next call we expect is from inside a function, to fill in the custom Hooks.
status = 'needsCustomHooks';
}
break;
case 1:
case 'needsCustomHooks':
if (hasCustomHooks) {

@@ -482,3 +492,8 @@ collectCustomHooksForSignature(savedType);

status = 'resolved';
break;
case 'resolved':
// Do nothing. Fast path for all future renders.
break;
}

@@ -485,0 +500,0 @@

@@ -7,3 +7,3 @@ {

],
"version": "0.4.2",
"version": "0.4.3",
"homepage": "https://reactjs.org/",

@@ -10,0 +10,0 @@ "bugs": "https://github.com/facebook/react/issues",

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