@sentry/junior 0.65.1 → 0.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -22550,7 +22550,9 @@ async function handleSlackWebhook(args) {
22550
22550
  services: args.services
22551
22551
  });
22552
22552
  if (shouldPersistBeforeAck(parsed)) {
22553
- await eventTask;
22553
+ await eventTask.catch((error) => {
22554
+ logException(error, "slack_event_persist_failed");
22555
+ });
22554
22556
  } else {
22555
22557
  enqueue(
22556
22558
  args.waitUntil,
@@ -30,6 +30,7 @@ function initSentry() {
30
30
  sendDefaultPii: true,
31
31
  enabled: Boolean(dsn),
32
32
  enableLogs,
33
+ registerEsmLoaderHooks: false,
33
34
  streamGenAiSpans: true,
34
35
  integrations: [
35
36
  sentry_exports.vercelAIIntegration({
package/dist/nitro.js CHANGED
@@ -313,6 +313,15 @@ function assertSerializableDirectPluginSet(pluginSet) {
313
313
  function resolveConversationWorkQueueTopic(options) {
314
314
  return options.conversationWorkQueueTopic?.trim() || process.env.JUNIOR_CONVERSATION_WORK_QUEUE_TOPIC?.trim() || DEFAULT_CONVERSATION_WORK_QUEUE_TOPIC;
315
315
  }
316
+ function bundleOpenTelemetryLoaderHooks(nitro) {
317
+ const existing = Array.isArray(nitro.options.noExternals) ? nitro.options.noExternals : [];
318
+ const additions = ["import-in-the-middle", "require-in-the-middle"].filter(
319
+ (pkg) => !existing.includes(pkg)
320
+ );
321
+ if (additions.length > 0) {
322
+ nitro.options.noExternals = [...existing, ...additions];
323
+ }
324
+ }
316
325
  function configureVercelDeployment(nitro, options) {
317
326
  const defaultMaxDuration = options.maxDuration ?? DEFAULT_FUNCTION_MAX_DURATION_SECONDS;
318
327
  const queueTopic = resolveConversationWorkQueueTopic(options);
@@ -356,6 +365,7 @@ function juniorNitro(options = {}) {
356
365
  options.cwd ?? nitro.options.rootDir ?? process.cwd()
357
366
  );
358
367
  configureVercelDeployment(nitro, options);
368
+ bundleOpenTelemetryLoaderHooks(nitro);
359
369
  applyRolldownTreeshakeWorkaround(nitro);
360
370
  const pluginSource = options.plugins;
361
371
  const pluginModule = isPluginModuleReference(pluginSource) ? resolvePluginModule(cwd, pluginSource) : void 0;
@@ -380,7 +390,7 @@ function juniorNitro(options = {}) {
380
390
  plugins: pluginCatalogConfig,
381
391
  trustedPluginRegistrations
382
392
  });
383
- nitro.hooks.hook("compiled", async () => {
393
+ const copyBuildContent = async () => {
384
394
  const pluginSet = await loadConfiguredPluginSet();
385
395
  const compiledPluginCatalogConfig = pluginCatalogConfigFromPluginSet(pluginSet);
386
396
  copyAppAndPluginContent(
@@ -393,6 +403,16 @@ function juniorNitro(options = {}) {
393
403
  nitro.options.output.serverDir,
394
404
  options.includeFiles
395
405
  );
406
+ };
407
+ nitro.hooks.hook("rollup:before", (_nitro, config) => {
408
+ const buildConfig = config;
409
+ buildConfig.plugins ??= [];
410
+ buildConfig.plugins.push({
411
+ name: "junior:copy-build-content",
412
+ async writeBundle() {
413
+ await copyBuildContent();
414
+ }
415
+ });
396
416
  });
397
417
  }
398
418
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/junior",
3
- "version": "0.65.1",
3
+ "version": "0.66.0",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -65,7 +65,7 @@
65
65
  "node-html-markdown": "^2.0.0",
66
66
  "yaml": "^2.9.0",
67
67
  "zod": "^4.4.3",
68
- "@sentry/junior-plugin-api": "0.65.1"
68
+ "@sentry/junior-plugin-api": "0.66.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/node": "^25.9.1",
@@ -77,7 +77,7 @@
77
77
  "typescript": "^6.0.3",
78
78
  "vercel": "^54.4.0",
79
79
  "vitest": "^4.1.7",
80
- "@sentry/junior-scheduler": "0.65.1"
80
+ "@sentry/junior-scheduler": "0.66.0"
81
81
  },
82
82
  "scripts": {
83
83
  "build": "tsup && tsc -p tsconfig.build.json --emitDeclarationOnly",