Skip to content

Commit

Permalink
fix(deps): update sentry sdk to ^7.47.0 (#552)
Browse files Browse the repository at this point in the history
NOTE: The `@sentry/tracing` package is deprecated and does not need to be installed regardless whether tracing functionality is used or not.
  • Loading branch information
rchl authored Apr 11, 2023
1 parent 5d9e00c commit 30c1a97
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 91 deletions.
1 change: 0 additions & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default defineBuildConfig({
'@sentry/cli',
'@sentry/core',
'@sentry/node',
'@sentry/tracing',
'@sentry/types',
'@sentry/webpack-plugin',
'consola',
Expand Down
2 changes: 1 addition & 1 deletion docs/content/en/guide/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Sentry SDK dependencies updated from v6 to v7. Please read about breaking change

Some of the breaking changes listed in that document are automatically handled by the module and don't need any action. Other notable changes that might require action are:

- When using the `tracing` option, the `@sentry/tracing` dependency needs to be upgraded from v6.x to v7.x.
- The `@sentry/tracing` dependency should be uninstalled, regardless whether `tracing` option is used or not.
- The `whitelistUrls` and `blacklistUrls` Sentry `config` (or `clientConfig` / `serverConfig`) options have been renamed to `allowUrls` and `denyUrls`.
- The `Vue` integration was removed as is now merged into the Sentry Browser SDK. If you have been passing custom `Vue` options through the `clientIntegrations.Vue` object then those can now be merged directly into the `clientConfig` option (without the parent `Vue` key).
- The `UserAgent` integration was renamed to `HttpContext`. If you have been passing custom configuration to that integration through `clientIntegrations` option then you should rename the key.
2 changes: 1 addition & 1 deletion docs/content/en/guide/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ In Typescript or type-checked JavaScript projects, add `@nuxtjs/sentry` to the `

<alert type="info">

The otherwise optional packages `@sentry/tracing` and `@sentry/webpack-plugin` have to be installed for types to be fully working.
The otherwise optional package `@sentry/webpack-plugin` has to be installed for types to be fully working.

If not using the relevant functionality (`tracing` and `publishRelease` options are not enabled) then those packages can be installed as dev-only dependencies.

Expand Down
6 changes: 0 additions & 6 deletions docs/content/en/sentry/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,6 @@ export default function () {
- Type: `Boolean` or `Object`
- Default: `false`
<alert type="info">
`@sentry/tracing@7` (version 7) should be installed manually when using this option.
</alert>
- Enables Sentry Performance Monitoring on the [server](https://docs.sentry.io/platforms/node/performance/) and [browser](https://docs.sentry.io/platforms/javascript/guides/vue/performance/) side.
- Takes the following object configuration format (default values shown):
```js
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
}
},
"dependencies": {
"@sentry/integrations": "^7.45.0",
"@sentry/node": "^7.45.0",
"@sentry/utils": "^7.45.0",
"@sentry/vue": "^7.45.0",
"@sentry/integrations": "^7.47.0",
"@sentry/node": "^7.47.0",
"@sentry/utils": "^7.47.0",
"@sentry/vue": "^7.47.0",
"consola": "^2.0.0",
"defu": "^6.0.0",
"hash-sum": "^2.0.0",
Expand All @@ -77,7 +77,6 @@
"@nuxtjs/eslint-config-typescript": "12.0.0",
"@nuxtjs/module-test-utils": "1.6.3",
"@release-it/conventional-changelog": "5.1.1",
"@sentry/tracing": "7.45.0",
"@sentry/webpack-plugin": "1.20.0",
"@size-limit/file": "^8.2.4",
"@types/hash-sum": "1.0.0",
Expand Down
2 changes: 0 additions & 2 deletions src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,6 @@ export async function initializeServerSentry (nuxt: Nuxt, moduleOptions: ModuleC
sentryHandlerProxy.errorHandler = Sentry.Handlers.errorHandler()
sentryHandlerProxy.requestHandler = Sentry.Handlers.requestHandler(moduleOptions.requestHandlerConfig)
if (serverOptions.tracing) {
// Triggers initialization of the tracing integration as a side effect.
await import('@sentry/tracing')
sentryHandlerProxy.tracingHandler = Sentry.Handlers.tracingHandler()
}

Expand Down
1 change: 0 additions & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export default defineNuxtModule<ModuleConfiguration>({
'@sentry/integrations',
'@sentry/utils',
'@sentry/vue',
...(options.tracing ? ['@sentry/tracing'] : []),
]
for (const dep of aliasedDependencies) {
nuxt.options.alias[`~${dep}`] = (await resolvePath(dep, { url: moduleDir })).replace(/\/cjs\//, '/esm/')
Expand Down
4 changes: 3 additions & 1 deletion src/options.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Consola } from 'consola'
import { defu } from 'defu'
import { relative } from 'pathe'
import { Integrations as ServerIntegrations } from '@sentry/node'
import { Integrations as ServerIntegrations, autoDiscoverNodePerformanceMonitoringIntegrations } from '@sentry/node'
import type Sentry from '@sentry/node'
import * as PluggableIntegrations from '@sentry/integrations'
import type { Options } from '@sentry/types'
Expand Down Expand Up @@ -248,6 +248,8 @@ export async function resolveServerOptions (nuxt: Nuxt, moduleOptions: ModuleCon
const defaultConfig = {
dsn: options.dsn,
integrations: [
// Automatically instrument Node.js libraries and frameworks
...(options.tracing ? autoDiscoverNodePerformanceMonitoringIntegrations() : []),
...filterDisabledIntegrations(options.serverIntegrations)
.map((name) => {
const opt = options.serverIntegrations[name]
Expand Down
4 changes: 1 addition & 3 deletions src/templates/client.shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ const browserIntegrations = options.BROWSER_INTEGRATIONS.filter(key => key in op
const vueImports = [
'init',
...(browserIntegrations.length ? ['Integrations'] : []),
...(options.tracing ? ['vueRouterInstrumentation'] : [])
...(options.tracing ? ['vueRouterInstrumentation', 'BrowserTracing'] : [])
]
%>import { <%= vueImports.join(', ') %> } from '~@sentry/vue'
import * as CoreSdk from '~@sentry/core'
import * as BrowserSdk from '~@sentry/browser-sdk'
<%
if (options.tracing) {%>import { BrowserTracing } from '~@sentry/tracing'
<%}
let integrations = options.BROWSER_PLUGGABLE_INTEGRATIONS.filter(key => key in options.integrations)
if (integrations.length) {%>import { <%= integrations.join(', ') %> } from '~@sentry/integrations'
<%}%>
Expand Down
3 changes: 1 addition & 2 deletions src/types/configuration.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { Configuration as WebpackOptions } from 'webpack'
import { BrowserTracing } from '@sentry/tracing'
import { Options as SentryOptions, IntegrationClass } from '@sentry/types'
import * as PluggableIntegrations from '@sentry/integrations'
import { Integrations as BrowserIntegrations } from '@sentry/vue'
import { BrowserTracing, Integrations as BrowserIntegrations } from '@sentry/vue'
import { Options as SentryVueOptions, TracingOptions as SentryVueTracingOptions } from '@sentry/vue/types/types'
import { SentryCliPluginOptions } from '@sentry/webpack-plugin'
import { Integrations as NodeIntegrations, NodeOptions, Handlers } from '@sentry/node'
Expand Down
129 changes: 61 additions & 68 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2270,26 +2270,26 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"

"@sentry-internal/tracing@7.45.0":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.45.0.tgz#01f347d0d1b42451b340b32b12923dc22e042d27"
integrity sha512-0aIDY2OvUX7k2XHaimOlWkboXoQvJ9dEKvfpu0Wh0YxfUTGPa+wplUdg3WVdkk018sq1L11MKmj4MPZyYUvXhw==
dependencies:
"@sentry/core" "7.45.0"
"@sentry/types" "7.45.0"
"@sentry/utils" "7.45.0"
"@sentry-internal/tracing@7.47.0":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.47.0.tgz#45e92eb4c8d049d93bd4fab961eaa38a4fb680f3"
integrity sha512-udpHnCzF8DQsWf0gQwd0XFGp6Y8MOiwnl8vGt2ohqZGS3m1+IxoRLXsSkD8qmvN6KKDnwbaAvYnK0z0L+AW95g==
dependencies:
"@sentry/core" "7.47.0"
"@sentry/types" "7.47.0"
"@sentry/utils" "7.47.0"
tslib "^1.9.3"

"@sentry/browser@7.45.0":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.45.0.tgz#c9f8031ad184558d08c374d4e4ee30996cc5b543"
integrity sha512-/dUrUwnI34voMj+jSJT7b5Jun+xy1utVyzzwTq3Oc22N+SB17ZOX9svZ4jl1Lu6tVJPVjPyvL6zlcbrbMwqFjg==
"@sentry/browser@7.47.0":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.47.0.tgz#c0d10f348d1fb9336c3ef8fa2f6638f26d4c17a8"
integrity sha512-L0t07kS/G1UGVZ9fpD6HLuaX8vVBqAGWgu+1uweXthYozu/N7ZAsakjU/Ozu6FSXj1mO3NOJZhOn/goIZLSj5A==
dependencies:
"@sentry-internal/tracing" "7.45.0"
"@sentry/core" "7.45.0"
"@sentry/replay" "7.45.0"
"@sentry/types" "7.45.0"
"@sentry/utils" "7.45.0"
"@sentry-internal/tracing" "7.47.0"
"@sentry/core" "7.47.0"
"@sentry/replay" "7.47.0"
"@sentry/types" "7.47.0"
"@sentry/utils" "7.47.0"
tslib "^1.9.3"

"@sentry/cli@^1.74.6":
Expand All @@ -2304,77 +2304,70 @@
proxy-from-env "^1.1.0"
which "^2.0.2"

"@sentry/core@7.45.0":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.45.0.tgz#87fdb283c211f145e508cc8ff89dabdf2fbcfc39"
integrity sha512-xJfdTS4lRmHvZI/A5MazdnKhBJFkisKu6G9EGNLlZLre+6W4PH5sb7QX4+xoBdqG7v10Jvdia112vi762ojO2w==
"@sentry/core@7.47.0":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.47.0.tgz#6a723d96f64009a9c1b9bc44e259956b7eca0a3f"
integrity sha512-EFhZhKdMu7wKmWYZwbgTi8FNZ7Fq+HdlXiZWNz51Bqe3pHmfAkdHtAEs0Buo0v623MKA0CA4EjXIazGUM34XTg==
dependencies:
"@sentry/types" "7.45.0"
"@sentry/utils" "7.45.0"
"@sentry/types" "7.47.0"
"@sentry/utils" "7.47.0"
tslib "^1.9.3"

"@sentry/integrations@^7.45.0":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.45.0.tgz#79166f44af59127bd67824dcaddb4fee254023d7"
integrity sha512-2lwBACr7w9YmnilndRH+39Ow97DJIZUPsDMlppu2NNFEZl2fBDpl+YWh7rxuMIpsOKqZkgxVhxWuoZL9gcWvEA==
"@sentry/integrations@^7.47.0":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.47.0.tgz#b952cc910e92e9235f42151f7260471b55b10cdf"
integrity sha512-PUSeBYI3fCOswn+K+PLjtl2epr8/ceqebWqVcxHclczSY3EOZE+osznDFgZmeVgrHavsgfE4oFVqJeFvDJwCog==
dependencies:
"@sentry/types" "7.45.0"
"@sentry/utils" "7.45.0"
"@sentry/types" "7.47.0"
"@sentry/utils" "7.47.0"
localforage "^1.8.1"
tslib "^1.9.3"

"@sentry/node@^7.45.0":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.45.0.tgz#7315cac471dadcbcc6ca2b2439fd2550ab3ddd1f"
integrity sha512-x8mq+DrJWpSi716Rap/2w70DKWD8vjl87Y70OYFu+Dn6CxWDHClObSxLzuJcE5lww0Sq9RnU6UHQWzjXSb/pVQ==
"@sentry/node@^7.47.0":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.47.0.tgz#2c1a8c4777eaf20232fc16d3aa2f26f3fd04bfd1"
integrity sha512-LTg2r5EV9yh4GLYDF+ViSltR9LLj/pcvk8YhANJcMO3Fp//xh8njcdU0FC2yNthUREawYDzAsVzLyCYJfV0H1A==
dependencies:
"@sentry-internal/tracing" "7.45.0"
"@sentry/core" "7.45.0"
"@sentry/types" "7.45.0"
"@sentry/utils" "7.45.0"
"@sentry-internal/tracing" "7.47.0"
"@sentry/core" "7.47.0"
"@sentry/types" "7.47.0"
"@sentry/utils" "7.47.0"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"

"@sentry/replay@7.45.0":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.45.0.tgz#1da15e8c419bb77ec7475c7b1879d11f17edad20"
integrity sha512-smM7FIcFIyKu30BqCl8BzLo1gH/z9WwXdGX6V0fNvHab9fJZ09+xjFn+LmIyo6N8H8jjwsup0+yQ12kiF/ZsEw==
"@sentry/replay@7.47.0":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.47.0.tgz#d2fc8fd3be2360950497426035d1ba0bd8a97b8f"
integrity sha512-BFpVZVmwlezZ83y0L43TCTJY142Fxh+z+qZSwTag5HlhmIpBKw/WKg06ajOhrYJbCBkhHmeOvyKkxX0jnc39ZA==
dependencies:
"@sentry/core" "7.45.0"
"@sentry/types" "7.45.0"
"@sentry/utils" "7.45.0"
"@sentry/core" "7.47.0"
"@sentry/types" "7.47.0"
"@sentry/utils" "7.47.0"

"@sentry/[email protected]":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.45.0.tgz#77fe1075b3fdfd5026bf8d816a855bbe992b64a3"
integrity sha512-FsoFmZPzTBGvWeJH73NxSF1ot61Zw3aIZo5XolengiKnRmcrQOFxebtMKBiZ61QBRYGqsm5uT7QB7zITU6Ikgg==
dependencies:
"@sentry-internal/tracing" "7.45.0"

"@sentry/[email protected]":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.45.0.tgz#b5e2db7a421f6090398565b0a72fb3bbdc94233a"
integrity sha512-iFt7msfUK8LCodFF3RKUyaxy9tJv/gpWhzxUFyNxtuVwlpmd+q6mtsFGn8Af3pbpm8A+MKyz1ebMwXj0PQqknw==
"@sentry/[email protected]":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.47.0.tgz#fd07dbec11a26ae861532a9abe75bd31663ca09b"
integrity sha512-GxXocplN0j1+uczovHrfkykl9wvkamDtWxlPUQgyGlbLGZn+UH1Y79D4D58COaFWGEZdSNKr62gZAjfEYu9nQA==

"@sentry/utils@7.45.0", "@sentry/utils@^7.45.0":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.45.0.tgz#e13e075098578557ec3a0decf735cbad6a26ce63"
integrity sha512-aTY7qqtNUudd09SH5DVSKMm3iQ6ZeWufduc0I9bPZe6UMM09BDc4KmjmrzRkdQ+VaOmHo7+v+HZKQk5f+AbuTQ==
"@sentry/utils@7.47.0", "@sentry/utils@^7.47.0":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.47.0.tgz#e62fdede15e45387b40c9fa135feba48f0960826"
integrity sha512-A89SaOLp6XeZfByeYo2C8Ecye/YAtk/gENuyOUhQEdMulI6mZdjqtHAp7pTMVgkBc/YNARVuoa+kR/IdRrTPkQ==
dependencies:
"@sentry/types" "7.45.0"
"@sentry/types" "7.47.0"
tslib "^1.9.3"

"@sentry/vue@^7.45.0":
version "7.45.0"
resolved "https://registry.yarnpkg.com/@sentry/vue/-/vue-7.45.0.tgz#cff1632d548038ba9498ba142ddec1920c3d5ec4"
integrity sha512-31wn10AjdMnCy5bzrMt3QLmX34ijuoxLOK4xE/E7NbtwAuPxd+mnc67CMy6UVfo8Ng36HFZFeNMewdqF676V5Q==
"@sentry/vue@^7.47.0":
version "7.47.0"
resolved "https://registry.yarnpkg.com/@sentry/vue/-/vue-7.47.0.tgz#2a930280e1f594260f33be5c41ac69ade5e004b5"
integrity sha512-ZaiddqyjMH5PAhe3JMw5Xy4vO3wvc97JzmvLnZ3qHkA69hQ1yFDtVhncscWeVtn5r0N9D4+VxUOHMCpDFNyATw==
dependencies:
"@sentry/browser" "7.45.0"
"@sentry/core" "7.45.0"
"@sentry/types" "7.45.0"
"@sentry/utils" "7.45.0"
"@sentry/browser" "7.47.0"
"@sentry/core" "7.47.0"
"@sentry/types" "7.47.0"
"@sentry/utils" "7.47.0"
tslib "^1.9.3"

"@sentry/[email protected]":
Expand Down

0 comments on commit 30c1a97

Please sign in to comment.