rerender-lens 0.4.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +192 -362
  3. package/dist/{budget-COBu7jBU.d.cts → budget-BnJlYwrV.d.ts} +20 -10
  4. package/dist/{budget-LkNjGtRc.d.ts → budget-CRswn-nC.d.cts} +20 -10
  5. package/dist/cli.cjs +248 -31
  6. package/dist/cli.cjs.map +1 -1
  7. package/dist/cli.js +248 -31
  8. package/dist/cli.js.map +1 -1
  9. package/dist/{devtools-CZebzpF6.d.ts → devtools-BYWat7nQ.d.ts} +7 -1
  10. package/dist/{devtools-BkCct3cJ.d.cts → devtools-DJi_6AfJ.d.cts} +7 -1
  11. package/dist/index.cjs +439 -41
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +131 -8
  14. package/dist/index.d.ts +131 -8
  15. package/dist/index.js +424 -42
  16. package/dist/index.js.map +1 -1
  17. package/dist/jest-setup.cjs +1673 -0
  18. package/dist/jest-setup.cjs.map +1 -0
  19. package/dist/jest-setup.d.cts +8 -0
  20. package/dist/jest-setup.d.ts +8 -0
  21. package/dist/jest-setup.js +1671 -0
  22. package/dist/jest-setup.js.map +1 -0
  23. package/dist/jest.cjs +1760 -0
  24. package/dist/jest.cjs.map +1 -0
  25. package/dist/jest.d.cts +23 -0
  26. package/dist/jest.d.ts +23 -0
  27. package/dist/jest.js +1751 -0
  28. package/dist/jest.js.map +1 -0
  29. package/dist/{notifiers-BjjGSHpp.d.ts → notifiers-DwKlvv4H.d.cts} +8 -4
  30. package/dist/{notifiers-BGQtWKfX.d.cts → notifiers-FNzKHs0a.d.ts} +8 -4
  31. package/dist/playwright.cjs +230 -28
  32. package/dist/playwright.cjs.map +1 -1
  33. package/dist/playwright.d.cts +4 -4
  34. package/dist/playwright.d.ts +4 -4
  35. package/dist/playwright.js +230 -28
  36. package/dist/playwright.js.map +1 -1
  37. package/dist/relay.cjs +10 -2
  38. package/dist/relay.cjs.map +1 -1
  39. package/dist/relay.js +10 -2
  40. package/dist/relay.js.map +1 -1
  41. package/dist/rerender-lens.iife.js +356 -54
  42. package/dist/runner-report-B8Sc3FZO.d.cts +46 -0
  43. package/dist/runner-report-CW8X5RwK.d.ts +46 -0
  44. package/dist/setup.cjs +112 -27
  45. package/dist/setup.cjs.map +1 -1
  46. package/dist/setup.js +112 -27
  47. package/dist/setup.js.map +1 -1
  48. package/dist/{types-BzUEVkxJ.d.cts → types-DW5-N2XH.d.cts} +55 -2
  49. package/dist/{types-BzUEVkxJ.d.ts → types-DW5-N2XH.d.ts} +55 -2
  50. package/dist/vite.d.cts +1 -1
  51. package/dist/vite.d.ts +1 -1
  52. package/dist/vitest-setup.cjs +337 -41
  53. package/dist/vitest-setup.cjs.map +1 -1
  54. package/dist/vitest-setup.d.cts +4 -4
  55. package/dist/vitest-setup.d.ts +4 -4
  56. package/dist/vitest-setup.js +337 -41
  57. package/dist/vitest-setup.js.map +1 -1
  58. package/dist/vitest.cjs +400 -77
  59. package/dist/vitest.cjs.map +1 -1
  60. package/dist/vitest.d.cts +21 -39
  61. package/dist/vitest.d.ts +21 -39
  62. package/dist/vitest.js +401 -78
  63. package/dist/vitest.js.map +1 -1
  64. package/package.json +40 -4
  65. package/panel/panel.css +1 -0
  66. package/panel/panel.js +499 -309
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rerender-lens",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Find avoidable React re-renders and what caused them. Reads the fiber tree like React DevTools, so nothing is patched: works with Fast Refresh, memo, forwardRef and classes. Structured reports, test assertions, and a DevTools bridge.",
5
5
  "keywords": [
6
6
  "react",
@@ -19,7 +19,9 @@
19
19
  "./dist/setup.js",
20
20
  "./dist/setup.cjs",
21
21
  "./dist/vitest-setup.js",
22
- "./dist/vitest-setup.cjs"
22
+ "./dist/vitest-setup.cjs",
23
+ "./dist/jest-setup.js",
24
+ "./dist/jest-setup.cjs"
23
25
  ],
24
26
  "main": "./dist/index.cjs",
25
27
  "module": "./dist/index.js",
@@ -85,6 +87,26 @@
85
87
  "default": "./dist/vitest-setup.cjs"
86
88
  }
87
89
  },
90
+ "./jest": {
91
+ "import": {
92
+ "types": "./dist/jest.d.ts",
93
+ "default": "./dist/jest.js"
94
+ },
95
+ "require": {
96
+ "types": "./dist/jest.d.cts",
97
+ "default": "./dist/jest.cjs"
98
+ }
99
+ },
100
+ "./jest/setup": {
101
+ "import": {
102
+ "types": "./dist/jest-setup.d.ts",
103
+ "default": "./dist/jest-setup.js"
104
+ },
105
+ "require": {
106
+ "types": "./dist/jest-setup.d.cts",
107
+ "default": "./dist/jest-setup.cjs"
108
+ }
109
+ },
88
110
  "./setup": {
89
111
  "import": {
90
112
  "types": "./dist/setup.d.ts",
@@ -119,9 +141,15 @@
119
141
  "docs:media": "node scripts/docs-media.mjs",
120
142
  "lint:ext": "npx --yes web-ext lint --source-dir dist-extension/firefox --warnings-as-errors=false",
121
143
  "version": "node scripts/sync-version.mjs && git add extension/manifest.json",
122
- "check": "npm run typecheck && npm test && npm run build && npm run lint:pkg && npm run build:ext",
144
+ "check": "npm run typecheck && npm test && npm run build && npm run test:built && npm run lint:pkg && npm run build:ext",
123
145
  "prepublishOnly": "npm run check",
124
- "dev:example": "npm run build && npm --prefix examples/vite-react run dev"
146
+ "dev:example": "npm run build && npm --prefix examples/vite-react run dev",
147
+ "test:built": "vitest run test/vendor.test.ts",
148
+ "e2e:next": "playwright test -c e2e/next.config.ts",
149
+ "test:jest": "node scripts/jest-check.mjs",
150
+ "test:react18": "npm install --prefix .react18 --no-save --no-package-lock --no-audit --no-fund react@18 react-dom@18 && vitest run --config test/react-compat.config.ts",
151
+ "store:media": "node scripts/store-media.mjs",
152
+ "test:react17": "npm install --prefix .react17 --no-save --no-package-lock --no-audit --no-fund react@17 react-dom@17 && REACT_COMPAT_DIR=.react17/node_modules vitest run --config test/react-compat.config.ts"
125
153
  },
126
154
  "peerDependencies": {
127
155
  "react": ">=16.8.0",
@@ -129,11 +157,19 @@
129
157
  },
130
158
  "devDependencies": {
131
159
  "@arethetypeswrong/cli": "^0.18.5",
160
+ "@babel/core": "^8.0.1",
161
+ "@babel/preset-env": "^8.0.2",
162
+ "@babel/preset-react": "^8.0.1",
163
+ "@babel/preset-typescript": "^8.0.1",
164
+ "@jest/globals": "^30.5.1",
132
165
  "@playwright/test": "^1.63.0",
133
166
  "@types/chrome": "^0.2.9",
134
167
  "@types/node": "^26.4.1",
135
168
  "@types/react": "^19.2.18",
136
169
  "@types/react-dom": "^19.2.7",
170
+ "babel-jest": "^30.5.1",
171
+ "jest": "^30.5.1",
172
+ "jest-environment-jsdom": "^30.5.1",
137
173
  "jsdom": "^29.1.1",
138
174
  "marked": "^9.1.6",
139
175
  "publint": "^0.3.24",
package/panel/panel.css CHANGED
@@ -324,6 +324,7 @@ details.obj pre { margin: 4px 0 0 12px; font: 11px/1.4 var(--mono); white-space:
324
324
  .opt input[type="text"], .opt input[type="number"] { height: 24px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--bg); color: inherit; font: inherit; }
325
325
  .opt input[type="text"]:focus, .opt input[type="number"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg); }
326
326
  .drawer .meta { color: var(--text-dim); margin-top: 4px; }
327
+ .drawer .report-link { display: inline-block; margin-top: 8px; font-weight: 600; }
327
328
 
328
329
  /* ---------- sessions, compare, commit priority ---------- */
329
330
  button.ib.rec .glyph { color: var(--danger); animation: blink 1.2s ease-in-out infinite; }