Skip to content

Commit 10fa5a1

Browse files
committed
ci: fix size limit
1 parent 60103ac commit 10fa5a1

9 files changed

Lines changed: 166 additions & 86 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
This is a monorepo containing the following packages:
2525

2626
- [kitsu]—Framework agnostic client using Axios
27-
- [kitsu-core]Core (de)serialisation functions
27+
- [kitsu-core]Framework agnostic (de)serialisation functions
2828

2929
## Features
3030

@@ -36,10 +36,10 @@ This is a monorepo containing the following packages:
3636

3737
| Package | Package<br> Size\* | Node | Chrome | Firefox | Safari | Edge |
3838
| -----------: | :----------------: | :--: | :----: | :-----: | :----: | :--: |
39-
| `kitsu` | ≤ 8.9 kb | 10+ | 67+ | 68+ | 12+ | 18+ |
40-
| `kitsu-core` | ≤ 1.5 kb | 10+ | 67+ | 68+ | 12+ | 18+ |
39+
| `kitsu` | ≤ 8.2 kb | 10+ | 69+ | 68+ | 12+ | 18+ |
40+
| `kitsu-core` | ≤ 1.6 kb | 10+ | 69+ | 68+ | 12+ | 18+ |
4141

42-
\* Including all dependencies, minified & gzipped
42+
\* Including all dependencies and minified with brotli
4343

4444
## Contributing
4545

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"jest": "~26.0.0",
4949
"lerna": "~3.22.0",
5050
"rollup": "~2.11.0",
51+
"rollup-plugin-delete": "~1.2.0",
5152
"rollup-plugin-local-resolve": "~1.0.7",
5253
"rollup-plugin-terser": "~6.1.0",
5354
"size-limit": "~4.5.0",

packages/kitsu-core/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,26 @@
2424
<a href=https://paypal.me/wopian><img alt="support me on paypal.me"src=https://flat.badgen.net/badge/support%20me%20on/paypal.me/pink></a>
2525
</p>
2626

27-
<p align=center>Core <a href=http://jsonapi.org>JSON:API</a> serialisation and deserialisation components</p>
27+
<p align=center>A simple, lightweight & framework agnostic <a href=http://jsonapi.org>JSON:API</a> serialisation and deserialisation functions</p>
2828

2929
<p align=center><a href=https://github.com/wopian/kitsu/blob/master/packages/kitsu-core/MIGRATING.md>Migration guide</a> for v9 and previous major releases</p>
3030

31-
#
31+
#
3232

3333
## Features
3434

3535
- JSON-API 1.0 compliant
3636
- Automatically links relationships to data
3737
- Works in Node and on the web
38+
- Zero dependencies
3839

3940
## Node / Browser Support
4041

4142
| Package | Package<br> Size\* | Node | Chrome | Firefox | Safari | Edge |
4243
| -----------: | :----------------: | :--: | :----: | :-----: | :----: | :--: |
43-
| `kitsu-core` | ≤ 1.5 kb | 10+ | 67+ | 68+ | 12+ | 18+ |
44+
| `kitsu-core` | ≤ 1.6 kb | 10+ | 69+ | 68+ | 12+ | 18+ |
4445

45-
\* Including all dependencies, minified & gzipped<br>
46+
\* Minified with brotli
4647

4748
## Install
4849

@@ -256,7 +257,7 @@ Filters includes for the specific relationship requested
256257
#### Parameters
257258

258259
- `included` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>** The response included object
259-
- `relationship` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
260+
- `relationship` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
260261
- `relationship.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The relationship ID
261262
- `relationship.type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The relationship type
262263

packages/kitsu-core/package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "9.1.8",
33
"name": "kitsu-core",
4-
"description": "Core serialisation and deserialsation functions for the kitsu JSON:API client",
4+
"description": "Simple, lightweight & framework agnostic JSON:API (de)serialsation functions",
55
"author": "James Harris <wopian@wopian.me>",
66
"contributors": [
77
"Brandon Martinez <me@brandonmartinez.com>",
@@ -11,8 +11,8 @@
1111
"Menthol <bennetteson@gmail.com>"
1212
],
1313
"license": "MIT",
14-
"main": "lib/index.js",
15-
"module": "lib/index.mjs",
14+
"main": "lib/index",
15+
"module": "lib/index",
1616
"unpkg": "lib/index.browser.js",
1717
"jsdelivr": "lib/index.browser.js",
1818
"types": "types/index.d.ts",
@@ -42,15 +42,18 @@
4242
"size-limit": [
4343
{
4444
"path": "./lib/index.js",
45-
"limit": "2 kb"
45+
"limit": "2 kb",
46+
"brotli": true
4647
},
4748
{
4849
"path": "./lib/index.mjs",
49-
"limit": "2 kb"
50+
"limit": "2 kb",
51+
"brotli": true
5052
},
5153
{
5254
"path": "./lib/index.browser.js",
53-
"limit": "2 kb"
55+
"limit": "2 kb",
56+
"brotli": true
5457
}
5558
],
5659
"gitHead": "5c9778d191d17d7c9790cfc6d0f4e983b4742a53",

