-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(deps): Remove tslib
dependency
#5753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tslib
to dev dependenciestslib
dependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ff9f812
to
df03535
Compare
size-limit report 📦
|
4731ed6
to
a298135
Compare
a298135
to
d31eee9
Compare
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
🥺 |
Maybe one day we'll get back to this, but it might be easier to try upgrading TS before we do. |
NOTE: Though most of the the problems the change causes have been solved, I'm leaving this in draft form until I can figure out why the
tracePropogationTargets
tests (and only thetracePropogationTargets
tests) consistently fail. Very mysterious...Now that we use Sucrase and Rollup for transpiling in our main build process, we no longer need
tslib
as a runtime dependency. (Sucrase and Rollup have their own ES6 polyfills, which we vendor.)We do still use
tsc
when creating ES5 bundles, but we do so throughrollup-plugin-typescript-2
, which includestslib
among its own dependencies.We've also been using it (indirectly) in our tests.
ts-jest
works by transpiling relevant TS files on the fly before runningjest
, and it's set to use the localtsconfig.test.json
when it does so. Because all of our tsconfig files inherit from the tsconfig in@sentry/typescript
, they've all been running withimportHelpers
set totrue
, which makes our testing dependent ontslib
. But since we have no other reason to depend ontslib
(and since we obviously don't care about bundle size when it comes to the temporary filests-jest
creates), it's fine to let TS just include the helper implementations alongside their use. Thus we can turnimportHelpers
off , which means we no longer needtslib
as a direct dev dependency, either.This therefore removes it from our dependencies, both at the repo and package levels.
Notes:
The change to
importHelpers
is done at the repo level, rather than being done directly in@sentry/typescript
, because other packages (likesentry-capacitor
andcraft
, among others) also depend on@sentry/typescript
(and use our old build infrastructure, which needed the setting).An old test testing for the inclusion of
tslib
code in our build files, and theskipFiles
setting in one of ourlaunch.json
profiles have also been removed, as they are now moot.