rescript-relay 0.22.0 → 1.0.0-beta.3

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,78 @@
1
1
  # master
2
2
 
3
+ # 1.0.0-beta.3
4
+
5
+ _[Here's a commit showing a project being upgraded to this version](https://github.com/zth/rescript-relay/commit/5831c2f1f0f13eedc1cb60468c32fd32b2dc01d3)_
6
+
7
+ The time has finally come - RescriptRelay `1.0.0` is in beta! The one, big major thing this release brings is that the ReScript type generation for the Relay compiler has been completely rewritten, and fully integrated into the new Relay Rust compiler. The RescriptRelay fork of the compiler is available and maintained [here])(https://github.com/zth/relay/tree/rescript-relay).
8
+
9
+ ## Remove Packages
10
+
11
+ You can go ahead and remove these packages, that are no longer needed, as the compiler is now shipped in the main package:
12
+
13
+ - `relay-config`
14
+ - `relay-compiler`
15
+ - `graphql` (if you don't use it for anything else)
16
+
17
+ ## Breaking Changes
18
+
19
+ - The compiler expects the `__generated__` folder to always exist, so if you're not committing your artifacts to source control, make sure you add a `.gitkeep` to the generated folder so git keeps it around.
20
+
21
+ ## Improvements
22
+
23
+ - The compiler itself should be _much_ faster than the old one. An order of magnitude faster. Especially for incremental compilation in watch mode.
24
+ - There's no longer any need to manually select `__typename` on interfaces and unions for RescriptRelay's sake, unless you actually want to use it yourself.
25
+ - We now support the `@required` directive from Relay, which is a new directive that lets you force non-nullability for nullable fields on the client side. You can then choose to throw an error if null values are encountered, or let the null value bubble up. Docs are coming soon, and you'll need to do `RescriptRelay.relayFeatureFlags.enableRequiredDirective = true` somewhere in your code to enable it for now.
26
+ - The errors reported by the compiler is now quite a lot better.
27
+
28
+ ## Beta fix changelog
29
+
30
+ ### beta.3
31
+
32
+ - Fix issue with duplicate keys being printed in the conversion instructions.
33
+ - Get rid of the need of nullability conversion instructions, and infer them instead.
34
+
35
+ ### beta.2
36
+
37
+ - Fix issue with recursive input objects not being converted correctly.
38
+
39
+ # 0.23.0
40
+
41
+ _[Here's a commit showing a project being upgraded to this version](https://github.com/zth/rescript-relay/commit/6e96dfafaec918b1d4e9519d3fcbf5e5c46be6c0)_
42
+
43
+ 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.
44
+
45
+ ## Upgrade versions
46
+
47
+ - `react-relay` to `12.0.0`
48
+ - `relay-compiler` to `12.0.0`
49
+ - `relay-config` to `12.0.0`
50
+ - `relay-runtime` to `12.0.0`
51
+
52
+ React to React 18 rc:
53
+
54
+ - `react` to `rc` (`yarn add react@rc`)
55
+ - `react-dom` to `rc`(`yarn add react-dom@rc`)
56
+
57
+ ## Migrations
58
+
59
+ 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.
60
+
61
+ - `comby 'ReactExperimental.unstable_useDeferredValue(:[1])' 'ReactExperimental.useDeferredValue(:[1])' .res -matcher .re -exclude-dir node_modules -review`
62
+ - `comby 'ReactExperimental.renderConcurrentRootAtElementWithId' 'ReactDOMExperimental.renderConcurrentRootAtElementWithId' .res -matcher .re -exclude-dir node_modules -review`
63
+ - `comby 'let (:[1], :[2]) = ReactExperimental.unstable_useTransition()' 'let (:[2], :[1]) = ReactExperimental.useTransition()' .res -matcher .re -exclude-dir node_modules -review`
64
+
65
+ ## Breaking changes
66
+
67
+ - 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.
68
+ - `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).
69
+ - `ReactExperimental.unstable_useDeferredValue` is now called `ReactExperimental.useDeferredValue` (migration available above).
70
+ - `ReactExperimental.renderConcurrentRootAtElementWithId` has moved to `ReactDOMExperimental`: `ReactDOMExperimental.renderConcurrentRootAtElementWithId` (migration available above).
71
+
72
+ ## Fixes & misc
73
+
74
+ - You're now allowed to configure Relay via `package.json`.
75
+
3
76
  # 0.22.0
4
77
 
5
78
  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/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"