PostHog / posthog-js

Send usage data from your web app or site to PostHog, with autocapture.
https://posthog.com/docs/libraries/js
Other
303 stars 126 forks source link

chore: always transform exponentiation #1537

Closed pauldambra closed 1 week ago

pauldambra commented 1 week ago

pulling small changes out of https://github.com/PostHog/posthog-js/pull/1525 because IE 11 tests are freezing in that PR and it's really hard to figure out why

We use the exponentiation operator in some code 2 ** 4 which is a relatively modern bit of JS.

This ensures that it is always transformed to Math.pow(2, 4) by babel. Which is at least ES5 supporting

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Nov 19, 2024 10:05am
github-actions[bot] commented 1 week ago

Size Change: +657 B (+0.02%)

Total Size: 3.11 MB

Filename Size Change
dist/array.full.js 356 kB +73 B (+0.02%)
dist/array.full.no-external.js 355 kB +73 B (+0.02%)
dist/array.js 170 kB +73 B (+0.04%)
dist/array.no-external.js 169 kB +73 B (+0.04%)
dist/main.js 171 kB +73 B (+0.04%)
dist/module.full.js 356 kB +73 B (+0.02%)
dist/module.full.no-external.js 355 kB +73 B (+0.02%)
dist/module.js 170 kB +73 B (+0.04%)
dist/module.no-external.js 169 kB +73 B (+0.04%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `dist/all-external-dependencies.js` | 204 kB | | `dist/array.full.es5.js` | 253 kB | | `dist/dead-clicks-autocapture.js` | 13.6 kB | | `dist/exception-autocapture.js` | 8.7 kB | | `dist/external-scripts-loader.js` | 2.19 kB | | `dist/recorder-v2.js` | 113 kB | | `dist/recorder.js` | 113 kB | | `dist/surveys-preview.js` | 56.6 kB | | `dist/surveys.js` | 62.1 kB | | `dist/tracing-headers.js` | 1.33 kB | | `dist/web-vitals.js` | 10.3 kB |

compressed-size-action