diff --git a/package.json b/package.json index e2faff37..3cb00d76 100644 --- a/package.json +++ b/package.json @@ -56,18 +56,18 @@ "e2e": "xvfb-maybe vitest run --root=./test/e2e --silent=false --disable-console-intercept" }, "dependencies": { - "@sentry/browser": "8.9.2", - "@sentry/core": "8.9.2", - "@sentry/node": "8.9.2", - "@sentry/types": "8.9.2", - "@sentry/utils": "8.9.2", + "@sentry/browser": "8.12.0", + "@sentry/core": "8.12.0", + "@sentry/node": "8.12.0", + "@sentry/types": "8.12.0", + "@sentry/utils": "8.12.0", "deepmerge": "4.3.1" }, "devDependencies": { "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-typescript": "^11.1.6", - "@sentry-internal/eslint-config-sdk": "8.9.2", - "@sentry-internal/typescript": "8.9.2", + "@sentry-internal/eslint-config-sdk": "8.12.0", + "@sentry-internal/typescript": "8.12.0", "@types/busboy": "^0.2.3", "@types/form-data": "^2.5.0", "@types/koa": "^2.0.52", @@ -96,4 +96,4 @@ "node": "20.12.0", "yarn": "1.22.19" } -} +} \ No newline at end of file diff --git a/src/main/index.ts b/src/main/index.ts index 67c4c173..b8a47c01 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -48,6 +48,7 @@ export { fastifyIntegration, flush, functionToStringIntegration, + generateInstrumentOnce, getActiveSpan, getAutoPerformanceIntegrations, getClient, diff --git a/src/main/integrations/electron-minidump.ts b/src/main/integrations/electron-minidump.ts index 1358b436..a9c637eb 100644 --- a/src/main/integrations/electron-minidump.ts +++ b/src/main/integrations/electron-minidump.ts @@ -126,8 +126,8 @@ export const electronMinidumpIntegration = defineIntegration(() => { // Update the extra parameters in the main process const mainParams = getNativeUploaderExtraParams(event); - for (const key of Object.keys(mainParams)) { - crashReporter.addExtraParameter(key, mainParams[key]); + for (const [key, value] of Object.entries(mainParams)) { + crashReporter.addExtraParameter(key, value); } }) .catch((error) => logger.error(error)); diff --git a/src/main/transports/electron-net.ts b/src/main/transports/electron-net.ts index 29366a6f..ef48a030 100644 --- a/src/main/transports/electron-net.ts +++ b/src/main/transports/electron-net.ts @@ -76,8 +76,8 @@ export function createElectronNetRequestExecutor( const req = net.request(getRequestOptions(url)); - for (const header of Object.keys(headers)) { - req.setHeader(header, headers[header]); + for (const [header, value] of Object.entries(headers)) { + req.setHeader(header, value); } req.on('response', (res) => { @@ -93,13 +93,15 @@ export function createElectronNetRequestExecutor( // "Key-value pairs of header names and values. Header names are lower-cased." // https://nodejs.org/api/http.html#http_message_headers - const retryAfterHeader = res.headers['retry-after'] ?? undefined; - const rateLimitsHeader = res.headers['x-sentry-rate-limits'] ?? undefined; + const retryAfterHeader = res.headers['retry-after'] ?? null; + const rateLimitsHeader = res.headers['x-sentry-rate-limits'] ?? null; resolve({ headers: dropUndefinedKeys({ - 'retry-after': Array.isArray(retryAfterHeader) ? retryAfterHeader[0] : retryAfterHeader, - 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader) ? rateLimitsHeader[0] : rateLimitsHeader, + 'retry-after': Array.isArray(retryAfterHeader) ? retryAfterHeader[0] || null : retryAfterHeader, + 'x-sentry-rate-limits': Array.isArray(rateLimitsHeader) + ? rateLimitsHeader[0] || null + : rateLimitsHeader, }), }); }); diff --git a/src/renderer/index.ts b/src/renderer/index.ts index 56278258..fdb8204f 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -104,6 +104,7 @@ export { startSession, startSpan, startSpanManual, + thirdPartyErrorFilterIntegration, withActiveSpan, withIsolationScope, withScope, diff --git a/src/renderer/sdk.ts b/src/renderer/sdk.ts index 9622c572..d7a463d8 100644 --- a/src/renderer/sdk.ts +++ b/src/renderer/sdk.ts @@ -44,7 +44,7 @@ interface ElectronRendererOptions extends BrowserOptions { export function init( options: ElectronRendererOptions & O = {} as ElectronRendererOptions & O, // This parameter name ensures that TypeScript error messages contain a hint for fixing SDK version mismatches - originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v8_9_2: O) => void = browserInit, + originalInit: (if_you_get_a_typescript_error_ensure_sdks_use_version_v8_12_0: O) => void = browserInit, ): void { // Ensure the browser SDK is only init'ed once. if (window?.__SENTRY__RENDERER_INIT__) { diff --git a/yarn.lock b/yarn.lock index 3346412f..50ac775f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -690,22 +690,22 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.16.4.tgz#c09ad9a132ccb5a67c4f211d909323ab1294f95f" integrity sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A== -"@sentry-internal/browser-utils@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.9.2.tgz#36b077fcb1a4ee8f2ed67437b2d9030c4e9e7586" - integrity sha512-2A0A6TnfzFDvYCRWS9My3t+JKG6KlslhyaN35BTiOTlYDauEekyJP7BFFyeTJXCHm2BQgI8aRZhBKm+oR9QuYw== - dependencies: - "@sentry/core" "8.9.2" - "@sentry/types" "8.9.2" - "@sentry/utils" "8.9.2" - -"@sentry-internal/eslint-config-sdk@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-8.9.2.tgz#76a74376f7424fe288ee5c29f05151d677a0690c" - integrity sha512-/4yxDNXRLcXterdciPaYMeIGWtxtfzHNj2jGqkiHIYtceH4ud33izpEIPNT9kcY9wB0pPZdC2KM33WdCIVTXgA== - dependencies: - "@sentry-internal/eslint-plugin-sdk" "8.9.2" - "@sentry-internal/typescript" "8.9.2" +"@sentry-internal/browser-utils@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.12.0.tgz#ddea4b1ed1ee798beccf71b5b531928f7bdfd082" + integrity sha512-h7HRqED15Qa+DRt8iZGna24Z331nglgjPzdFn4+u+jvnZrehUjH0vjsfuj7qhwSUNZu8Rxi1ZlUYFURjLDTKCA== + dependencies: + "@sentry/core" "8.12.0" + "@sentry/types" "8.12.0" + "@sentry/utils" "8.12.0" + +"@sentry-internal/eslint-config-sdk@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-config-sdk/-/eslint-config-sdk-8.12.0.tgz#04d5311875b6c100909892b4dfe4c0ce506f4213" + integrity sha512-JLz+aWE6m12vk6K/a3jzgvRb5tjnTHXs5mDH/g9Lq/oJDXGO7p59R+xdAEhhOFTgYln82Rea/v0nByrpdW7cSA== + dependencies: + "@sentry-internal/eslint-plugin-sdk" "8.12.0" + "@sentry-internal/typescript" "8.12.0" "@typescript-eslint/eslint-plugin" "^5.48.0" "@typescript-eslint/parser" "^5.48.0" eslint-config-prettier "^6.11.0" @@ -715,70 +715,70 @@ eslint-plugin-jsdoc "^30.0.3" eslint-plugin-simple-import-sort "^5.0.3" -"@sentry-internal/eslint-plugin-sdk@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-8.9.2.tgz#50f720f49bee72727deaf2e2db8f87cb70f7a357" - integrity sha512-RvCQ8i4426fAxqEum+1mk1r+HzUnEgYdCDFviICBUSG06Sn7LLpNbEU93Jx4agZlrAIqD7lXWJwzsb1hWPv6Pg== - -"@sentry-internal/feedback@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.9.2.tgz#0afa4c630820b49125ad4b9ad2b38db10de81134" - integrity sha512-v04Q+08ohwautwmiDfK5hI+nFW2B/IYhBz7pZM9x1srkwmNA69XOFyo5u34TeVHhYOPbMM2Ubs0uNEcSWHgbbQ== - dependencies: - "@sentry/core" "8.9.2" - "@sentry/types" "8.9.2" - "@sentry/utils" "8.9.2" - -"@sentry-internal/replay-canvas@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.9.2.tgz#76ff2302f7dd6e3870a34b656e6b9b34e9275c18" - integrity sha512-vu9TssSjO+XbZjnoyYxMrBI4KgXG+zyqw3ThfPqG6o7O0BGa54fFwtZiMdGq/BHz017FuNiEz4fgtzuDd4gZJQ== - dependencies: - "@sentry-internal/replay" "8.9.2" - "@sentry/core" "8.9.2" - "@sentry/types" "8.9.2" - "@sentry/utils" "8.9.2" - -"@sentry-internal/replay@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.9.2.tgz#35460590a4be71ba050fd49de95e3f8b0f27e50f" - integrity sha512-YPnrnXJd6mJpJspJ8pI8hd1KTMOxw+BARP5twiDwXlij1RTotwnNoX9UGaSm+ZPTexPD++6Zyp6xQf4vKKP3yg== - dependencies: - "@sentry-internal/browser-utils" "8.9.2" - "@sentry/core" "8.9.2" - "@sentry/types" "8.9.2" - "@sentry/utils" "8.9.2" - -"@sentry-internal/typescript@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-8.9.2.tgz#6959e7fba889afc16e8bb8ef1f60e2eec0ed41f9" - integrity sha512-oR9cPqpW7m/iajjTKhEgfSnZaeluoMQSCJjCs4dcH4XzfvLlm0eMOI0fimmSKnh3OFrDUoz2d+5pZc68v5OtfQ== - -"@sentry/browser@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.9.2.tgz#4cfd63449f0038718b5435a4537f3d11123a396b" - integrity sha512-jI5XY4j8Sa+YteokI+4SW+A/ErZxPDnspjvV3dm5pIPWvEFhvDyXWZSepqaoqwo3L7fdkRMzXY8Bi4T7qDVMWg== - dependencies: - "@sentry-internal/browser-utils" "8.9.2" - "@sentry-internal/feedback" "8.9.2" - "@sentry-internal/replay" "8.9.2" - "@sentry-internal/replay-canvas" "8.9.2" - "@sentry/core" "8.9.2" - "@sentry/types" "8.9.2" - "@sentry/utils" "8.9.2" - -"@sentry/core@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.9.2.tgz#af0f2ec25b88da5467cf327d2ffcd555323c30e6" - integrity sha512-ixm8NISFlPlEo3FjSaqmq4nnd13BRHoafwJ5MG+okCz6BKGZ1SexEggP42/QpGvDprUUHnfncG6WUMgcarr1zA== - dependencies: - "@sentry/types" "8.9.2" - "@sentry/utils" "8.9.2" - -"@sentry/node@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-8.9.2.tgz#67a95050c499542c963da7bf9815f16aa3163607" - integrity sha512-Q+JBpR4yx3eUyyhwgugucfRtPg65gYvzJGEmjzcnDJXJqX8ms4HPpNv9o2Om7A4014JxIibUdrQ+p5idcT7SZA== +"@sentry-internal/eslint-plugin-sdk@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/eslint-plugin-sdk/-/eslint-plugin-sdk-8.12.0.tgz#87959c54eae493cef10fcbd2507762b04da9f29d" + integrity sha512-/r77Kw2VmJV4ICDoZczlzzcdY+tqOy0RxIiAeCKSDa5tVcEchPfKZV0Ux1xCPjR7fQcSZkL+XtxAJMXQpv1MjA== + +"@sentry-internal/feedback@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.12.0.tgz#c4ba284ad7ab8a611f5cde4f705df2888c686ae0" + integrity sha512-PvQ14wVOPmzRdYdmXD791CqERZZC4jZa5hnyBKBuF6ZpifIQ4Uk7spPu6ZO+Ympx3GtRlpYjk4dbjHyNSfYTwA== + dependencies: + "@sentry/core" "8.12.0" + "@sentry/types" "8.12.0" + "@sentry/utils" "8.12.0" + +"@sentry-internal/replay-canvas@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.12.0.tgz#b3f473ff3000f9151cdfcd26e1cf07ce8e3d60b4" + integrity sha512-0slfHZ3TD3MKeBu5NEGuKuecxStX23gts5L3mGFJd/zwsd04A31fhVmo6agIkxnZbOU4GPX/7HPWIeevkvy3ig== + dependencies: + "@sentry-internal/replay" "8.12.0" + "@sentry/core" "8.12.0" + "@sentry/types" "8.12.0" + "@sentry/utils" "8.12.0" + +"@sentry-internal/replay@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.12.0.tgz#c518139ea6805dcc3d47c050d9857486166e6e21" + integrity sha512-TJceMtzRnY3SCvt3nFDu9rlT00Le7SaV2RL3D7SyDuijvJbWvIw3DRk7yutpF8c9YKO9j6FMa4NlkCJ+YAnnKQ== + dependencies: + "@sentry-internal/browser-utils" "8.12.0" + "@sentry/core" "8.12.0" + "@sentry/types" "8.12.0" + "@sentry/utils" "8.12.0" + +"@sentry-internal/typescript@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/typescript/-/typescript-8.12.0.tgz#8ff21805124b2f2638dd7a311dd1eec863940658" + integrity sha512-7Bqvl1S+24+GxpnVpxnrFWaRw4bABDtoSTZA70OLVGz6K/O+1RMH6+/WIgBnSqu3okFRyAPRmFhEm7J34orEBQ== + +"@sentry/browser@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.12.0.tgz#12dba1c7c54d74bba6830e6625f851d55c56bce8" + integrity sha512-H82dmr7KQWoS2DQc5dJko5wNepltcEro1EM4mBeL2YmVbNRtoZzD3HQTpbxJJuFsTvEMZevvez5HFlpUgxmIwQ== + dependencies: + "@sentry-internal/browser-utils" "8.12.0" + "@sentry-internal/feedback" "8.12.0" + "@sentry-internal/replay" "8.12.0" + "@sentry-internal/replay-canvas" "8.12.0" + "@sentry/core" "8.12.0" + "@sentry/types" "8.12.0" + "@sentry/utils" "8.12.0" + +"@sentry/core@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.12.0.tgz#e1cbb5c0494db708ade84295f40360250709fd81" + integrity sha512-y+5Hlf/E45nj2adJy4aUCNBefQbyWIX66Z9bOM6JjnVB0hxCm5H0sYqrFKldYqaeZx6/Q2cgAcGs61krUxNerQ== + dependencies: + "@sentry/types" "8.12.0" + "@sentry/utils" "8.12.0" + +"@sentry/node@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-8.12.0.tgz#eeb81e74a413c64c2386fbd5f78fa85e0c43716a" + integrity sha512-NWuEAjq9iIxc0o78UtFUtUa2Xwb3iowWNzBD7Dz8yKe6EGHA+QnC6GJAYt6xuUuH3/RUbPveR4qJ2EhKo6lkjQ== dependencies: "@opentelemetry/api" "^1.9.0" "@opentelemetry/context-async-hooks" "^1.25.0" @@ -803,33 +803,33 @@ "@opentelemetry/sdk-trace-base" "^1.25.0" "@opentelemetry/semantic-conventions" "^1.25.0" "@prisma/instrumentation" "5.15.0" - "@sentry/core" "8.9.2" - "@sentry/opentelemetry" "8.9.2" - "@sentry/types" "8.9.2" - "@sentry/utils" "8.9.2" + "@sentry/core" "8.12.0" + "@sentry/opentelemetry" "8.12.0" + "@sentry/types" "8.12.0" + "@sentry/utils" "8.12.0" optionalDependencies: opentelemetry-instrumentation-fetch-node "1.2.0" -"@sentry/opentelemetry@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry/opentelemetry/-/opentelemetry-8.9.2.tgz#64048025283db5099bcf9b8e4e60a9b68b729610" - integrity sha512-Q6SHDQhrsBPcMi7ejqVdNTkt6SCTIhpGsFN8QR7daH3uvM0X2O7ciCuO9gRNRTEkflEINV4SBZEjANYH7BkRAg== +"@sentry/opentelemetry@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry/opentelemetry/-/opentelemetry-8.12.0.tgz#9bda3f058ca719d5369d05eb90b158c5d36f5f48" + integrity sha512-CjMzd8ytyf2C6emkvIAmvAD45LCqcQl6Ygl8UEFX6USGywhUyqFIaNvYlb0RA7/eaQ7mcKMflQ1z7ptj0YxgEQ== dependencies: - "@sentry/core" "8.9.2" - "@sentry/types" "8.9.2" - "@sentry/utils" "8.9.2" + "@sentry/core" "8.12.0" + "@sentry/types" "8.12.0" + "@sentry/utils" "8.12.0" -"@sentry/types@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.9.2.tgz#d143383fc35552d9f153042cc6d56c5ee8ec2fa6" - integrity sha512-+LFOyQGl+zk5SZRGZD2MEURf7i5RHgP/mt3s85Rza+vz8M211WJ0YsjkIGUJFSY842nged5QLx4JysLaBlLymg== +"@sentry/types@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.12.0.tgz#a14608eddec270c994d86a06408c0d3e5b11f1f2" + integrity sha512-pKuW64IjgcklWAOHzPJ02Ej480hyL25TLnYCAfl2TDMrYc+N0bbbH1N7ZxqJpTSVK9IxZPY/t2TRxpQBiyPEcg== -"@sentry/utils@8.9.2": - version "8.9.2" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.9.2.tgz#58b003d9c1302f61192e7c99ea42bf1cd5cad7f7" - integrity sha512-A4srR9mEBFdVXwSEKjQ94msUbVkMr8JeFiEj9ouOFORw/Y/ux/WV2bWVD/ZI9wq0TcTNK8L1wBgU8UMS5lIq3A== +"@sentry/utils@8.12.0": + version "8.12.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.12.0.tgz#be6a6514a034a04bb8feb5556a90ac2b83aa9310" + integrity sha512-pwYMoOmexz3vsNSOJGPvD2qwp/fsPcr8mkFk67wMM37Y+30KQ8pF4Aq1cc+HBRIn1tKmenzFDPTczSdVPFxm3Q== dependencies: - "@sentry/types" "8.9.2" + "@sentry/types" "8.12.0" "@sinclair/typebox@^0.27.8": version "0.27.8"