Skip to content

Commit 37f15bc

Browse files
authored
meta: Prepare major release (getsentry#1538)
1 parent 976edc1 commit 37f15bc

File tree

14 files changed

+1096
-438
lines changed

14 files changed

+1096
-438
lines changed

CHANGELOG.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Changelog
2+
3+
## 4.0.0
4+
5+
This is the release of our new SDKs, `@sentry/browser`, `@sentry/node`. While there are too many changes to list for
6+
this release, we will keep a consistent changelog for upcoming new releases. `raven-js` (our legacy JavaScript/Browser
7+
SDK) and `raven` (our legacy Node.js SDK) will still reside in this repo, but they will receive their own changelog.
8+
9+
We generally guide people to use our new SDKs from this point onward. The migration should be straightforward if you
10+
were only using the basic features of our previous SDKs.
11+
12+
`raven-js` and `raven` will both still receive bugfixes but all the new features implemented will only work in the new
13+
SDKs. The new SDKs are completely written in TypeScript, which means all functions, classes and properties are typed.
14+
15+
## Links
16+
17+
- [Official SDK Docs](https://docs.sentry.io/quickstart/)
18+
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
19+
20+
### Migration
21+
22+
Here are some examples of how the new SDKs work. Please note that the API for all JavaScript SDKs is the same.
23+
24+
#### Installation
25+
26+
_Old_:
27+
28+
```js
29+
Raven.config('___PUBLIC_DSN___', {
30+
release: '1.3.0',
31+
}).install();
32+
```
33+
34+
_New_:
35+
36+
```js
37+
Sentry.init({
38+
dsn: '___PUBLIC_DSN___',
39+
release: '1.3.0',
40+
});
41+
```
42+
43+
#### Set a global tag
44+
45+
_Old_:
46+
47+
```js
48+
Raven.setTagsContext({ key: 'value' });
49+
```
50+
51+
_New_:
52+
53+
```js
54+
Sentry.configureScope(scope => {
55+
scope.setTag('key', 'value');
56+
});
57+
```
58+
59+
#### Capture custom exception
60+
61+
_Old_:
62+
63+
```js
64+
try {
65+
throwingFunction();
66+
} catch (e) {
67+
Raven.captureException(e, { extra: { debug: false } });
68+
}
69+
```
70+
71+
_New_:
72+
73+
```js
74+
try {
75+
throwingFunction();
76+
} catch (e) {
77+
Sentry.withScope(scope => {
78+
scope.setExtra('debug', false);
79+
Sentry.captureException(e);
80+
});
81+
}
82+
```
83+
84+
#### Capture a message
85+
86+
_Old_:
87+
88+
```js
89+
Raven.captureMessage('test', 'info', { extra: { debug: false } });
90+
```
91+
92+
_New_:
93+
94+
```js
95+
Sentry.withScope(scope => {
96+
scope.setExtra('debug', false);
97+
Sentry.captureMessage('test', 'info');
98+
});
99+
```
100+
101+
#### Breadcrumbs
102+
103+
_Old_:
104+
105+
```js
106+
Raven.captureBreadcrumb({
107+
message: 'Item added to shopping cart',
108+
category: 'action',
109+
data: {
110+
isbn: '978-1617290541',
111+
cartSize: '3',
112+
},
113+
});
114+
```
115+
116+
_New_:
117+
118+
```js
119+
Sentry.addBreadcrumb({
120+
message: 'Item added to shopping cart',
121+
category: 'action',
122+
data: {
123+
isbn: '978-1617290541',
124+
cartSize: '3',
125+
},
126+
});
127+
```

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,14 @@ publish:
2020
publish-cdn:
2121
node scripts/browser-upload-cdn.js
2222

23+
publish-docs:
24+
node ./node_modules/.bin/typedoc --options ./typedoc.js
25+
rm -rf /tmp/sentry-js-docs | true
26+
cp -r ./docs /tmp/sentry-js-docs
27+
git checkout gh-pages
28+
cp -r /tmp/sentry-js-docs/* .
29+
git commit -a -m "meta: Update docs"
30+
git push origin gh-pages
31+
git checkout master
32+
2333
release: bump prepare-release publish publish-cdn

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
[![Build Status](https://travis-ci.com/getsentry/sentry-javascript.svg?branch=master)](https://travis-ci.com/getsentry/sentry-javascript)
99
[![codecov](https://codecov.io/gh/getsentry/sentry-javascript/branch/master/graph/badge.svg)](https://codecov.io/gh/getsentry/sentry-javascript)
1010
[![npm version](https://img.shields.io/npm/v/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core)
11+
[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/)
1112

1213
# Official Sentry SDKs for JavaScript
1314

1415
This is the next line of Sentry JavaScript SDKs, comprised in the `@sentry/` namespace. It will provide a more
1516
convenient interface and improved consistency between various JavaScript environments.
1617

17-
**WARNING:** All of these SDKs are still undergoing active development, so the public interface might change and break
18-
backwards compatibility from time to time.
18+
## Links
19+
20+
- [Official SDK Docs](https://docs.sentry.io/quickstart/)
21+
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
1922

2023
## Contents
2124

@@ -30,21 +33,22 @@ backwards compatibility from time to time.
3033
For each major JavaScript platform, there is a specific high-level SDK that provides all the tools you need in a single
3134
package. Please refer to the README and instructions of those SDKs for more detailed information:
3235

33-
- [`@sentry/hub`](https://github.com/getsentry/raven-js/tree/master/packages/hub): Global state management of SDKs
34-
- [`@sentry/minimal`](https://github.com/getsentry/raven-js/tree/master/packages/minimal): Minimal SDK for library
35-
authors to add Sentry support
36-
- [`@sentry/browser`](https://github.com/getsentry/raven-js/tree/master/packages/browser): SDK for Browsers, including
37-
integrations for React, Angular, Ember, Vue and Backbone
38-
- [`@sentry/node`](https://github.com/getsentry/raven-js/tree/master/packages/node): SDK for Node, including
36+
- [`@sentry/hub`](https://github.com/getsentry/sentry-javascript/tree/master/packages/hub): Global state management of
37+
SDKs
38+
- [`@sentry/minimal`](https://github.com/getsentry/sentry-javascript/tree/master/packages/minimal): Minimal SDK for
39+
library authors to add Sentry support
40+
- [`@sentry/browser`](https://github.com/getsentry/sentry-javascript/tree/master/packages/browser): SDK for Browsers,
41+
including integrations for React, Angular, Ember, Vue and Backbone
42+
- [`@sentry/node`](https://github.com/getsentry/sentry-javascript/tree/master/packages/node): SDK for Node, including
3943
integrations for Express, Koa, Loopback, Sails and Connect
4044
- [`@sentry/electron`](https://github.com/getsentry/sentry-electron): SDK for Electron with support for native crashes
4145
- [`sentry-cordova`](https://github.com/getsentry/sentry-cordova): SDK for Cordova Apps and Ionic with support for
4246
native crashes
43-
- [`raven-js`](https://github.com/getsentry/raven-js/tree/master/packages/raven-js): Our old stable Javascript SDK, we
44-
still support and release bug fixes for the SDK but all new features will be implemented in `@sentry/browser` which is
45-
the successor.
46-
- [`raven`](https://github.com/getsentry/raven-js/tree/master/packages/raven-node): Our old stable Node SDK, same as for
47-
`raven-js` we still support and release bug fixes for the SDK but all new features will be implemented in
47+
- [`raven-js`](https://github.com/getsentry/sentry-javascript/tree/master/packages/raven-js): Our old stable Javascript
48+
SDK, we still support and release bug fixes for the SDK but all new features will be implemented in `@sentry/browser`
49+
which is the successor.
50+
- [`raven`](https://github.com/getsentry/sentry-javascript/tree/master/packages/raven-node): Our old stable Node SDK,
51+
same as for `raven-js` we still support and release bug fixes for the SDK but all new features will be implemented in
4852
`@sentry/node` which is the successor.
4953

5054
## Installation and Usage
@@ -75,15 +79,11 @@ Besides the high-level SDKs, this repository contains shared packages, helpers a
7579
development. If you're thinking about contributing to or creating a JavaScript-based SDK, have a look at the resources
7680
below:
7781

78-
- [`@sentry/core`](https://github.com/getsentry/raven-js/tree/master/packages/core): The base for all JavaScript SDKs
79-
with interfaces, type definitions and base classes.
80-
- [`@sentry/utils`](https://github.com/getsentry/raven-js/tree/master/packages/utils): A set of helpers and utility
81-
functions useful for various SDKs.
82-
- [`@sentry/typescript`](https://github.com/getsentry/raven-js/tree/master/packages/typescript): Shared Typescript
83-
compiler and linter options.
84-
- [`@sentry/types`](https://github.com/getsentry/raven-js/tree/master/packages/types): Types used in all packages.
85-
86-
## Join the Discussion
87-
88-
Join the discussion in our [tracking issue](https://github.com/getsentry/raven-js/issues/1281) and let us know what you
89-
think of the updated interface and new possibilities.
82+
- [`@sentry/core`](https://github.com/getsentry/sentry-javascript/tree/master/packages/core): The base for all
83+
JavaScript SDKs with interfaces, type definitions and base classes.
84+
- [`@sentry/utils`](https://github.com/getsentry/sentry-javascript/tree/master/packages/utils): A set of helpers and
85+
utility functions useful for various SDKs.
86+
- [`@sentry/typescript`](https://github.com/getsentry/sentry-javascript/tree/master/packages/typescript): Shared
87+
Typescript compiler and linter options.
88+
- [`@sentry/types`](https://github.com/getsentry/sentry-javascript/tree/master/packages/types): Types used in all
89+
packages.

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"lerna": "2.11.0",
2+
"lerna": "3.4.0",
33
"version": "4.0.0-rc.2",
44
"packages": "packages/*",
55
"ignore": "raven-*",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"codecov": "^3.0.2",
3232
"jest": "^22.4.3",
3333
"karma-sinon": "^1.0.5",
34-
"lerna": "3.0.0-beta.20",
34+
"lerna": "3.4.0",
3535
"mocha": "^5.1.1",
3636
"npm-run-all": "^4.1.2",
3737
"prettier": "^1.14.0",

packages/browser/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
[![npm version](https://img.shields.io/npm/v/@sentry/browser.svg)](https://www.npmjs.com/package/@sentry/browser)
1111
[![npm dm](https://img.shields.io/npm/dm/@sentry/browser.svg)](https://www.npmjs.com/package/@sentry/browser)
1212
[![npm dt](https://img.shields.io/npm/dt/@sentry/browser.svg)](https://www.npmjs.com/package/@sentry/browser)
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/)
1319

1420
## Usage
1521

packages/core/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
[![npm version](https://img.shields.io/npm/v/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core)
1111
[![npm dm](https://img.shields.io/npm/dm/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core)
1212
[![npm dt](https://img.shields.io/npm/dt/@sentry/core.svg)](https://www.npmjs.com/package/@sentry/core)
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
1321

1422
This package contains interface definitions, base classes and utilities for building Sentry JavaScript SDKs, like
1523
`@sentry/node` or `@sentry/browser`.

packages/hub/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@
1010
[![npm version](https://img.shields.io/npm/v/@sentry/hub.svg)](https://www.npmjs.com/package/@sentry/hub)
1111
[![npm dm](https://img.shields.io/npm/dm/@sentry/hub.svg)](https://www.npmjs.com/package/@sentry/hub)
1212
[![npm dt](https://img.shields.io/npm/dt/@sentry/hub.svg)](https://www.npmjs.com/package/@sentry/hub)
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+
This package provides the `Hub` and `Scope` for all JavaScript related SDKs.

packages/minimal/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
[![npm version](https://img.shields.io/npm/v/@sentry/minimal.svg)](https://www.npmjs.com/package/@sentry/minimal)
1111
[![npm dm](https://img.shields.io/npm/dm/@sentry/minimal.svg)](https://www.npmjs.com/package/@sentry/minimal)
1212
[![npm dt](https://img.shields.io/npm/dt/@sentry/minimal.svg)](https://www.npmjs.com/package/@sentry/minimal)
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
1321

1422
A minimal Sentry SDK that uses a configured client when embedded into an application. It allows library authors add
1523
support for a Sentry SDK without having to bundle the entire SDK or being dependent on a specific platform. If the user

packages/node/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
[![npm version](https://img.shields.io/npm/v/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node)
1111
[![npm dm](https://img.shields.io/npm/dm/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node)
1212
[![npm dt](https://img.shields.io/npm/dt/@sentry/node.svg)](https://www.npmjs.com/package/@sentry/node)
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/)
1319

1420
## Usage
1521

packages/types/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,13 @@
1010
[![npm version](https://img.shields.io/npm/v/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types)
1111
[![npm dm](https://img.shields.io/npm/dm/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types)
1212
[![npm dt](https://img.shields.io/npm/dt/@sentry/types.svg)](https://www.npmjs.com/package/@sentry/types)
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
1321

1422
Common types used by the Sentry JavaScript SDKs.

packages/typescript/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
[![npm dm](https://img.shields.io/npm/dm/@sentry/typescript.svg)](https://www.npmjs.com/package/@sentry/typescript)
1212
[![npm dt](https://img.shields.io/npm/dt/@sentry/typescript.svg)](https://www.npmjs.com/package/@sentry/typescript)
1313

14+
[![typedoc](https://img.shields.io/badge/docs-typedoc-blue.svg)](http://getsentry.github.io/sentry-javascript/)
15+
16+
## Links
17+
18+
- [Official SDK Docs](https://docs.sentry.io/quickstart/)
19+
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
20+
21+
## General
22+
1423
Shared typescript configuration used at Sentry.
1524

1625
## Installation

packages/utils/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,13 @@
1010
[![npm version](https://img.shields.io/npm/v/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils)
1111
[![npm dm](https://img.shields.io/npm/dm/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils)
1212
[![npm dt](https://img.shields.io/npm/dt/@sentry/utils.svg)](https://www.npmjs.com/package/@sentry/utils)
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
1321

1422
Common utilities used by the Sentry JavaScript SDKs. **Warning, only submodule imports are allowed here.**

0 commit comments

Comments
 (0)