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

fix: disable deprecation warnings #1971

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

cristiand391
Copy link
Member

What does this PR do?

Disables deprecation warnings by passing in the --no-deprecation flag to node
forcedotcom/cli#2535

--no-deprecation:
https://nodejs.org/api/cli.html#--no-deprecation

Why not use --disable-warning= DEP0040 to only disable the punycode deprecation warning?
--disable-warning was added in node v21, we still support node v18 so we can't use that flag yet.

Setting it dynamically like in the block above doesn't work because NODE_OPTIONS is expected to be set before the node process starts.

if (process.version.startsWith('v22') {
  process.env.NODE_OPTIONS = '--disable-warning= DEP0040'
}

https://nodejs.org/docs/latest-v22.x/api/cli.html#--disable-warningcode-or-type
https://nodejs.org/api/deprecations.html#dep0040-nodepunycode-module

Acceptance Criteria

How do you know this change is successful? What is the scope of this change? What tests test the criteria (or why no tests)?

The Acceptance Criteria can be copied from the work item if they exist there but it is useful to have on the PR when reviewing the code.

Testing Notes

run commands via bin/run on node v18, v22 and v23, see there's no deprecation warnings from punycode usage.

What issues does this PR fix or reference?

@W-17013195@

shetzel
shetzel previously approved these changes Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants