rescript-relay 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # master
2
2
 
3
+ # 0.23.0
4
+
5
+ Finally, a new release! This brings the Relay version to 12, and the React version to 18 (in rc.0 at the time of writing). This release has a few breaking changes which are necessary as we're slowly approaching version 1.0.0 of RescriptRelay. Check the new "Migrations" section below for a few scripts you can run to help the migration.
6
+
7
+ ## Upgrade versions
8
+
9
+ - `react-relay` to `12.0.0`
10
+ - `relay-compiler` to `12.0.0`
11
+ - `relay-config` to `12.0.0`
12
+ - `relay-runtime` to `12.0.0`
13
+
14
+ React to React 18 rc:
15
+
16
+ - `react` to `rc` (`yarn add react@rc`)
17
+ - `react-dom` to `rc`(`yarn add react-dom@rc`)
18
+
19
+ ## Migrations
20
+
21
+ Want help migrating most of the changes in this release? Install [comby](https://comby.dev) and run the migrations below (paste them into your terminal at the root of your project). Comby will guide you through the proposed changes.
22
+
23
+ - `comby 'ReactExperimental.unstable_useDeferredValue(:[1])' 'ReactExperimental.useDeferredValue(:[1])' .res -matcher .re -exclude-dir node_modules -review`
24
+ - `comby 'ReactExperimental.renderConcurrentRootAtElementWithId' 'ReactDOMExperimental.renderConcurrentRootAtElementWithId' .res -matcher .re -exclude-dir node_modules -review`
25
+ - `comby 'let (:[1], :[2]) = ReactExperimental.unstable_useTransition()' 'let (:[2], :[1]) = ReactExperimental.useTransition()' .res -matcher .re -exclude-dir node_modules -review`
26
+
27
+ ## Breaking changes
28
+
29
+ - Remove `reason-promise` (unless you're using it for something else yourself and want to keep it). We're waiting for the official new Promise bindings, but since they seem to be quite far away, we'll have to revert back to stock `Js.Promise` for now. This is because `reason-promise` clashes with other Promise bindings that people might want to use before the new official ones are actually shipped.
30
+ - `ReactExperimental.unstable_useTransition` is now called `ReactExperimental.useTransition`, and the order of the tuple that's returned has been reversed to align with the underlying API. This means that what was before `let (startTransition, isTransitioning) = ReactExperimental.unstable_useTransition()` is now `let (isTransitioning, startTransition) = ReactExperimental.useTransition()` (migration available above).
31
+ - `ReactExperimental.unstable_useDeferredValue` is now called `ReactExperimental.useDeferredValue` (migration available above).
32
+ - `ReactExperimental.renderConcurrentRootAtElementWithId` has moved to `ReactDOMExperimental`: `ReactDOMExperimental.renderConcurrentRootAtElementWithId` (migration available above).
33
+
34
+ ## Fixes & misc
35
+
36
+ - You're now allowed to configure Relay via `package.json`.
37
+
3
38
  # 0.22.0
4
39
 
5
40
  This release brings a few `rescript-relay-cli` improvements under the hood, as well as the breaking (but very easily fixable) change of uncurrying the `sink` methods received back from `RescriptRelay.Observable.make`.
package/bin-darwin CHANGED
Binary file
package/bin-linux CHANGED
Binary file
package/bsconfig.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "module": "commonjs",
15
15
  "in-source": true
16
16
  },
17
- "bs-dependencies": ["@rescript/react", "reason-promise"],
17
+ "bs-dependencies": ["@rescript/react"],
18
18
  "suffix": ".bs.js",
19
19
  "warnings": {
20
20
  "error": "+101"