Skip to content

Commit 66f08ca

Browse files
authored
Re-export integrations (#192)
* Re-export integrations * Create thick-badgers-prove.md * Fix build
1 parent 370954f commit 66f08ca

File tree

8 files changed

+57
-4
lines changed

8 files changed

+57
-4
lines changed

.changeset/thick-badgers-prove.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"toucan-js": minor
3+
---
4+
5+
The following integrations are now re-exported from `toucan-js` for type compatibility: `Dedupe`, `ExtraErrorData`, `RewriteFrames`, `SessionTiming`, `Transaction`.

examples/wrangler-rollup/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"rollup": "^3.5.1",
1212
"rollup-plugin-typescript2": "^0.34.1",
1313
"@rollup/plugin-node-resolve": "^15.0.1",
14+
"@rollup/plugin-commonjs": "^25.0.3",
1415
"@sentry/rollup-plugin": "^0.2.3"
1516
},
1617
"private": true,

examples/wrangler-rollup/rollup.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
const { nodeResolve } = require('@rollup/plugin-node-resolve');
22
const { default: sentryRollupPlugin } = require('@sentry/rollup-plugin');
33
const typescript = require('rollup-plugin-typescript2');
4+
const commonjs = require('@rollup/plugin-commonjs');
45

56
module.exports = [
67
{
78
input: 'src/index.ts',
89
plugins: [
910
nodeResolve(),
11+
commonjs(),
1012
typescript({
1113
tsconfigOverride: {
1214
include: ['./src/**/*'],

packages/toucan-js/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ You can use custom integrations to enhance `toucan-js` as you would any other Se
3838
- not enhance or wrap global runtime methods (such as `console.log`).
3939
- not use runtime APIs that aren't available in Cloudflare Workers (NodeJS runtime functions, `window` object, etc...).
4040

41-
Supported integrations from [@sentry/integrations](https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations):
41+
Supported integrations from [@sentry/integrations](https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations) are re-exported from `toucan-js`:
4242

4343
- [Dedupe](https://github.com/getsentry/sentry-javascript/blob/master/packages/integrations/src/dedupe.ts)
4444
- [ExtraErrorData](https://github.com/getsentry/sentry-javascript/blob/master/packages/integrations/src/extraerrordata.ts)

packages/toucan-js/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"dependencies": {
3232
"@sentry/core": "7.60.0",
3333
"@sentry/utils": "7.60.0",
34-
"@sentry/types": "7.60.0"
34+
"@sentry/types": "7.60.0",
35+
"@sentry/integrations": "7.60.0"
3536
},
3637
"devDependencies": {
3738
"@rollup/plugin-commonjs": "25.0.3",

packages/toucan-js/src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
export { LinkedErrors, RequestData } from './integrations';
1+
export {
2+
LinkedErrors,
3+
RequestData,
4+
Dedupe,
5+
ExtraErrorData,
6+
RewriteFrames,
7+
SessionTiming,
8+
Transaction,
9+
} from './integrations';
210
export type { LinkedErrorsOptions, RequestDataOptions } from './integrations';
311
export { Toucan } from './sdk';
412
export type { Options } from './types';
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
export * from './linkedErrors';
22
export * from './requestData';
3+
export {
4+
Dedupe,
5+
ExtraErrorData,
6+
RewriteFrames,
7+
SessionTiming,
8+
Transaction,
9+
} from '@sentry/integrations';

yarn.lock

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,7 @@
15051505
"@nodelib/fs.scandir" "2.1.5"
15061506
fastq "^1.6.0"
15071507

1508-
1508+
"@rollup/[email protected]", "@rollup/plugin-commonjs@^25.0.3":
15091509
version "25.0.3"
15101510
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.3.tgz#eb5217ebae43d63a172b516655be270ed258bdcc"
15111511
integrity sha512-uBdtWr/H3BVcgm97MUdq2oJmqBR23ny1hOrWe2PKo9FTbjsGqg32jfasJUKYAI5ouqacjRnj65mBB/S79F+GQA==
@@ -1626,6 +1626,16 @@
16261626
dependencies:
16271627
"@sentry/bundler-plugin-core" "0.2.3"
16281628

1629+
1630+
version "7.60.0"
1631+
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.60.0.tgz#1939a70f04f0a155d4e6d419616beaaaae7f4730"
1632+
integrity sha512-Zh/Kgvs501ABc2Qq1gscC/y2u4HDUhgzCsJ10/GdYZwIqM/UMfviHbYpzjFZssJvGUrGzjEW0GXCInCc4rYzQA==
1633+
dependencies:
1634+
"@sentry/types" "7.60.0"
1635+
"@sentry/utils" "7.60.0"
1636+
localforage "^1.8.1"
1637+
tslib "^2.4.1 || ^1.9.3"
1638+
16291639
"@sentry/node@^7.19.0":
16301640
version "7.23.0"
16311641
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.23.0.tgz#a9573a1a93994b6dc7ed3539c27cb8faf7bacfb2"
@@ -4083,6 +4093,11 @@ ignore@^5.2.0, ignore@^5.2.4:
40834093
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
40844094
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
40854095

4096+
immediate@~3.0.5:
4097+
version "3.0.6"
4098+
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
4099+
integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==
4100+
40864101
import-fresh@^3.2.1:
40874102
version "3.3.0"
40884103
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
@@ -4963,6 +4978,13 @@ levn@^0.4.1:
49634978
prelude-ls "^1.2.1"
49644979
type-check "~0.4.0"
49654980

4981+
4982+
version "3.1.1"
4983+
resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e"
4984+
integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==
4985+
dependencies:
4986+
immediate "~3.0.5"
4987+
49664988
lines-and-columns@^1.1.6:
49674989
version "1.2.4"
49684990
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
@@ -4983,6 +5005,13 @@ loader-runner@^4.2.0:
49835005
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1"
49845006
integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==
49855007

5008+
localforage@^1.8.1:
5009+
version "1.10.0"
5010+
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4"
5011+
integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==
5012+
dependencies:
5013+
lie "3.1.1"
5014+
49865015
locate-path@^5.0.0:
49875016
version "5.0.0"
49885017
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"

0 commit comments

Comments
 (0)