Use Object.assign instead of deprecated util._extend#1666
Use Object.assign instead of deprecated util._extend#1666nikeee wants to merge 2 commits intohttp-party:masterfrom
Object.assign instead of deprecated util._extend#1666Conversation
Resolves: ``` [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead. ``` When using Node.js 22
|
+1 |
|
When should we expect updated version with required changes for fix of this warning. |
so, when we can use the updated version 😂 |
|
Ping @indexzero |
|
Any release happening for this? |
|
What would it take to get this merged? |
|
Nice that this got merged. Would be awesome with a release now been a few years :) @jcrugzz is one in the works? or prob not happening? should we be using master instead? |
|
Now still no any progress after a year. So we have to put this patch in preinstall script [
'http-proxy/lib/http-proxy/index.js', 'http-proxy/lib/http-proxy/common.js', // any others
].map(id => require.resolve(id)).filter(file => /_extend/.test(fs.readFileSync(file, 'utf8'))).forEach(file => {
console.log('patching', file);
fs.writeFileSync(file, fs.readFileSync(file, 'utf8').replaceAll("require('util')._extend", 'Object.assign'));
}) |
|
Half of all framework dev servers depend on this dependency and the fix is a few lines of codes with easy replaces and we still don't get an official patch release. wtf. |
|
TBH this issue has been patched on Vite's side over a year ago, and this week, they dropped dependency on http-proxy, switching to a maintained fork, http-proxy-3. Which I would recommend doing as well. |
|
when it will be merged |
|
any updates on this? long time no update & release |
Gah, I dont even remember what I needed this PR merged for now lol |
|
+1 Is this repository is no longer being maintained? Are there alternative projects that should be used instead? |
|
When building an app using Vite, there is this deprecationw arning when using Node.js 22:
This PR resolves that.
Object.assignis supported since Node.js 4.