From a6af8826fa58a2f4dba3f506afd3bbadc10ea2e5 Mon Sep 17 00:00:00 2001 From: Burak Yigit Kaya Date: Fri, 23 May 2025 21:17:38 +0100 Subject: [PATCH] fix(node): Don't warn about Spotlight on empty NODE_ENV When running with `spotlight: true` I got a warning about not being in development mode when `NODE_ENV` was not set. This typically indicates dev mode so added a check for that. --- packages/node/src/integrations/spotlight.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/node/src/integrations/spotlight.ts b/packages/node/src/integrations/spotlight.ts index 49a169076798..f47ea064efa8 100644 --- a/packages/node/src/integrations/spotlight.ts +++ b/packages/node/src/integrations/spotlight.ts @@ -20,7 +20,12 @@ const _spotlightIntegration = ((options: Partial = { return { name: INTEGRATION_NAME, setup(client) { - if (typeof process === 'object' && process.env && process.env.NODE_ENV !== 'development') { + if ( + typeof process === 'object' && + process.env && + process.env.NODE_ENV && + process.env.NODE_ENV !== 'development' + ) { logger.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?"); } connectToSpotlight(client, _options);