Skip to content

Commit 57f8e3a

Browse files
committed
ref: Introduce @sentry/integrations package
1 parent cf365cf commit 57f8e3a

32 files changed

+384
-38
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ since we removed some methods from the public API and removed some classes from
3030
- **breaking** [utils] ref: Rename `safeNormalize` to `normalize` and rewrite its internals
3131
- **breaking** [utils] ref: Remove `serialize`, `deserialize`, `clone` and `serializeObject` functions
3232
- **breaking** [utils] ref: Rewrite normalization functions by removing most of them and leaving just `normalize` and `normalizeToSize`
33+
- **breaking** [core] ref: Extract all pluggable integrations into a separate `@sentry/integrations` package
34+
- **breaking** [core] ref: Move `extraErrorData` integration to `@sentry/integrations` package
3335
- [core] feat: Add `maxValueLength` option to adjust max string length for values, default is 250.
3436

3537
## 4.6.4

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ publish-npm:
1313
cd packages/browser; npm publish
1414
cd packages/core; npm publish
1515
cd packages/hub; npm publish
16+
cd packages/integrations; npm publish
1617
cd packages/minimal; npm publish
1718
cd packages/node; npm publish
1819
# cd packages/types; npm publish

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ package. Please refer to the README and instructions of those SDKs for more deta
4040
including integrations for React, Angular, Ember, Vue and Backbone
4141
- [`@sentry/node`](https://github.com/getsentry/sentry-javascript/tree/master/packages/node): SDK for Node, including
4242
integrations for Express, Koa, Loopback, Sails and Connect
43+
- [`@sentry/integrations`](https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations): Pluggable
44+
integrations that can be used to enchance JS SDKs
4345
- [`@sentry/electron`](https://github.com/getsentry/sentry-electron): SDK for Electron with support for native crashes
4446
- [`sentry-cordova`](https://github.com/getsentry/sentry-cordova): SDK for Cordova Apps and Ionic with support for
4547
native crashes
@@ -73,15 +75,16 @@ captureMessage('Hello, world!');
7375
```
7476

7577
If you want sentry to be customized for the browsers you want to support use the `esm` build:
78+
7679
```javascript
7780
import { init, captureMessage } from '@sentry/browser/esm';
7881
```
7982

8083
and add it to your babel/... build, if you want to support older browsers
8184

82-
> TIP: You can use [`<script type="module" str="newbrowser.js">` +
83-
`<script nomodule src="oldbrowser.js">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Module_Fallback)
84-
to provide builds for newer and older browsers
85+
> TIP: You can use
86+
> [`<script type="module" str="newbrowser.js">` + `<script nomodule src="oldbrowser.js">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Module_Fallback)
87+
> to provide builds for newer and older browsers
8588
8689
## Other Packages
8790

dangerfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { resolve } from 'path';
55
import tslint from 'danger-plugin-tslint';
66
import { prettyResults } from 'danger-plugin-tslint/dist/prettyResults';
77

8-
const packages = ['browser', 'core', 'hub', 'minimal', 'node', 'types', 'utils'];
8+
const packages = ['browser', 'core', 'hub', 'integrations', 'minimal', 'node', 'types', 'utils'];
99

1010
export default async () => {
1111
if (!danger.github) {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"packages/browser",
1717
"packages/core",
1818
"packages/hub",
19+
"packages/integrations",
1920
"packages/minimal",
2021
"packages/node",
2122
"packages/types",

packages/browser/src/integrations/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,3 @@ export { TryCatch } from './trycatch';
33
export { Breadcrumbs } from './breadcrumbs';
44
export { LinkedErrors } from './linkederrors';
55
export { UserAgent } from './useragent';
6-
7-
export { Ember } from './pluggable/ember';
8-
export { Vue } from './pluggable/vue';
9-
export { ReportingObserver } from './pluggable/reportingobserver';

packages/core/src/integrations/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,3 @@ export { Dedupe } from './dedupe';
22
export { FunctionToString } from './functiontostring';
33
export { InboundFilters } from './inboundfilters';
44
export { ExtraErrorData } from './extraerrordata';
5-
6-
export { Debug } from './pluggable/debug';
7-
export { RewriteFrames } from './pluggable/rewriteframes';

packages/integrations/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.js.map
2+
*.d.ts
3+
*.js

packages/integrations/.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
!*.js.map
3+
!*.d.ts
4+
!*.js
5+
!/esm/**/*
6+
jest.config.js

packages/integrations/LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2019, Sentry
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

packages/integrations/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<p align="center">
2+
<a href="https://sentry.io" target="_blank" align="center">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-logo-black.png" width="280">
4+
</a>
5+
<br />
6+
</p>
7+
8+
# Sentry JavaScript SDK Integrations
9+
10+
[![npm version](https://img.shields.io/npm/v/@sentry/integrations.svg)](https://www.npmjs.com/package/@sentry/integrations)
11+
[![npm dm](https://img.shields.io/npm/dm/@sentry/integrations.svg)](https://www.npmjs.com/package/@sentry/integrations)
12+
[![npm dt](https://img.shields.io/npm/dt/@sentry/integrations.svg)](https://www.npmjs.com/package/@sentry/integrations)
13+
[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/)
14+
15+
## Links
16+
17+
- [Official SDK Docs](https://docs.sentry.io/quickstart/)
18+
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
19+
20+
## General
21+
22+
Pluggable integrations that can be used to enchance JS SDKs.

packages/integrations/package-lock.json

Lines changed: 187 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)