Skip to content

Commit 913b0ca

Browse files
authored
feat: Try size-limit gh action (#2750)
* feat: Try size-limit gh action * ref: Fix version * feat: Lock typescript version * feat: Pin typescript and lint version * ci: Try skip scripts * ref: Add size check for tracing and react
1 parent 820bd77 commit 913b0ca

File tree

31 files changed

+4683
-3108
lines changed

31 files changed

+4683
-3108
lines changed

.github/workflows/size-limit.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Bundle Size'
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
jobs:
7+
job_1:
8+
name: Size Check
9+
runs-on: ubuntu-latest
10+
env:
11+
CI_JOB_NUMBER: 1
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: andresz1/[email protected]
15+
with:
16+
github_token: ${{ secrets.GITHUB_TOKEN }}

.size-limit.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = [
2+
{
3+
name: '@sentry/browser - CDN Bundle (gzipped)',
4+
path: 'packages/browser/build/bundle.min.js',
5+
gzip: true,
6+
limit: '18 KB',
7+
},
8+
{
9+
name: '@sentry/browser - Webpack',
10+
path: 'packages/browser/esm/index.js',
11+
import: '{ init }',
12+
limit: '18 KB',
13+
},
14+
{
15+
name: '@sentry/react - Webpack',
16+
path: 'packages/react/esm/index.js',
17+
import: '{ init }',
18+
limit: '19 KB',
19+
},
20+
{
21+
name: '@sentry/browser + @sentry/tracing - CDN Bundle (gzipped)',
22+
path: 'packages/tracing/build/bundle.tracing.min.js',
23+
gzip: true,
24+
limit: '23 KB',
25+
},
26+
];

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ branches:
77
- /^release\/.+$/
88
- /^major\/.+$/
99

10-
install: yarn --ignore-engines
10+
install: yarn --ignore-engines --ignore-scripts
1111
os: linux
1212

1313
language: node_js

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"postpublish": "make publish-docs"
1616
},
1717
"volta": {
18-
"node": "10.15.3",
18+
"node": "10.18.1",
1919
"yarn": "1.13.0"
2020
},
2121
"workspaces": [
@@ -35,6 +35,7 @@
3535
],
3636
"devDependencies": {
3737
"@google-cloud/storage": "^2.5.0",
38+
"@size-limit/preset-big-lib": "^4.5.5",
3839
"@strictsoftware/typedoc-plugin-monorepo": "^0.2.1",
3940
"@types/chai": "^4.1.3",
4041
"@types/jest": "^24.0.11",
@@ -56,10 +57,11 @@
5657
"replace-in-file": "^4.0.0",
5758
"rimraf": "^2.6.3",
5859
"sinon": "^7.3.2",
60+
"size-limit": "^4.5.5",
5961
"ts-jest": "^24.0.2",
60-
"tslint": "^5.16.0",
62+
"tslint": "5.16.0",
6163
"typedoc": "^0.14.2",
62-
"typescript": "^3.4.5",
64+
"typescript": "3.4.5",
6365
"typescript-tslint-plugin": "^0.3.1"
6466
},
6567
"resolutions": {

packages/apm/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
"rollup-plugin-node-resolve": "^4.2.3",
3737
"rollup-plugin-terser": "^4.0.4",
3838
"rollup-plugin-typescript2": "^0.21.0",
39-
"tslint": "^5.16.0",
40-
"typescript": "^3.4.5"
39+
"tslint": "5.16.0",
40+
"typescript": "3.4.5"
4141
},
4242
"scripts": {
4343
"build": "run-p build:es5 build:esm build:bundle",

packages/apm/src/integrations/tracing.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,7 @@ export class Tracing implements Integration {
350350
if (Tracing._heartbeatCounter >= 3) {
351351
if (Tracing._activeTransaction) {
352352
Tracing._log(
353-
`[Tracing] Transaction: ${
354-
SpanStatus.Cancelled
355-
} -> Heartbeat safeguard kicked in since content hasn't changed for 3 beats`,
353+
`[Tracing] Transaction: ${SpanStatus.Cancelled} -> Heartbeat safeguard kicked in since content hasn't changed for 3 beats`,
356354
);
357355
Tracing._activeTransaction.setStatus(SpanStatus.DeadlineExceeded);
358356
Tracing._activeTransaction.setTag('heartbeat', 'failed');

packages/browser/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
"rollup-plugin-terser": "^4.0.4",
5050
"rollup-plugin-typescript2": "^0.21.0",
5151
"sinon": "^7.3.2",
52-
"tslint": "^5.16.0",
53-
"typescript": "^3.4.5",
52+
"tslint": "5.16.0",
53+
"typescript": "3.4.5",
5454
"webpack": "^4.30.0"
5555
},
5656
"scripts": {

packages/core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
"prettier": "^1.17.0",
2929
"prettier-check": "^2.0.0",
3030
"rimraf": "^2.6.3",
31-
"tslint": "^5.16.0",
32-
"typescript": "^3.4.5"
31+
"tslint": "5.16.0",
32+
"typescript": "3.4.5"
3333
},
3434
"scripts": {
3535
"build": "run-p build:es5 build:esm",

packages/core/test/lib/base.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -804,9 +804,15 @@ describe('BaseClient', () => {
804804
const client = new TestClient({ dsn: PUBLIC_DSN });
805805

806806
return Promise.all([
807-
client.flush(1).then(() => expect(true).toEqual(true)),
808-
client.flush(1).then(() => expect(true).toEqual(true)),
809-
client.flush(1).then(() => expect(true).toEqual(true)),
807+
client.flush(1).then(() => {
808+
expect(true).toEqual(true);
809+
}),
810+
client.flush(1).then(() => {
811+
expect(true).toEqual(true);
812+
}),
813+
client.flush(1).then(() => {
814+
expect(true).toEqual(true);
815+
}),
810816
]);
811817
});
812818
});

packages/gatsby/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
"prettier": "^1.17.0",
3939
"prettier-check": "^2.0.0",
4040
"rimraf": "^2.6.3",
41-
"tslint": "^5.16.0",
42-
"typescript": "^3.5.1"
41+
"tslint": "5.16.0",
42+
"typescript": "3.4.5"
4343
},
4444
"scripts": {
4545
"build": "run-p build:es5 build:esm",

0 commit comments

Comments
 (0)