diff --git a/biome.json b/biome.json index 52f6d6728bf4..3960297b92d1 100644 --- a/biome.json +++ b/biome.json @@ -23,6 +23,9 @@ }, "nursery": { "noUnusedImports": "error" + }, + "performance": { + "noAccumulatingSpread": "error" } }, "ignore": [".vscode/*", "**/*.json"] diff --git a/packages/integrations/scripts/buildBundles.ts b/packages/integrations/scripts/buildBundles.ts index d056d5a523e2..b5eb77730d40 100644 --- a/packages/integrations/scripts/buildBundles.ts +++ b/packages/integrations/scripts/buildBundles.ts @@ -33,7 +33,10 @@ async function buildBundle(integration: string, jsVersion: string): Promise [...tasks, buildBundle(integration, 'es5'), buildBundle(integration, 'es6')], + (tasks, integration) => { + tasks.push(buildBundle(integration, 'es5'), buildBundle(integration, 'es6')); + return tasks; + }, [] as Promise[], ); diff --git a/packages/utils/src/baggage.ts b/packages/utils/src/baggage.ts index 0202f0ec00f5..25210d02bbc4 100644 --- a/packages/utils/src/baggage.ts +++ b/packages/utils/src/baggage.ts @@ -40,10 +40,10 @@ export function baggageHeaderToDynamicSamplingContext( // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it baggageObject = baggageHeader.reduce>((acc, curr) => { const currBaggageObject = baggageHeaderToObject(curr); - return { - ...acc, - ...currBaggageObject, - }; + for (const key of Object.keys(currBaggageObject)) { + acc[key] = currBaggageObject[key]; + } + return acc; }, {}); } else { // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but diff --git a/scripts/prepack.ts b/scripts/prepack.ts index 65cd9ddbf631..43febdcde4ee 100644 --- a/scripts/prepack.ts +++ b/scripts/prepack.ts @@ -95,13 +95,14 @@ if (newPkgJson[EXPORT_MAP_ENTRY_POINT]) { if (newPkgJson[TYPES_VERSIONS_ENTRY_POINT]) { Object.entries(newPkgJson[TYPES_VERSIONS_ENTRY_POINT]).forEach(([key, val]) => { - newPkgJson[TYPES_VERSIONS_ENTRY_POINT][key] = Object.entries(val).reduce((acc, [key, val]) => { - const newKey = key.replace(`${buildDir}/`, ''); - return { - ...acc, - [newKey]: val.map(v => v.replace(`${buildDir}/`, '')), - }; - }, {}); + newPkgJson[TYPES_VERSIONS_ENTRY_POINT][key] = Object.entries(val).reduce( + (acc, [key, val]) => { + const newKey = key.replace(`${buildDir}/`, ''); + acc[newKey] = val.map(v => v.replace(`${buildDir}/`, '')); + return acc; + }, + {} as Record, + ); }); }