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

Cli: Fixes #10992: Disable deprecation warning when running Joplin from CLI #11074

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

pedr
Copy link
Collaborator

@pedr pedr commented Sep 17, 2024

Fixes #10992

Summary

The change is to add a flag to the shebang line that should hide all warning when the main.js file is run directly (aka $: ./main.js), but it shouldn't affect when running in dev mode (yarn start).

I took more time to fix this than it was probably necessary because at first I was testing the modification running node ./build/main.js version which ignored the shebang line.

The depreciation warning started to appear when running the CLI with Node.js version >21 where punycode std lib is being deprecated but it is still used by a lot of our dependencies.

Testing

  • Open packages/app-cli
  • Run yarn build
  • Run ./build/main.js version
  • It should printout the app-cli version without showing the deprecation warning

Dev environment should still print the warning:

  • Run yarn start version on packages/app-cli
  • It should printout the app-cli but also the deprecation warning

@pedr pedr added bug It's a bug cli CLI app specific issue labels Sep 17, 2024
@pedr pedr requested a review from laurent22 September 17, 2024 14:40
@pedr pedr changed the title Cli: Fixes #10992: Disable deprecation warning when running joplin from CLI Cli: Fixes #10992: Disable deprecation warning when running Joplin from CLI Sep 17, 2024
@laurent22 laurent22 merged commit 817f3bc into laurent22:dev Sep 23, 2024
10 checks passed
@pedr pedr deleted the disable-no-deprecation-app-cli branch September 24, 2024 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug cli CLI app specific issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CLI] DeprecationWarning: The punycode module is deprecated.
2 participants