Skip to content

Commit f5cc6ec

Browse files
committed
Remove async diff and patch methods, update version to 1.1.0, and clean up package dependencies.
1 parent 3c3eea4 commit f5cc6ec

File tree

3 files changed

+1
-33
lines changed

3 files changed

+1
-33
lines changed

bun.lock

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,3 @@ exports.native = native;
1010
exports.diff = native.diff;
1111
exports.patch = native.patch;
1212

13-
// 异步版本 (Promise)
14-
exports.diffAsync = function(oldBuf, newBuf) {
15-
return new Promise((resolve, reject) => {
16-
native.diff(oldBuf, newBuf, (err, result) => {
17-
if (err) reject(err);
18-
else resolve(result);
19-
});
20-
});
21-
};
22-
23-
exports.patchAsync = function(oldBuf, diffBuf) {
24-
return new Promise((resolve, reject) => {
25-
native.patch(oldBuf, diffBuf, (err, result) => {
26-
if (err) reject(err);
27-
else resolve(result);
28-
});
29-
});
30-
};

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-hdiffpatch",
3-
"version": "1.0.9",
3+
"version": "1.1.0",
44
"description": "hdiffpatch port to node.js",
55
"main": "index.js",
66
"scripts": {
@@ -14,9 +14,6 @@
1414
"dependencies": {
1515
"node-addon-api": "^8.5.0"
1616
},
17-
"devDependencies": {
18-
"md5": "^2.3.0"
19-
},
2017
"repository": {
2118
"type": "git",
2219
"url": "git+https://github.com/reactnativecn/node-hdiffpatch"

0 commit comments

Comments
 (0)