Skip to content

Releases: robertcepa/toucan-js

toucan-js@4.0.0

02 Jul 15:51
f8e0bbb
Compare
Choose a tag to compare

Major Changes

  • fce854c and c29ddfa: This release upgrades the underlying Sentry SDKs to v8.

    • Toucan now extends ScopeClass instead of Hub.
    • Class-based integrations have been removed in Sentry v8. Toucan adapts to this change by renaming:
      • Dedupe integration to dedupeIntegration
      • ExtraErrorData integration to extraErrorDataIntegration
      • RewriteFrames integration to rewriteFramesIntegration
      • SessionTiming integration to sessionTimingIntegration
      • LinkedErrors integration to linkedErrorsIntegration
      • RequestData integration to requestDataIntegration
    • Additionally, Transaction integration is no longer provided.
    • Toucan instance can now be deeply copied using Toucan.clone().

    Refer to Sentry v8 release notes and Sentry v7->v8 for additional context.

Special shout-out to @timfish for their contribution 🚀

toucan-js@3.4.0

27 Apr 15:51
fb3fe6d
Compare
Choose a tag to compare

Minor Changes

  • 2c75016: Update sentry dependencies to 7.112.2

toucan-js@3.3.1

29 Oct 05:28
68c8369
Compare
Choose a tag to compare

Patch Changes

  • 9a23541: Update sentry dependencies to v7.76.0
  • 8d7b40f: fix: query parameter with camelCase key becomes undefined

toucan-js@3.3.0

23 Sep 16:16
e8cd2bc
Compare
Choose a tag to compare

Minor Changes

  • 948583b: Add support for Cron check-ins

Patch Changes

  • 65ba3f4: Update sentry dependencies to v7.70.0

toucan-js@3.2.3

28 Aug 16:05
cf7e2db
Compare
Choose a tag to compare

Patch Changes

  • c7c0b64: Update sentry dependencies to v7.65.0

toucan-js@3.2.2

17 Aug 02:04
e9c57b9
Compare
Choose a tag to compare

Patch Changes

  • 19eaef2: Update sentry dependencies to v7.63.0

toucan-js@3.2.1

03 Aug 05:17
4d94e2e
Compare
Choose a tag to compare

Patch Changes

  • 321ecdd: Update sentry dependencies to v7.61.0

toucan-js@3.2.0

26 Jul 21:38
208125e
Compare
Choose a tag to compare

Minor Changes

  • 3ce9e8e: You can now wrap fetch by passing fetcher to transportOptions.
  • 87e50c9: Add setEnabled method
  • 66f08ca: The following integrations are now re-exported from toucan-js for type compatibility: Dedupe, ExtraErrorData, RewriteFrames, SessionTiming, Transaction.

Patch Changes

  • 370954f: Update sentry dependencies to v7.60.0
  • 86c2be8: Update dependency miniflare to v2.12.1
  • 17b22f1: Update dependency rollup to v3.19.1
  • cde3c15: Update dependency @rollup/plugin-commonjs to v24
  • ac869b6: Update dependency @rollup/plugin-commonjs to v23.0.7
  • d697e6f: Update dependency ts-jest to v29.0.5
  • c478f14: Update dependency @rollup/plugin-replace to v5.0.2

toucan-js@3.1.0

25 Dec 19:18
0ad38a1
Compare
Choose a tag to compare

Minor Changes

  • 5f6cea5: Update Sentry dependencies to 7.28.1

toucan-js@3.0.0

06 Dec 07:39
aa70df8
Compare
Choose a tag to compare

This is a complete rewrite of toucan-js. The goal of this update is to reuse more components from @sentry/core, fix long-standing issues with source maps, and provide starters using various bundlers (esbuild, rollup, vite, webpack).

The good news is that toucan-js now supports pretty much all SDK options and methods provided in official Sentry SDKs for JavaScript that you all are used to and love.

The bad news is that I may fail to document all breaking changes, because toucan-js now delegates to a lot of code written by someone else. So use this release with caution. :)

Breaking changes

  • Toucan now uses Envelopes protocol with POST /api/<project_id>/envelope/ endpoint, instead of previously used POST /api/<project_id>/store/ endpoint.

  • Toucan client is no longer the default export. It is now a named export.

    Before:

    import Toucan from 'toucan-js';

    After:

    import { Toucan } from 'toucan-js';
  • setFingerprint is no longer a top level method. This method is now available on Scope. There are many ways to configure scope:

Option 1:

const sentry = new Toucan({
      dsn: env.SENTRY_DSN,
      context,
      request,
      initialScope: {
        fingerprint:  [...]
      }
    });

Option 2:

const sentry = new Toucan({...});

sentry.configureScope(scope => scope.setFingerprint([...]))

Option 3:

const sentry = new Toucan({...});

sentry.withScope((scope) => scope.setFingerprint([...]));
  • OtherOptions type has been removed. Use Options type instead. Options type isn't a discriminated union anymore and contains all types.

  • event option has been removed. Use context option instead.

  • context.request is no longer used to track request data. If you want to track request data, use top-level request option instead.

  • allowedCookies, allowedHeaders, allowedSearchParams are no longer top level options, but options on new RequestData integration that is exported from the SDK. The Toucan client provides a shortcut for these options as requestDataOptions top level option. To migrate, either move them to requestDataOptions, or pass them to RequestData integration.

    Before:

    import Toucan from 'toucan-js';
    
    const sentry = new Toucan({
      dsn: '...',
      context,
      allowedCookies: ['myCookie'],
      allowedHeaders: ['user-agent'],
      allowedSearchParams: ['utm-source'],
    });

    After (option 1):

    import { Toucan } from 'toucan-js';
    
    const sentry = new Toucan({
      dsn: '...',
      context,
      requestDataOptions: {
        allowedCookies: ['myCookie'],
        allowedHeaders: ['user-agent'],
        allowedSearchParams: ['utm-source'],
      },
    });

    After (option 2):

    import { Toucan, RequestData } from 'toucan-js';
    
    const sentry = new Toucan({
      dsn: '...',
      context,
      integrations: [new RequestData({{
        allowedCookies: ['myCookie'],
        allowedHeaders: ['user-agent'],
        allowedSearchParams: ['utm-source'],
      }})],
    });
  • allowed* options now support boolean values on top of lists and regexes. true allows everything, false denies everything.

  • tracesSampleRate and tracesSampler options no longer affect Sentry events. They only affect transactions. If you want to sample sentry events, use sampleRate option. Refer to https://docs.sentry.io/platforms/javascript/configuration/sampling/ for more information.

  • pkg option has been removed.

  • rewriteFrames option has been removed. To migrate, use RewriteFrames integration from @sentry/integrations.

    Before

    import Toucan from 'toucan-js';
    
    const sentry = new Toucan({
      dsn: '...',
      context,
      rewriteFrames: {
        root: '/',
      },
    });

    After

    import { RewriteFrames } from '@sentry/integrations';
    import { Toucan } from 'toucan-js';
    
    const sentry = new Toucan({
      dsn: '...',
      context,
      integrations: [new RewriteFrames({ root: '/' })],
    });