preactjs / preact

⚛ī¸ Fast 3kB React alternative with the same modern API. Components & Virtual DOM.
https://preactjs.com
MIT License
36.35k stars 1.93k forks source link

debug: Provide error for illegal nesting of <button> and <a> #4376

Closed rschristian closed 1 month ago

rschristian commented 1 month ago

Technically any Interactive Content is disallowed from being a child of <a> & <button>, but self nesting (<a> within <a>, <button> within <button>) seems to be the only case that actually results in a parser mismatch, hence this limited implementation.

github-actions[bot] commented 1 month ago

📊 Tachometer Benchmark Results

Summary

âŗ Benchmarks are currently running. Results below are out of date.

duration

  • create10k: unsure 🔍 -2% - +1% (-14.42ms - +11.44ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +0% (-0.10ms - +0.07ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +3% (-1.03ms - +1.91ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -2% - +4% (-0.26ms - +0.70ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -2% - +2% (-1.43ms - +1.10ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +3% (-0.09ms - +0.05ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -2% - +1% (-0.63ms - +0.16ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -1% - +1% (-0.15ms - +0.25ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +3% (-0.34ms - +0.45ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • replace1k: faster ✔ 0% - 1% (0.01ms - 0.05ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -4% - +2% (-0.04ms - +0.02ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 +0% - +0% (+0.00ms - +0.00ms)
    preact-local vs preact-main

Results

âŗ Benchmarks are currently running. Results below are out of date.
create10k
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1487
  • Commit: a51c8e2

duration

VersionAvg timevs preact-localvs preact-main
preact-local890.40ms - 906.47ms-unsure 🔍
-2% - +1%
-14.42ms - +11.44ms
preact-main889.80ms - 910.06msunsure 🔍
-1% - +2%
-11.44ms - +14.42ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local26.75ms - 26.75ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main26.75ms - 26.75msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1487
  • Commit: a51c8e2

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.62ms - 16.72ms-unsure 🔍
-1% - +0%
-0.10ms - +0.07ms
preact-main16.62ms - 16.75msunsure 🔍
-0% - +1%
-0.07ms - +0.10ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.75ms - 1.75ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.75ms - 1.75msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1487
  • Commit: a51c8e2

duration

VersionAvg timevs preact-localvs preact-main
preact-local75.93ms - 78.20ms-unsure 🔍
-1% - +3%
-1.03ms - +1.91ms
preact-main75.69ms - 77.56msunsure 🔍
-2% - +1%
-1.91ms - +1.03ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local14.10ms - 14.71ms-unsure 🔍
-2% - +3%
-0.34ms - +0.45ms
preact-main14.10ms - 14.60msunsure 🔍
-3% - +2%
-0.45ms - +0.34ms
-
many-updates
  • Browser: chrome-headless
  • Sample size: 70
  • Built by: Benchmarks #1487
  • Commit: a51c8e2

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.48ms - 17.29ms-unsure 🔍
-2% - +4%
-0.26ms - +0.70ms
preact-main16.40ms - 16.92msunsure 🔍
-4% - +2%
-0.70ms - +0.26ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.86ms - 4.86ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main4.86ms - 4.86msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: Benchmarks #1487
  • Commit: a51c8e2

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.52ms - 70.26ms-unsure 🔍
-2% - +2%
-1.43ms - +1.10ms
preact-main68.63ms - 70.48msunsure 🔍
-2% - +2%
-1.10ms - +1.43ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.65ms - 3.68ms-faster ✔
0% - 1%
0.01ms - 0.05ms
preact-main3.67ms - 3.71msslower ❌
0% - 1%
0.01ms - 0.05ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local28.74ms - 29.29ms-unsure 🔍
-2% - +1%
-0.56ms - +0.30ms
preact-main28.82ms - 29.47msunsure 🔍
-1% - +2%
-0.30ms - +0.56ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local35.49ms - 37.35ms-unsure 🔍
-3% - +4%
-1.19ms - +1.60ms
preact-main35.17ms - 37.26msunsure 🔍
-4% - +3%
-1.60ms - +1.19ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local25.62ms - 25.97ms-unsure 🔍
-1% - +1%
-0.30ms - +0.17ms
preact-main25.70ms - 26.02msunsure 🔍
-1% - +1%
-0.17ms - +0.30ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local24.47ms - 25.35ms-unsure 🔍
-0% - +5%
-0.10ms - +1.10ms
preact-main24.00ms - 24.82msunsure 🔍
-4% - +0%
-1.10ms - +0.10ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local29.12ms - 30.77ms-unsure 🔍
-2% - +6%
-0.53ms - +1.79ms
preact-main28.50ms - 30.13msunsure 🔍
-6% - +2%
-1.79ms - +0.53ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local23.82ms - 24.91ms-unsure 🔍
-2% - +4%
-0.59ms - +1.05ms
preact-main23.52ms - 24.75msunsure 🔍
-4% - +2%
-1.05ms - +0.59ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 170
  • Built by: Benchmarks #1487
  • Commit: a51c8e2

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.75ms - 1.84ms-unsure 🔍
-5% - +3%
-0.09ms - +0.05ms
preact-main1.76ms - 1.87msunsure 🔍
-3% - +5%
-0.05ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.99ms - 1.03ms-unsure 🔍
-4% - +2%
-0.04ms - +0.02ms
preact-main1.00ms - 1.04msunsure 🔍
-2% - +4%
-0.02ms - +0.04ms
-
todo
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1487
  • Commit: a51c8e2

duration

VersionAvg timevs preact-localvs preact-main
preact-local27.66ms - 27.89ms-unsure 🔍
-2% - +1%
-0.63ms - +0.16ms
preact-main27.63ms - 28.38msunsure 🔍
-1% - +2%
-0.16ms - +0.63ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.25ms - 1.25ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.25ms - 1.25msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
update10th1k
  • Browser: chrome-headless
  • Sample size: 50
  • Built by: Benchmarks #1487
  • Commit: a51c8e2

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.18ms - 29.46ms-unsure 🔍
-1% - +1%
-0.15ms - +0.25ms
preact-main29.12ms - 29.41msunsure 🔍
-1% - +1%
-0.25ms - +0.15ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.70ms - 3.70ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main3.70ms - 3.70msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-

tachometer-reporter-action v2 for Benchmarks

github-actions[bot] commented 1 month ago

Size Change: +223 B (0%)

Total Size: 61.4 kB

Filename Size Change
debug/dist/debug.js 3.7 kB +72 B (+2%)
debug/dist/debug.module.js 3.69 kB +76 B (+2%)
debug/dist/debug.umd.js 3.78 kB +75 B (+2%)
ℹī¸ View Unchanged | Filename | Size | | :--- | :---: | | `compat/dist/compat.js` | 4.09 kB | | `compat/dist/compat.module.js` | 4.01 kB | | `compat/dist/compat.umd.js` | 4.14 kB | | `devtools/dist/devtools.js` | 231 B | | `devtools/dist/devtools.module.js` | 240 B | | `devtools/dist/devtools.umd.js` | 314 B | | `dist/preact.js` | 4.63 kB | | `dist/preact.min.js` | 4.67 kB | | `dist/preact.min.module.js` | 4.66 kB | | `dist/preact.min.umd.js` | 4.69 kB | | `dist/preact.module.js` | 4.65 kB | | `dist/preact.umd.js` | 4.71 kB | | `hooks/dist/hooks.js` | 1.55 kB | | `hooks/dist/hooks.module.js` | 1.59 kB | | `hooks/dist/hooks.umd.js` | 1.63 kB | | `jsx-runtime/dist/jsxRuntime.js` | 976 B | | `jsx-runtime/dist/jsxRuntime.module.js` | 949 B | | `jsx-runtime/dist/jsxRuntime.umd.js` | 1.06 kB | | `test-utils/dist/testUtils.js` | 453 B | | `test-utils/dist/testUtils.module.js` | 454 B | | `test-utils/dist/testUtils.umd.js` | 536 B |

compressed-size-action

coveralls commented 1 month ago

Coverage Status

coverage: 99.61% (+0.001%) from 99.609% when pulling 8a45c302c1b71408bb2b570a7ab526b7d943e1ac on debug/button-anchor-nesting into 414c870e4395d1bf3ef8050a75d86bba46d36809 on main.

coveralls commented 1 month ago

Coverage Status

coverage: 99.609% (+0.001%) from 99.608% when pulling 06a2df1d66f4ca657b39b601d447dfb2b2705c83 on debug/button-anchor-nesting into c29caa335a96f4d31aeccc132e6d5e5e3ce69be2 on main.