Skip to content

Commit 70b0b86

Browse files
committed
DEV: Add jsDiff dependency
For use in Discourse AI (discourse/discourse-ai#1355)
1 parent 1eba96a commit 70b0b86

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
Plugins & themes are unable to async-import npm modules directly.
3+
This wrapper provides them with a way to use morphlex, while keeping the `import()` in core's codebase.
4+
*/
5+
export default async function loadJSDiff() {
6+
return await import("diff");
7+
}

app/assets/javascripts/discourse/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@messageformat/runtime": "^3.0.1",
2828
"ace-builds": "^1.41.0",
2929
"decorator-transforms": "^2.3.0",
30+
"diff": "^8.0.1",
3031
"discourse-widget-hbs": "workspace:1.0.0",
3132
"ember-curry-component": "^0.3.0",
3233
"ember-resolver": "^13.1.1",
@@ -35,6 +36,8 @@
3536
"highlight.js": "11.11.1",
3637
"immer": "^10.1.1",
3738
"jspreadsheet-ce": "^4.15.0",
39+
"moment": "2.30.1",
40+
"moment-timezone": "0.5.45",
3841
"morphlex": "^0.0.16",
3942
"orderedmap": "^2.1.1",
4043
"pretty-text": "workspace:1.0.0",
@@ -51,9 +54,7 @@
5154
"prosemirror-schema-list": "^1.5.1",
5255
"prosemirror-state": "^1.4.3",
5356
"prosemirror-transform": "^1.10.4",
54-
"prosemirror-view": "^1.39.3",
55-
"moment": "2.30.1",
56-
"moment-timezone": "0.5.45"
57+
"prosemirror-view": "^1.39.3"
5758
},
5859
"devDependencies": {
5960
"@babel/core": "^7.27.1",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@
8484
]
8585
}
8686
}
87-
}
87+
}

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)