react-render-pulse 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +97 -2
- package/dist/aggregate/aggregator.d.cts +27 -0
- package/dist/aggregate/aggregator.d.ts +28 -0
- package/dist/aggregate/aggregator.d.ts.map +1 -0
- package/dist/aggregate/histogram.d.cts +18 -0
- package/dist/aggregate/histogram.d.ts +19 -0
- package/dist/aggregate/histogram.d.ts.map +1 -0
- package/dist/components/RenderMonitor.d.cts +19 -0
- package/dist/components/RenderMonitor.d.ts +20 -0
- package/dist/components/RenderMonitor.d.ts.map +1 -0
- package/dist/context/device.d.cts +2 -0
- package/dist/context/device.d.ts +3 -0
- package/dist/context/device.d.ts.map +1 -0
- package/dist/context/route.d.cts +7 -0
- package/dist/context/route.d.ts +8 -0
- package/dist/context/route.d.ts.map +1 -0
- package/dist/core.cjs +56 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.d.cts +2 -0
- package/dist/core.d.ts +3 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +28 -0
- package/dist/core.js.map +1 -0
- package/dist/export/console.d.cts +3 -0
- package/dist/export/console.d.ts +4 -0
- package/dist/export/console.d.ts.map +1 -0
- package/dist/export/otel.d.cts +34 -0
- package/dist/export/otel.d.ts +35 -0
- package/dist/export/otel.d.ts.map +1 -0
- package/dist/hooks/useRenderMonitor.d.cts +9 -0
- package/dist/hooks/useRenderMonitor.d.ts +10 -0
- package/dist/hooks/useRenderMonitor.d.ts.map +1 -0
- package/dist/index.cjs +634 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +602 -0
- package/dist/index.js.map +1 -0
- package/dist/modes/detect.d.cts +16 -0
- package/dist/modes/detect.d.ts +17 -0
- package/dist/modes/detect.d.ts.map +1 -0
- package/dist/observe/longtasks.d.cts +12 -0
- package/dist/observe/longtasks.d.ts +13 -0
- package/dist/observe/longtasks.d.ts.map +1 -0
- package/dist/observe/renderWindows.d.cts +17 -0
- package/dist/observe/renderWindows.d.ts +18 -0
- package/dist/observe/renderWindows.d.ts.map +1 -0
- package/dist/otel.cjs +65 -0
- package/dist/otel.cjs.map +1 -0
- package/dist/otel.d.cts +2 -0
- package/dist/otel.d.ts +3 -0
- package/dist/otel.d.ts.map +1 -0
- package/dist/otel.js +38 -0
- package/dist/otel.js.map +1 -0
- package/dist/runtime/guard.d.cts +7 -0
- package/dist/runtime/guard.d.ts +8 -0
- package/dist/runtime/guard.d.ts.map +1 -0
- package/dist/runtime/initRenderPulse.d.cts +44 -0
- package/dist/runtime/initRenderPulse.d.ts +45 -0
- package/dist/runtime/initRenderPulse.d.ts.map +1 -0
- package/dist/runtime/runtime.d.cts +13 -0
- package/dist/runtime/runtime.d.ts +14 -0
- package/dist/runtime/runtime.d.ts.map +1 -0
- package/dist/runtime/useIsomorphicLayoutEffect.d.cts +2 -0
- package/dist/runtime/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/runtime/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/sample/sample.d.cts +7 -0
- package/dist/sample/sample.d.ts +8 -0
- package/dist/sample/sample.d.ts.map +1 -0
- package/dist/transport/payload.d.cts +8 -0
- package/dist/transport/payload.d.ts +9 -0
- package/dist/transport/payload.d.ts.map +1 -0
- package/dist/transport/transport.d.cts +18 -0
- package/dist/transport/transport.d.ts +19 -0
- package/dist/transport/transport.d.ts.map +1 -0
- package/dist/types.d.cts +120 -0
- package/dist/types.d.ts +121 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +128 -3
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface TransportOptions {
|
|
2
|
+
endpoint: string;
|
|
3
|
+
/** Failed sends are retried on later flushes, up to this many attempts in total. */
|
|
4
|
+
maxAttempts: number;
|
|
5
|
+
/** Most failed bodies kept for retry; the oldest are dropped past this. */
|
|
6
|
+
maxQueued: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Transport {
|
|
9
|
+
/**
|
|
10
|
+
* Sends a serialized payload. With `unloading`, uses `navigator.sendBeacon`
|
|
11
|
+
* (falling back to `fetch` with `keepalive`), since the page may be gone
|
|
12
|
+
* before a normal request finishes. Never throws or rejects.
|
|
13
|
+
*/
|
|
14
|
+
send: (body: string, options: {
|
|
15
|
+
unloading: boolean;
|
|
16
|
+
}) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function createTransport(options: TransportOptions): Transport;
|
|
19
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/transport/transport.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAC/D;AAOD,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CA+CpE"}
|
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/** How render durations are measured. See the "Modes" guide. */
|
|
2
|
+
export type Mode = "profiling" | "lightweight";
|
|
3
|
+
/** `"auto"` starts in lightweight mode and switches to profiling mode once React's profiling build is detected. */
|
|
4
|
+
export type ModeOption = Mode | "auto";
|
|
5
|
+
/** Mirrors the `phase` React's `<Profiler>` reports. */
|
|
6
|
+
export type RenderPhase = "mount" | "update" | "nested-update";
|
|
7
|
+
/** One measured commit of one monitored area. Times are on the `performance.now()` timeline, in milliseconds. */
|
|
8
|
+
export interface RenderEvent {
|
|
9
|
+
/** The `id` given to `<RenderMonitor>` or `useRenderMonitor`. */
|
|
10
|
+
area: string;
|
|
11
|
+
route: string;
|
|
12
|
+
phase: RenderPhase;
|
|
13
|
+
duration: number;
|
|
14
|
+
startTime: number;
|
|
15
|
+
endTime: number;
|
|
16
|
+
/** How this measurement was taken: `"profiling"` for `<Profiler>` timings, `"lightweight"` for marks (including every `useRenderMonitor` measurement). */
|
|
17
|
+
mode: Mode;
|
|
18
|
+
}
|
|
19
|
+
export type LongTaskKind = "longtask" | "long-animation-frame";
|
|
20
|
+
/** A main-thread block reported by a `PerformanceObserver`, tagged with the monitored area that was rendering. */
|
|
21
|
+
export interface LongTaskEvent {
|
|
22
|
+
kind: LongTaskKind;
|
|
23
|
+
/**
|
|
24
|
+
* The area blamed for the block: of the renders that overlapped it, the
|
|
25
|
+
* innermost one that accounts for at least half of the longest. `null`
|
|
26
|
+
* when no recent render overlapped it (e.g. work in an event handler).
|
|
27
|
+
*/
|
|
28
|
+
area: string | null;
|
|
29
|
+
route: string;
|
|
30
|
+
startTime: number;
|
|
31
|
+
duration: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Receives measurements as they happen (`onRender`, `onLongTask`) and the
|
|
35
|
+
* batch on each flush (`onFlush`). Errors thrown here are caught, so an
|
|
36
|
+
* exporter can never break the app.
|
|
37
|
+
*/
|
|
38
|
+
export interface Exporter {
|
|
39
|
+
onRender?: ((event: RenderEvent) => void) | undefined;
|
|
40
|
+
onLongTask?: ((event: LongTaskEvent) => void) | undefined;
|
|
41
|
+
onFlush?: ((payload: Payload) => void) | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** Device details from browser APIs. `null` when the browser doesn't expose one. */
|
|
44
|
+
export interface DeviceContext {
|
|
45
|
+
memoryGb: number | null;
|
|
46
|
+
cores: number | null;
|
|
47
|
+
/** `navigator.connection.effectiveType`, e.g. `"4g"`. */
|
|
48
|
+
connection: string | null;
|
|
49
|
+
/** `${innerWidth}x${innerHeight}` in CSS pixels. */
|
|
50
|
+
viewport: string;
|
|
51
|
+
}
|
|
52
|
+
export interface SessionInfo {
|
|
53
|
+
/** Random per page load and never stored on the device, so it can't identify a user. Lets the collector group batches. */
|
|
54
|
+
id: string;
|
|
55
|
+
/** Batch number within the session, starting at 1. */
|
|
56
|
+
seq: number;
|
|
57
|
+
mode: Mode;
|
|
58
|
+
/** The route when the batch was built. */
|
|
59
|
+
route: string;
|
|
60
|
+
appVersion: string | null;
|
|
61
|
+
/** Epoch milliseconds when the session started and when this batch was built. */
|
|
62
|
+
startedAt: number;
|
|
63
|
+
sentAt: number;
|
|
64
|
+
}
|
|
65
|
+
/** One of the slowest renders of an area in a batch. */
|
|
66
|
+
export interface WorstCase {
|
|
67
|
+
ms: number;
|
|
68
|
+
phase: RenderPhase;
|
|
69
|
+
/** Milliseconds since the session started. */
|
|
70
|
+
at: number;
|
|
71
|
+
}
|
|
72
|
+
/** Render timings for one area on one route, for one batch. Durations are in milliseconds. */
|
|
73
|
+
export interface AreaReport {
|
|
74
|
+
id: string;
|
|
75
|
+
route: string;
|
|
76
|
+
renders: number;
|
|
77
|
+
mounts: number;
|
|
78
|
+
/** Renders slower than `slowRenderMs`. */
|
|
79
|
+
slow: number;
|
|
80
|
+
totalMs: number;
|
|
81
|
+
/** Fastest render; with `max`, it bounds percentile estimates from merged histograms. */
|
|
82
|
+
min: number;
|
|
83
|
+
max: number;
|
|
84
|
+
p50: number;
|
|
85
|
+
p75: number;
|
|
86
|
+
p95: number;
|
|
87
|
+
/** Render counts per `HISTOGRAM_BOUNDS` bucket, plus a final overflow bucket. Histograms from many batches can be added together. */
|
|
88
|
+
hist: number[];
|
|
89
|
+
worst: WorstCase[];
|
|
90
|
+
}
|
|
91
|
+
export interface LongTaskReport {
|
|
92
|
+
area: string | null;
|
|
93
|
+
route: string;
|
|
94
|
+
count: number;
|
|
95
|
+
totalMs: number;
|
|
96
|
+
maxMs: number;
|
|
97
|
+
}
|
|
98
|
+
/** Totals for the whole batch, across every area and route. */
|
|
99
|
+
export interface SessionSummary {
|
|
100
|
+
renders: number;
|
|
101
|
+
slowRenders: number;
|
|
102
|
+
longTasks: number;
|
|
103
|
+
longTaskMs: number;
|
|
104
|
+
longFrames: number;
|
|
105
|
+
longFrameMs: number;
|
|
106
|
+
}
|
|
107
|
+
/** What gets sent to the collector. Durations are in milliseconds; no user IDs, IP addresses, or page text. */
|
|
108
|
+
export interface Payload {
|
|
109
|
+
v: 1;
|
|
110
|
+
session: SessionInfo;
|
|
111
|
+
device: DeviceContext;
|
|
112
|
+
summary: SessionSummary;
|
|
113
|
+
areas: AreaReport[];
|
|
114
|
+
longTasks: LongTaskReport[];
|
|
115
|
+
longFrames: LongTaskReport[];
|
|
116
|
+
/** Areas left out to respect `maxAreas` or `maxPayloadBytes`. */
|
|
117
|
+
dropped: {
|
|
118
|
+
areas: number;
|
|
119
|
+
};
|
|
120
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/** How render durations are measured. See the "Modes" guide. */
|
|
2
|
+
export type Mode = "profiling" | "lightweight";
|
|
3
|
+
/** `"auto"` starts in lightweight mode and switches to profiling mode once React's profiling build is detected. */
|
|
4
|
+
export type ModeOption = Mode | "auto";
|
|
5
|
+
/** Mirrors the `phase` React's `<Profiler>` reports. */
|
|
6
|
+
export type RenderPhase = "mount" | "update" | "nested-update";
|
|
7
|
+
/** One measured commit of one monitored area. Times are on the `performance.now()` timeline, in milliseconds. */
|
|
8
|
+
export interface RenderEvent {
|
|
9
|
+
/** The `id` given to `<RenderMonitor>` or `useRenderMonitor`. */
|
|
10
|
+
area: string;
|
|
11
|
+
route: string;
|
|
12
|
+
phase: RenderPhase;
|
|
13
|
+
duration: number;
|
|
14
|
+
startTime: number;
|
|
15
|
+
endTime: number;
|
|
16
|
+
/** How this measurement was taken: `"profiling"` for `<Profiler>` timings, `"lightweight"` for marks (including every `useRenderMonitor` measurement). */
|
|
17
|
+
mode: Mode;
|
|
18
|
+
}
|
|
19
|
+
export type LongTaskKind = "longtask" | "long-animation-frame";
|
|
20
|
+
/** A main-thread block reported by a `PerformanceObserver`, tagged with the monitored area that was rendering. */
|
|
21
|
+
export interface LongTaskEvent {
|
|
22
|
+
kind: LongTaskKind;
|
|
23
|
+
/**
|
|
24
|
+
* The area blamed for the block: of the renders that overlapped it, the
|
|
25
|
+
* innermost one that accounts for at least half of the longest. `null`
|
|
26
|
+
* when no recent render overlapped it (e.g. work in an event handler).
|
|
27
|
+
*/
|
|
28
|
+
area: string | null;
|
|
29
|
+
route: string;
|
|
30
|
+
startTime: number;
|
|
31
|
+
duration: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Receives measurements as they happen (`onRender`, `onLongTask`) and the
|
|
35
|
+
* batch on each flush (`onFlush`). Errors thrown here are caught, so an
|
|
36
|
+
* exporter can never break the app.
|
|
37
|
+
*/
|
|
38
|
+
export interface Exporter {
|
|
39
|
+
onRender?: ((event: RenderEvent) => void) | undefined;
|
|
40
|
+
onLongTask?: ((event: LongTaskEvent) => void) | undefined;
|
|
41
|
+
onFlush?: ((payload: Payload) => void) | undefined;
|
|
42
|
+
}
|
|
43
|
+
/** Device details from browser APIs. `null` when the browser doesn't expose one. */
|
|
44
|
+
export interface DeviceContext {
|
|
45
|
+
memoryGb: number | null;
|
|
46
|
+
cores: number | null;
|
|
47
|
+
/** `navigator.connection.effectiveType`, e.g. `"4g"`. */
|
|
48
|
+
connection: string | null;
|
|
49
|
+
/** `${innerWidth}x${innerHeight}` in CSS pixels. */
|
|
50
|
+
viewport: string;
|
|
51
|
+
}
|
|
52
|
+
export interface SessionInfo {
|
|
53
|
+
/** Random per page load and never stored on the device, so it can't identify a user. Lets the collector group batches. */
|
|
54
|
+
id: string;
|
|
55
|
+
/** Batch number within the session, starting at 1. */
|
|
56
|
+
seq: number;
|
|
57
|
+
mode: Mode;
|
|
58
|
+
/** The route when the batch was built. */
|
|
59
|
+
route: string;
|
|
60
|
+
appVersion: string | null;
|
|
61
|
+
/** Epoch milliseconds when the session started and when this batch was built. */
|
|
62
|
+
startedAt: number;
|
|
63
|
+
sentAt: number;
|
|
64
|
+
}
|
|
65
|
+
/** One of the slowest renders of an area in a batch. */
|
|
66
|
+
export interface WorstCase {
|
|
67
|
+
ms: number;
|
|
68
|
+
phase: RenderPhase;
|
|
69
|
+
/** Milliseconds since the session started. */
|
|
70
|
+
at: number;
|
|
71
|
+
}
|
|
72
|
+
/** Render timings for one area on one route, for one batch. Durations are in milliseconds. */
|
|
73
|
+
export interface AreaReport {
|
|
74
|
+
id: string;
|
|
75
|
+
route: string;
|
|
76
|
+
renders: number;
|
|
77
|
+
mounts: number;
|
|
78
|
+
/** Renders slower than `slowRenderMs`. */
|
|
79
|
+
slow: number;
|
|
80
|
+
totalMs: number;
|
|
81
|
+
/** Fastest render; with `max`, it bounds percentile estimates from merged histograms. */
|
|
82
|
+
min: number;
|
|
83
|
+
max: number;
|
|
84
|
+
p50: number;
|
|
85
|
+
p75: number;
|
|
86
|
+
p95: number;
|
|
87
|
+
/** Render counts per `HISTOGRAM_BOUNDS` bucket, plus a final overflow bucket. Histograms from many batches can be added together. */
|
|
88
|
+
hist: number[];
|
|
89
|
+
worst: WorstCase[];
|
|
90
|
+
}
|
|
91
|
+
export interface LongTaskReport {
|
|
92
|
+
area: string | null;
|
|
93
|
+
route: string;
|
|
94
|
+
count: number;
|
|
95
|
+
totalMs: number;
|
|
96
|
+
maxMs: number;
|
|
97
|
+
}
|
|
98
|
+
/** Totals for the whole batch, across every area and route. */
|
|
99
|
+
export interface SessionSummary {
|
|
100
|
+
renders: number;
|
|
101
|
+
slowRenders: number;
|
|
102
|
+
longTasks: number;
|
|
103
|
+
longTaskMs: number;
|
|
104
|
+
longFrames: number;
|
|
105
|
+
longFrameMs: number;
|
|
106
|
+
}
|
|
107
|
+
/** What gets sent to the collector. Durations are in milliseconds; no user IDs, IP addresses, or page text. */
|
|
108
|
+
export interface Payload {
|
|
109
|
+
v: 1;
|
|
110
|
+
session: SessionInfo;
|
|
111
|
+
device: DeviceContext;
|
|
112
|
+
summary: SessionSummary;
|
|
113
|
+
areas: AreaReport[];
|
|
114
|
+
longTasks: LongTaskReport[];
|
|
115
|
+
longFrames: LongTaskReport[];
|
|
116
|
+
/** Areas left out to respect `maxAreas` or `maxPayloadBytes`. */
|
|
117
|
+
dropped: {
|
|
118
|
+
areas: number;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,131 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-render-pulse",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Real-user render performance monitoring for React, at the component level.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"hooks",
|
|
8
|
+
"performance",
|
|
9
|
+
"profiler",
|
|
10
|
+
"render",
|
|
11
|
+
"rum",
|
|
12
|
+
"real-user-monitoring",
|
|
13
|
+
"monitoring",
|
|
14
|
+
"long-tasks",
|
|
15
|
+
"opentelemetry",
|
|
16
|
+
"observability"
|
|
17
|
+
],
|
|
18
|
+
"author": "Amal M",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/Amalmktk/react-render-pulse.git",
|
|
23
|
+
"directory": "packages/client"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/Amalmktk/react-render-pulse/issues"
|
|
27
|
+
},
|
|
28
|
+
"homepage": "https://github.com/Amalmktk/react-render-pulse#readme",
|
|
29
|
+
"type": "module",
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"main": "./dist/index.cjs",
|
|
32
|
+
"module": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"default": "./dist/index.js"
|
|
39
|
+
},
|
|
40
|
+
"require": {
|
|
41
|
+
"types": "./dist/index.d.cts",
|
|
42
|
+
"default": "./dist/index.cjs"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"./core": {
|
|
46
|
+
"import": {
|
|
47
|
+
"types": "./dist/core.d.ts",
|
|
48
|
+
"default": "./dist/core.js"
|
|
49
|
+
},
|
|
50
|
+
"require": {
|
|
51
|
+
"types": "./dist/core.d.cts",
|
|
52
|
+
"default": "./dist/core.cjs"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"./otel": {
|
|
56
|
+
"import": {
|
|
57
|
+
"types": "./dist/otel.d.ts",
|
|
58
|
+
"default": "./dist/otel.js"
|
|
59
|
+
},
|
|
60
|
+
"require": {
|
|
61
|
+
"types": "./dist/otel.d.cts",
|
|
62
|
+
"default": "./dist/otel.cjs"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"./package.json": "./package.json"
|
|
66
|
+
},
|
|
67
|
+
"typesVersions": {
|
|
68
|
+
"*": {
|
|
69
|
+
"core": [
|
|
70
|
+
"./dist/core.d.ts"
|
|
71
|
+
],
|
|
72
|
+
"otel": [
|
|
73
|
+
"./dist/otel.d.ts"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"files": [
|
|
78
|
+
"dist"
|
|
79
|
+
],
|
|
80
|
+
"size-limit": [
|
|
81
|
+
{
|
|
82
|
+
"name": "full client (initRenderPulse + RenderMonitor + hook)",
|
|
83
|
+
"path": "dist/index.js",
|
|
84
|
+
"import": "{ initRenderPulse, RenderMonitor, useRenderMonitor }",
|
|
85
|
+
"ignore": [
|
|
86
|
+
"react"
|
|
87
|
+
],
|
|
88
|
+
"limit": "3.75 kB"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "otel exporter",
|
|
92
|
+
"path": "dist/otel.js",
|
|
93
|
+
"import": "{ createOtelExporter }",
|
|
94
|
+
"limit": "600 B"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"peerDependencies": {
|
|
98
|
+
"react": "^18.0.0 || ^19.0.0"
|
|
99
|
+
},
|
|
100
|
+
"peerDependenciesMeta": {
|
|
101
|
+
"react": {
|
|
102
|
+
"optional": true
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"devDependencies": {
|
|
106
|
+
"@arethetypeswrong/cli": "^0.18.5",
|
|
107
|
+
"@size-limit/preset-small-lib": "^14.3.0",
|
|
108
|
+
"@testing-library/react": "^16.3.3",
|
|
109
|
+
"@types/node": "^26.6.5",
|
|
110
|
+
"@types/react": "^19.3.0",
|
|
111
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
112
|
+
"jsdom": "^25.0.1",
|
|
113
|
+
"publint": "^0.3.25",
|
|
114
|
+
"react": "^19.2.8",
|
|
115
|
+
"react-dom": "^19.3.1",
|
|
116
|
+
"size-limit": "^14.3.0",
|
|
117
|
+
"tsup": "^8.5.1",
|
|
118
|
+
"typescript": "^7.0.2",
|
|
119
|
+
"vitest": "^4.1.12"
|
|
120
|
+
},
|
|
121
|
+
"scripts": {
|
|
122
|
+
"build": "tsup && tsc -p tsconfig.build.json && node scripts/cjs-types.mjs",
|
|
123
|
+
"dev": "tsup --watch",
|
|
124
|
+
"test": "vitest run",
|
|
125
|
+
"test:watch": "vitest",
|
|
126
|
+
"test:coverage": "vitest run --coverage",
|
|
127
|
+
"typecheck": "tsc --noEmit",
|
|
128
|
+
"size": "size-limit",
|
|
129
|
+
"check:package": "publint && attw --pack . --profile node16"
|
|
130
|
+
}
|
|
6
131
|
}
|