Skip to content

Commit 4e010db

Browse files
committed
ci: Check es5 bundles for valid syntax
To avoid accidentally including non-ES5 code.
1 parent 8b8bb47 commit 4e010db

File tree

5 files changed

+76
-3
lines changed

5 files changed

+76
-3
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,10 @@ jobs:
321321
uses: ./.github/actions/restore-cache
322322
env:
323323
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
324-
- name: Run linter
324+
- name: Lint source files
325325
run: yarn lint
326+
- name: Validate ES5 builds
327+
run: yarn validate:es5
326328

327329
job_circular_dep_check:
328330
name: Circular Dependency Check

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"link:yarn": "lerna exec yarn link",
2424
"lint": "lerna run lint",
2525
"lint:eslint": "lerna run lint:eslint",
26+
"validate:es5": "lerna run validate:es5",
2627
"postpublish": "lerna run --stream --concurrency 1 postpublish",
2728
"test": "lerna run --ignore @sentry-internal/* test",
2829
"test:unit": "lerna run --ignore @sentry-internal/* test:unit",
@@ -89,6 +90,7 @@
8990
"chai": "^4.1.2",
9091
"codecov": "^3.6.5",
9192
"deepmerge": "^4.2.2",
93+
"es5-validator": "1.3.1",
9294
"eslint": "7.32.0",
9395
"jest": "^27.5.1",
9496
"jest-environment-node": "^27.5.1",

packages/browser/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"lint": "run-s lint:prettier lint:eslint",
6767
"lint:eslint": "eslint . --format stylish",
6868
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
69+
"validate:es5": "es5-validator build/bundles/bundle.es5.js",
6970
"size:check": "run-p size:check:es5 size:check:es6",
7071
"size:check:es5": "cat build/bundles/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES5: \",$1,\"kB\";}'",
7172
"size:check:es6": "cat build/bundles/bundle.es6.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES6: \",$1,\"kB\";}'",

packages/tracing/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"lint": "run-s lint:prettier lint:eslint",
4747
"lint:eslint": "eslint . --format stylish",
4848
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
49+
"validate:es5": "es5-validator build/bundles/bundle.tracing.es5.js",
4950
"test:unit": "jest",
5051
"test": "jest",
5152
"test:watch": "jest --watch",

yarn.lock

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5837,7 +5837,7 @@ acorn@^6.0.5, acorn@^6.4.1:
58375837
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6"
58385838
integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==
58395839

5840-
acorn@^7.1.1, acorn@^7.4.0:
5840+
acorn@^7.1.1, acorn@^7.3.1, acorn@^7.4.0:
58415841
version "7.4.1"
58425842
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa"
58435843
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
@@ -9359,7 +9359,7 @@ [email protected], commander@^7.2.0:
93599359
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
93609360
integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==
93619361

9362-
commander@^2.16.0, commander@^2.20.0, commander@^2.20.3, commander@^2.6.0, commander@^2.8.1:
9362+
commander@^2.16.0, commander@^2.19.0, commander@^2.20.0, commander@^2.20.3, commander@^2.6.0, commander@^2.8.1:
93639363
version "2.20.3"
93649364
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
93659365
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
@@ -9477,6 +9477,14 @@ [email protected]:
94779477
ini "^1.3.4"
94789478
proto-list "~1.2.1"
94799479

9480+
config-chain@^1.1.13:
9481+
version "1.1.13"
9482+
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4"
9483+
integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==
9484+
dependencies:
9485+
ini "^1.3.4"
9486+
proto-list "~1.2.1"
9487+
94809488
configstore@^5.0.1:
94819489
version "5.0.1"
94829490
resolved "https://registry.yarnpkg.com/configstore/-/configstore-5.0.1.tgz#d365021b5df4b98cdd187d6a3b0e3f6a7cc5ed96"
@@ -11103,6 +11111,16 @@ editions@^2.2.0:
1110311111
errlop "^2.0.0"
1110411112
semver "^6.3.0"
1110511113

11114+
editorconfig@^0.15.3:
11115+
version "0.15.3"
11116+
resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5"
11117+
integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==
11118+
dependencies:
11119+
commander "^2.19.0"
11120+
lru-cache "^4.1.5"
11121+
semver "^5.6.0"
11122+
sigmund "^1.0.1"
11123+
1110611124
1110711125
version "1.1.1"
1110811126
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
@@ -12055,6 +12073,17 @@ es5-ext@^0.10.35, es5-ext@^0.10.50:
1205512073
es6-symbol "^3.1.3"
1205612074
next-tick "^1.1.0"
1205712075

12076+
12077+
version "1.3.1"
12078+
resolved "https://registry.yarnpkg.com/es5-validator/-/es5-validator-1.3.1.tgz#901571e5ad34bfb69167eeb055ea51a31d14cb0a"
12079+
integrity sha512-kqScH/mW2XidBTpWhS4vXtUWrO0uPz9GCFKyC9md5aEyx6fl3DgHxnQB4/PCfE0xJjmQ/EEH0TZc3eGkkUmT0g==
12080+
dependencies:
12081+
"@babel/code-frame" "^7.10.4"
12082+
acorn "^7.3.1"
12083+
chalk "^4.1.0"
12084+
is-minified-performant "^1.0.2"
12085+
js-beautify "^1.11.0"
12086+
1205812087
[email protected], es6-iterator@^2.0.3:
1205912088
version "2.0.3"
1206012089
resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
@@ -15514,6 +15543,11 @@ is-language-code@^3.1.0:
1551415543
dependencies:
1551515544
"@babel/runtime" "^7.14.0"
1551615545

15546+
is-minified-performant@^1.0.2:
15547+
version "1.0.2"
15548+
resolved "https://registry.yarnpkg.com/is-minified-performant/-/is-minified-performant-1.0.2.tgz#349408c633fa016056b196b58c09deed14c23dfb"
15549+
integrity sha512-ZFIOY8eE/ZnOn8sLnDwTsPJZm7pNV8iC5cCtErqnphKcPwrDd32t6zG+qRaQSIekDre5mXUnjluTPTlP5UT9mA==
15550+
1551715551
is-module@^1.0.0:
1551815552
version "1.0.0"
1551915553
resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591"
@@ -16397,6 +16431,16 @@ [email protected]:
1639716431
resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217"
1639816432
integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc=
1639916433

16434+
js-beautify@^1.11.0:
16435+
version "1.14.7"
16436+
resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.7.tgz#9206296de33f86dc106d3e50a35b7cf8729703b2"
16437+
integrity sha512-5SOX1KXPFKx+5f6ZrPsIPEY7NwKeQz47n3jm2i+XeHx9MoRsfQenlOP13FQhWvg8JRS0+XLO6XYUQ2GX+q+T9A==
16438+
dependencies:
16439+
config-chain "^1.1.13"
16440+
editorconfig "^0.15.3"
16441+
glob "^8.0.3"
16442+
nopt "^6.0.0"
16443+
1640016444
js-cleanup@^1.2.0:
1640116445
version "1.2.0"
1640216446
resolved "https://registry.yarnpkg.com/js-cleanup/-/js-cleanup-1.2.0.tgz#8dbc65954b1d38b255f1e8cf02cd17b3f7a053f9"
@@ -17750,6 +17794,14 @@ lowercase-keys@^2.0.0:
1775017794
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
1775117795
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
1775217796

17797+
lru-cache@^4.1.5:
17798+
version "4.1.5"
17799+
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
17800+
integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
17801+
dependencies:
17802+
pseudomap "^1.0.2"
17803+
yallist "^2.1.2"
17804+
1775317805
lru-cache@^5.1.1:
1775417806
version "5.1.1"
1775517807
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
@@ -22191,6 +22243,11 @@ ps-tree@=1.2.0:
2219122243
dependencies:
2219222244
event-stream "=3.3.4"
2219322245

22246+
pseudomap@^1.0.2:
22247+
version "1.0.2"
22248+
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
22249+
integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==
22250+
2219422251
psl@^1.1.28, psl@^1.1.33:
2219522252
version "1.8.0"
2219622253
resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
@@ -24006,6 +24063,11 @@ siginfo@^2.0.0:
2400624063
resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30"
2400724064
integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==
2400824065

24066+
sigmund@^1.0.1:
24067+
version "1.0.1"
24068+
resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
24069+
integrity sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==
24070+
2400924071
[email protected], signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
2401024072
version "3.0.7"
2401124073
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
@@ -27800,6 +27862,11 @@ yalc@^1.0.0-pre.53:
2780027862
npm-packlist "^2.1.5"
2780127863
yargs "^16.1.1"
2780227864

27865+
yallist@^2.1.2:
27866+
version "2.1.2"
27867+
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
27868+
integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==
27869+
2780327870
yallist@^3.0.0, yallist@^3.0.2, yallist@^3.1.1:
2780427871
version "3.1.1"
2780527872
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"

0 commit comments

Comments
 (0)