Skip to content

Commit

Permalink
update debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Jul 1, 2024
1 parent 4174f98 commit d31895e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/js/tools/metroconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ export function withSentryBabelTransformer(config: MetroConfig): MetroConfig {
logger.debug('Default Babel transformer path from `config.transformer`:', defaultBabelTransformerPath);

if (!defaultBabelTransformerPath) {
// This has to be console.warn because the options is enabled but won't be used
// eslint-disable-next-line no-console
console.warn('`transformer.babelTransformerPath` is undefined.');
// eslint-disable-next-line no-console
Expand Down
3 changes: 2 additions & 1 deletion src/js/tools/sentryBabelTransformerUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function cleanDefaultBabelTransformerPath(): void {
}
logger.debug('Cleaned default Babel transformer path');
} catch (e) {
// We don't want to fail the build if we can't clean the file
// eslint-disable-next-line no-console
console.error('[Sentry] Failed to clean default Babel transformer path:', e);
}
Expand All @@ -59,7 +60,7 @@ function getDefaultBabelTransformerPath(): string {
export function loadDefaultBabelTransformer(): BabelTransformer {
const defaultBabelTransformerPath = readDefaultBabelTransformerPath();
if (!defaultBabelTransformerPath) {
throw new Error('Default Babel transformer path not found');
throw new Error('Default Babel Transformer Path not found in `.sentry` directory.');
}

logger.debug(`Loading default Babel transformer from ${defaultBabelTransformerPath}`);
Expand Down

0 comments on commit d31895e

Please sign in to comment.