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
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@sentry/core": "10.67.0",
"@sentry/conventions": "^0.16.0",
"@sentry/node": "10.67.0",
"@sentry/vite-plugin": "^5.3.0"
"@sentry/bundler-plugins": "10.67.0"
},
"devDependencies": {
"astro": "^3.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/integration/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';
import type { AstroConfig, AstroIntegration, AstroIntegrationLogger } from 'astro';
import * as fs from 'fs';
import { createRequire } from 'module';
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/integration/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BuildTimeOptionsBase, UnstableVitePluginOptions } from '@sentry/core';
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
import type { SentryVitePluginOptions } from '@sentry/bundler-plugins/vite';
import type { RouteData } from 'astro';

type SdkInitPaths = {
Expand Down Expand Up @@ -101,7 +101,7 @@ type SourceMapsOptions = {
filesToDeleteAfterUpload?: string | Array<string>;

/**
* Options to further customize the Sentry Vite Plugin (@sentry/vite-plugin) behavior directly.
* Options to further customize the Sentry Vite Plugin (@sentry/bundler-plugins/vite) behavior directly.
* Options specified in this object take precedence over all other options.
*
* @see https://www.npmjs.com/package/@sentry/vite-plugin/v/2.14.2#options which lists all available options.
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/integration/cloudflare.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ vi.mock('fs', async requireActual => {
};
});

vi.mock('@sentry/vite-plugin', () => ({
vi.mock('@sentry/bundler-plugins/vite', () => ({
sentryVitePlugin: vi.fn(() => 'sentryVitePlugin'),
}));

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/integration/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { SentryOptions } from '../../src/integration/types';

const sentryVitePluginSpy = vi.fn(() => 'sentryVitePlugin');

vi.mock('@sentry/vite-plugin', () => ({
vi.mock('@sentry/bundler-plugins/vite', () => ({
// @ts-expect-error - just mocking around
sentryVitePlugin: vi.fn(args => sentryVitePluginSpy(args)),
}));
Expand Down
3 changes: 2 additions & 1 deletion packages/bundler-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@
"dotenv": "^17.4.2",
"find-up": "^5.0.0",
"glob": "^13.0.6",
"magic-string": "~0.30.8"
"magic-string": "~0.30.8",
"supports-color": "^8.1.1"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this intentional?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It kept getting sorted alphabetically so in the end I left it sorted!

},
"peerDependencies": {
"rollup": ">=3.2.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/build-time-plugins/buildTimeOptionsBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @example
* ```typescript
* import type { BuildTimeOptionsBase, UnstableVitePluginOptions } from '@sentry/core';
* import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
* import type { SentryVitePluginOptions } from '@sentry/bundler-plugins/vite';
*
* // Example of how a framework SDK would define its build-time options
* type MyFrameworkBuildOptions =
Expand Down Expand Up @@ -152,7 +152,7 @@ export interface BuildTimeOptionsBase {
*/
export type UnstableVitePluginOptions<PluginOptionsType> = {
/**
* Options to be passed directly to the Sentry Vite Plugin (`@sentry/vite-plugin`) that ships with the Sentry SDK.
* Options to be passed directly to the Sentry Vite Plugin (`@sentry/bundler-plugins/vite`) that ships with the Sentry SDK.
* You can use this option to override any options the SDK passes to the Vite plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
Expand All @@ -176,7 +176,7 @@ export type UnstableVitePluginOptions<PluginOptionsType> = {
*/
export type UnstableWebpackPluginOptions<PluginOptionsType> = {
/**
* Options to be passed directly to the Sentry Webpack Plugin (`@sentry/webpack-plugin`) that ships with the Sentry SDK.
* Options to be passed directly to the Sentry Webpack Plugin (`@sentry/bundler-plugins/webpack`) that ships with the Sentry SDK.
* You can use this option to override any options the SDK passes to the Webpack plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
Expand All @@ -200,7 +200,7 @@ export type UnstableWebpackPluginOptions<PluginOptionsType> = {
*/
export type UnstableRollupPluginOptions<PluginOptionsType> = {
/**
* Options to be passed directly to the Sentry Rollup Plugin (`@sentry/rollup-plugin`) that ships with the Sentry SDK.
* Options to be passed directly to the Sentry Rollup Plugin (`@sentry/bundler-plugins/rollup`) that ships with the Sentry SDK.
* You can use this option to override any options the SDK passes to the Rollup plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs');

const { sentryWebpackPlugin } = require('@sentry/webpack-plugin');
const { sentryWebpackPlugin } = require('@sentry/bundler-plugins/webpack');

const SENTRY_USER_CONFIG = ['./sentry.config.js', './sentry.config.ts'];

Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"dependencies": {
"@sentry/core": "10.67.0",
"@sentry/react": "10.67.0",
"@sentry/webpack-plugin": "^5.3.0"
"@sentry/bundler-plugins": "10.67.0"
},
"peerDependencies": {
"gatsby": "^3.0.0 || ^4.0.0 || ^5.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/gatsby/test/gatsby-node.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { onCreateWebpackConfig } from '../gatsby-node';

vi.hoisted(
() =>
void mock('@sentry/webpack-plugin', {
void mock('@sentry/bundler-plugins/webpack', {
sentryWebpackPlugin: vi.fn().mockReturnValue({}),
}),
);

// Need to override mock because `gatsby-node.js` loads `@sentry/webpack-plugin` as a CJS file.
// Need to override mock because `gatsby-node.js` loads `@sentry/bundler-plugins/webpack` as a CJS file.
async function mock(mockedUri: string, stub: any) {
const { Module } = await import('module');

Expand All @@ -24,7 +24,7 @@ async function mock(mockedUri: string, stub: any) {

describe('onCreateWebpackConfig', () => {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { sentryWebpackPlugin } = require('@sentry/webpack-plugin');
const { sentryWebpackPlugin } = require('@sentry/bundler-plugins/webpack');
let originalNodeEnv: string | undefined;

beforeAll(() => {
Expand Down
3 changes: 1 addition & 2 deletions packages/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,14 @@
"@opentelemetry/api": "^1.9.1",
"@rollup/plugin-commonjs": "28.0.1",
"@sentry/browser-utils": "10.67.0",
"@sentry/bundler-plugin-core": "^5.3.0",
"@sentry/bundler-plugins": "10.67.0",
"@sentry/conventions": "^0.16.0",
"@sentry/core": "10.67.0",
"@sentry/node": "10.67.0",
"@sentry/opentelemetry": "10.67.0",
"@sentry/react": "10.67.0",
"@sentry/server-utils": "10.67.0",
"@sentry/vercel-edge": "10.67.0",
"@sentry/webpack-plugin": "^5.3.0",
"rollup": "^4.60.3",
"stacktrace-parser": "^0.1.11"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/src/config/getBuildPluginOptions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Options as SentryBuildPluginOptions } from '@sentry/bundler-plugin-core';
import type { Options as SentryBuildPluginOptions } from '@sentry/bundler-plugins/core';
import * as fs from 'fs';
import * as path from 'path';
import type { SentryBuildOptions } from './types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { createSentryBuildPluginManager as createSentryBuildPluginManagerType } from '@sentry/bundler-plugin-core';
import type { createSentryBuildPluginManager as createSentryBuildPluginManagerType } from '@sentry/bundler-plugins/core';
import { loadModule } from '@sentry/core';
import * as fs from 'fs';
import * as path from 'path';
Expand Down Expand Up @@ -32,7 +32,7 @@ export async function handleRunAfterProductionCompile(

const { createSentryBuildPluginManager } =
loadModule<{ createSentryBuildPluginManager: typeof createSentryBuildPluginManagerType }>(
'@sentry/bundler-plugin-core',
'@sentry/bundler-plugins/core',
module,
) ?? {};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createComponentNameAnnotateHooks } from '@sentry/bundler-plugin-core';
import { createComponentNameAnnotateHooks } from '@sentry/bundler-plugins/core';
import type { LoaderThis } from './types';

export type ComponentAnnotationLoaderOptions = {
Expand All @@ -9,7 +9,7 @@ export type ComponentAnnotationLoaderOptions = {
* Turbopack loader that annotates React components with `data-sentry-component`,
* `data-sentry-element`, and `data-sentry-source-file` attributes.
*
* This is the Turbopack equivalent of what `@sentry/webpack-plugin` does
* This is the Turbopack equivalent of what `@sentry/bundler-plugins/webpack` does
* via the `reactComponentAnnotation` option and `@sentry/babel-plugin-component-annotate`.
*
* Options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type ModuleMetadataInjectionLoaderOptions = {
* `thirdPartyErrorFilterIntegration` can tell first-party code from
* third-party code.
*
* This is the Turbopack equivalent of what `@sentry/webpack-plugin` does
* This is the Turbopack equivalent of what `@sentry/bundler-plugins/webpack` does
* via its `moduleMetadata` option.
*
* Options:
Expand All @@ -25,7 +25,7 @@ export default function moduleMetadataInjectionLoader(
// We do not want to cache injected values across builds
this.cacheable(false);

// The snippet mirrors what @sentry/webpack-plugin injects for moduleMetadata.
// The snippet mirrors what @sentry/bundler-plugins/webpack injects for moduleMetadata.
// It is wrapped in a try-catch IIFE (matching the webpack plugin's CodeInjection pattern)
// so that injection failures in node_modules or unusual environments never break the module.
// The IIFE resolves the global object and stores metadata keyed by (new Error).stack
Expand Down
10 changes: 5 additions & 5 deletions packages/nextjs/src/config/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { GLOBAL_OBJ } from '@sentry/core';
import type { SentryWebpackPluginOptions } from '@sentry/webpack-plugin';
import type { SentryWebpackPluginOptions } from '@sentry/bundler-plugins/webpack';

// The first argument to `withSentryConfig` (which is the user's next config).
export type ExportedNextConfig = NextConfigObject | NextConfigFunction;
Expand Down Expand Up @@ -147,7 +147,7 @@ export type SentryBuildWebpackOptions = {
};

/**
* Options to be passed directly to the Sentry Webpack Plugin (`@sentry/webpack-plugin`) that ships with the Sentry SDK.
* Options to be passed directly to the Sentry Webpack Plugin (`@sentry/bundler-plugins/webpack`) that ships with the Sentry SDK.
* You can use this option to override any options the SDK passes to the Webpack plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
Expand Down Expand Up @@ -469,7 +469,7 @@ export type SentryBuildOptions = {
* This key is used by the `thirdPartyErrorFilterIntegration` to filter out errors
* originating from third-party scripts.
*
* For webpack builds, this is forwarded to the `@sentry/webpack-plugin`.
* For webpack builds, this is forwarded to the `@sentry/bundler-plugins/webpack`.
* For Turbopack builds, this injects module metadata via a custom loader.
*
* @see https://docs.sentry.io/platforms/javascript/configuration/filtering/#using-thirdpartyerrorfilterintegration
Expand Down Expand Up @@ -542,7 +542,7 @@ export type SentryBuildOptions = {
}; // TODO(v11): remove this option

/**
* Options to be passed directly to the Sentry Webpack Plugin (`@sentry/webpack-plugin`) that ships with the Sentry Next.js SDK.
* Options to be passed directly to the Sentry Webpack Plugin (`@sentry/bundler-plugins/webpack`) that ships with the Sentry Next.js SDK.
* You can use this option to override any options the SDK passes to the webpack plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
Expand Down Expand Up @@ -747,7 +747,7 @@ export type SentryBuildOptions = {
* first-party code from third-party code in Turbopack builds.
*
* When set, a Turbopack loader injects `_sentryModuleMetadata` into every
* first-party module, mirroring what `@sentry/webpack-plugin` does for
* first-party module, mirroring what `@sentry/bundler-plugins/webpack` does for
* webpack builds via its `moduleMetadata` / `applicationKey` option.
*
* Requires Next.js 16+
Expand Down
5 changes: 3 additions & 2 deletions packages/nextjs/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,9 @@ export function constructWebpackConfigFunction({
// We don't want to do any webpack plugin stuff OR any source maps stuff in dev mode or for the server on static-only builds.
// Symbolication for dev-mode errors is done elsewhere.
if (!(isDev || (isStaticExport && isServer))) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { sentryWebpackPlugin } = loadModule<{ sentryWebpackPlugin: any }>('@sentry/webpack-plugin', module) ?? {};
const { sentryWebpackPlugin } =
// eslint-disable-next-line @typescript-eslint/no-explicit-any
loadModule<{ sentryWebpackPlugin: any }>('@sentry/bundler-plugins/webpack', module) ?? {};

if (sentryWebpackPlugin) {
if (!userSentryOptions.sourcemaps?.disable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const { mockTransform, mockCreateHooks } = vi.hoisted(() => {
return { mockTransform, mockCreateHooks };
});

vi.mock('@sentry/bundler-plugin-core', () => ({
vi.mock('@sentry/bundler-plugins/core', () => ({
createComponentNameAnnotateHooks: mockCreateHooks,
}));

Expand Down
2 changes: 1 addition & 1 deletion packages/nitro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"nitro": ">=3.0.0-0 <4.0.0 || 3.0.260311-beta || 3.0.260415-beta"
},
"dependencies": {
"@sentry/bundler-plugin-core": "^5.3.0",
"@sentry/bundler-plugins": "^10.67.0",
"@sentry/core": "10.67.0",
"@sentry/node": "10.67.0",
"@sentry/server-utils": "10.67.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/nitro/src/sourceMaps.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Options as BundlerPluginOptions } from '@sentry/bundler-plugin-core';
import { createSentryBuildPluginManager } from '@sentry/bundler-plugin-core';
import type { Options as BundlerPluginOptions } from '@sentry/bundler-plugins/core';
import { createSentryBuildPluginManager } from '@sentry/bundler-plugins/core';
import type { Nitro, NitroConfig } from 'nitro/types';
import type { SentryNitroOptions } from './config';

Expand Down
3 changes: 1 addition & 2 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@
"@sentry/core": "10.67.0",
"@sentry/node": "10.67.0",
"@sentry/node-core": "10.67.0",
"@sentry/rollup-plugin": "^5.3.0",
"@sentry/bundler-plugins": "10.67.0",
"@sentry/server-utils": "10.67.0",
"@sentry/vite-plugin": "^5.3.0",
"@sentry/vue": "10.67.0",
"local-pkg": "^1.1.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/nuxt/src/common/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BuildTimeOptionsBase } from '@sentry/core';
import type { init as initNode } from '@sentry/node';
import type { SentryRollupPluginOptions } from '@sentry/rollup-plugin';
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
import type { SentryRollupPluginOptions } from '@sentry/bundler-plugins/rollup';
import type { SentryVitePluginOptions } from '@sentry/bundler-plugins/vite';
import type { init as initVue } from '@sentry/vue';

// Omitting Vue 'app' as the Nuxt SDK will add the app instance in the client plugin (users do not have to provide this)
Expand Down Expand Up @@ -272,7 +272,7 @@ export type SentryNuxtModuleOptions = BuildTimeOptionsBase & {
experimental_entrypointWrappedFunctions?: string[];

/**
* Options to be passed directly to the Sentry Rollup Plugin (`@sentry/rollup-plugin`) and Sentry Vite Plugin (`@sentry/vite-plugin`) that ship with the Sentry Nuxt SDK.
* Options to be passed directly to the Sentry Rollup Plugin (`@sentry/bundler-plugins/rollup`) and Sentry Vite Plugin (`@sentry/bundler-plugins/vite`) that ship with the Sentry Nuxt SDK.
* You can use this option to override any options the SDK passes to the Vite (for Nuxt) and Rollup (for Nitro) plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxt/src/vite/sourceMaps.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Nuxt } from '@nuxt/schema';
import { sentryRollupPlugin, type SentryRollupPluginOptions } from '@sentry/rollup-plugin';
import { sentryVitePlugin, type SentryVitePluginOptions } from '@sentry/vite-plugin';
import { sentryRollupPlugin, type SentryRollupPluginOptions } from '@sentry/bundler-plugins/rollup';
import { sentryVitePlugin, type SentryVitePluginOptions } from '@sentry/bundler-plugins/vite';
import type { NitroConfig } from 'nitropack';
import type { Plugin } from 'vite';
import type { SentryNuxtModuleOptions } from '../common/types';
Expand Down
8 changes: 4 additions & 4 deletions packages/nuxt/test/vite/sourceMaps-nuxtHooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ describe('setupSourceMaps hooks', () => {
const consoleWarnSpy = vi.spyOn(console, 'warn');

beforeAll(() => {
vi.doMock('@sentry/vite-plugin', () => ({
vi.doMock('@sentry/bundler-plugins/vite', () => ({
sentryVitePlugin: mockSentryVitePlugin,
}));
vi.doMock('@sentry/rollup-plugin', () => ({
vi.doMock('@sentry/bundler-plugins/rollup', () => ({
sentryRollupPlugin: mockSentryRollupPlugin,
}));
});

afterAll(() => {
consoleLogSpy.mockRestore();
consoleWarnSpy.mockRestore();
vi.doUnmock('@sentry/vite-plugin');
vi.doUnmock('@sentry/rollup-plugin');
vi.doUnmock('@sentry/bundler-plugins/vite');
vi.doUnmock('@sentry/bundler-plugins/rollup');
});

beforeEach(() => {
Expand Down
11 changes: 8 additions & 3 deletions packages/nuxt/test/vite/sourceMaps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ import {
validateNitroSourceMapSettings,
} from '../../src/vite/sourceMaps';

vi.mock('@sentry/core', () => ({
consoleSandbox: (callback: () => void) => callback(),
}));
vi.mock('@sentry/core', async importOriginal => {
const actual = await importOriginal();
return {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
...(actual as any),
consoleSandbox: (callback: () => void) => callback(),
};
});

describe('getPluginOptions', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@sentry/core": "10.67.0",
"@sentry/node": "10.67.0",
"@sentry/react": "10.67.0",
"@sentry/vite-plugin": "^5.3.0",
"@sentry/bundler-plugins": "10.67.0",
"glob": "^13.0.6"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { rm } from 'node:fs/promises';
import type { Config } from '@react-router/dev/config';
import SentryCli from '@sentry/cli';
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
import type { SentryVitePluginOptions } from '@sentry/bundler-plugins/vite';
import { glob } from 'glob';
import type { SentryReactRouterBuildOptions } from '../types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sentryVitePlugin } from '@sentry/vite-plugin';
import { sentryVitePlugin } from '@sentry/bundler-plugins/vite';
import { type Plugin } from 'vite';
import type { SentryReactRouterBuildOptions } from './types';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/src/vite/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { BuildTimeOptionsBase, UnstableVitePluginOptions } from '@sentry/core';
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
import type { SentryVitePluginOptions } from '@sentry/bundler-plugins/vite';

type SourceMapsOptions = {
/**
Expand Down
Loading
Loading