Skip to content

Commit

Permalink
refactor(kitsu-core): change output directory to dist
Browse files Browse the repository at this point in the history
Closes #510
  • Loading branch information
wopian committed Jan 6, 2021
1 parent ac249b7 commit ddcbe09
Show file tree
Hide file tree
Showing 4 changed files with 263 additions and 111 deletions.
1 change: 1 addition & 0 deletions packages/kitsu-core/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib
src
MIGRATING.md
rollup.config.js
Expand Down
19 changes: 19 additions & 0 deletions packages/kitsu-core/MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Migrating to `10.0.0`

### Serialising

`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.

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

### Exports

The compiled output of `kitsu-core` has been changed from `lib` to `dist`.

```js
// Legacy behaviour, any of:
import kitsu from 'kitsu-core'
import { serialise } from 'kitsu-core'
import { serialise } from 'kitsu-core/lib/serialise'

// New behaviour, any of:
import kitsu from 'kitsu-core'
import { serialise } from 'kitsu-core'
import { serialise } from 'kitsu-core/serialise' // Node 12+
import { serialise } from 'kitsu-core/dist/serialise'
```

#### Legacy Input

```js
Expand Down
Loading

0 comments on commit ddcbe09

Please sign in to comment.