Skip to content

DEV: Add jsDiff dependency #32833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/assets/javascripts/discourse/app/lib/load-js-diff.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
Plugins & themes are unable to async-import npm modules directly.
This wrapper provides them with a way to use morphlex, while keeping the `import()` in core's codebase.
*/
export default async function loadJSDiff() {
return await import("diff");
}
7 changes: 4 additions & 3 deletions app/assets/javascripts/discourse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@messageformat/runtime": "^3.0.1",
"ace-builds": "^1.41.0",
"decorator-transforms": "^2.3.0",
"diff": "^8.0.1",
"discourse-widget-hbs": "workspace:1.0.0",
"ember-curry-component": "^0.3.0",
"ember-resolver": "^13.1.1",
Expand All @@ -35,6 +36,8 @@
"highlight.js": "11.11.1",
"immer": "^10.1.1",
"jspreadsheet-ce": "^4.15.0",
"moment": "2.30.1",
"moment-timezone": "0.5.45",
"morphlex": "^0.0.16",
"orderedmap": "^2.1.1",
"pretty-text": "workspace:1.0.0",
Expand All @@ -51,9 +54,7 @@
"prosemirror-schema-list": "^1.5.1",
"prosemirror-state": "^1.4.3",
"prosemirror-transform": "^1.10.4",
"prosemirror-view": "^1.39.3",
"moment": "2.30.1",
"moment-timezone": "0.5.45"
"prosemirror-view": "^1.39.3"
},
"devDependencies": {
"@babel/core": "^7.27.1",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
]
}
}
}
}
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading