@sentry/bundler-plugin-core
Advanced tools
Comparing version 2.8.0 to 2.9.0
import { UnpluginOptions } from "unplugin"; | ||
import { Options } from "./types"; | ||
import { Options, SentrySDKBuildFlags } from "./types"; | ||
interface SentryUnpluginFactoryOptions { | ||
@@ -8,2 +8,3 @@ releaseInjectionPlugin: (injectionCode: string) => UnpluginOptions; | ||
debugIdUploadPlugin: (upload: (buildArtifacts: string[]) => Promise<void>) => UnpluginOptions; | ||
bundleSizeOptimizationsPlugin: (buildFlags: SentrySDKBuildFlags) => UnpluginOptions; | ||
} | ||
@@ -37,3 +38,3 @@ /** | ||
*/ | ||
export declare function sentryUnpluginFactory({ releaseInjectionPlugin, moduleMetadataInjectionPlugin, debugIdInjectionPlugin, debugIdUploadPlugin, }: SentryUnpluginFactoryOptions): import("unplugin").UnpluginInstance<Options, true>; | ||
export declare function sentryUnpluginFactory({ releaseInjectionPlugin, moduleMetadataInjectionPlugin, debugIdInjectionPlugin, debugIdUploadPlugin, bundleSizeOptimizationsPlugin, }: SentryUnpluginFactoryOptions): import("unplugin").UnpluginInstance<Options, true>; | ||
export declare function getBuildInformation(): { | ||
@@ -62,2 +63,8 @@ deps: string[]; | ||
}; | ||
export declare function createRollupBundleSizeOptimizationHooks(replacementValues: SentrySDKBuildFlags): { | ||
transform(code: string): { | ||
code: string; | ||
map: import("magic-string").SourceMap; | ||
} | null; | ||
}; | ||
export declare function createRollupDebugIdInjectionHooks(): { | ||
@@ -88,4 +95,4 @@ renderChunk(code: string, chunk: { | ||
export declare function getDebugIdSnippet(debugId: string): string; | ||
export { stringToUUID } from "./utils"; | ||
export type { Options } from "./types"; | ||
export { stringToUUID, replaceBooleanFlagsInCode } from "./utils"; | ||
export type { Options, SentrySDKBuildFlags } from "./types"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -54,2 +54,9 @@ import { Logger } from "./sentry/logger"; | ||
}; | ||
bundleSizeOptimizations: { | ||
excludeDebugStatements?: boolean | undefined; | ||
excludePerformanceMonitoring?: boolean | undefined; | ||
excludeReplayCanvas?: boolean | undefined; | ||
excludeReplayShadowDom?: boolean | undefined; | ||
excludeReplayIframe?: boolean | undefined; | ||
} | undefined; | ||
_experiments: { | ||
@@ -56,0 +63,0 @@ injectBuildInformation?: boolean | undefined; |
@@ -206,2 +206,38 @@ export interface Options { | ||
/** | ||
* Options related to bundle size optimizations. | ||
*/ | ||
bundleSizeOptimizations?: { | ||
/** | ||
* If set to true, the plugin will try to tree-shake debug statements out. | ||
* Note that the success of this depends on tree shaking generally being enabled in your build. | ||
*/ | ||
excludeDebugStatements?: boolean; | ||
/** | ||
* If set to true, the plugin will try to tree-shake performance monitoring statements out. | ||
* Note that the success of this depends on tree shaking generally being enabled in your build. | ||
* Attention: DO NOT enable this when you're using any performance monitoring-related SDK features (e.g. Sentry.startTransaction()). | ||
* This flag is intended to be used in combination with packages like @sentry/next or @sentry/sveltekit, | ||
* which automatically include performance monitoring functionality. | ||
*/ | ||
excludePerformanceMonitoring?: boolean; | ||
/** | ||
* If set to true, the plugin will try to tree-shake Session Replay's Canvas recording functionality out. | ||
* You can safely do this when you do not want to capture any Canvas activity via Replay. | ||
* Note that the success of this depends on tree shaking generally being enabled in your build. | ||
*/ | ||
excludeReplayCanvas?: boolean; | ||
/** | ||
* If set to true, the plugin will try to tree-shake Session Replay's Shadow DOM recording functionality out. | ||
* You can safely do this when you do not want to capture any Shadow DOM activity via Replay. | ||
* Note that the success of this depends on tree shaking generally being enabled in your build. | ||
*/ | ||
excludeReplayShadowDom?: boolean; | ||
/** | ||
* If set to true, the plugin will try to tree-shake Session Replay's IFrame recording functionality out. | ||
* You can safely do this when you do not want to capture any IFrame activity via Replay. | ||
* Note that the success of this depends on tree shaking generally being enabled in your build. | ||
*/ | ||
excludeReplayIframe?: boolean; | ||
}; | ||
/** | ||
* Options that are considered experimental and subject to change. | ||
@@ -310,2 +346,9 @@ * | ||
}; | ||
export interface SentrySDKBuildFlags extends Record<string, boolean | undefined> { | ||
__SENTRY_DEBUG__?: boolean; | ||
__SENTRY_TRACE__?: boolean; | ||
__RRWEB_EXCLUDE_CANVAS__?: boolean; | ||
__RRWEB_EXCLUDE_IFRAME__?: boolean; | ||
__RRWEB_EXCLUDE_SHADOW_DOM__?: boolean; | ||
} | ||
type SetCommitsOptions = (AutoSetCommitsOptions | ManualSetCommitsOptions) & { | ||
@@ -312,0 +355,0 @@ /** |
@@ -0,1 +1,2 @@ | ||
import { SourceMap } from "magic-string"; | ||
/** | ||
@@ -42,3 +43,7 @@ * Checks whether the given input is already an array, and if it isn't, wraps it in one. | ||
export declare function stripQueryAndHashFromPath(path: string): string; | ||
export declare function replaceBooleanFlagsInCode(code: string, replacementValues: Record<string, boolean | undefined>): { | ||
code: string; | ||
map: SourceMap; | ||
} | null; | ||
export {}; | ||
//# sourceMappingURL=utils.d.ts.map |
{ | ||
"name": "@sentry/bundler-plugin-core", | ||
"version": "2.8.0", | ||
"version": "2.9.0", | ||
"description": "Sentry Bundler Plugin Core", | ||
@@ -72,4 +72,4 @@ "repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git", | ||
"@rollup/plugin-replace": "^4.0.0", | ||
"@sentry-internal/eslint-config": "2.8.0", | ||
"@sentry-internal/sentry-bundler-plugin-tsconfig": "2.8.0", | ||
"@sentry-internal/eslint-config": "2.9.0", | ||
"@sentry-internal/sentry-bundler-plugin-tsconfig": "2.9.0", | ||
"@swc/core": "^1.2.205", | ||
@@ -76,0 +76,0 @@ "@swc/jest": "^0.2.21", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
473287
4661
2