Remove usages of ??= operators throught the library
See original GitHub issueBug Description
There library is targeting Node 14 & 16, but contains usages of the ??= operator which is blocking production builds for various apps which are locked into Node 14. One was recently replaced, but there’s at least one more…
Reproducible By
Consuming library in Node.js v14 environment
Expected Behavior
Should run in Node.js v14 as expected
Logs & Screenshots
this[kHeadersList][kHeadersSortedMap] ??= new Map([...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1))
Environment
Ubuntu 18.04 LTS, Node lts/fermium
Additional context
Previous PR replacing another of these operators:
Issue Analytics
- State:
- Created a year ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
Replacing operator new and operator delete in applications ...
Replacing operator new and operator delete in applications that use shared libraries (C++). Edit online. You can define your own versions of operator...
Read more >New and delete operators override in libraries - Stack Overflow
have their own globally overridden version of the new and the delete operators and they use their own memory management?
Read more >operator delete, operator delete[] - cppreference.com
1) Called by delete-expressions to deallocate storage previously allocated for a single object. The behavior of the standard library ...
Read more >new and delete operators | Microsoft Learn
C++ supports dynamic allocation and deallocation of objects using the new and delete operators. These operators allocate memory for objects ...
Read more >Overloading New and Delete operator in c++ - GeeksforGeeks
We can use realloc() function in new function to re-allocate memory dynamically. 7. Overloaded new operator also enables programmers to squeeze ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@matthewlilley Probably the Next.js compiler.
You can close this issue here and the discussion can continue on the one your created for graph-client. I am certain we all will find a solution.
@ronag Some people bundle their Node.js application code into a single JavaScript file that contains everything for easier/faster deployment. I guess in this case people would have to transpile the undici with babel or even better omit the non-“Node.js 14” code by configuring webpack to instead load a “noop” module.