You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/kitsu-core/MIGRATING.md
+25-10Lines changed: 25 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,6 @@
2
2
3
3
## Migrating to `10.0.0`
4
4
5
-
### Serialising
6
-
7
-
`serialise` has been refactored to match the v9 `deserialise` behaviour. This was intended for the v9 release, however it slipped though the net and resulted in broken relationship serialisation in v9.
8
-
9
-
Relationships given to the `serialise` function are now always an object containing either a `data` object or a `data` array. This allows for optional top-level relationship `links` and `meta` objects to be serialised into the JSON:API format.
10
-
11
-
Exemptions:
12
-
-`links` that are not objects or do not contain `self` or `related` will become attributes as normal
13
-
-`meta` that are not objects will become attributes as normal
14
-
15
5
### Exports
16
6
17
7
The compiled output of `kitsu-core` has been changed from `lib` to `dist`.
These exports are now named exports instead of default exports.
25
+
26
+
```js
27
+
// Legacy behaviour, any of:
28
+
import { camel } from'kitsu-core'
29
+
importcamelfrom'kitsu-core/lib/camel'
30
+
31
+
// New behaviour, any of:
32
+
import { camel } from'kitsu-core'
33
+
import { camel } from'kitsu-core/camel'
34
+
import { camel } from'kitsu-core/dist/camel'
35
+
```
36
+
37
+
### Serialising
38
+
39
+
`serialise` has been refactored to match the v9 `deserialise` behaviour. This was intended for the v9 release, however it slipped though the net and resulted in broken relationship serialisation in v9.
40
+
41
+
Relationships given to the `serialise` function are now always an object containing either a `data` object or a `data` array. This allows for optional top-level relationship `links` and `meta` objects to be serialised into the JSON:API format.
42
+
43
+
Exemptions:
44
+
-`links` that are not objects or do not contain `self` or `related` will become attributes as normal
45
+
-`meta` that are not objects will become attributes as normal
0 commit comments