Skip to content

Commit 718903d

Browse files
authored
chore: switch from size-limit to bundlewatch (#2845)
1 parent 765830c commit 718903d

File tree

8 files changed

+72
-174
lines changed

8 files changed

+72
-174
lines changed

.github/workflows/size-limit.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/test-and-publish.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
- name: Install dependencies
2626
uses: bahmutov/npm-install@v1
2727
- run: yarn test:ci
28+
- run: yarn test:size
29+
if: matrix.node == '16'
30+
env:
31+
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
2832

2933
publish-module:
3034
name: 'Publish Module to NPM'

examples/load-more-infinite-scroll/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "pagination",
2+
"name": "load-more-infinite-scroll",
33
"version": "1.0.0",
44
"main": "index.js",
55
"license": "MIT",

examples/optimistic-updates-typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "basic",
2+
"name": "optimistic-updates-typescript",
33
"version": "1.0.0",
44
"main": "index.js",
55
"license": "MIT",

examples/optimistic-updates/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "basic",
2+
"name": "optimistic-updates",
33
"version": "1.0.0",
44
"main": "index.js",
55
"license": "MIT",

examples/prefetching/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "basic",
2+
"name": "prefetching",
33
"version": "1.0.0",
44
"main": "index.js",
55
"license": "MIT",

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"test:format": "yarn prettier --check",
3333
"test:types": "tsc",
3434
"test:eslint": "eslint --ext .ts,.tsx ./src",
35+
"test:size": "yarn build:umd && bundlewatch",
3536
"build": "yarn build:commonjs && yarn build:es && yarn build:umd && yarn build:types",
3637
"build:commonjs": "rimraf ./lib && cross-env BABEL_ENV=commonjs babel --extensions .ts,.tsx --ignore ./src/**/tests/**/* ./src --out-dir lib",
3738
"build:es": "rimraf ./es && babel --extensions .ts,.tsx --ignore ./src/**/tests/**/* ./src --out-dir es",
@@ -46,8 +47,7 @@
4647
"prettier": "prettier \"{.,src,src/**,example/src,example/src/**,types}/*.{md,js,jsx,ts,tsx,json}\"",
4748
"start": "yarn watch",
4849
"format": "yarn prettier --write",
49-
"stats": "open ./stats.html",
50-
"build-size": "yarn build:umd"
50+
"stats": "open ./stats.html"
5151
},
5252
"files": [
5353
"core",
@@ -91,7 +91,6 @@
9191
"@babel/preset-react": "^7.10.4",
9292
"@babel/preset-typescript": "^7.10.4",
9393
"@rollup/plugin-replace": "^2.3.3",
94-
"@size-limit/file": "^6.0.3",
9594
"@svgr/rollup": "^5.4.0",
9695
"@testing-library/react": "^10.4.7",
9796
"@testing-library/jest-dom": "^5.14.1",
@@ -104,6 +103,7 @@
104103
"babel-jest": "^26.0.1",
105104
"babel-plugin-const-enum": "^1.0.1",
106105
"babel-plugin-transform-async-to-promises": "^0.8.15",
106+
"bundlewatch": "^0.3.2",
107107
"cross-env": "^7.0.2",
108108
"eslint": "7.x",
109109
"eslint-config-prettier": "^6.11.0",
@@ -137,17 +137,18 @@
137137
"rollup-plugin-size": "^0.2.2",
138138
"rollup-plugin-terser": "^6.1.0",
139139
"rollup-plugin-visualizer": "^4.0.4",
140-
"size-limit": "^6.0.3",
141140
"type-fest": "^0.21.0",
142141
"typescript": "^4.1.2"
143142
},
144143
"resolutions": {
145144
"@types/react": "^16.9.41",
146145
"@types/react-dom": "^16.9.8"
147146
},
148-
"size-limit": [
149-
{
150-
"path": "dist/*.production.min.js"
151-
}
152-
]
147+
"bundlewatch": {
148+
"files": [
149+
{
150+
"path": "dist/*.production.min.js"
151+
}
152+
]
153+
}
153154
}

0 commit comments

Comments
 (0)