Replace Node.js Buffer with Unit8Array [#3398216]
Table of Contents
Problem/Motivation
From @coby.sher in slack: drupal.slack.com/archives/C05BP6659U0/p1698411217734069?thread_t…
> An interesting article here on Node.js Buffer and why we maybe shouldn’t use it! TLDR: Apparently under the hood it’s the same as a Unit8Array which is valid in both the browser AND node, while Buffer is node.js only. The article suggests moving away from Buffer and using Unit8Array and a util they made for things like base64 encoding.
We may want to replace our esbuild polyfill stuff with this approach.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Read more here: Source link
