Skip to content

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,6 @@

"skipFiles": [
"<node_internals>/**",
// this prevents us from landing in a neverending cycle of TS async-polyfill functions as we're stepping through
// our code
"${workspaceFolder}/node_modules/tslib/**/*"
],
"sourceMaps": true,
// this controls which files are sourcemapped
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
"size-limit": "^4.5.5",
"ts-jest": "^27.1.4",
"ts-node": "^10.7.0",
"tslib": "^2.3.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/angular/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"@sentry/utils": "Sentry.util"
}
},
"whitelistedNonPeerDependencies": ["@sentry/browser", "@sentry/utils", "@sentry/types", "tslib"],
"whitelistedNonPeerDependencies": ["@sentry/browser", "@sentry/utils", "@sentry/types"],
"assets": ["README.md", "LICENSE"]
}
3 changes: 1 addition & 2 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"dependencies": {
"@sentry/browser": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"tslib": "^2.0.0"
"@sentry/utils": "7.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1002.4",
Expand Down
3 changes: 1 addition & 2 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"dependencies": {
"@sentry/core": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"tslib": "^1.9.3"
"@sentry/utils": "7.13.0"
},
"devDependencies": {
"@types/md5": "2.1.33",
Expand Down
5 changes: 0 additions & 5 deletions packages/browser/test/package/npm-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ function runTests() {

const myLibrary = fs.readFileSync(bundlePath, { encoding: 'utf-8' });

if (myLibrary.indexOf('tslib_1__default') !== -1) {
console.log('"tslib_1__default" reappeared...');
process.exit(1);
}

const scriptEl = window.document.createElement('script');
scriptEl.textContent = myLibrary;
window.document.body.appendChild(scriptEl);
Expand Down
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"dependencies": {
"@sentry/hub": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"tslib": "^1.9.3"
"@sentry/utils": "7.13.0"
},
"scripts": {
"build": "run-p build:rollup build:types",
Expand Down
3 changes: 1 addition & 2 deletions packages/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
},
"dependencies": {
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"tslib": "^1.9.3"
"@sentry/utils": "7.13.0"
},
"scripts": {
"build": "run-p build:rollup build:types",
Expand Down
3 changes: 1 addition & 2 deletions packages/integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"dependencies": {
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"localforage": "^1.8.1",
"tslib": "^1.9.3"
"localforage": "^1.8.1"
},
"devDependencies": {
"chai": "^4.1.2"
Expand Down
3 changes: 1 addition & 2 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
"@sentry/utils": "7.13.0",
"@sentry/webpack-plugin": "1.19.0",
"chalk": "3.0.0",
"rollup": "2.78.0",
"tslib": "^1.9.3"
"rollup": "2.78.0"
},
"devDependencies": {
"@sentry/nextjs": "7.13.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"@sentry/utils": "7.13.0",
"cookie": "^0.4.1",
"https-proxy-agent": "^5.0.0",
"lru_map": "^0.3.3",
"tslib": "^1.9.3"
"lru_map": "^0.3.3"
},
"devDependencies": {
"@types/cookie": "0.3.2",
Expand Down
3 changes: 1 addition & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"@sentry/browser": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"hoist-non-react-statics": "^3.3.2",
"tslib": "^1.9.3"
"hoist-non-react-statics": "^3.3.2"
},
"peerDependencies": {
"react": "15.x || 16.x || 17.x || 18.x"
Expand Down
3 changes: 1 addition & 2 deletions packages/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
"@sentry/tracing": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"@sentry/webpack-plugin": "1.19.0",
"tslib": "^1.9.3"
"@sentry/webpack-plugin": "1.19.0"
},
"devDependencies": {
"@remix-run/node": "^1.4.3",
Expand Down
3 changes: 1 addition & 2 deletions packages/serverless/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"@types/aws-lambda": "^8.10.62",
"@types/express": "^4.17.14",
"tslib": "^1.9.3"
"@types/express": "^4.17.14"
},
"devDependencies": {
"@google-cloud/bigquery": "^5.3.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"@sentry/browser": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"magic-string": "^0.26.2",
"tslib": "^1.9.3"
"magic-string": "^0.26.2"
},
"peerDependencies": {
"svelte": "3.x"
Expand Down
3 changes: 1 addition & 2 deletions packages/tracing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"dependencies": {
"@sentry/hub": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"tslib": "^1.9.3"
"@sentry/utils": "7.13.0"
},
"devDependencies": {
"@sentry/browser": "7.13.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"access": "public"
},
"dependencies": {
"@sentry/types": "7.13.0",
"tslib": "^1.9.3"
"@sentry/types": "7.13.0"
},
"devDependencies": {
"@types/array.prototype.flat": "^1.2.1",
Expand Down
3 changes: 1 addition & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"@sentry/browser": "7.13.0",
"@sentry/core": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"tslib": "^1.9.3"
"@sentry/utils": "7.13.0"
},
"peerDependencies": {
"vue": "2.x || 3.x"
Expand Down
3 changes: 1 addition & 2 deletions packages/wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"dependencies": {
"@sentry/browser": "7.13.0",
"@sentry/types": "7.13.0",
"@sentry/utils": "7.13.0",
"tslib": "^1.9.3"
"@sentry/utils": "7.13.0"
},
"devDependencies": {
"@types/jest-environment-puppeteer": "^4.4.0",
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,12 @@
"declarationMap": false,
"skipLibCheck": true,
"types": ["node"],
// Setting this to `false` causes TS to include the full code for each helper it injects, which allows us to remove
// `tslib` as a dependency, with the advantage that it means we don't have to worry about `tslib` version
// compatibility with our version of TS. Since we now use Sucrase and Rollup for our main builds, this only affects
// our ES5 bundles (which would pull in the helper code in any case, even if specified in an import) and tests
// (where the built files last only long enough to run tests againt), so it's safe to include it here in the root
// tsconfig.
"importHelpers": false,
}
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25309,7 +25309,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==

tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
Expand Down