Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove RENOVATE_X_IGNORE_NODE_WARN #29835

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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