From cdb8c4252dccfafe04d232f20f93a0e4c822bcd2 Mon Sep 17 00:00:00 2001 From: Caio Lins Date: Tue, 11 Mar 2025 17:05:45 +1000 Subject: [PATCH 1/2] typo: Turbo instead of Trubo Co-authored-by: Caio Lins --- packages/bundler-plugin-core/src/index.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/bundler-plugin-core/src/index.ts b/packages/bundler-plugin-core/src/index.ts index a5323f6f..29ad02db 100644 --- a/packages/bundler-plugin-core/src/index.ts +++ b/packages/bundler-plugin-core/src/index.ts @@ -337,9 +337,9 @@ export function sentryUnpluginFactory({ } // https://turbo.build/repo/docs/reference/system-environment-variables#environment-variables-in-tasks const isRunningInTurboRepo = Boolean(process.env["TURBO_HASH"]); - const getTruboRepoEnvPassthroughWarning = (envVarName: string) => + const getTurboRepoEnvPassthroughWarning = (envVarName: string) => isRunningInTurboRepo - ? `\nYou seem to be using Truborepo, did you forget to put ${envVarName} in \`passThroughEnv\`? https://turbo.build/repo/docs/reference/configuration#passthroughenv` + ? `\nYou seem to be using Turborepo, did you forget to put ${envVarName} in \`passThroughEnv\`? https://turbo.build/repo/docs/reference/configuration#passthroughenv` : ""; if (!options.release.name) { logger.debug( @@ -350,17 +350,17 @@ export function sentryUnpluginFactory({ } else if (!options.authToken) { logger.warn( "No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/" + - getTruboRepoEnvPassthroughWarning("SENTRY_AUTH_TOKEN") + getTurboRepoEnvPassthroughWarning("SENTRY_AUTH_TOKEN") ); } else if (!options.org && !options.authToken.startsWith("sntrys_")) { logger.warn( "No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug." + - getTruboRepoEnvPassthroughWarning("SENTRY_ORG") + getTurboRepoEnvPassthroughWarning("SENTRY_ORG") ); } else if (!options.project) { logger.warn( "No project provided. Will not create release. Please set the `project` option to your Sentry project slug." + - getTruboRepoEnvPassthroughWarning("SENTRY_PROJECT") + getTurboRepoEnvPassthroughWarning("SENTRY_PROJECT") ); } else { plugins.push( @@ -405,17 +405,17 @@ export function sentryUnpluginFactory({ } else if (!options.authToken) { logger.warn( "No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/" + - getTruboRepoEnvPassthroughWarning("SENTRY_AUTH_TOKEN") + getTurboRepoEnvPassthroughWarning("SENTRY_AUTH_TOKEN") ); } else if (!options.org && !options.authToken.startsWith("sntrys_")) { logger.warn( "No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug." + - getTruboRepoEnvPassthroughWarning("SENTRY_ORG") + getTurboRepoEnvPassthroughWarning("SENTRY_ORG") ); } else if (!options.project) { logger.warn( "No project provided. Will not upload source maps. Please set the `project` option to your Sentry project slug." + - getTruboRepoEnvPassthroughWarning("SENTRY_PROJECT") + getTurboRepoEnvPassthroughWarning("SENTRY_PROJECT") ); } else { // This option is only strongly typed for the webpack plugin, where it is used. It has no effect on other plugins From 41dc0bac3132eb37e33507f92f320f11416bef8b Mon Sep 17 00:00:00 2001 From: Caio Lins Date: Tue, 11 Mar 2025 17:08:35 +1000 Subject: [PATCH 2/2] typo: Turborepo not TurboRepo Co-authored-by: Caio Lins --- packages/bundler-plugin-core/src/index.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/bundler-plugin-core/src/index.ts b/packages/bundler-plugin-core/src/index.ts index 29ad02db..0dcf2785 100644 --- a/packages/bundler-plugin-core/src/index.ts +++ b/packages/bundler-plugin-core/src/index.ts @@ -336,9 +336,9 @@ export function sentryUnpluginFactory({ plugins.push(moduleMetadataInjectionPlugin(injectionCode)); } // https://turbo.build/repo/docs/reference/system-environment-variables#environment-variables-in-tasks - const isRunningInTurboRepo = Boolean(process.env["TURBO_HASH"]); - const getTurboRepoEnvPassthroughWarning = (envVarName: string) => - isRunningInTurboRepo + const isRunningInTurborepo = Boolean(process.env["TURBO_HASH"]); + const getTurborepoEnvPassthroughWarning = (envVarName: string) => + isRunningInTurborepo ? `\nYou seem to be using Turborepo, did you forget to put ${envVarName} in \`passThroughEnv\`? https://turbo.build/repo/docs/reference/configuration#passthroughenv` : ""; if (!options.release.name) { @@ -350,17 +350,17 @@ export function sentryUnpluginFactory({ } else if (!options.authToken) { logger.warn( "No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/" + - getTurboRepoEnvPassthroughWarning("SENTRY_AUTH_TOKEN") + getTurborepoEnvPassthroughWarning("SENTRY_AUTH_TOKEN") ); } else if (!options.org && !options.authToken.startsWith("sntrys_")) { logger.warn( "No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug." + - getTurboRepoEnvPassthroughWarning("SENTRY_ORG") + getTurborepoEnvPassthroughWarning("SENTRY_ORG") ); } else if (!options.project) { logger.warn( "No project provided. Will not create release. Please set the `project` option to your Sentry project slug." + - getTurboRepoEnvPassthroughWarning("SENTRY_PROJECT") + getTurborepoEnvPassthroughWarning("SENTRY_PROJECT") ); } else { plugins.push( @@ -405,17 +405,17 @@ export function sentryUnpluginFactory({ } else if (!options.authToken) { logger.warn( "No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/" + - getTurboRepoEnvPassthroughWarning("SENTRY_AUTH_TOKEN") + getTurborepoEnvPassthroughWarning("SENTRY_AUTH_TOKEN") ); } else if (!options.org && !options.authToken.startsWith("sntrys_")) { logger.warn( "No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug." + - getTurboRepoEnvPassthroughWarning("SENTRY_ORG") + getTurborepoEnvPassthroughWarning("SENTRY_ORG") ); } else if (!options.project) { logger.warn( "No project provided. Will not upload source maps. Please set the `project` option to your Sentry project slug." + - getTurboRepoEnvPassthroughWarning("SENTRY_PROJECT") + getTurborepoEnvPassthroughWarning("SENTRY_PROJECT") ); } else { // This option is only strongly typed for the webpack plugin, where it is used. It has no effect on other plugins