File tree Expand file tree Collapse file tree 5 files changed +147
-15
lines changed Expand file tree Collapse file tree 5 files changed +147
-15
lines changed Original file line number Diff line number Diff line change 1+ name : Check bundle size
2+ on :
3+ pull_request :
4+ branches :
5+ - main
6+ concurrency :
7+ group : ${{ github.workflow }}-${{ github.ref }}
8+ cancel-in-progress : true
9+
10+ permissions :
11+ pull-requests : write
12+
13+ jobs :
14+ sizecheck :
15+ runs-on : ubuntu-latest
16+ env :
17+ CI_RUN : true
18+ CI_JOB_NUMBER : 1
19+ steps :
20+ - uses : actions/checkout@v4
21+ - uses : andresz1/size-limit-action
22+ with :
23+ github_token : ${{ secrets.GITHUB_TOKEN }}
24+ package_manager : pnpm
Original file line number Diff line number Diff line change 1+ import type { SizeLimitConfig } from "size-limit" ;
2+
3+ module . exports = [
4+ {
5+ name : "createTypedChannel" ,
6+ path : "dist/index.js" ,
7+ import : "{ createTypedChannel }" ,
8+ limit : "254 B" ,
9+ } ,
10+ {
11+ name : "createPostMessageTransport" ,
12+ path : "dist/index.js" ,
13+ import : "{ createPostMessageTransport }" ,
14+ limit : "86 B" ,
15+ } ,
16+ {
17+ name : "createEventTargetTransport" ,
18+ path : "dist/index.js" ,
19+ import : "{ createEventTargetTransport }" ,
20+ limit : "109 B" ,
21+ } ,
22+ ] satisfies SizeLimitConfig ;
Original file line number Diff line number Diff line change 33A type-safe communication channel for sending and receiving messages between different contexts in a TypeScript environment.
44
55[ ![ npm version] ( https://img.shields.io/npm/v/typed-channel.svg )] ( https://www.npmjs.com/package/typed-channel )
6+ [ ![ Bundle size] ( https://img.shields.io/badge/Bundle_size-from_363_B-brightgreen )] ( https://github.com/psd-coder/typed-channel/blob/main/.size-limit.ts )
67[ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-blue.svg )] ( https://opensource.org/licenses/MIT )
78
89## Features
Original file line number Diff line number Diff line change 3131 "lint" : " pnpm --parallel /^lint:*/" ,
3232 "lint:oxlint" : " oxlint" ,
3333 "lint:prettier" : " prettier --check ." ,
34+ "lint:size" : " pnpm build && size-limit" ,
3435 "format" : " prettier . --write" ,
3536 "typecheck" : " tsc --noEmit" ,
3637 "test" : " vitest run" ,
3940 },
4041 "packageManager" :
" [email protected] " ,
4142 "devDependencies" : {
43+ "@size-limit/preset-small-lib" : " ^11.2.0" ,
4244 "oxlint" : " ^0.16.6" ,
4345 "prettier" : " ^3.5.3" ,
46+ "size-limit" : " ^11.2.0" ,
4447 "tsup" : " ^8.4.0" ,
4548 "typescript" : " ^5.8.3" ,
4649 "vite" : " ^6.3.1" ,
You can’t perform that action at this time.
0 commit comments