Skip to content

📦 Update dependency preact to v10.5.13#34241

Closed
renovate-bot wants to merge 1 commit intoampproject:mainfrom
renovate-bot:renovate/core-dependencies
Closed

📦 Update dependency preact to v10.5.13#34241
renovate-bot wants to merge 1 commit intoampproject:mainfrom
renovate-bot:renovate/core-dependencies

Conversation

@renovate-bot
Copy link
Copy Markdown
Contributor

@renovate-bot renovate-bot commented May 5, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
preact (source) 10.2.1 -> 10.5.13 age adoption passing confidence
How to resolve breaking changes

This PR may introduce breaking changes that require manual intervention. In such cases, you will need to check out this branch, fix the cause of the breakage, and commit the fix to ensure a green CI build. To check out and update this PR, follow the steps below:

# Check out the PR branch (these steps are from GitHub)
git checkout -b renovate-bot-renovate/core-dependencies main
git pull https://github.com/renovate-bot/amphtml.git renovate/core-dependencies

# Directly make fixes and commit them
amp lint --fix # For lint errors in JS files
amp prettify --fix # For prettier errors in non-JS files
# Edit source code in case of new compiler warnings / errors

# Push the changes to the branch
git push git@github.com:renovate-bot/amphtml.git renovate-bot-renovate/core-dependencies:renovate/core-dependencies

Release Notes

preactjs/preact

v10.5.13

Compare Source

Bug Fixes

Types

Maintenance

v10.5.12

Compare Source

This release includes an enhancement to our devtools integration. Via a babel plugin you can get more readable hook names to show up in devtools instead of dozens of useState hooks in devtools. Check out https://github.com/preactjs/babel-plugin-transform-hook-names for more information.

Before:

image

After:

image

Bug Fixes

Maintenance

v10.5.11

Compare Source

📈 Bug Fixes

⛳ Code golfing

🛠️ Maintenance

v10.5.10

Compare Source

Bug Fixes

Maintenance

v10.5.9

Compare Source

Happy New Year to everyone 🎉 Let's kick of the year with a few welcome bug fixes regarding preact/compat 👍

Bug Fixes

Maintenance

v10.5.8

Compare Source

This is probably the last release for 2020. Thank you everyone for the amazing contributions over the year and we can't wait to see where Preact is going in 2021! Lot's of interesting ideas are being worked on 🎉

Bug Fixes

Types

Other

Maintenance

v10.5.7

Compare Source

v10.5.6

Compare Source

Bug Fixes

Types

Maintenance

v10.5.5

Compare Source

Bug Fixes

Typings

v10.5.4

Compare Source

tl;dr: Bug-Fix only release that should get rid of the last className edge cases. We encourage everyone to upgrade.

Despite our effort to account for all edge cases regarding className handling in preact/compat, we got some reports of some missed ones. This release corrects those 🎉

This release contains a fix to increase compatibility with next.js that ensures that the error overlay will show up.

Bug Fixes

v10.5.3

Compare Source

This release fixes a regression in regards to class/className handling in preact/compat. We encourage everyone to upgrade.

Bug Fixes

Maintenance

v10.5.2

Compare Source

v10.5.1

Compare Source

v10.5.0

Compare Source

New JSX-runtime functions

This has been a long time in the making for various virtual-dom based frameworks. Historically JSX was always transpiled to createElement function calls.

// input
<div>foobar</div>

