hyperHTML: 2.34.x is a breaking change, should be 3.0.x

Hi,

We faced an issue when upgrading to 2.34 version of hyperhtml. The new behaviour with the ?disabled=${value} option causes breaking changes when using the null value.

Previous behaviour: disabled=${null} sets the disabled property on the DOM element to false Current behaviour: disabled=${null} sets the disabled property on the DOM element to true

Because of this breaking change in behaviour the major version should be bumped to 3.x.x to indicate the breaking change.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (16 by maintainers)

Most upvoted comments

So … 2.18 coincidentally comes from 2018 https://github.com/WebReflection/hyperHTML/commit/cf6bbed5af5f21cb5200f7a03da8033168933117 … but we are in 2021 … although the change that bugs you is from 10th of May 2019 https://github.com/WebReflection/hyperHTML/commit/6262e1d7426c2ac3fefde6f8a3e6ebe8b8086630

that changes in particular deals with legacy, and it feels like you’re either not interested in it, or you’re late to the update hyperHTML party.

Now … as previously mentioned, hyperHTML had an ambiguity there, and to opt out from such ambiguity, you have now either ?attr or .attr … the latter is for accessors.

The .disabled=${...} is exactly what you are looking for, and since this library won’t break backward compatibility from 2019 today, or ever, I strongly suggest you switch to that syntax, when you mean to access the element.attribute instead, so that nothing will ever be a surprise.

I guess updating has these costs, but at least here it’s clear what you should update.

absolutely, as once again, you never touch new code if you haven’t changed templates … but without anything to reproduce, not even via the latest, only you can find out where it broke, why, or how …

I’ll try to reproduce it.

You don’t reach that code and yes, double (( )) means intentional