Files
klz-cables.com/.pnpm-store/v10/files/54/2832f996f998e6cb525c1c8cf2c975d86969841dce4d4470721b6c7ff4f64a7e1e368884c81d588c5acd0112c26a6d9c74d84d3ebf5fcf655b37ad491bdc37
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

31 lines
1.0 KiB
Plaintext

import { SDK_VERSION } from './version.js';
/**
* A builder for the SDK metadata in the options for the SDK initialization.
*
* Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.
* We don't extract it for bundle size reasons.
* @see https://github.com/getsentry/sentry-javascript/pull/7404
* @see https://github.com/getsentry/sentry-javascript/pull/4196
*
* If you make changes to this function consider updating the others as well.
*
* @param options SDK options object that gets mutated
* @param names list of package names
*/
function applySdkMetadata(options, name, names = [name], source = 'npm') {
const sdk = ((options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {});
if (!sdk.name) {
sdk.name = `sentry.javascript.${name}`;
sdk.packages = names.map(name => ({
name: `${source}:@sentry/${name}`,
version: SDK_VERSION,
}));
sdk.version = SDK_VERSION;
}
}
export { applySdkMetadata };
//# sourceMappingURL=sdkMetadata.js.map