Skip to content

v5.0.0 #1919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 54 commits into from
Mar 20, 2019
Merged

v5.0.0 #1919

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7e378da
fix: Events created from exception shouldnt have top-level message at…
kamilogorek Jan 31, 2019
43bf5c3
feat: Use SyncPromise internally, remove deprecated and some public A…
HazAT Feb 8, 2019
ff26781
ref: Remove install function from client and backend (#1888)
HazAT Feb 13, 2019
8b61b89
build: Add major branches to travis.yml config
HazAT Feb 15, 2019
633e943
ref: Move public interfaces to @sentry/types package (#1889)
HazAT Feb 18, 2019
f383ed5
build: Update all dependencies
HazAT Feb 18, 2019
a62e6e3
fix: License file to be the same as in package.json
HazAT Feb 18, 2019
292bc80
ref: Major @sentry/utils rewrite (#1902)
kamilogorek Feb 19, 2019
42b6cd6
feat: Disable client once flushed (#1904)
kamilogorek Feb 19, 2019
bacc195
feat: Add maxValueLength option (#1928)
HazAT Feb 26, 2019
d543164
ref: Introduce @sentry/integrations package
kamilogorek Feb 19, 2019
70ae635
feat: AngularJS integration
kamilogorek Feb 20, 2019
787d1f1
misc: Add package-lock from separate packages to gitignore
kamilogorek Feb 21, 2019
ec96e01
ref: Remove lsmod dependency
kamilogorek Feb 21, 2019
c02ea81
ref: Move extraErrorData from @sentry/core to @sentry/integrations
kamilogorek Feb 26, 2019
a5661c7
prepare: 5.0.0-beta0
kamilogorek Feb 26, 2019
ed5c49a
feat: Remove esm rewrite script, expose module in package.json (#1930)
HazAT Feb 26, 2019
0c081ef
feat: New setters for scope data (#1934)
HazAT Feb 28, 2019
f708d7e
feat: New setters for scope data (#1934)
HazAT Feb 28, 2019
9a5798c
feat: Add synthetic to mechanism
HazAT Feb 27, 2019
380e611
feat: Move mechanism to exception
HazAT Feb 27, 2019
6cb4c42
fix: Use addExceptionTypeValue in helpers
HazAT Feb 27, 2019
c45190b
build: Use terser instead of uglify
kamilogorek Feb 27, 2019
bccd339
build: Use es6 target instead of esnext for ESM builds
kamilogorek Feb 27, 2019
80828de
ref: Remove unused TraceKit code
kamilogorek Feb 27, 2019
0a743c8
ref: Minor changes related to bundle size
kamilogorek Feb 27, 2019
53f33b6
feat: Prefix all private methods with _
HazAT Feb 28, 2019
c287c34
misc: Bundle size reduction changelog
kamilogorek Mar 1, 2019
56eb24e
ref: Change Scope code
HazAT Mar 1, 2019
343957c
fix: Travis
HazAT Mar 1, 2019
dc103cb
feat: Add lint rule for private
HazAT Feb 28, 2019
e4ff9fd
feat: Make more private + fix integration tests with synthetic
HazAT Feb 28, 2019
98298af
fix: Scope
HazAT Mar 1, 2019
ad32957
feat: Pimp travis
HazAT Mar 1, 2019
7465984
ci: Travis re-add branches
HazAT Mar 1, 2019
e94e552
ci: Travis
HazAT Mar 1, 2019
79d2bab
feat: Remove rollup plugins
HazAT Mar 1, 2019
08bd1c3
fix: Build for browser
HazAT Mar 2, 2019
13df582
feat: Add es6 bundle
HazAT Mar 4, 2019
367b99e
@sentry/opentracing (#1918)
HazAT Mar 6, 2019
7907a8c
ref: Dedupe is now optional, Fix integration build
HazAT Mar 6, 2019
513e6aa
fix: Typo
HazAT Mar 7, 2019
5f7d02f
feat: Set synthetic true
HazAT Mar 12, 2019
ff407da
feat: Export integrations on Sentry.Integrations
HazAT Mar 13, 2019
8b5fc5a
feat: Update all deps + tslint
HazAT Mar 14, 2019
c4c3c60
fix: Integration tests on windows
HazAT Mar 14, 2019
5ee84b3
fix: Remove strict 40 char limit on serializeValue
HazAT Mar 18, 2019
482b4da
fix: Async client calls were not captured by flush
HazAT Mar 19, 2019
f08c339
fix: Make OnUncaughtException consider global options
HazAT Mar 19, 2019
e22afa2
feat: Use generic for getClient on hub
HazAT Mar 19, 2019
4962c1d
fix: Build error
HazAT Mar 19, 2019
8f8ca5e
ref: Changelog and Readme
HazAT Mar 19, 2019
d0247dc
fix: Danger
HazAT Mar 19, 2019
6755a66
Fix: Correctly parse stack with braces in path (#1948)
timfish Mar 20, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# dependencies
node_modules/
packages/*/package-lock.json

# build and test
build/
packages/*/dist/
/packages/*/esm
packages/*/esm/
coverage/
scratch/
*.pyc
Expand All @@ -31,3 +32,4 @@ lint-results.json

# legacy
!/packages/raven-js/dist
tmp.js
47 changes: 31 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ branches:
only:
- master
- /^release\/.+$/
- /^major\/.+$/
- 4.x

install: true
sudo: required
Expand All @@ -17,14 +19,17 @@ cache:
directories:
- node_modules

stages:
- Test
- Saucelabs
- Deploy

jobs:
include:
- name: '@sentry/packages - build + lint + test + codecov + danger [node v8]'
- stage: Test
name: '@sentry/packages - build + lint + test + codecov + danger [node v8]'
node_js: '8'
script: scripts/danger.sh
- name: '@sentry/packages - pack and zeus upload'
node_js: '8'
script: scripts/pack-and-upload.sh || [[ ! "$TRAVIS_BRANCH" =~ ^release/ ]]
- name: '@sentry/packages - build and test [node v6]'
node_js: '6'
script: scripts/test.sh
Expand All @@ -37,30 +42,40 @@ jobs:
chrome: stable
firefox: latest
script: scripts/browser-integration.sh
- name: '@sentry/browser - SauceLabs tests'
if: fork = false
node_js: '8'
addons:
sauce_connect: true
script: scripts/browser-saucelabs.sh
- name: 'raven-js - unit and integration tests'
node_js: '8'
addons:
chrome: stable
firefox: latest
script: scripts/raven-js.sh
- name: 'raven-node [node v4]'
if: branch = 4.x
node_js: '4'
script: scripts/raven-node.sh
- name: 'raven-node [node v6]'
if: branch = 4.x
node_js: '6'
script: scripts/raven-node.sh
- name: 'raven-node [node v8]'
if: branch = 4.x
node_js: '8'
script: scripts/raven-node.sh
- name: 'raven-node [node v10]'
if: branch = 4.x
node_js: '10'
script: scripts/raven-node.sh
- name: 'raven-js - unit and integration tests'
if: branch = 4.x
node_js: '8'
addons:
chrome: stable
firefox: latest
script: scripts/raven-js.sh
- stage: Saucelabs
name: '@sentry/browser - SauceLabs tests'
if: fork = false
node_js: '8'
addons:
sauce_connect: true
script: scripts/browser-saucelabs.sh
- stage: Deploy
name: '@sentry/packages - pack and zeus upload'
node_js: '8'
script: scripts/pack-and-upload.sh || [[ ! "$TRAVIS_BRANCH" =~ ^release/ ]]

notifications:
webhooks:
Expand Down
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,51 @@
# Changelog

## Unreleased
## 5.0.0-beta1

### Migration from v4

This major bump brings a lot of internal improvements. If you were using the SDK without any special abilities,
basically, the way we describe it in the docs, you should be fine by just updating it. This is a **breaking** release
since we removed some methods from the public API and removed some classes from the default export.

- **breaking** [node] fix: Events created from exception shouldn't have top-level message attribute
- [utils] ref: Update wrap method to hide internal sentry flags
- [utils] fix: Make internal Sentry flags non-enumerable in fill utils
- [utils] ref: Move `SentryError` + `PromiseBuffer` to utils
- **breaking** [core] ref: Use `SyncPromise` internally, this reduces memory pressure by a lot.
- **breaking** [browser] ref: Removed `BrowserBackend` from default export.
- **breaking** [node] ref: Removed `BrowserBackend` from default export.
- **breaking** [core] feat: Disable client once flushed using `close` method
- ref: Move internal `ExtendedError` to a types package
- **breaking** [core] ref: Pass `Event` to `sendEvent` instead of already stringified data
- [utils] feat: Introduce `isSyntheticEvent` util
- **breaking** [utils] ref: remove `isArray` util in favor of `Array.isArray`
- **breaking** [utils] ref: Remove `isNaN` util in favor of `Number.isNaN`
- **breaking** [utils] ref: Remove `isFunction` util in favor of `typeof === 'function'`
- **breaking** [utils] ref: Remove `isUndefined` util in favor of `=== void 0`
- **breaking** [utils] ref: Remove `assign` util in favor of `Object.assign`
- **breaking** [utils] ref: Remove `includes` util in favor of native `includes`
- **breaking** [utils] ref: Rename `serializeKeysToEventMessage` to `keysToEventMessage`
- **breaking** [utils] ref: Rename `limitObjectDepthToSize` to `normalizeToSize` and rewrite its internals
- **breaking** [utils] ref: Rename `safeNormalize` to `normalize` and rewrite its internals
- **breaking** [utils] ref: Remove `serialize`, `deserialize`, `clone` and `serializeObject` functions
- **breaking** [utils] ref: Rewrite normalization functions by removing most of them and leaving just `normalize` and
`normalizeToSize`
- **breaking** [core] ref: Extract all pluggable integrations into a separate `@sentry/integrations` package
- **breaking** [core] ref: Move `extraErrorData` integration to `@sentry/integrations` package
- [core] feat: Add `maxValueLength` option to adjust max string length for values, default is 250.
- [hub] feat: Introduce `setExtras`, `setTags`, `clearBreadcrumbs`.
- **breaking** [all] feat: Move `Mechanism` to `Exception`
- [browser/node] feat: Add `synthetic` to `Mechanism` in exception.
- [browser/node] fix: Use `addExceptionTypeValue` in helpers
- [browser] ref: Remove unused TraceKit code
- **breaking** [all] build: Expose `module` in `package.json` as entry point for esm builds.
- **breaking** [all] build: Use `es6` target instead of esnext for ESM builds
- [all] feat: Prefix all private methods with `_`
- [all] build: Use terser instead of uglify
- [opentracing] feat: Introduce `@sentry/opentracing` providing functions to attach opentracing data to Sentry Events
- **breaking** [core] ref: `Dedupe` Integration is now optional, it is no longer enabled by default.
- **breaking** [core] ref: Removed default client fingerprinting for messages

## 4.6.4

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ publish-npm:
cd packages/browser; npm publish
cd packages/core; npm publish
cd packages/hub; npm publish
cd packages/integrations; npm publish
cd packages/minimal; npm publish
cd packages/node; npm publish
# cd packages/types; npm publish
Expand Down
6 changes: 0 additions & 6 deletions NOTES.md

This file was deleted.

17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ package. Please refer to the README and instructions of those SDKs for more deta
including integrations for React, Angular, Ember, Vue and Backbone
- [`@sentry/node`](https://github.com/getsentry/sentry-javascript/tree/master/packages/node): SDK for Node, including
integrations for Express, Koa, Loopback, Sails and Connect
- [`@sentry/integrations`](https://github.com/getsentry/sentry-javascript/tree/master/packages/integrations): Pluggable
integrations that can be used to enhance JS SDKs
- [`@sentry/electron`](https://github.com/getsentry/sentry-electron): SDK for Electron with support for native crashes
- [`sentry-cordova`](https://github.com/getsentry/sentry-cordova): SDK for Cordova Apps and Ionic with support for
native crashes
- [`raven-js`](https://github.com/getsentry/sentry-javascript/tree/master/packages/raven-js): Our old stable Javascript
- [`raven-js`](https://github.com/getsentry/sentry-javascript/tree/master/packages/raven-js): Our old stable JavaScript
SDK, we still support and release bug fixes for the SDK but all new features will be implemented in `@sentry/browser`
which is the successor.
- [`raven`](https://github.com/getsentry/sentry-javascript/tree/master/packages/raven-node): Our old stable Node SDK,
Expand Down Expand Up @@ -72,17 +74,6 @@ init({
captureMessage('Hello, world!');
```

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

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

> TIP: You can use [`<script type="module" src="newbrowser.js">` +
`<script nomodule src="oldbrowser.js">`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Module_Fallback)
to provide builds for newer and older browsers

## Other Packages

Besides the high-level SDKs, this repository contains shared packages, helpers and configuration used for SDK
Expand All @@ -93,6 +84,8 @@ below:
JavaScript SDKs with interfaces, type definitions and base classes.
- [`@sentry/utils`](https://github.com/getsentry/sentry-javascript/tree/master/packages/utils): A set of helpers and
utility functions useful for various SDKs.
- [`@sentry/opentracing`](https://github.com/getsentry/sentry-javascript/tree/master/packages/opentracing): OpenTracing
compatible integration that can be used as a pluggable integration for the SDKs.
- [`@sentry/typescript`](https://github.com/getsentry/sentry-javascript/tree/master/packages/typescript): Shared
Typescript compiler and linter options.
- [`@sentry/types`](https://github.com/getsentry/sentry-javascript/tree/master/packages/types): Types used in all
Expand Down
4 changes: 2 additions & 2 deletions dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { resolve } from 'path';
import tslint from 'danger-plugin-tslint';
import { prettyResults } from 'danger-plugin-tslint/dist/prettyResults';

const packages = ['browser', 'core', 'hub', 'minimal', 'node', 'types', 'utils'];
const packages = ['browser', 'core', 'hub', 'integrations', 'opentracing', 'minimal', 'node', 'types', 'utils'];

export default async () => {
if (!danger.github) {
Expand Down Expand Up @@ -48,6 +48,6 @@ export default async () => {

schedule(async () => {
const result = (await promisify(exec)('cd packages/browser; yarn size:check')).stdout;
message(`@sentry/browser gzip'ed minified size: ${result.split('\n')[1]}`);
message(`@sentry/browser bundle gzip'ed minified size: *(${result.split('\n')[4]}) (${result.split('\n')[5]})*`);
});
};
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "3.4.0",
"version": "4.6.4",
"version": "5.0.0-beta0",
"packages": "packages/*",
"ignore": "raven-*",
"npmClient": "yarn",
Expand Down
38 changes: 22 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,54 @@
"build:watch": "lerna run build:watch --stream --no-sort --concurrency 9999",
"clean": "lerna run --stream clean",
"fix": "lerna run --stream --concurrency 1 fix",
"link:yarn": "lerna run --stream --concurrency 1 link:yarn",
"lint": "lerna run --stream --concurrency 1 lint",
"lint:json": "lerna run --stream --concurrency 1 lint:tslint:json",
"test": "lerna run --stream --concurrency 1 --sort test",
"codecov": "codecov"
},
"toolchain": {
"node": "10.15.3",
"yarn": "1.13.0"
},
"workspaces": [
"packages/browser",
"packages/core",
"packages/hub",
"packages/integrations",
"packages/minimal",
"packages/node",
"packages/opentracing",
"packages/types",
"packages/typescript",
"packages/utils"
],
"devDependencies": {
"@google-cloud/storage": "^2.3.1",
"@types/chai": "^4.1.3",
"@types/jest": "^23.3.9",
"@types/jest": "^24.0.11",
"@types/mocha": "^5.2.0",
"@types/node": "^10.0.2",
"@types/node": "^11.11.3",
"@types/raven": "^2.5.1",
"@types/sinon": "^5.0.7",
"@types/sinon": "^7.0.10",
"chai": "^4.1.2",
"codecov": "^3.0.2",
"danger": "^6.1.5",
"danger": "^7.0.14",
"danger-plugin-tslint": "^2.0.0",
"jest": "^23.6.0",
"karma-sinon": "^1.0.5",
"lerna": "3.5.0",
"mocha": "^4.1.0",
"jest": "^24.5.0",
"lerna": "3.13.1",
"mocha": "^6.0.2",
"npm-run-all": "^4.1.2",
"prettier": "^1.14.0",
"prettier-check": "^2.0.0",
"replace-in-file": "^3.4.2",
"rimraf": "^2.6.2",
"sinon": "^7.1.1",
"ts-jest": "^23.10.5",
"tslint": "^5.11.0",
"typedoc": "^0.13.0",
"replace-in-file": "^3.4.4",
"rimraf": "^2.6.3",
"sinon": "^7.2.7",
"ts-jest": "^24.0.0",
"tslint": "^5.14.0",
"typedoc": "^0.14.2",
"typedoc-plugin-monorepo": "^0.1.0",
"typescript": "^3.2.0",
"typescript-tslint-plugin": "^0.2.1"
"typescript": "^3.3.3333",
"typescript-tslint-plugin": "^0.3.1"
}
}
26 changes: 14 additions & 12 deletions packages/browser/LICENSE
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
Copyright (c) 2018 Sentry (https://sentry.io) and individual contributors.
BSD 3-Clause License

Copyright (c) 2019, Sentry
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the Sentry nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Expand Down
Loading