From 0fcb832244234f985d0b2628ddc63a382d1700c9 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 14 Jan 2025 20:17:13 +0000 Subject: [PATCH] DEV: Setup deprecation workflow earlier (#30768) In 0ed4b09527857d7751dba7fb2d765e08bf46a65e, this code was moved into app.js, which means it actually ends up running after all the other imports have been completed. That's too late, and some deprecations are triggered before that. This commit moves `setupDeprecationWorkflow` back into its own module, with a 'side effect only' import from `app.js`. --- app/assets/javascripts/discourse/app/app.js | 5 +---- .../javascripts/discourse/app/setup-deprecation-workflow.js | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 app/assets/javascripts/discourse/app/setup-deprecation-workflow.js diff --git a/app/assets/javascripts/discourse/app/app.js b/app/assets/javascripts/discourse/app/app.js index 6d15e44d2cc..fa7b901c0ea 100644 --- a/app/assets/javascripts/discourse/app/app.js +++ b/app/assets/javascripts/discourse/app/app.js @@ -1,7 +1,4 @@ -import setupDeprecationWorkflow from "ember-cli-deprecation-workflow"; -import DEPRECATION_WORKFLOW from "./deprecation-workflow"; -setupDeprecationWorkflow({ workflow: DEPRECATION_WORKFLOW }); - +import "./setup-deprecation-workflow"; import "decorator-transforms/globals"; import "./loader-shims"; import "./discourse-common-loader-shims"; diff --git a/app/assets/javascripts/discourse/app/setup-deprecation-workflow.js b/app/assets/javascripts/discourse/app/setup-deprecation-workflow.js new file mode 100644 index 00000000000..01b5af2960e --- /dev/null +++ b/app/assets/javascripts/discourse/app/setup-deprecation-workflow.js @@ -0,0 +1,4 @@ +import setupDeprecationWorkflow from "ember-cli-deprecation-workflow"; +import DEPRECATION_WORKFLOW from "./deprecation-workflow"; + +setupDeprecationWorkflow({ workflow: DEPRECATION_WORKFLOW });