Skip to content

Commit c6dc57c

Browse files
authored
Revert "feat: send sentry bundle size metrics (#87)" (#107)
1 parent b560302 commit c6dc57c

File tree

6 files changed

+8
-268
lines changed

6 files changed

+8
-268
lines changed

.changeset/silent-pugs-add.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@codecov/bundler-plugin-core": patch
3+
"@codecov/rollup-plugin": patch
4+
"@codecov/vite-plugin": patch
5+
"@codecov/webpack-plugin": patch
6+
---
7+
8+
Remove Sentry stats upload from the plugins, as the project has been put on hold

packages/bundler-plugin-core/src/bundle-analysis/bundleAnalysisPluginFactory.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { getPreSignedURL } from "../utils/getPreSignedURL.ts";
99
import { type NormalizedOptions } from "../utils/normalizeOptions.ts";
1010
import { detectProvider } from "../utils/provider.ts";
1111
import { uploadStats } from "../utils/uploadStats.ts";
12-
import { sendSentryBundleStats } from "../utils/sentryUtils.ts";
1312

1413
interface BundleAnalysisUploadPluginArgs {
1514
options: NormalizedOptions;
@@ -51,16 +50,6 @@ export const bundleAnalysisPluginFactory = ({
5150
// don't need to do anything if the bundle name is not present or empty
5251
if (!options.bundleName || options.bundleName === "") return;
5352

54-
if (options.sentry?.isEnabled) {
55-
try {
56-
await sendSentryBundleStats(output, options);
57-
} catch {}
58-
59-
if (options?.sentry?.sentryOnly) {
60-
return;
61-
}
62-
}
63-
6453
const args: UploadOverrides = options.uploadOverrides ?? {};
6554
const envs = process.env;
6655
const inputs: ProviderUtilInputs = { envs, args };

packages/bundler-plugin-core/src/types.ts

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -105,35 +105,6 @@ export interface Options {
105105

106106
/** Override values for passing custom information to API. */
107107
uploadOverrides?: UploadOverrides;
108-
109-
/** A set of options to configure Sentry settings inside the plugin. */
110-
sentry?: {
111-
/**
112-
* Only send bundle stats to sentry (used within sentry bundler plugin).
113-
*
114-
* Defaults to `false`
115-
*/
116-
sentryOnly?: boolean;
117-
118-
/**
119-
* Enables stats to be sent to sentry, set this to true on release.
120-
*
121-
* Defaults to `false`
122-
*/
123-
isEnabled?: boolean;
124-
125-
/** Sentry auth token to send bundle stats. */
126-
authToken?: string;
127-
128-
/** The name of the sentry organization to send bundler stats to. */
129-
org?: string;
130-
131-
/** The name of the sentry project to send bundler stats to. */
132-
project?: string;
133-
134-
/** The name of the sentry enviornment to send bundler stats to. */
135-
environment?: string;
136-
};
137108
}
138109

139110
export type BundleAnalysisUploadPlugin = (

packages/bundler-plugin-core/src/utils/__tests__/sentryUtils.test.ts

Lines changed: 0 additions & 69 deletions
This file was deleted.

packages/bundler-plugin-core/src/utils/normalizeOptions.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -80,36 +80,6 @@ const optionsSchemaFactory = (options: Options) =>
8080
.string({ invalid_type_error: "`uploadToken` must be a string." })
8181
.optional(),
8282
uploadOverrides: UploadOverridesSchema.optional(),
83-
sentry: z
84-
.object({
85-
sentryOnly: z
86-
.boolean({
87-
invalid_type_error: "`sentry.sentryOnly` must be a boolean.",
88-
})
89-
.default(false),
90-
authToken: z.string({
91-
invalid_type_error: "`sentry.authToken` must be a string.",
92-
}),
93-
isEnabled: z
94-
.boolean({
95-
invalid_type_error: "`sentry.isEnabled` must be a boolean.",
96-
})
97-
.default(false),
98-
org: z
99-
.string({ invalid_type_error: "`sentry.org` must be a string." })
100-
.optional(),
101-
project: z
102-
.string({
103-
invalid_type_error: "`sentry.project` must be a string.",
104-
})
105-
.optional(),
106-
environment: z
107-
.string({
108-
invalid_type_error: "`sentry.environment` must be a string.",
109-
})
110-
.optional(),
111-
})
112-
.optional(),
11383
});
11484

11585
interface NormalizedOptionsFailure {

packages/bundler-plugin-core/src/utils/sentryUtils.ts

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)