Skip to content

Commit ddcbe09

Browse files
committed
refactor(kitsu-core): change output directory to dist
Closes #510
1 parent ac249b7 commit ddcbe09

4 files changed

Lines changed: 263 additions & 111 deletions

File tree

packages/kitsu-core/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
lib
12
src
23
MIGRATING.md
34
rollup.config.js

packages/kitsu-core/MIGRATING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Migrating to `10.0.0`
44

5+
### Serialising
6+
57
`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.
68

79
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,6 +12,23 @@ Exemptions:
1012
- `links` that are not objects or do not contain `self` or `related` will become attributes as normal
1113
- `meta` that are not objects will become attributes as normal
1214

15+
### Exports
16+
17+
The compiled output of `kitsu-core` has been changed from `lib` to `dist`.
18+
19+
```js
20+
// Legacy behaviour, any of:
21+
import kitsu from 'kitsu-core'
22+
import { serialise } from 'kitsu-core'
23+
import { serialise } from 'kitsu-core/lib/serialise'
24+
25+
// New behaviour, any of:
26+
import kitsu from 'kitsu-core'
27+
import { serialise } from 'kitsu-core'
28+
import { serialise } from 'kitsu-core/serialise' // Node 12+
29+
import { serialise } from 'kitsu-core/dist/serialise'
30+
```
31+
1332
#### Legacy Input
1433

1534
```js

0 commit comments

Comments
 (0)