Skip to content

Thirty-two library is deprecated still using new Buffer() #711

@HermesZum

Description

@HermesZum

The thirty-two library is deprecated, uses the deprecated new Buffer(...) constructor in several places.
This usage is deprecated and should be replaced with Buffer.from(...) for safety and compatibility with modern Node.js versions.

/node_modules/.pnpm/@[email protected]/node_modules/thirty-two/lib/thirty-two/thirty-two.js

To safely replace the deprecated new Buffer(...) usage, use Buffer.from(...) instead.
How to update:
Replace new Buffer(plain) with Buffer.from(plain)
Replace new Buffer(quintetCount(plain) * 8) with Buffer.alloc(quintetCount(plain) * 8)
Replace new Buffer(encoded) with Buffer.from(encoded)
Replace new Buffer(Math.ceil(encoded.length * 5 / 8)) with Buffer.alloc(Math.ceil(encoded. Length * 5 / 8))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions