Skip to content

Commit c93bc6c

Browse files
committed
Refactor 3.0.0 changelog
1 parent 3bc2fdd commit c93bc6c

File tree

1 file changed

+45
-41
lines changed

1 file changed

+45
-41
lines changed

doc/changelog/3.0.0.md

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 3.0.0
22

3-
### New
3+
## New
44

55
- React 18 support
66
- List of implemented features is here: https://github.com/japgolly/scalajs-react/issues/1057
@@ -27,7 +27,7 @@
2727

2828
- `Renderable` typeclass for anything that React can render
2929

30-
### Other Changes
30+
## Other Changes
3131

3232
- Allow calling `useCallback*` with sync functions that return a value.
3333

@@ -41,7 +41,7 @@
4141
- `TriStateCheckbox` no longer uses `Reusability.shouldComponentUpdate`, therefore
4242
the fourth argument to its props is no longer wrapped in `Reusable`.
4343

44-
### Deprecated
44+
## Deprecated
4545

4646
- Anything deprecated by React 18 is now deprecated in Scala
4747

@@ -51,7 +51,7 @@
5151

5252
- `ReactTestUtils` is now `LegacyReactTestUtils` and deprecated
5353

54-
### Upgrades
54+
## Upgrades
5555

5656
- Cats 2.13.0
5757
- CatsEffect 3.6.3
@@ -62,44 +62,48 @@
6262
- ScalaJsDom 2.8.1
6363
- Sourcecode 0.4.4
6464

65-
### Migration
65+
## Migration
6666

67-
- Run this to switch from `{ => Legacy}ReactTestUtils`, and if you were on the betas `ReactTestUtils{2 => }`:
67+
### `jsDependencies`
6868

69-
```sh
70-
find . -type f -name '*.scala' -exec perl -pi -e '
71-
s/\bReactTestUtils\b/LegacyReactTestUtils/g;
72-
s/\bReactTestUtils2\b/ReactTestUtils/g;
73-
' {} +
74-
```
69+
To upgrade when using `jsDependencies`, make your sbt config look like this (comments for clarity)
7570

76-
- To upgrade when using `jsDependencies`, make your sbt config look like this (comments for clarity)
71+
```scala
72+
// Required for React 18.3.1
73+
dependencyOverrides += "org.webjars.npm" % "scheduler" % "0.22.0",
7774

78-
```scala
79-
// Required for React 18.0.0
80-
dependencyOverrides += "org.webjars.npm" % "scheduler" % "0.22.0",
81-
82-
jsDependencies ++= Seq(
83-
84-
// Polyfill required for React 18.0.0
85-
"org.webjars.npm" % "fast-text-encoding" % "1.0.3" / "text.js" minified "text.min.js"
86-
87-
"org.webjars.npm" % "react" % "18.0.0"
88-
/ "umd/react.development.js"
89-
minified "umd/react.production.min.js"
90-
dependsOn "text.js" // <-- Load the fast-text-encoding polyfill before loading React itself
91-
commonJSName "React",
92-
93-
"org.webjars.npm" % "react-dom" % "18.0.0"
94-
/ "umd/react-dom.development.js"
95-
minified "umd/react-dom.production.min.js"
96-
dependsOn "umd/react.development.js"
97-
commonJSName "ReactDOM",
98-
99-
"org.webjars.npm" % "react-dom" % "18.0.0"
100-
/ "umd/react-dom-server.browser.development.js"
101-
minified "umd/react-dom-server.browser.production.min.js"
102-
dependsOn "umd/react-dom.development.js"
103-
commonJSName "ReactDOMServer",
104-
),
105-
```
75+
jsDependencies ++= Seq(
76+
77+
// Polyfill required for React 18.3.1
78+
"org.webjars.npm" % "fast-text-encoding" % "1.0.6" / "1.0.6/text.min.js" minified "text.min.js"
79+
80+
"org.webjars.npm" % "react" % "18.3.1"
81+
/ "umd/react.development.js"
82+
minified "umd/react.production.min.js"
83+
dependsOn "text.js" // <-- Load the fast-text-encoding polyfill before loading React itself
84+
commonJSName "React",
85+
86+
"org.webjars.npm" % "react-dom" % "18.3.1"
87+
/ "umd/react-dom.development.js"
88+
minified "umd/react-dom.production.min.js"
89+
dependsOn "umd/react.development.js"
90+
commonJSName "ReactDOM",
91+
92+
"org.webjars.npm" % "react-dom" % "18.3.1"
93+
/ "umd/react-dom-server.browser.development.js"
94+
minified "umd/react-dom-server.browser.production.min.js"
95+
dependsOn "umd/react-dom.development.js"
96+
commonJSName "ReactDOMServer",
97+
),
98+
```
99+
100+
### `ReactTestUtils`
101+
102+
Run this to switch from `{ => Legacy}ReactTestUtils`, and if you were on the betas `ReactTestUtils{2 => }`:
103+
104+
```sh
105+
find . -type f -name '*.scala' -exec perl -pi -e '
106+
s/\bReactTestUtils\b/LegacyReactTestUtils/g;
107+
s/\bReactTestUtils2\b/ReactTestUtils/g;
108+
' {} +
109+
```

0 commit comments

Comments
 (0)