Skip to content

Commit

Permalink
use telem plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-codecov committed Feb 21, 2024
1 parent b21d0f7 commit 5720f96
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/bundler-plugin-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
type NormalizedOptions,
} from "./utils/normalizeOptions.ts";
import { createSentryInstance } from "./sentry.ts";
import { telemetryPlugin } from "./plugins/telemetry.ts";

const NODE_VERSION_RANGE = ">=18.18.0";

Expand All @@ -42,7 +43,7 @@ function codecovUnpluginFactory({

const options = normalizeOptions(userOptions);

Check warning on line 44 in packages/bundler-plugin-core/src/index.ts

View check run for this annotation

Codecov - Staging / codecov/patch

packages/bundler-plugin-core/src/index.ts#L44

Added line #L44 was not covered by tests

Check warning on line 44 in packages/bundler-plugin-core/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/bundler-plugin-core/src/index.ts#L44

Added line #L44 was not covered by tests

const { sentryHub, sentryMetrics } = createSentryInstance(
const { sentryHub, sentryMetrics, sentryClient } = createSentryInstance(

Check warning on line 46 in packages/bundler-plugin-core/src/index.ts

View check run for this annotation

Codecov - Staging / codecov/patch

packages/bundler-plugin-core/src/index.ts#L46

Added line #L46 was not covered by tests

Check warning on line 46 in packages/bundler-plugin-core/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/bundler-plugin-core/src/index.ts#L46

Added line #L46 was not covered by tests
options,
unpluginMetaContext.framework,
);
Expand Down Expand Up @@ -84,6 +85,14 @@ function codecovUnpluginFactory({
}
}

plugins.push(

Check warning on line 88 in packages/bundler-plugin-core/src/index.ts

View check run for this annotation

Codecov - Staging / codecov/patch

packages/bundler-plugin-core/src/index.ts#L88

Added line #L88 was not covered by tests

Check warning on line 88 in packages/bundler-plugin-core/src/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/bundler-plugin-core/src/index.ts#L88

Added line #L88 was not covered by tests
telemetryPlugin({
sentryClient,
sentryHub,
shouldSendTelemetry: options.telemetry,
}),
);

if (options?.enableBundleAnalysis) {
plugins.push(
bundleAnalysisPluginFactory({
Expand Down

0 comments on commit 5720f96

Please sign in to comment.