react-refresh 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- /** @license React vundefined
1
+ /**
2
+ * @license React
2
3
  * react-refresh-babel.development.js
3
4
  *
4
5
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,5 @@
1
- /** @license React vundefined
1
+ /**
2
+ * @license React
2
3
  * react-refresh-babel.production.min.js
3
4
  *
4
5
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -1,4 +1,5 @@
1
- /** @license React vundefined
1
+ /**
2
+ * @license React
2
3
  * react-refresh-runtime.development.js
3
4
  *
4
5
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -14,48 +15,8 @@ if (process.env.NODE_ENV !== "production") {
14
15
  'use strict';
15
16
 
16
17
  // ATTENTION
17
- // When adding new symbols to this file,
18
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
19
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
20
- // nor polyfill, then a plain number is used for performance.
21
- var REACT_ELEMENT_TYPE = 0xeac7;
22
- var REACT_PORTAL_TYPE = 0xeaca;
23
- var REACT_FRAGMENT_TYPE = 0xeacb;
24
- var REACT_STRICT_MODE_TYPE = 0xeacc;
25
- var REACT_PROFILER_TYPE = 0xead2;
26
- var REACT_PROVIDER_TYPE = 0xeacd;
27
- var REACT_CONTEXT_TYPE = 0xeace;
28
- var REACT_FORWARD_REF_TYPE = 0xead0;
29
- var REACT_SUSPENSE_TYPE = 0xead1;
30
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
31
- var REACT_MEMO_TYPE = 0xead3;
32
- var REACT_LAZY_TYPE = 0xead4;
33
- var REACT_SCOPE_TYPE = 0xead7;
34
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
35
- var REACT_OFFSCREEN_TYPE = 0xeae2;
36
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
37
- var REACT_CACHE_TYPE = 0xeae4;
38
-
39
- if (typeof Symbol === 'function' && Symbol.for) {
40
- var symbolFor = Symbol.for;
41
- REACT_ELEMENT_TYPE = symbolFor('react.element');
42
- REACT_PORTAL_TYPE = symbolFor('react.portal');
43
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
44
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
45
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
46
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
47
- REACT_CONTEXT_TYPE = symbolFor('react.context');
48
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
49
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
50
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
51
- REACT_MEMO_TYPE = symbolFor('react.memo');
52
- REACT_LAZY_TYPE = symbolFor('react.lazy');
53
- REACT_SCOPE_TYPE = symbolFor('react.scope');
54
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
55
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
56
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
57
- REACT_CACHE_TYPE = symbolFor('react.cache');
58
- }
18
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
19
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
59
20
 
60
21
  var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // We never remove these associations.
61
22
  // It's OK to reference families, but use WeakMap/Set for types.
@@ -521,7 +482,7 @@ function injectIntoGlobalHook(globalObject) {
521
482
  // If this breaks with some refactoring, you'll want to update DevTools too.
522
483
 
523
484
  if (alternate !== null) {
524
- var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null;
485
+ var wasMounted = alternate.memoizedState != null && alternate.memoizedState.element != null && mountedRoots.has(root);
525
486
  var isMounted = current.memoizedState != null && current.memoizedState.element != null;
526
487
 
527
488
  if (!wasMounted && isMounted) {
@@ -1,4 +1,5 @@
1
- /** @license React vundefined
1
+ /**
2
+ * @license React
2
3
  * react-refresh-runtime.production.min.js
3
4
  *
4
5
  * Copyright (c) Facebook, Inc. and its affiliates.
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "keywords": [
5
5
  "react"
6
6
  ],
7
- "version": "0.11.0",
7
+ "version": "0.12.0",
8
8
  "homepage": "https://reactjs.org/",
9
9
  "bugs": "https://github.com/facebook/react/issues",
10
10
  "license": "MIT",
@@ -13,11 +13,16 @@
13
13
  "README.md",
14
14
  "babel.js",
15
15
  "runtime.js",
16
- "build-info.json",
17
16
  "cjs/",
18
17
  "umd/"
19
18
  ],
20
19
  "main": "runtime.js",
20
+ "exports": {
21
+ ".": "./runtime.js",
22
+ "./runtime": "./runtime.js",
23
+ "./babel": "./babel.js",
24
+ "./package.json": "./package.json"
25
+ },
21
26
  "repository": {
22
27
  "type": "git",
23
28
  "url": "https://github.com/facebook/react.git",