1
0
mirror of https://gitcode.com/github-mirrors/react-native-update-cli.git synced 2025-09-16 09:41:38 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Deprecate new Buffer usage

This commit is contained in:
sunnylqm
2020-02-27 00:06:43 +08:00
parent d63ba619ba
commit 4a062c68af

View File

@@ -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;
}