diff --git a/.vscode/launch.json b/.vscode/launch.json index 2fd396c8ddbf..cb9a2997bfc9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -131,9 +131,6 @@ "skipFiles": [ "/**", - // 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 diff --git a/package.json b/package.json index 19b1888e6dcc..6cd7e64b5a59 100644 --- a/package.json +++ b/package.json @@ -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" }, diff --git a/packages/angular/ng-package.json b/packages/angular/ng-package.json index 88df70c1c7bd..7a4826d5f8be 100644 --- a/packages/angular/ng-package.json +++ b/packages/angular/ng-package.json @@ -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"] } diff --git a/packages/angular/package.json b/packages/angular/package.json index 586dec8f10fa..f53762a25c8e 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -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", diff --git a/packages/browser/package.json b/packages/browser/package.json index 8eae3391f483..30c8d6b3341d 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -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", diff --git a/packages/browser/test/package/npm-build.js b/packages/browser/test/package/npm-build.js index c74fb5ba9831..e4cff5dbbe8d 100644 --- a/packages/browser/test/package/npm-build.js +++ b/packages/browser/test/package/npm-build.js @@ -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); diff --git a/packages/core/package.json b/packages/core/package.json index fd97e77b2c75..444e1cb4a111 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -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", diff --git a/packages/hub/package.json b/packages/hub/package.json index ad74b8760d83..97165cec2cc8 100644 --- a/packages/hub/package.json +++ b/packages/hub/package.json @@ -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", diff --git a/packages/integrations/package.json b/packages/integrations/package.json index d3f4bfece389..9ce9f776db53 100644 --- a/packages/integrations/package.json +++ b/packages/integrations/package.json @@ -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" diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 3a34a9eecce4..fc297d55c0f7 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -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", diff --git a/packages/node/package.json b/packages/node/package.json index 8df5cb90e6e4..7029fecd4a3c 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -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", diff --git a/packages/react/package.json b/packages/react/package.json index 68f2187548e8..6228c188a7c3 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -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" diff --git a/packages/remix/package.json b/packages/remix/package.json index 442430dc79ba..5f3248d47c62 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -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", diff --git a/packages/serverless/package.json b/packages/serverless/package.json index 07b9a0dcda1b..30541539a3b9 100644 --- a/packages/serverless/package.json +++ b/packages/serverless/package.json @@ -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", diff --git a/packages/svelte/package.json b/packages/svelte/package.json index a77a2881669e..1eb0df76c734 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -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" diff --git a/packages/tracing/package.json b/packages/tracing/package.json index 6a2515d3cff3..1c4460141524 100644 --- a/packages/tracing/package.json +++ b/packages/tracing/package.json @@ -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", diff --git a/packages/utils/package.json b/packages/utils/package.json index c3730693b23b..c70e18bd3f74 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -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", diff --git a/packages/vue/package.json b/packages/vue/package.json index f7e9579bd532..86d26f18d6d9 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -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" diff --git a/packages/wasm/package.json b/packages/wasm/package.json index dc4fab281045..fc12be2916f6 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -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", diff --git a/tsconfig.json b/tsconfig.json index 9f46e21db53c..fa9ae4ec766f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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, } } diff --git a/yarn.lock b/yarn.lock index e2215f03ff14..eaef0250f5c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25309,7 +25309,7 @@ tslib@2.0.1: 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==