Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: renovatebot/renovate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 39.203.1
Choose a base ref
...
head repository: renovatebot/renovate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 39.204.0
Choose a head ref
  • 1 commit
  • 2 files changed
  • 2 contributors

Commits on Mar 16, 2025

  1. feat: add transform template log (#34821)

    Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
    bdovaz and secustor authored Mar 16, 2025
    Copy the full SHA
    fe36034 View commit details
Showing with 14 additions and 2 deletions.
  1. +12 −2 lib/modules/datasource/custom/index.ts
  2. +2 −0 lib/modules/datasource/custom/utils.ts
14 changes: 12 additions & 2 deletions lib/modules/datasource/custom/index.ts
Original file line number Diff line number Diff line change
@@ -43,7 +43,10 @@ export class CustomDatasource extends Datasource {
return null;
}

logger.trace({ data }, `Custom manager fetcher '${format}' returned data.`);
logger.trace(
{ data },
`Custom datasource API fetcher '${format}' received data. Starting transformation.`,
);

for (const transformTemplate of transformTemplates) {
const expression = getExpression(transformTemplate);
@@ -57,7 +60,14 @@ export class CustomDatasource extends Datasource {
}

try {
data = await expression.evaluate(data);
const modifiedData = await expression.evaluate(data);

logger.trace(
{ before: data, after: modifiedData },
`Custom datasource transformed data.`,
);

data = modifiedData;
} catch (err) {
logger.once.warn(
{ err },
2 changes: 2 additions & 0 deletions lib/modules/datasource/custom/utils.ts
Original file line number Diff line number Diff line change
@@ -39,6 +39,8 @@ export function massageCustomDatasourceConfig(
transform.push(templated);
}

logger.trace({ transform }, `Custom datasource compiled data.`);

return {
format: customDatasource.format ?? 'json',
defaultRegistryUrlTemplate: registryUrl,