Skip to content

fix: escape style object value in precompile transform #4794

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025

Conversation

marvinhagemeister
Copy link
Member

We didn't escape the value when passing an object to style when using Deno's precompile transform. This does not affect other JSX transforms.

Copy link

github-actions bot commented Jun 11, 2025

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -1% - +0% (-5.14ms - +2.77ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +3% (-0.17ms - +0.52ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -2% - +2% (-1.21ms - +1.16ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +3% (-0.18ms - +0.46ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +2% (-0.70ms - +1.02ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -5% - +4% (-0.10ms - +0.07ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -2% - +0% (-0.54ms - +0.12ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -3% - +4% (-0.95ms - +1.27ms)
    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 🔍 -7% - +4% (-0.58ms - +0.36ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.00ms - +0.01ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -1% - +3% (-0.01ms - +0.03ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -0% - +2% (-0.00ms - +0.02ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local973.78ms - 978.80ms-unsure 🔍
-1% - +0%
-5.14ms - +2.77ms
preact-main974.41ms - 980.53msunsure 🔍
-0% - +1%
-2.77ms - +5.14ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local19.19ms - 19.19ms-unsure 🔍
+0% - +0%
+0.00ms - +0.00ms
preact-main19.19ms - 19.19msunsure 🔍
-0% - -0%
-0.00ms - -0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.42ms - 17.07ms-unsure 🔍
-1% - +3%
-0.17ms - +0.52ms
preact-main16.45ms - 16.69msunsure 🔍
-3% - +1%
-0.52ms - +0.17ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.54ms - 1.54ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.54ms - 1.54msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local71.96ms - 73.72ms-unsure 🔍
-2% - +2%
-1.21ms - +1.16ms
preact-main72.07ms - 73.66msunsure 🔍
-2% - +2%
-1.16ms - +1.21ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local8.23ms - 8.91ms-unsure 🔍
-7% - +4%
-0.58ms - +0.36ms
preact-main8.35ms - 9.01msunsure 🔍
-4% - +7%
-0.36ms - +0.58ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.36ms - 16.97ms-unsure 🔍
-1% - +3%
-0.18ms - +0.46ms
preact-main16.42ms - 16.63msunsure 🔍
-3% - +1%
-0.46ms - +0.18ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.77ms - 3.79ms-unsure 🔍
-0% - +0%
-0.00ms - +0.01ms
preact-main3.77ms - 3.78msunsure 🔍
-0% - +0%
-0.01ms - +0.00ms
-
replace1k
  • Browser: chrome-headless
  • Sample size: 100
  • Built by: CI #4777
  • Commit: 681fc3f

duration

VersionAvg timevs preact-localvs preact-main
preact-local62.46ms - 63.82ms-unsure 🔍
-1% - +2%
-0.70ms - +1.02ms
preact-main62.45ms - 63.51msunsure 🔍
-2% - +1%
-1.02ms - +0.70ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.99ms - 3.00ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main2.98ms - 3.00msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local25.54ms - 26.20ms-unsure 🔍
-3% - +1%
-0.70ms - +0.26ms
preact-main25.75ms - 26.43msunsure 🔍
-1% - +3%
-0.26ms - +0.70ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local32.76ms - 34.22ms-unsure 🔍
-1% - +5%
-0.46ms - +1.52ms
preact-main32.29ms - 33.63msunsure 🔍
-5% - +1%
-1.52ms - +0.46ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local28.77ms - 29.69ms-unsure 🔍
-2% - +3%
-0.48ms - +0.88ms
preact-main28.53ms - 29.53msunsure 🔍
-3% - +2%
-0.88ms - +0.48ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local26.22ms - 27.27ms-unsure 🔍
-3% - +2%
-0.82ms - +0.63ms
preact-main26.35ms - 27.35msunsure 🔍
-2% - +3%
-0.63ms - +0.82ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local22.70ms - 23.90ms-unsure 🔍
-2% - +6%
-0.39ms - +1.26ms
preact-main22.30ms - 23.43msunsure 🔍
-5% - +2%
-1.26ms - +0.39ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.98ms - 21.91ms-unsure 🔍
-2% - +4%
-0.32ms - +0.88ms
preact-main20.78ms - 21.54msunsure 🔍
-4% - +1%
-0.88ms - +0.32ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 180
  • Built by: CI #4777
  • Commit: 681fc3f

duration

VersionAvg timevs preact-localvs preact-main
preact-local1.99ms - 2.12ms-unsure 🔍
-5% - +4%
-0.10ms - +0.07ms
preact-main2.01ms - 2.13msunsure 🔍
-4% - +5%
-0.07ms - +0.10ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local0.97ms - 1.00ms-unsure 🔍
-1% - +3%
-0.01ms - +0.03ms
preact-main0.97ms - 0.99msunsure 🔍
-3% - +1%
-0.03ms - +0.01ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local32.53ms - 32.73ms-unsure 🔍
-2% - +0%
-0.54ms - +0.12ms
preact-main32.53ms - 33.15msunsure 🔍
-0% - +2%
-0.12ms - +0.54ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.24ms - 1.27ms-unsure 🔍
-0% - +2%
-0.00ms - +0.02ms
preact-main1.24ms - 1.25msunsure 🔍
-2% - +0%
-0.02ms - +0.00ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local29.94ms - 31.46ms-unsure 🔍
-3% - +4%
-0.95ms - +1.27ms
preact-main29.72ms - 31.35msunsure 🔍
-4% - +3%
-1.27ms - +0.95ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local2.94ms - 2.95ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main2.94ms - 2.95msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-

tachometer-reporter-action v2 for CI

Copy link

Size Change: +1 B (0%)

Total Size: 46.6 kB

Filename Size Change
jsx-runtime/dist/jsxRuntime.js 862 B +1 B (+0.12%)
ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 3.78 kB
compat/dist/compat.mjs 3.69 kB
compat/dist/compat.umd.js 3.83 kB
debug/dist/debug.js 3.85 kB
debug/dist/debug.mjs 3.85 kB
debug/dist/debug.umd.js 3.94 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.mjs 271 B
devtools/dist/devtools.umd.js 346 B
dist/preact.js 4.65 kB
dist/preact.mjs 4.66 kB
dist/preact.umd.js 4.72 kB
hooks/dist/hooks.js 1.52 kB
hooks/dist/hooks.mjs 1.54 kB
hooks/dist/hooks.umd.js 1.58 kB
jsx-runtime/dist/jsxRuntime.mjs 830 B
jsx-runtime/dist/jsxRuntime.umd.js 934 B
test-utils/dist/testUtils.js 473 B
test-utils/dist/testUtils.mjs 473 B
test-utils/dist/testUtils.umd.js 555 B

compressed-size-action

@JoviDeCroock
Copy link
Member

@marvinhagemeister does this need to be released as part of X, else you would need to PR to 10.x

I haven't properly fixed the actions yet to run there though, sorry about that.

@marvinhagemeister marvinhagemeister changed the base branch from main to v10.x June 11, 2025 10:36
@marvinhagemeister marvinhagemeister changed the base branch from v10.x to main June 11, 2025 10:37
@marvinhagemeister marvinhagemeister merged commit a3565a4 into main Jun 11, 2025
14 checks passed
@marvinhagemeister marvinhagemeister deleted the escape-precompile branch June 11, 2025 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants