mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Move discourse-common/(utils|lib) to discourse/lib (#30733)
`discourse-common` was created in the past to share logic between the 'wizard' app and the main 'discourse' app. Since then, the wizard has been consolidated into the main app, so the separation of `discourse-common` is no longer useful. This commit moves `discourse-common/(lib|utils)/*` into `discourse/lib/*`, adds shims for the imports, and updates existing uses in core.
This commit is contained in:
@@ -34,7 +34,7 @@ describe "JS Deprecation Handling", type: :system do
|
||||
visit("/latest")
|
||||
|
||||
page.execute_script <<~JS
|
||||
const deprecated = require("discourse-common/lib/deprecated").default;
|
||||
const deprecated = require("discourse/lib/deprecated").default;
|
||||
deprecated("Fake deprecation message", { id: "fake-deprecation" })
|
||||
JS
|
||||
|
||||
@@ -54,7 +54,7 @@ describe "JS Deprecation Handling", type: :system do
|
||||
type: :js,
|
||||
name: "discourse/connectors/below-footer/my-connector.gjs",
|
||||
value: <<~JS,
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import deprecated from "discourse/lib/deprecated";
|
||||
function triggerDeprecation(){
|
||||
deprecated("Fake deprecation message", { id: "fake-deprecation" })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user