mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
Deprecate new Buffer usage
This commit is contained in:
@@ -312,7 +312,7 @@ async function diffFromPPK(origin, next, output) {
|
||||
}
|
||||
|
||||
//console.log({copies, deletes});
|
||||
zipfile.addBuffer(new Buffer(JSON.stringify({ copies, deletes })), '__diff.json');
|
||||
zipfile.addBuffer(Buffer.from(JSON.stringify({ copies, deletes })), '__diff.json');
|
||||
zipfile.end();
|
||||
await writePromise;
|
||||
}
|
||||
@@ -399,7 +399,7 @@ async function diffFromPackage(origin, next, output, originBundleName, transform
|
||||
}
|
||||
});
|
||||
|
||||
zipfile.addBuffer(new Buffer(JSON.stringify({ copies })), '__diff.json');
|
||||
zipfile.addBuffer(Buffer.from(JSON.stringify({ copies })), '__diff.json');
|
||||
zipfile.end();
|
||||
await writePromise;
|
||||
}
|
||||
|
Reference in New Issue
Block a user