Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@
},
"devDependencies": {
"@nuxt/module-builder": "^0.8.4",
"@nuxt/nitro-server": "^3.21.1",
"nuxi": "^3.25.1",
"nuxt": "^3.13.2",
"nuxt": "3.17.7",
"vite": "^5.4.11"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/src/runtime/plugins/sentry.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default defineNuxtPlugin({
nuxtApp.hook('app:error', error => {
if (isNuxtError(error)) {
// Do not report if status code is 3xx or 4xx
if (error.statusCode >= 300 && error.statusCode < 500) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

statusCode was deprecated

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only after 3.20.1. In 3.20.0, we still need to use statusCode

if (error?.statusCode && error.statusCode >= 300 && error.statusCode < 500) {
return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/src/runtime/utils/route-extraction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { NuxtPage } from '@nuxt/schema';
import { debug } from '@sentry/core';
import type { NuxtSSRContext } from 'nuxt/app';
import type { NuxtPage } from 'nuxt/schema';

export type NuxtPageSubset = { path: NuxtPage['path']; file: NuxtPage['file'] };

Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/src/vendor/server-template.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useNuxt } from '@nuxt/kit';
import type { NuxtTemplate } from 'nuxt/schema';
import type { NuxtTemplate } from '@nuxt/schema';

/**
* Adds a virtual file that can be used within the Nuxt Nitro server build.
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/src/vite/storageConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addServerPlugin, createResolver } from '@nuxt/kit';
import type { Nuxt } from 'nuxt/schema';
import type { Nuxt } from '@nuxt/schema';
import { addServerTemplate } from '../vendor/server-template';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/src/vite/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Nuxt } from '@nuxt/schema';
import { consoleSandbox } from '@sentry/core';
import * as fs from 'fs';
import type { Nuxt } from 'nuxt/schema';
import * as path from 'path';

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/nuxt/test/vite/utils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Nuxt } from '@nuxt/schema';
import * as fs from 'fs';
import type { Nuxt } from 'nuxt/schema';
import { afterEach, describe, expect, it, vi } from 'vitest';
import {
addOTelCommonJSImportAlias,
Expand Down Expand Up @@ -89,7 +89,7 @@ describe('findDefaultSdkInitFile', () => {
},
],
},
} as Nuxt;
} as unknown as Nuxt;

const result = findDefaultSdkInitFile('client', nuxtMock);
expect(result).toMatch('packages/nuxt/sentry.client.config.ts');
Expand All @@ -115,7 +115,7 @@ describe('findDefaultSdkInitFile', () => {
},
],
},
} as Nuxt;
} as unknown as Nuxt;

const result = findDefaultSdkInitFile('server', nuxtMock);
expect(result).toMatch('packages/nuxt/sentry.server.config.ts');
Expand All @@ -137,7 +137,7 @@ describe('findDefaultSdkInitFile', () => {
},
],
},
} as Nuxt;
} as unknown as Nuxt;

const result = findDefaultSdkInitFile('client', nuxtMock);
expect(result).toMatch('packages/nuxt/sentry.client.config.ts');
Expand Down
2,419 changes: 1,185 additions & 1,234 deletions yarn.lock

Large diffs are not rendered by default.

Loading