Skip to content
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

10.25.0 #4561

Merged
merged 1 commit into from
Nov 22, 2024
Merged

10.25.0 #4561

merged 1 commit into from
Nov 22, 2024

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Nov 21, 2024

Features

Move per-element type interfaces into core and more strictly type IntrinsicElements (#4546, thanks @rschristian)

This adds per-element typings for every DOM-node type, this means that our types might become slightly stricter when you are using DOM attributes/properties where they are not allowed, an example of this might be <div src="x" />.

If you notice any issues when upgrading tell us about them, we can evaluate whether we have missed a case.

Recreate unkeyed functional components when they change position. (#4550, thanks @JoviDeCroock)

This is a long time bugfix, when we have elements that look like

return (
	{condition ? <Element /> : null}
	{condition ? null : <Element />
)

We would reuse the state of the first VNode to render the second one when the condition switches. When you are using key, this issue was not present.

Support { handleEvent() {} } object interface as a listener (#4538, thanks @lilnasy)

We've added support for attaching object/class event-handlers

let handler = {
	onclick,
	handleEvent() {
		this.onclick()
	}
}

<div onClick={handler} />

Fixes

Maintenance

Copy link

github-actions bot commented Nov 21, 2024

📊 Tachometer Benchmark Results

Summary

duration

  • create10k: unsure 🔍 -0% - +1% (-0.09ms - +11.09ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -2% - +1% (-0.31ms - +0.15ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -1% - +2% (-0.64ms - +1.79ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -1% - +4% (-0.21ms - +0.60ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +1% (-0.86ms - +0.51ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -3% - +7% (-0.06ms - +0.15ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -3% - +1% (-1.19ms - +0.28ms)
    preact-local vs preact-main
  • update10th1k: unsure 🔍 -4% - +0% (-1.54ms - +0.13ms)
    preact-local vs preact-main

usedJSHeapSize

  • create10k: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • filter-list: unsure 🔍 -1% - +1% (-0.02ms - +0.01ms)
    preact-local vs preact-main
  • hydrate1k: unsure 🔍 -5% - +4% (-0.60ms - +0.56ms)
    preact-local vs preact-main
  • many-updates: unsure 🔍 -0% - +0% (-0.01ms - +0.01ms)
    preact-local vs preact-main
  • replace1k: unsure 🔍 -1% - +0% (-0.03ms - +0.02ms)
    preact-local vs preact-main
  • text-update: unsure 🔍 -0% - +0% (-0.00ms - +0.00ms)
    preact-local vs preact-main
  • todo: unsure 🔍 -1% - +1% (-0.01ms - +0.01ms)
    preact-local vs preact-main
  • update10th1k: faster ✔ 0% - 1% (0.00ms - 0.03ms)
    preact-local vs preact-main

Results

create10k

duration

VersionAvg timevs preact-localvs preact-main
preact-local943.61ms - 953.70ms-unsure 🔍
-0% - +1%
-0.09ms - +11.09ms
preact-main940.74ms - 945.56msunsure 🔍
-1% - +0%
-11.09ms - +0.09ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local25.29ms - 25.29ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main25.28ms - 25.29msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
filter-list

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.53ms - 16.82ms-unsure 🔍
-2% - +1%
-0.31ms - +0.15ms
preact-main16.57ms - 16.93msunsure 🔍
-1% - +2%
-0.15ms - +0.31ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.66ms - 1.68ms-unsure 🔍
-1% - +1%
-0.02ms - +0.01ms
preact-main1.67ms - 1.69msunsure 🔍
-1% - +1%
-0.01ms - +0.02ms
-
hydrate1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local75.28ms - 77.04ms-unsure 🔍
-1% - +2%
-0.64ms - +1.79ms
preact-main74.74ms - 76.42msunsure 🔍
-2% - +1%
-1.79ms - +0.64ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local12.05ms - 12.91ms-unsure 🔍
-5% - +4%
-0.60ms - +0.56ms
preact-main12.11ms - 12.89msunsure 🔍
-4% - +5%
-0.56ms - +0.60ms
-
many-updates

duration

VersionAvg timevs preact-localvs preact-main
preact-local16.18ms - 16.66ms-unsure 🔍
-1% - +4%
-0.21ms - +0.60ms
preact-main15.90ms - 16.55msunsure 🔍
-4% - +1%
-0.60ms - +0.21ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local4.58ms - 4.60ms-unsure 🔍
-0% - +0%
-0.01ms - +0.01ms
preact-main4.58ms - 4.59msunsure 🔍
-0% - +0%
-0.01ms - +0.01ms
-
replace1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local68.23ms - 69.08ms-unsure 🔍
-1% - +1%
-0.86ms - +0.51ms
preact-main68.29ms - 69.37msunsure 🔍
-1% - +1%
-0.51ms - +0.86ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.61ms - 3.65ms-unsure 🔍
-1% - +0%
-0.03ms - +0.02ms
preact-main3.62ms - 3.66msunsure 🔍
-0% - +1%
-0.02ms - +0.03ms
-

run-warmup-0

VersionAvg timevs preact-localvs preact-main
preact-local30.88ms - 31.69ms-unsure 🔍
-2% - +2%
-0.67ms - +0.51ms
preact-main30.94ms - 31.79msunsure 🔍
-2% - +2%
-0.51ms - +0.67ms
-

run-warmup-1

VersionAvg timevs preact-localvs preact-main
preact-local36.46ms - 37.90ms-unsure 🔍
-5% - +1%
-1.74ms - +0.41ms
preact-main37.05ms - 38.64msunsure 🔍
-1% - +5%
-0.41ms - +1.74ms
-

run-warmup-2

VersionAvg timevs preact-localvs preact-main
preact-local30.57ms - 31.67ms-unsure 🔍
-4% - +1%
-1.13ms - +0.44ms
preact-main30.90ms - 32.03msunsure 🔍
-1% - +4%
-0.44ms - +1.13ms
-

run-warmup-3

VersionAvg timevs preact-localvs preact-main
preact-local23.28ms - 23.78ms-unsure 🔍
-1% - +2%
-0.18ms - +0.49ms
preact-main23.15ms - 23.60msunsure 🔍
-2% - +1%
-0.49ms - +0.18ms
-

run-warmup-4

VersionAvg timevs preact-localvs preact-main
preact-local22.30ms - 22.54ms-unsure 🔍
-1% - +1%
-0.11ms - +0.19ms
preact-main22.28ms - 22.48msunsure 🔍
-1% - +1%
-0.19ms - +0.11ms
-

run-final

VersionAvg timevs preact-localvs preact-main
preact-local20.63ms - 21.11ms-unsure 🔍
-2% - +2%
-0.46ms - +0.34ms
preact-main20.61ms - 21.25msunsure 🔍
-2% - +2%
-0.34ms - +0.46ms
-
text-update
  • Browser: chrome-headless
  • Sample size: 220
  • Built by: CI #4058
  • Commit: fe698b6

duration

VersionAvg timevs preact-localvs preact-main
preact-local2.08ms - 2.21ms-unsure 🔍
-3% - +7%
-0.06ms - +0.15ms
preact-main2.02ms - 2.17msunsure 🔍
-7% - +3%
-0.15ms - +0.06ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.11ms - 1.11ms-unsure 🔍
-0% - +0%
-0.00ms - +0.00ms
preact-main1.11ms - 1.11msunsure 🔍
-0% - +0%
-0.00ms - +0.00ms
-
todo

duration

VersionAvg timevs preact-localvs preact-main
preact-local34.27ms - 34.58ms-unsure 🔍
-3% - +1%
-1.19ms - +0.28ms
preact-main34.16ms - 35.60msunsure 🔍
-1% - +3%
-0.28ms - +1.19ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local1.22ms - 1.24ms-unsure 🔍
-1% - +1%
-0.01ms - +0.01ms
preact-main1.22ms - 1.24msunsure 🔍
-1% - +1%
-0.01ms - +0.01ms
-
update10th1k

duration

VersionAvg timevs preact-localvs preact-main
preact-local32.89ms - 33.96ms-unsure 🔍
-4% - +0%
-1.54ms - +0.13ms
preact-main33.49ms - 34.77msunsure 🔍
-0% - +5%
-0.13ms - +1.54ms
-

usedJSHeapSize

VersionAvg timevs preact-localvs preact-main
preact-local3.52ms - 3.53ms-faster ✔
0% - 1%
0.00ms - 0.03ms
preact-main3.53ms - 3.55msslower ❌
0% - 1%
0.00ms - 0.03ms
-

tachometer-reporter-action v2 for CI

Copy link

Size Change: 0 B

Total Size: 62.3 kB

ℹ️ View Unchanged
Filename Size
compat/dist/compat.js 4.13 kB
compat/dist/compat.module.js 4.06 kB
compat/dist/compat.umd.js 4.19 kB
debug/dist/debug.js 3.82 kB
debug/dist/debug.module.js 3.83 kB
debug/dist/debug.umd.js 3.9 kB
devtools/dist/devtools.js 260 B
devtools/dist/devtools.module.js 274 B
devtools/dist/devtools.umd.js 346 B
dist/preact.js 4.69 kB
dist/preact.min.js 4.71 kB
dist/preact.min.module.js 4.72 kB
dist/preact.min.umd.js 4.74 kB
dist/preact.module.js 4.71 kB
dist/preact.umd.js 4.76 kB
hooks/dist/hooks.js 1.52 kB
hooks/dist/hooks.module.js 1.56 kB
hooks/dist/hooks.umd.js 1.6 kB
jsx-runtime/dist/jsxRuntime.js 976 B
jsx-runtime/dist/jsxRuntime.module.js 949 B
jsx-runtime/dist/jsxRuntime.umd.js 1.05 kB
test-utils/dist/testUtils.js 451 B
test-utils/dist/testUtils.module.js 456 B
test-utils/dist/testUtils.umd.js 536 B

compressed-size-action

@coveralls
Copy link

Coverage Status

coverage: 99.486%. remained the same
when pulling fe698b6 on 10.25.0
into 0fc547c on main.

@JoviDeCroock JoviDeCroock merged commit 33a688f into main Nov 22, 2024
15 checks passed
@JoviDeCroock JoviDeCroock deleted the 10.25.0 branch November 22, 2024 07:11
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.

3 participants