Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
97e6ff3
[v7] feat: Remove references to @sentry/apm (#4845)
AbhiPrasad Apr 7, 2022
57d37c2
[v7] feat(core): Delete API class (#4848)
AbhiPrasad Apr 7, 2022
424df27
[v7] feat: Delete deprecated `startSpan` and `child` methods (#4849)
AbhiPrasad Apr 7, 2022
5a7f145
feat(core): Remove whitelistUrls/blacklistUrls (#4850)
AbhiPrasad Apr 7, 2022
f855260
feat(gatsby): Remove Sentry from window (#4857)
AbhiPrasad Apr 7, 2022
f1e9da2
feat(hub): Remove getActiveDomain (#4858)
AbhiPrasad Apr 7, 2022
55b0570
feat(types): Remove deprecated user dsn field (#4864)
AbhiPrasad Apr 7, 2022
2fc13c6
feat(hub): Remove setTransaction scope method (#4865)
AbhiPrasad Apr 7, 2022
20c7773
[v7] feat: Drop support for Node 6 (#4851)
AbhiPrasad Apr 7, 2022
244eb0e
[v7] feat(tracing): Rename registerRequestInstrumentation -> instrume…
AbhiPrasad Apr 7, 2022
285ca26
fix(test): Increase MongoMemoryServer creation timeout (#4881)
Lms24 Apr 7, 2022
fb1b74f
[v7] feat(node): Remove deprecated `frameContextLines` (#4884)
timfish Apr 7, 2022
81b10fb
[v7] feat(browser): Remove top level eventbuilder exports (#4887)
timfish Apr 7, 2022
a0792da
Merge branch '7.x' of https://github.com/getsentry/sentry-javascript …
timfish Apr 8, 2022
79084f2
Mostly working
timfish Apr 8, 2022
52047b6
Lint
timfish Apr 8, 2022
14a10dc
make generic across all javascript
timfish Apr 8, 2022
dc765c7
Merge remote-tracking branch 'upstream/7.x' into v7/configurable-stac…
timfish Apr 8, 2022
0988600
Fix build
timfish Apr 8, 2022
c6e8a60
export nodeStackParser
timfish Apr 8, 2022
03b5d5c
Fix test
timfish Apr 8, 2022
7943990
Merge 'upstream/7.x' into v7/configurable-stack-parser
timfish Apr 12, 2022
623fcfd
Fix tests from bad merge
timfish Apr 12, 2022
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
Prev Previous commit
Next Next commit
Merge 'upstream/7.x' into v7/configurable-stack-parser
  • Loading branch information
timfish committed Apr 12, 2022
commit 79439908000f9c14cc424b60d8e1dea4eb0bb927
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ jobs:
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Check dependency cache
uses: actions/cache@v2
with:
Expand Down
3 changes: 0 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
// this runs one test at a time, rather than running them in parallel (necessary for debugging so that you know
// you're hitting a single test's breakpoints, in order)
"--runInBand",
// TODO: when we unify jest config, we may need to change this
"--config",
"${workspaceFolder}/packages/${input:getPackageName}/package.json",
// coverage messes up the source maps
"--coverage",
"false",
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@

- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott

## 7.0.0-alpha.0

- **breaking** feat: Drop support for Node 6 (#4851)
- **breaking** feat: Remove references to @sentry/apm (#4845)
- **breaking** feat: Delete deprecated startSpan and child methods (#4849)
- **breaking** feat(bundles): Stop publishing CDN bundles on npm (#4901)
- **breaking** ref(build): Rename dist directories to cjs (#4900)
- **breaking** ref(build): Update to TypeScript 3.8.3 (#4895)
- **breaking** feat(browser): Remove top level eventbuilder exports (#4887)
- **breaking** feat(core): Delete API class (#4848)
- **breaking** feat(core): Remove whitelistUrls/blacklistUrls (#4850)
- **breaking** feat(gatsby): Remove Sentry from window (#4857)
- **breaking** feat(hub): Remove getActiveDomain (#4858)
- **breaking** feat(hub): Remove setTransaction scope method (#4865)
- **breaking** feat(integrations): Remove old angular, ember, and vue integrations (#4893)
- **breaking** feat(node): Remove deprecated frameContextLines (#4884)
- **breaking** feat(tracing): Rename registerRequestInstrumentation -> instrumentOutgoingRequests (#4859)
- **breaking** feat(types): Remove deprecated user dsn field (#4864)
- **breaking** feat(types): Delete RequestSessionStatus enum (#4889)
- **breaking** feat(types): Delete Status enum (#4891)
- **breaking** feat(types): Delete SessionStatus enum (#4890)

## 6.19.6

- fix(typing): Fix typing API in CaptureConsle (#4879)
Expand Down
94 changes: 94 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,97 @@
## Upgrading from 6.x to 7.x

The main goal of version 7 is to reduce bundle size. This version is breaking because we removed deprecated APIs, upgraded our build tooling, and restructured npm package contents.
Below we will outline all the breaking changes you should consider when upgrading.

### Dropping Support for Node.js v6

Node.js version 6 has reached end of life in April 2019. For Sentry JavaScript SDK version 7, we will no longer be supporting version 6 of Node.js.

As far as SDK development goes, dropping support means no longer running integration tests for Node.js version 6, and also no longer handling edge cases specific to version 6.
Running the new SDK version on Node.js v6 is therefore highly discouraged.

### Removal Of Old Platform Integrations From `@sentry/integrations` Package

The following classes will be removed from the `@sentry/integrations` package and can no longer be used:

- `Angular`
- `Ember`
- `Vue`

These classes have been superseded and were moved into their own packages, `@sentry/angular`, `@sentry/ember`, and `@sentry/vue` in a previous version.
Refer to those packages if you want to integrate Sentry into your Angular, Ember, or Vue application.

### Moving To ES6 For CommonJS Files

From version 7 onwards, the CommonJS files in Sentry JavaScript SDK packages will use ES6.

If you need to support Internet Explorer 11 or old Node.js versions, we recommend using a preprocessing tool like [Babel](https://babeljs.io/) to convert Sentry packages to ES5.

### Renaming Of CDN Bundles

CDN bundles will be ES6 by default. Files that followed the naming scheme `bundle.es6.min.js` were renamed to `bundle.min.js` and any bundles using ES5 (files without `.es6`) turned into `bundle.es5.min.js`.

See our [docs on CDN bundles](https://docs.sentry.io/platforms/javascript/install/cdn/) for more information.

### Restructuring Of Package Content

Up until v6.x, we have published our packages on npm with the following structure:

- `build` folder contained CDN bundles
- `dist` folder contained CommonJS files and TypeScript declarations
- `esm` folder contained ESM files and TypeScript declarations

Moving forward the JavaScript SDK packages will generally have the following structure:

- `cjs` folder contains CommonJS files
- `esm` folder contains ESM files
- `types` folder contains TypeScript declarations

**CDN bundles of version 7 or higher will no longer be distributed through our npm package.**
This means that most third-party CDNs like [unpkg](https://unpkg.com/) or [jsDelivr](https://www.jsdelivr.com/) will also not provide them.

If you depend on any specific files in a Sentry JavaScript npm package, you will most likely need to update their references.
For example, imports on `@sentry/browser/dist/client` will become `@sentry/browser/cjs/client`.
However, directly importing from specific files is discouraged.

### Removing the `API` class from `@sentry/core`

The internal `API` class was removed in favor of the `initAPIDetails` function and the `APIDetails` type. More details can be found in the [PR that deprecated this class](https://github.com/getsentry/sentry-javascript/pull/4281). To migrate, see the following example.

```js
// New in v7:
import {
initAPIDetails,
getEnvelopeEndpointWithUrlEncodedAuth,
getStoreEndpointWithUrlEncodedAuth,
} from '@sentry/core';

const dsn = initAPIDetails(dsn, metadata, tunnel);
const dsn = api.dsn;
const storeEndpoint = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);
const envelopeEndpoint = getStoreEndpointWithUrlEncodedAuth(api.dsn);

// Before:
import { API } from '@sentry/core';

const api = new API(dsn, metadata, tunnel);
const dsn = api.getDsn();
const storeEndpoint = api.getStoreEndpointWithUrlEncodedAuth();
const envelopeEndpoint = api.getEnvelopeEndpointWithUrlEncodedAuth();
```

### General API Changes

For our efforts to reduce bundle size of the SDK we had to remove and refactor parts of the package which introduced a few changes to the API:

- Remove support for deprecated `@sentry/apm` package. `@sentry/tracing` should be used instead.
- Remove deprecated `user` field from DSN. `publicKey` should be used instead.
- Remove deprecated `whitelistUrls` and `blacklistUrls` options from `Sentry.init`. They have been superseded by `allowUrls` and `denyUrls` specifically. See [our docs page on inclusive language](https://develop.sentry.dev/inclusion/) for more details.
- Gatsby SDK: Remove `Sentry` from `window` object.
- Remove deprecated `Status`, `SessionStatus`, and `RequestSessionStatus` enums. These were only part of an internal API. If you are using these enums, we encourage you to to look at [b177690d](https://github.com/getsentry/sentry-javascript/commit/b177690d89640aef2587039113c614672c07d2be), [5fc3147d](https://github.com/getsentry/sentry-javascript/commit/5fc3147dfaaf1a856d5923e4ba409479e87273be), and [f99bdd16](https://github.com/getsentry/sentry-javascript/commit/f99bdd16539bf6fac14eccf1a974a4988d586b28) to to see the changes we've made to our code as result. We generally recommend using string literals instead of the removed enums.
- Remove deprecated `getActiveDomain` method and `DomainAsCarrier` type from `@sentry/hub`.
- Rename `registerRequestInstrumentation` to `instrumentOutgoingRequests` in `@sentry/tracing`.

# Upgrading from 6.17.x to 6.18.0

Version 6.18.0 deprecates the `frameContextLines` top-level option for the Node SDK. This option will be removed in an upcoming major version. To migrate off of the top-level option, pass it instead to the new `ContextLines` integration.
Expand Down
18 changes: 18 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
rootDir: process.cwd(),
collectCoverage: true,
transform: {
'^.+\\.ts$': 'ts-jest',
'^.+\\.tsx$': 'ts-jest',
},
coverageDirectory: '<rootDir>/coverage',
moduleFileExtensions: ['js', 'ts', 'tsx'],
testMatch: ['<rootDir>/**/*.test.ts', '<rootDir>/**/*.test.tsx'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.test.json',
diagnostics: false,
},
},
testPathIgnorePatterns: ['<rootDir>/build/', '<rootDir>/node_modules/'],
};
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": "6.19.6",
"version": "7.0.0-alpha.0",
"packages": "packages/*",
"npmClient": "yarn",
"useWorkspaces": true
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,17 @@
"@strictsoftware/typedoc-plugin-monorepo": "^0.3.1",
"@types/chai": "^4.1.3",
"@types/jest": "^24.0.11",
"@types/jsdom": "^16.2.3",
"@types/mocha": "^5.2.0",
"@types/node": "~10.17.0",
"@types/sinon": "^7.0.11",
"chai": "^4.1.2",
"codecov": "^3.6.5",
"deepmerge": "^4.2.2",
"eslint": "7.32.0",
"jest": "^24.9.0",
"jest": "^27.5.1",
"jest-environment-node": "^27.5.1",
"jsdom": "^19.0.0",
"karma-browserstack-launcher": "^1.5.1",
"karma-firefox-launcher": "^1.1.0",
"lerna": "3.13.4",
Expand All @@ -85,15 +88,14 @@
"rollup-plugin-typescript2": "^0.31.2",
"sinon": "^7.3.2",
"size-limit": "^4.5.5",
"ts-jest": "^24.3.0",
"ts-jest": "^27.1.4",
"ts-node": "^8.10.2",
"tslib": "^2.3.1",
"typedoc": "^0.18.0",
"typescript": "3.8.3"
},
"resolutions": {
"**/agent-base": "5",
"**/jest-environment-node": "24"
"**/agent-base": "5"
},
"version": "0.0.0",
"dependencies": {}
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular",
"version": "6.19.6",
"version": "7.0.0-alpha.0",
"description": "Official Sentry SDK for Angular",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
Expand All @@ -21,9 +21,9 @@
"@angular/router": "10.x || 11.x || 12.x || 13.x"
},
"dependencies": {
"@sentry/browser": "6.19.6",
"@sentry/types": "6.19.6",
"@sentry/utils": "6.19.6",
"@sentry/browser": "7.0.0-alpha.0",
"@sentry/types": "7.0.0-alpha.0",
"@sentry/utils": "7.0.0-alpha.0",
"rxjs": "^6.6.0",
"tslib": "^1.9.3"
},
Expand Down
7 changes: 7 additions & 0 deletions packages/browser/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const baseConfig = require('../../jest.config.js');

module.exports = {
...baseConfig,
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/test/unit/**/*.test.ts'],
};
13 changes: 6 additions & 7 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/browser",
"version": "6.19.6",
"version": "7.0.0-alpha.0",
"description": "Official Sentry SDK for browsers",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
Expand All @@ -16,17 +16,16 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "6.19.6",
"@sentry/types": "6.19.6",
"@sentry/utils": "6.19.6",
"@sentry/core": "7.0.0-alpha.0",
"@sentry/types": "7.0.0-alpha.0",
"@sentry/utils": "7.0.0-alpha.0",
"tslib": "^1.9.3"
},
"devDependencies": {
"@types/md5": "2.1.33",
"btoa": "^1.2.1",
"chai": "^4.1.2",
"chokidar": "^3.0.2",
"jsdom": "^15.0.0",
"karma": "^6.3.16",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.2.0",
Expand Down Expand Up @@ -72,11 +71,11 @@
"size:check:es5": "cat build/bundles/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES5: \",$1,\"kB\";}'",
"size:check:es6": "cat build/bundles/bundle.es6.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES6: \",$1,\"kB\";}'",
"test": "run-s test:unit",
"test:unit": "jest --config test/unit/jest.config.js",
"test:unit": "jest",
"test:integration": "test/integration/run.js",
"test:integration:checkbrowsers": "node scripts/checkbrowsers.js",
"test:package": "node test/package/npm-build.js && rm test/package/tmp.js",
"test:unit:watch": "jest --config test/unit/jest.config.js --watch",
"test:unit:watch": "jest --watch",
"test:integration:watch": "test/integration/run.js --watch"
},
"volta": {
Expand Down
87 changes: 0 additions & 87 deletions packages/browser/src/backend.ts

This file was deleted.

Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.