Skip to content

Commit 651c11f

Browse files
committed
refactor: replace diff-match-patch to @hackmd/diff-match-patch
Signed-off-by: BoHong Li <a60814billy@gmail.com>
1 parent 541576d commit 651c11f

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

lib/models/note.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var shortId = require('shortid')
1111
var Sequelize = require('sequelize')
1212
var async = require('async')
1313
var moment = require('moment')
14-
var DiffMatchPatch = require('diff-match-patch')
14+
var DiffMatchPatch = require('@hackmd/diff-match-patch')
1515
var dmp = new DiffMatchPatch()
1616
var S = require('string')
1717

lib/workers/dmpWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22
// external modules
3-
var DiffMatchPatch = require('diff-match-patch')
3+
var DiffMatchPatch = require('@hackmd/diff-match-patch')
44
var dmp = new DiffMatchPatch()
55

66
// core

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@hackmd/codemirror": "^5.41.2",
20+
"@hackmd/diff-match-patch": "^1.1.1",
2021
"@hackmd/idle-js": "^1.0.1",
2122
"@hackmd/js-sequence-diagrams": "^0.0.1-alpha.2",
2223
"@passport-next/passport-openid": "^1.0.0",
@@ -36,7 +37,6 @@
3637
"cookie": "0.3.1",
3738
"cookie-parser": "1.4.3",
3839
"deep-freeze": "^0.0.1",
39-
"diff-match-patch": "git+https://github.com/hackmdio/diff-match-patch.git",
4040
"ejs": "^2.5.5",
4141
"emojify.js": "~1.1.0",
4242
"express": ">=4.14",

yarn.lock

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
resolved "https://registry.yarnpkg.com/@hackmd/codemirror/-/codemirror-5.41.2.tgz#14ead072a736bf9f1cae3eb349d600f22fbaf69c"
2424
integrity sha512-uYvDnyIIqyC4lJ/Qn67Zkwj1olUvk5+r8smWkZiNjGEoYz5qjiULrYcPFvu8vPUv6axy5Qq1AXIJs6CUCx0zow==
2525

26+
"@hackmd/diff-match-patch@^1.1.1":
27+
version "1.1.1"
28+
resolved "https://registry.yarnpkg.com/@hackmd/diff-match-patch/-/diff-match-patch-1.1.1.tgz#9740833d315468fead567c336132faabe3f195eb"
29+
integrity sha512-eZc7w8fyRYCPIbzM56OA74HSuIgrlj62AgUSattDVCyGO5Kh6/ZLSgx1xvmypWjP16t4EUA1F5CoZvftbiZ5fg==
30+
2631
"@hackmd/idle-js@^1.0.1":
2732
version "1.0.1"
2833
resolved "https://registry.yarnpkg.com/@hackmd/idle-js/-/idle-js-1.0.1.tgz#89079a76d9c7bda87029660a708e72fbb2be3605"
@@ -2915,10 +2920,6 @@ diagnostics@^1.1.1:
29152920
enabled "1.0.x"
29162921
kuler "1.0.x"
29172922

2918-
"diff-match-patch@git+https://github.com/hackmdio/diff-match-patch.git":
2919-
version "1.1.0"
2920-
resolved "git+https://github.com/hackmdio/diff-match-patch.git#73e56e779a2a8503b05458e607077d0fd1d80419"
2921-
29222923
diff@3.5.0:
29232924
version "3.5.0"
29242925
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"

0 commit comments

Comments
 (0)