packages/kitsu-core/rollup.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import babel from '@rollup/plugin-babel'
22
import { terser } from 'rollup-plugin-terser'
33
import local from 'rollup-plugin-local-resolve'
4+
import del from 'rollup-plugin-delete'
45
import pkg from './package.json'
56

67
const {
@@ -30,7 +31,9 @@ const pluginsMain = [
3031
export default [
3132
{
3233
input: 'src/index.js',
33-
plugins: pluginsMain,
34+
plugins: [
35+
del({ targets: './lib/*' }),
36+
...pluginsMain ],
3437
output: {
3538
file: `${pkg.unpkg}`,
3639
name: 'kitsuCore',

packages/kitsu/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
<a href=https://paypal.me/wopian><img alt="support me on paypal.me"src=https://flat.badgen.net/badge/support%20me%20on/paypal.me/pink></a>
2525
</p>
2626

27-
<p align=center>A simple, lightweight & framework agnostic <a href=http://jsonapi.org>JSON:API</a> client for <a href=https://kitsu.io>Kitsu.io</a> and other APIs</p>
27+
<p align=center>A simple, lightweight & framework agnostic <a href=http://jsonapi.org>JSON:API</a> client using Axios</p>
2828

2929
<p align=center><a href=https://github.com/wopian/kitsu/blob/master/packages/kitsu/MIGRATING.md>Migration guide</a> for v9 and previous major releases</p>
3030

31-
#
31+
#
3232

3333
## Features
3434

@@ -41,9 +41,9 @@
4141

4242
| Package | Package<br> Size\* | Node | Chrome | Firefox | Safari | Edge |
4343
| ------: | :----------------: | :--: | :----: | :-----: | :----: | :--: |
44-
| `kitsu` | ≤ 8.9 kb | 10+ | 67+ | 68+ | 12+ | 18+ |
44+
| `kitsu` | ≤ 8.2 kb | 10+ | 69+ | 68+ | 12+ | 18+ |
4545

46-
\* Including all dependencies, minified & gzipped
46+
\* Including all dependencies and minified with brotli
4747

4848
## Response Comparison
4949

packages/kitsu/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": "9.1.8",
33
"name": "kitsu",
4-
"description": "Simple & lightweight JSON-API client for Kitsu and other compliant APIs",
4+
"description": "Simple,lightweight & framework agnostic JSON:API client using Axios",
55
"author": "James Harris <wopian@wopian.me>",
66
"contributors": [
77
"Brandon Martinez <me@brandonmartinez.com>",
@@ -11,8 +11,8 @@
1111
"Menthol <bennetteson@gmail.com>"
1212
],
1313
"license": "MIT",
14-
"main": "lib/index.js",
15-
"module": "lib/index.mjs",
14+
"main": "lib/index",
15+
"module": "lib/index",
1616
"types": "types/index.d.ts",
1717
"homepage": "https://github.com/wopian/kitsu/tree/master/packages/kitsu#readme",
1818
"repository": "https://github.com/wopian/kitsu/tree/master/packages/kitsu",
@@ -53,11 +53,13 @@
5353
"size-limit": [
5454
{
5555
"path": "./lib/index.js",
56-
"limit": "10 kb"
56+
"limit": "10 kb",
57+
"brotli": true
5758
},
5859
{
5960
"path": "./lib/index.mjs",
60-
"limit": "10 kb"
61+
"limit": "10 kb",
62+
"brotli": true
6163
}
6264
],
6365
"gitHead": "5c9778d191d17d7c9790cfc6d0f4e983b4742a53",

packages/kitsu/rollup.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import babel from '@rollup/plugin-babel'
22
import { terser } from 'rollup-plugin-terser'
33
import local from 'rollup-plugin-local-resolve'
4+
import del from 'rollup-plugin-delete'
45
import pkg from './package.json'
56

67
const {
@@ -22,6 +23,7 @@ const globals = {
2223
}
2324

2425
const plugins = [
26+
del({ targets: './lib/*' }),
2527
local(),
2628
terser()
2729
]
@@ -37,13 +39,13 @@ export default {
3739
plugins: pluginsMain,
3840
output: [
3941
{
40-
file: pkg.main,
42+
file: `${pkg.main}.js`,
4143
format: 'cjs',
4244
sourcemap: false,
4345
globals
4446
},
4547
{
46-
file: pkg.module,
48+
file: `${pkg.module}.mjs`,
4749
format: 'es',
4850
sourcemap: false,
4951
globals

0 commit comments

Comments
 (0)