diff --git a/doc/changelog/2.0.0-RCs.md b/doc/changelog/2.0.0-RCs.md new file mode 100644 index 000000000..1d0b3e342 --- /dev/null +++ b/doc/changelog/2.0.0-RCs.md @@ -0,0 +1,80 @@ +# 2.0.0-RC*x* + +The full combined list of changes from v1.7.7 to v2.0.0 is [here](./2.0.0.md). + +Contents: +- [Changes in RC1](#changes-in-rc1) +- [Changes in RC2](#changes-in-rc2) +- [Changes in RC3](#changes-in-rc3) +- [Changes in RC4](#changes-in-rc4) +- [Changes in RC5](#changes-in-rc5) + + +# Changes in RC1 + +[See here.](https://github.com/japgolly/scalajs-react/blob/v2.0.0-RC1/doc/changelog/2.0.0.md) + +# Changes in RC2 + +* Bugfix in the `useCallbackWithDeps{,By}` hook + +* Changed the pattern in hook signatures from `(mainArg: => A, deps: => D)` to `(deps: D)(mainArg: D => A)`. + Affected methods: + * `useCallbackWithDeps{,By}` + * `useEffectWithDeps{,By}` + * `useLayoutEffectWithDeps{,By}` + * `useMemo{,By}` + +# Changes in RC3 + +* Bugfixes: + * Expose default sync effect instead of internal type in: + * `SetStateFn(…)` + * `ModStateFn(…)` + * `ModStateWithPropsFn(…)` + * `StateSnapshot` constructors should accept + * `SetStateFn` + * `ModStateFn` + * `ModStateWithPropsFn` + * `TimerSupport.install` had an infinite loop + * `TriStateCheckbox`'s `onKeyDown` handler was calling `event.preventDefault()` on unhandled keys + * Fix the Scala 3 version of `renderBackend` to support polymorphic backends + *(e.g. `renderBackend[Backend[X]]` where `X` is a type already in scope)* + * Support `CallbackOption[Unit]` being passed directly to event handling vdom + +* Additions: + * `TriStateCheckbox` now accepts an optional `Reusable[TagMod]` in its `Props` that will be applied to the `` + * Add `.dispatch` to `Callback` and `AsyncCallback` which schedules (-and-forgets) the callback to be run in the background + +* Upgrade deps + * Cats-effect to 3.2.2 + * Scala.js to 1.7.0 + * Microlibs to 3.0.1 + * UnivEq to 1.6.0 + +# Changes in RC4 + +* Support turning React warnings into runtime exceptions. There are a few ways to do this: + * Via a [new config option](../CONFIG.md#testwarningsreact) for `ReactTestUtils` + * [Manually](../TESTING.md#fatal-react-warnings) + +* Document existing `debounce` methods to clarify you need to save them as a `val` and reuse them + +* Add: + * `AsyncCallback.debounce(duration): AsyncCallback[Unit]` + * `Callback.debounce(duration): Callback` + * `ScalaFnComponent.withReuse{,By}` + * `ScalaFnComponent.withChildrenAndReuse{,By}` + +* `ReactTestUtils` is now a `trait` as well as an `object` so that you can mix it into your own test utils collection + +* Upgrade deps + * Cats-effect to 3.2.9 + * Microlibs to 4.0.0 + * Scala.js to 1.7.1 + * scalajs-dom 2.0.0 + * UnivEq to 2.0.0 + +# Changes in RC5 + +* Add a new bundle called `core-bundle-cb_io` with provides core scalajs-react functionality with `Callback` as the default sync effect and `cats.effect.IO` as the default async effect. (Thanks [@rpiaggio](https://github.com/rpiaggio)) diff --git a/doc/changelog/2.0.0.md b/doc/changelog/2.0.0.md index 9263481a3..ba1a91b19 100644 --- a/doc/changelog/2.0.0.md +++ b/doc/changelog/2.0.0.md @@ -1,4 +1,4 @@ -# 2.0.0-RC3 +# 2.0.0 Lots of big, juicy, modernising changes here. Make sure you at least read the [migration](#migration) guide. @@ -11,8 +11,7 @@ Contents: - [Changes: Backwards-Compatible](#changes-backwards-compatible) - [Changes: Auto-Migratable](#changes-auto-migratable) - [Migration](#migration) -- [Changes in RC2](#changes-in-rc2) -- [Changes in RC3](#changes-in-rc3) +- [Changes in RCs](#changes-in-rcs) - [Thanks](#thanks) @@ -55,6 +54,13 @@ Contents: * Global settings have been fixed and revamped. See the [new guide here](../CONFIG.md). This allows you to produce different dev and prod builds without making code changes. +* Support turning React warnings into runtime exceptions. There are a few ways to do this: + * Via a [new config option](../CONFIG.md#testwarningsreact) for `ReactTestUtils` + * [Manually](../TESTING.md#fatal-react-warnings) + +* Upgrade scala-js-dom to 2.0.0. This is mostly source-compatible with v1.2.0, but isn't binary-compatible. + See the [scala-js-dom v2 release notes](https://github.com/scala-js/scala-js-dom/releases/tag/v2.0.0). + # Minor New Features @@ -155,7 +161,14 @@ Contents: * `CallbackTo` * `CallbackOption` -* Add `withFilter` to `Callback(To)` and `AsyncCallback` +* Additions + * `AsyncCallback.debounce(duration): AsyncCallback[Unit]` + * `Callback.debounce(duration): Callback` + * `ScalaFnComponent.withReuse{,By}` + * `ScalaFnComponent.withChildrenAndReuse{,By}` + * Add a `withFilter` method to `Callback(To)` and `AsyncCallback` + * Add a `dispatch` method to `Callback` and `AsyncCallback` which schedules (-and-forgets) the callback to be run in the background + * `TriStateCheckbox` now accepts an optional `Reusable[TagMod]` in its `Props` that will be applied to the `` * Bug fixes: * ScalaFnComponents now use `VdomNode`s instead of `VdomElement`s @@ -165,14 +178,18 @@ Contents: * Avoid boxing in `React.Context` and `getSnapshotBeforeUpdate` +* `ReactTestUtils` is now a `trait` as well as an `object` so that you can mix it into your own test utils collection + * `Px[A]#extract` now takes an implicit `Px.Extract[A](Px[A] => A)` argument instead of being a macro. If you're using this exotic feature, you can now provide your own `Px.Extract` typeclass instances. * Backwards-compatible dependency upgrades: * Cats to 2.6.1 + * Cats Effect to 3.2.9 * Monocle (v2) to 2.1.0 + * Monocle (v3) to 3.1.0 * Scala to 2.13.6 - * Scala.js to 1.7.0 + * Scala.js to 1.7.1 * Sourcecode to 0.2.7 @@ -314,70 +331,11 @@ You can run the script in the Migration section at the bottom of the page to aut ``` -# Changes in RC2 - -* Bugfix in the `useCallbackWithDeps{,By}` hook -* Changed the pattern in hook signatures from `(mainArg: => A, deps: => D)` to `(deps: D)(mainArg: D => A)`. - Affected methods: - * `useCallbackWithDeps{,By}` - * `useEffectWithDeps{,By}` - * `useLayoutEffectWithDeps{,By}` - * `useMemo{,By}` - - -# Changes in RC3 - -* Bugfixes: - * Expose default sync effect instead of internal type in: - * `SetStateFn(…)` - * `ModStateFn(…)` - * `ModStateWithPropsFn(…)` - * `StateSnapshot` constructors should accept - * `SetStateFn` - * `ModStateFn` - * `ModStateWithPropsFn` - * `TimerSupport.install` had an infinite loop - * `TriStateCheckbox`'s `onKeyDown` handler was calling `event.preventDefault()` on unhandled keys - * Fix the Scala 3 version of `renderBackend` to support polymorphic backends - *(e.g. `renderBackend[Backend[X]]` where `X` is a type already in scope)* - * Support `CallbackOption[Unit]` being passed directly to event handling vdom - -* Additions: - * `TriStateCheckbox` now accepts an optional `Reusable[TagMod]` in its `Props` that will be applied to the `` - * Add `.dispatch` to `Callback` and `AsyncCallback` which schedules (-and-forgets) the callback to be run in the background - -* Upgrade deps - * Cats-effect to 3.2.2 - * Scala.js to 1.7.0 - * Microlibs to 3.0.1 - * UnivEq to 1.6.0 - - -# Changes in RC4 - -* Support turning React warnings into runtime exceptions. There are a few ways to do this: - * Via a [new config option](../CONFIG.md#testwarningsreact) for `ReactTestUtils` - * [Manually](../TESTING.md#fatal-react-warnings) - -* Document existing `debounce` methods to clarify you need to save them as a `val` and reuse them -* Add: - * `AsyncCallback.debounce(duration): AsyncCallback[Unit]` - * `Callback.debounce(duration): Callback` - * `ScalaFnComponent.withReuse{,By}` - * `ScalaFnComponent.withChildrenAndReuse{,By}` -* `ReactTestUtils` is now a `trait` as well as an `object` so that you can mix it into your own test utils collection -* Upgrade deps - * Cats-effect to 3.2.9 - * Microlibs to 4.0.0 - * Scala.js to 1.7.1 - * scalajs-dom 2.0.0 - * UnivEq to 2.0.0 +# Changes in RCs +If you're interested in the changes between each RC release, [see here](./2.0.0-RCs.md). -# Changes in RC5 - * Add a new bundle called `core-bundle-cb_io` with provides core scalajs-react functionality with `Callback` as the default sync effect and `cats.effect.IO` as the default async effect. (Thanks [@rpiaggio](https://github.com/rpiaggio)) -s # Thanks A lot of this was kindly sponsored by [Gemini](https://www.gemini.edu/)/[NOIRLab](https://nationalastro.org/)/[AURA](https://www.aura-astronomy.org/).