Skip to content

Commit 9b0c759

Browse files
Lms24lforst
andauthored
doc(angular): Add Angular migration instructions to migration doc (#4960)
Co-authored-by: Luca Forstner <[email protected]>
1 parent 45f4320 commit 9b0c759

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

MIGRATION.md

+13
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,19 @@ For our efforts to reduce bundle size of the SDK we had to remove and refactor p
123123
`setupBrowserTransport` or `setupNodeTransport` for default transports, depending on your requirements.
124124
- Remove support for Opera browser pre v15
125125

126+
## Sentry Angular SDK Changes
127+
128+
The Sentry Angular SDK (`@sentry/angular`) is now compiled with the Angular compiler (see [#4641](https://github.com/getsentry/sentry-javascript/pull/4641)). This change was necessary to fix a long-lasting bug in the SDK (see [#3282](https://github.com/getsentry/sentry-javascript/issues/3282)): `TraceDirective` and `TraceModule` can now be used again without risking an application compiler error or having to disable AOT compilation.
129+
130+
### Angular Version Compatibility
131+
132+
Given the forward compatibility of the Angular compiler, v7 of our SDK will only work with Angular 10 and above. Previously, it was possible to use the SDK with versions <10, although we officially only supported Angular 10-13 as peer dependencies. If you are using Angular <10 in your project, we recommend staying on the latest 6.x version until you can upgrade your Angular version.
133+
134+
### Import Changes
135+
136+
Due to the compiler change, our NPM package structure changed as well as it now conforms to the [Angular Package Format v10](https://docs.google.com/document/d/1uh2D6XqaGh2yjjXwfF4SrJqWl1MBhMPntlNBBsk6rbw/edit).
137+
In case you're importing from specific paths other than `@sentry/angular` you will have to adjust these paths. As an example, `import ... from '@sentry/angular/esm/injex.js'` should be changed to `import ... from '@sentry/angular/esm2015/index.js'`. Generally, we strongly recommend only importing from `@sentry/angular`.
138+
126139
# Upgrading from 6.17.x to 6.18.0
127140

128141
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.

packages/angular/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
- [Official SDK Docs](https://docs.sentry.io/platforms/javascript/angular/)
1313
- [TypeDoc](http://getsentry.github.io/sentry-javascript/)
1414

15+
## Angular Version Compatibility
16+
17+
For Angular 10-13 use the latest version of the Sentry Angular SDK. In case
18+
you are using an Angular 9 or earlier, use version 6.x of the SDK as newer versions do not support Angular <10.
19+
1520
## General
1621

1722
This package is a wrapper around `@sentry/browser`, with added functionality related to Angular. All methods available

0 commit comments

Comments
 (0)