Skip to content

Commit

Permalink
feat: remove RENOVATE_X_IGNORE_NODE_WARN (#29835)
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh committed Jun 25, 2024
1 parent a581f7b commit 03f5c5c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
4 changes: 4 additions & 0 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2250,6 +2250,10 @@ Be careful with remapping `warn` or `error` messages to lower log levels, as it
{
"matchMessage": "Package lookup error",
"newLogLevel": "warn"
},
{
"matchMessage": "/^Please upgrade the version of Node.js/",
"newLogLevel": "info"
}
]
}
Expand Down
4 changes: 0 additions & 4 deletions docs/usage/self-hosted-experimental.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ Default value: `250` (milliseconds).
If set to any value, Renovate will use a "hard" `process.exit()` once all work is done, even if a sub-process is otherwise delaying Node.js from exiting.
See [issue 8660](https://github.com/renovatebot/renovate/issues/8660) for background on why this was created.

## `RENOVATE_X_IGNORE_NODE_WARN`

Suppress the default warning when a deprecated version of Node.js is used to run Renovate.

## `RENOVATE_X_IGNORE_RE2`

Skip initializing `RE2` for regular expressions and instead use Node-native `RegExp` instead.
Expand Down
8 changes: 4 additions & 4 deletions lib/workers/global/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function checkEnv(): void {
const range = pkg.engines!.node!;
const rangeNext = pkg['engines-next']?.node;
if (process.release?.name !== 'node' || !process.versions?.node) {
logger[process.env.RENOVATE_X_IGNORE_NODE_WARN ? 'info' : 'warn'](
logger.warn(
{ release: process.release, versions: process.versions },
'Unknown node environment detected.',
);
Expand All @@ -86,7 +86,7 @@ function checkEnv(): void {
rangeNext &&
!semver.satisfies(process.versions?.node, rangeNext)
) {
logger[process.env.RENOVATE_X_IGNORE_NODE_WARN ? 'info' : 'warn'](
logger.warn(
{ versions: process.versions },
`Please upgrade the version of Node.js used to run Renovate to satisfy "${rangeNext}". Support for your current version will be removed in Renovate's next major release.`,
);
Expand Down Expand Up @@ -173,12 +173,12 @@ export async function start(): Promise<number> {

await validatePresets(config);

setGlobalLogLevelRemaps(config.logLevelRemap);

checkEnv();

// validate secrets. Will throw and abort if invalid
validateConfigSecrets(config);

setGlobalLogLevelRemaps(config.logLevelRemap);
});

// autodiscover repositories (needs to come after platform initialization)
Expand Down
2 changes: 0 additions & 2 deletions tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ LABEL org.opencontainers.image.source="https://github.com/renovatebot/renovate"

WORKDIR /usr/src/app

ENV RENOVATE_X_IGNORE_NODE_WARN=true

COPY tools/docker/bin/ /usr/local/bin/
CMD ["renovate"]

Expand Down

0 comments on commit 03f5c5c

Please sign in to comment.