react-render-detective 0.3.0 → 0.5.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.
- package/CHANGELOG.md +244 -0
- package/README.md +1 -1
- package/dist/{chunk-QOGTEVBP.js → chunk-DI5STJM4.js} +39 -3
- package/dist/chunk-DI5STJM4.js.map +1 -0
- package/dist/chunk-H5RG2EPP.cjs +75 -0
- package/dist/chunk-H5RG2EPP.cjs.map +1 -0
- package/dist/chunk-LILK23YH.js +71 -0
- package/dist/chunk-LILK23YH.js.map +1 -0
- package/dist/{chunk-DZ3BZ654.cjs → chunk-OSPTERGK.cjs} +39 -3
- package/dist/chunk-OSPTERGK.cjs.map +1 -0
- package/dist/core.cjs +18 -18
- package/dist/core.d.cts +14 -0
- package/dist/core.d.ts +14 -0
- package/dist/core.js +1 -1
- package/dist/index.cjs +466 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +160 -2
- package/dist/index.d.ts +160 -2
- package/dist/index.js +429 -24
- package/dist/index.js.map +1 -1
- package/dist/overlay.cjs +2 -2
- package/dist/overlay.js +1 -1
- package/dist/testing.cjs +20 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.d.cts +62 -0
- package/dist/testing.d.ts +62 -0
- package/dist/testing.js +3 -0
- package/dist/testing.js.map +1 -0
- package/package.json +14 -4
- package/dist/chunk-DZ3BZ654.cjs.map +0 -1
- package/dist/chunk-QOGTEVBP.js.map +0 -1
package/dist/core.d.cts
CHANGED
|
@@ -15,6 +15,8 @@ interface Lifecycle {
|
|
|
15
15
|
unmounts: number;
|
|
16
16
|
/** Mounts that followed an unmount of the same component. */
|
|
17
17
|
remounts: number;
|
|
18
|
+
/** When the most recent remount was observed. */
|
|
19
|
+
lastRemountAt?: number;
|
|
18
20
|
}
|
|
19
21
|
interface NodeRecord {
|
|
20
22
|
id: string;
|
|
@@ -118,6 +120,16 @@ declare class Detective {
|
|
|
118
120
|
*/
|
|
119
121
|
inlineDefinitionSuspected(name: string): boolean;
|
|
120
122
|
lifecycleOf(name: string): Lifecycle;
|
|
123
|
+
/**
|
|
124
|
+
* Did a whole-tree rebuild just happen?
|
|
125
|
+
*
|
|
126
|
+
* Hot reload is the most common cause of remounts in development, and this
|
|
127
|
+
* tool only ever runs in development — so without this it would confidently
|
|
128
|
+
* blame a `key` every time React Fast Refresh replaced a module. A real key
|
|
129
|
+
* or inline-definition problem affects one component; a reload affects many
|
|
130
|
+
* at once.
|
|
131
|
+
*/
|
|
132
|
+
private reloadSuspectedAt;
|
|
121
133
|
/** Hot path. Must stay allocation-free and O(1). */
|
|
122
134
|
recordAttempt(node: NodeRecord, props: Record<string, unknown>): void;
|
|
123
135
|
recordStateChange(node: NodeRecord, change: TrackedStateChange): void;
|
|
@@ -196,6 +208,8 @@ interface DiagnosisInput {
|
|
|
196
208
|
remounts: number;
|
|
197
209
|
/** The component looks like it is declared inside another component's render body. */
|
|
198
210
|
inlineDefinitionSuspected: boolean;
|
|
211
|
+
/** Many components remounted at once — a hot reload or a route change. */
|
|
212
|
+
treeReloadSuspected: boolean;
|
|
199
213
|
selfDuration: number;
|
|
200
214
|
attempts: number;
|
|
201
215
|
committed: boolean;
|
package/dist/core.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ interface Lifecycle {
|
|
|
15
15
|
unmounts: number;
|
|
16
16
|
/** Mounts that followed an unmount of the same component. */
|
|
17
17
|
remounts: number;
|
|
18
|
+
/** When the most recent remount was observed. */
|
|
19
|
+
lastRemountAt?: number;
|
|
18
20
|
}
|
|
19
21
|
interface NodeRecord {
|
|
20
22
|
id: string;
|
|
@@ -118,6 +120,16 @@ declare class Detective {
|
|
|
118
120
|
*/
|
|
119
121
|
inlineDefinitionSuspected(name: string): boolean;
|
|
120
122
|
lifecycleOf(name: string): Lifecycle;
|
|
123
|
+
/**
|
|
124
|
+
* Did a whole-tree rebuild just happen?
|
|
125
|
+
*
|
|
126
|
+
* Hot reload is the most common cause of remounts in development, and this
|
|
127
|
+
* tool only ever runs in development — so without this it would confidently
|
|
128
|
+
* blame a `key` every time React Fast Refresh replaced a module. A real key
|
|
129
|
+
* or inline-definition problem affects one component; a reload affects many
|
|
130
|
+
* at once.
|
|
131
|
+
*/
|
|
132
|
+
private reloadSuspectedAt;
|
|
121
133
|
/** Hot path. Must stay allocation-free and O(1). */
|
|
122
134
|
recordAttempt(node: NodeRecord, props: Record<string, unknown>): void;
|
|
123
135
|
recordStateChange(node: NodeRecord, change: TrackedStateChange): void;
|
|
@@ -196,6 +208,8 @@ interface DiagnosisInput {
|
|
|
196
208
|
remounts: number;
|
|
197
209
|
/** The component looks like it is declared inside another component's render body. */
|
|
198
210
|
inlineDefinitionSuspected: boolean;
|
|
211
|
+
/** Many components remounted at once — a hot reload or a route change. */
|
|
212
|
+
treeReloadSuspected: boolean;
|
|
199
213
|
selfDuration: number;
|
|
200
214
|
attempts: number;
|
|
201
215
|
committed: boolean;
|
package/dist/core.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Detective, RingBuffer, defaultConfig, detectDev, diagnose, diffProps, formatInspected, getDetective, inspect, isPlainObject, isReactElement, matches, mergeConfig, severityFor, shallowEqual, shouldInstrument, valueType } from './chunk-
|
|
1
|
+
export { Detective, RingBuffer, defaultConfig, detectDev, diagnose, diffProps, formatInspected, getDetective, inspect, isPlainObject, isReactElement, matches, mergeConfig, severityFor, shallowEqual, shouldInstrument, valueType } from './chunk-DI5STJM4.js';
|
|
2
2
|
//# sourceMappingURL=core.js.map
|
|
3
3
|
//# sourceMappingURL=core.js.map
|