question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix `new Buffer` deprecation warning by updating dependency

See original GitHub issue

Right now, it seems this project uses a very old version of inquirer. What would it take to upgrade that? The main reason I care is because this seems to be blocking resolution of an annoying deprecation warning when using yarn with Node >= 10 because it uses commitizen#inquirer#external-editor#chardet (v0.4.2, which uses new Buffer(...) – v0.7.0 updates to Buffer.alloc(...), but it’s not getting used because here inquirer is pinned to 1.2.3).

It looks like these are the breaking changes between 1.x and 6.x:

  • 2.x: Drop support for node 0.10 and 0.12
  • 3.x: Drop support for Node < 4
  • 4.x: The core codebase went through a major es5 to 6 refactor. As such, we’re dropping support for Node 4. This change will likely require changes to the community Plugins as es6 classes are enforcing more restriction (like constructor can only be invoked with new)."
  • 5.x: Upgrade to RxJS v5 which updates a bunch of Reactive interface method names. For people not using the Reactive interface directly, this new major release should just work out of the box.
  • 6.x: Update to Rx.js v6

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
karlhorkycommented, Aug 20, 2018

In case you want to go ahead with the upgrade after all, I recently upgraded Inquirer.js from version 3 to 6 in inquirer-autocomplete-prompt. I tried to make the commits as granular as possible.

Maybe the pull request is good reference:

https://github.com/mokkabonna/inquirer-autocomplete-prompt/pull/64

1reaction
jimthedevcommented, Aug 20, 2018

I think it’s time for us to release a new 2.x version with some deprecation warnings about specific items. Then 3.x will just be a bigger breaking change release than we’d anticipated. IMO it is worth it at this point.

– Jim ForCy

On August 20, 2018 at 6:27:19 AM, Linus Unnebäck (notifications@github.com) wrote:

We could probably go to 3.x without problem, unfortunately going beyond that would be a breaking change from our side.

That being said, us passing inquirer to the adapter is deprecated, so we could probably create a breaking change that removes it 🙌

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/commitizen/cz-cli/issues/552#issuecomment-414284044, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGpiqplZGfITce-fcv4zuUZjWaXPIc6ks5uSp0XgaJpZM4WC7Va .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fixing "Buffer without new" deprecation warnings
Fixing "Buffer without new" deprecation warnings. ... dependency is out of date, try updating the dependency first, to see if the warning goes...
Read more >
How to fix DeprecationWarning: Buffer() - node.js
I am building a web app from a sample I found, and get a warning in my output "DeprecationWarning: Buffer() is deprecated due...
Read more >
Porting to the Buffer.from() / Buffer.alloc() API
This guide explains how to migrate to safe Buffer constructor methods. The migration fixes the following deprecation warning: The Buffer() and new Buffer() ......
Read more >
Buffer() is deprecated error on Galaxy after deployment
My meteor application running fine in local environment with node version 12, But after deploy the app to galaxy it shows this error,....
Read more >
DeprecationWarning
(node:8) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found