Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Uses deprecated new Buffer() which gives warning #46

Open
buckett opened this issue Feb 14, 2023 · 0 comments · May be fixed by #47
Open

Uses deprecated new Buffer() which gives warning #46

buckett opened this issue Feb 14, 2023 · 0 comments · May be fixed by #47

Comments

@buckett
Copy link
Contributor

buckett commented Feb 14, 2023

Description

When running anything that makes requests to the API a warning is emitted on newer versions of nodejs:

(node:41042) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

This is because the code uses the new Buffer(string) method which is deprecated and since version 10 has emitted this warning: https://nodejs.org/api/buffer.html#new-bufferstring-encoding

buckett added a commit to buckett/canvas-data-cli that referenced this issue Feb 14, 2023
Since nodejs 6 `new Buffer(…)` has been deprecated and shouldn’t be used, this switches to the newer method and this gets rid of the warning.

Fixes instructure#46
@buckett buckett linked a pull request Feb 14, 2023 that will close this issue
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant