-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add size-limit * comment out `useSuspenseQuery_experimental` for main branch
- Loading branch information
Showing
5 changed files
with
1,077 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "size" | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- release-* | ||
jobs: | ||
size: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- name: Install dependencies (with cache) | ||
uses: bahmutov/npm-install@v1 | ||
- name: Run size-limit | ||
uses: andresz1/size-limit-action@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,5 @@ junit.xml | |
|
||
# Ignore generated test report output | ||
reports | ||
|
||
esbuild-why-*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const checks = [ | ||
{ | ||
path: "dist/apollo-client.min.cjs", | ||
limit: "36.64kb" | ||
}, | ||
{ | ||
path: "dist/main.cjs", | ||
import: "{ ApolloClient, InMemoryCache, HttpLink }" | ||
}, | ||
{ | ||
path: "dist/index.js", | ||
import: "{ ApolloClient, InMemoryCache, HttpLink }", | ||
limit: "34.99kb" | ||
}, | ||
...[ | ||
"ApolloProvider", | ||
"useQuery", | ||
"useLazyQuery", | ||
"useMutation", | ||
"useSubscription", | ||
//"useSuspenseQuery_experimental", | ||
"useFragment_experimental" | ||
].map((name) => ({ path: "dist/react/index.js", import: `{ ${name} }` })), | ||
].map((config) => ({ | ||
...config, | ||
name: config.name || config.import ? `import ${config.import} from "${config.path}"` : config.path, | ||
ignore: [ | ||
...(config.ignore || []), | ||
"react", | ||
"react-dom", | ||
"@graphql-typed-document-node/core", | ||
"@wry/context", | ||
"@wry/equality", | ||
"@wry/trie", | ||
"graphql-tag", | ||
"hoist-non-react-statics", | ||
"optimism", | ||
"prop-types", | ||
"response-iterator", | ||
"symbol-observable", | ||
"ts-invariant", | ||
"tslib", | ||
"zen-observable-ts" | ||
], | ||
})); | ||
|
||
module.exports = checks; |
Oops, something went wrong.