// output, we need to move "foobar" to `props.children`
createElement("div, {}, "foobar");

While this has served us well and is very reliable, it has proven to be hard to optimize. Most of the things we do in our createElement function could by done by babel directly, thereby making it smaller and faster. This is very desirable for us as this function is called a lot in any application. It's part of the so-called hot-path.

And that's exactly what the new signature does. It removes the need for us to pull out key from props, add back children to props and just makes the implementation simpler. As a nice benefit users won't need to manually import h/createElement anymore 🎉

// input
<li key="foo">foobar</li>

// output
jsx("li", { children: "foobar" }, "foo");

Usage with babel:

// babel.config.js
module.exports = {
  plugins: [
    ["@&#8203;babel/plugin-transform-react-jsx", {
      runtime: "automatic", // defaults to classic (classic == createElement calls)
      importSource: "preact", // NOT preact/jsx-runtime
    }]
  ]
}

Note that the JSX transformer in TypeScript is a work in progress and will likely be released as part of version 4.1. We're currently running into microsoft/TypeScript#​40502 though, so the JSX typings are not found.

Features

Bug Fixes

Maintenance

v10.4.8

Compare Source

tl;dr: A good handful of bug fixes make this release the ideal candidate to upgrade! Should be very safe to upgrade

Thanks to all the people who made this release possible! This is for everyone who took part in our discussions, helped report issues, did code contributions or just spread the word. Thank you all for another amazing release 🙌

Golfing

Bug Fixes

Typings

Maintenance

v10.4.7

Compare Source

tl;dr: This is a bug-fix only release and safe to upgrade 🎉

This release contains some amazing fixes by first time contributors! Thank you so much for everyone who filed issues or contributed PRs ❤️

Bug Fixes

Types

Maintenance

v10.4.6

Compare Source

tl;dr: This is a bug-fix only release and safe to upgrade 🎉

We've landed some very anticipated fixes and therefore thought to cut a new release not soon after 🙌

Bug Fixes

Typings

Maintenance

v10.4.5

Compare Source

This is a bugfix-only release and updating is seamless. We encourage everyone to do so 👍

Bug Fixes

Maintenance

v10.4.4

Compare Source

This is a hotfix for today's 10.4.2 release that:

v10.4.3

Compare Source

v10.4.2

Compare Source

What a month we had! The weather is getting warmer and I think we can all enjoy a new refreshment in the form of a Preact release! The past weeks saw a good chunk of bug fixes and a bit of house keeping. Upgrades should be as straightforward as swapping out the version number in package.json and running npm install or yarn install once!

Introducing prefresh (experimental)

It was one of those miracle days where all the pieces fell into place just perfectly: @​JoviDeCroock got a HMR (=hot module reloading) prototype up without any changes to Preact and running in a couple hours! With the biggset achievement being that it works amazingly well in keeping hooks state around.

Since then he was contacted by various maintainers of bundlers to collaborate on an ideal developer experience. Today, about a little more than a week later we have them ready to be tested. And we need your feedback to make it the best HMR experience we can! Please file any issue you come across!

Snowpack template

Oh and while we were at it @​sventschui added a Preact template for snowpack! You can get it up and running via this line:

npx create-snowpack-app my-project --template @&#8203;snowpack/app-template-preact

EX5IXBLXsAIVhTx

Preact sightings

Recently deno cut it's 1.0.0 release which is a huge achievement. It's a new spin on what node could look like if it would have started fresh in 2019 and we're excited where this experiment will lead to! Despite it being very early it made some waves in our community and we were filled with joy when we noticed that the website is built with our beloved framework!

Bug Fixes

Types

Maintenance

v10.4.1

Compare Source

tl;dr: This release allows our devtools extension to inspect hooks. Apart from that it includes the usual round of bug fixes.

We have a nice little present for you and that is hooks are now fully supported in Preact Devtools 0.5.0 🎉 The extension is currently awaiting approval in browsers stores and your browser will automatically update to it in the following days.

Screenshot from 2020-04-19 21-10-06

Both @​andrewiggins and @​JoviDeCroock went full on bug hunting mode and got some neat fixes in! We also saw an awesome contribution from @​davidje13 who found an error in our types for memo 👍

But the true star from the show is without a doubt that we finally have updated our typings to bring back the marquee element. @​developit himself took the honors and made sure that developers can continue to use this element in their demo applications.

Bug Fixes
Typings
Maintenance

v10.4.0

Compare Source

tl;dr: This release contains some very amazing improvements to hydration and to performance when memoized vnodes are used. We recommend everyone to upgrade 🎉

We understand that the past weeks have been very strange for everybody across the world. We've spent that last weeks mainly focusing on making sure our families and loved ones are safe and taken care of. Whether you're using Preact at work or in a sideproject we hope that this release brings you a little bit of joy and makes your day a little bit brighter 🌠

Strictly equal vnodes bail out of render

When an vnode is equal to the one from the last render we will successfully bail out of rendering. This is a performance optimization many state libraries frequently make use of. The most well known of those is probably react-redux. We've wanted to add this for the initial Preact X release but had to postpone due to not having found the proper solution back then. In the following months we've passed around various ideas on how to best solve this and it wasn't until last month when it finally clicked and the pieces fell together. @​JoviDeCroock had a prototype up running in a few days and has spent a lot of time into making sure that this performance optimization works in all scenarios. We can't stress enough how much of an accomplishment this is. This is really amazing work by @​JoviDeCroock and we're over the moon that it has finally landed in Preact 🎉

hydrate falls back to render for new subtrees

When doing SSR there are cases where the DOM tree and the vnodes don't match. This can lead to a lot of problems, but for now we handle situations a bit more gracefully when there is no existing DOM node present. If we encounter that, we just opt out of hydration for that tree and revert back to doing a full diff. In the future we plan to add more warnings to preact/debug for that.

Features
Bug Fixes
Typings
Maintenance

v10.3.4

Compare Source

This is a maintenance release, upgrading should be free, please do report it in case you encounter any issues.

render-queue sorting

Preact batches all rendering work and executes from the top of the Virtual DOM tree to the bottom. However, if new rendering tasks were added during an existing render, they were processed without regard for their depth in the tree.

Thanks to a clever fix from @​jviide, Preact's render queue is now immutable. Any new tasks added during rendering are placed into a second batch.

material-ui integration

A peculiar issue users were seeing with material-ui related to a ref never getting populated, we went very deep into the codebase and found out that our forwardRef was a bit too eager, at creation it would already start forwarding. We moved this to a later point, now just before the vnode will get diffed the ref will be forwarded.

Fixes:
Maintenance:

Configuration

📅 Schedule: "after 12am every weekday" in timezone America/Los_Angeles.

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@rsimha
Copy link
Copy Markdown
Contributor

rsimha commented May 7, 2021

This needs accompanying fixes. They were being done via #30043 for an older version of Preact.

@rsimha rsimha added the Blocked label May 7, 2021
@rsimha rsimha requested a review from caroqliu May 11, 2021 18:11
@rsimha rsimha closed this May 12, 2021
@renovate-bot renovate-bot deleted the renovate/core-dependencies branch May 12, 2021 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants