Skip to content

Commit ec37e37

Browse files
committed
review comments
1 parent 575e335 commit ec37e37

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

dev-packages/browser-integration-tests/utils/generatePlugin.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,14 @@ function generateSentryAlias(): Record<string, string> {
129129

130130
return Object.fromEntries(
131131
packageNames.map(packageName => {
132-
// pluggable integrations exist in the browser package
133-
const actPackageName = packageName === 'integrations' ? 'browser' : packageName;
134-
135132
const packageJSON: Package = JSON.parse(
136-
fs.readFileSync(path.resolve(PACKAGES_DIR, actPackageName, 'package.json'), { encoding: 'utf-8' }).toString(),
133+
fs.readFileSync(path.resolve(PACKAGES_DIR, packageName, 'package.json'), { encoding: 'utf-8' }).toString(),
137134
);
138135

139-
const modulePath = path.resolve(PACKAGES_DIR, actPackageName);
136+
const modulePath = path.resolve(PACKAGES_DIR, packageName);
140137

141-
if (useCompiledModule && bundleKey && BUNDLE_PATHS[actPackageName]?.[bundleKey]) {
142-
const bundlePath = path.resolve(modulePath, BUNDLE_PATHS[actPackageName][bundleKey]);
138+
if (useCompiledModule && bundleKey && BUNDLE_PATHS[packageName]?.[bundleKey]) {
139+
const bundlePath = path.resolve(modulePath, BUNDLE_PATHS[packageName][bundleKey]);
143140

144141
return [packageJSON['name'], bundlePath];
145142
}

dev-packages/rollup-utils/bundleHelpers.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function makeBaseBundleConfig(options) {
5959
plugins: [rrwebBuildPlugin, markAsBrowserBuildPlugin],
6060
};
6161

62-
// used by `@sentry/wasm` (bundles which need to be combined with a stand-alone SDK bundle)
62+
// used by `@sentry/wasm` & pluggable integrations from core/browser (bundles which need to be combined with a stand-alone SDK bundle)
6363
const addOnBundleConfig = {
6464
// These output settings are designed to mimic an IIFE. We don't use Rollup's `iife` format because we don't want to
6565
// attach this code to a new global variable, but rather inject it into the existing SDK's `Integrations` object.

packages/browser/rollup.bundle.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (targets.some(target => target !== 'es5' && target !== 'es6')) {
88
throw new Error('JS_VERSION must be either "es5" or "es6"');
99
}
1010

11-
const addonIntegrationFiles = ['contextlines', 'httpclient', 'reportingobserver'];
11+
const browserPluggableIntegrationFiles = ['contextlines', 'httpclient', 'reportingobserver'];
1212

1313
const coreIntegrationFiles = ['captureconsole', 'debug', 'dedupe', 'extraerrordata', 'rewriteframes', 'sessiontiming'];
1414

@@ -29,7 +29,7 @@ targets.forEach(jsVersion => {
2929
outputFileBase: () => `bundles/bundle.tracing${jsVersion === 'es5' ? '.es5' : ''}`,
3030
});
3131

32-
addonIntegrationFiles.forEach(integrationName => {
32+
browserPluggableIntegrationFiles.forEach(integrationName => {
3333
const integrationsBundleConfig = makeBaseBundleConfig({
3434
bundleType: 'addon',
3535
entrypoints: [`src/integrations/${integrationName}.ts`],

0 commit comments

Comments
 (0)