From ed75e62ebc8690ca9ad6be40da47e57cdf894fd5 Mon Sep 17 00:00:00 2001 From: Andrei Prigorshnev Date: Mon, 9 Oct 2023 21:03:51 +0400 Subject: [PATCH 1/3] DEV: Stop using the deprecated text.cookAsync function --- .../discourse/components/custom-wizard-field.js.es6 | 4 ++-- .../discourse/components/custom-wizard-step.js.es6 | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/javascripts/discourse/components/custom-wizard-field.js.es6 b/assets/javascripts/discourse/components/custom-wizard-field.js.es6 index d706ecd8..bb368310 100644 --- a/assets/javascripts/discourse/components/custom-wizard-field.js.es6 +++ b/assets/javascripts/discourse/components/custom-wizard-field.js.es6 @@ -1,7 +1,7 @@ import Component from "@ember/component"; import { dasherize } from "@ember/string"; import discourseComputed from "discourse-common/utils/decorators"; -import { cookAsync } from "discourse/lib/text"; +import { cook } from "discourse/lib/text"; export default Component.extend({ classNameBindings: [ @@ -14,7 +14,7 @@ export default Component.extend({ didReceiveAttrs() { this._super(...arguments); - cookAsync(this.field.translatedDescription).then((cookedDescription) => { + cook(this.field.translatedDescription).then((cookedDescription) => { this.set("cookedDescription", cookedDescription); }); }, diff --git a/assets/javascripts/discourse/components/custom-wizard-step.js.es6 b/assets/javascripts/discourse/components/custom-wizard-step.js.es6 index 7c933771..250f9140 100644 --- a/assets/javascripts/discourse/components/custom-wizard-step.js.es6 +++ b/assets/javascripts/discourse/components/custom-wizard-step.js.es6 @@ -4,7 +4,7 @@ import I18n from "I18n"; import getUrl from "discourse-common/lib/get-url"; import { htmlSafe } from "@ember/template"; import { schedule } from "@ember/runloop"; -import { cookAsync } from "discourse/lib/text"; +import { cook } from "discourse/lib/text"; import CustomWizard, { updateCachedWizard, } from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard"; @@ -25,10 +25,10 @@ export default Component.extend({ didReceiveAttrs() { this._super(...arguments); - cookAsync(this.step.translatedTitle).then((cookedTitle) => { + cook(this.step.translatedTitle).then((cookedTitle) => { this.set("cookedTitle", cookedTitle); }); - cookAsync(this.step.translatedDescription).then((cookedDescription) => { + cook(this.step.translatedDescription).then((cookedDescription) => { this.set("cookedDescription", cookedDescription); }); }, From c052856947c5b1f0d322b195181defef1394e0cf Mon Sep 17 00:00:00 2001 From: Andrei Prigorshnev Date: Mon, 9 Oct 2023 21:12:14 +0400 Subject: [PATCH 2/3] Ensure compatibility --- .discourse-compatibility | 1 + 1 file changed, 1 insertion(+) diff --git a/.discourse-compatibility b/.discourse-compatibility index 01ce2cde..ff1e994a 100644 --- a/.discourse-compatibility +++ b/.discourse-compatibility @@ -1,3 +1,4 @@ +3.2.0.beta2: 1ee2f7d8babafe32912372fbbfa50c89f5b09ba9 3.1.999: 1f35b80f85e5fd1efb7f4851f0845700432febdc 2.7.99: e07a57e398b6b1676ab42a7e34467556fca5416b 2.5.1: bb85b3a0d2c0ab6b59bcb405731c39089ec6731c From 757a195047ed40dc8c22fdae2ae85e6c8e7b9745 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Wed, 11 Oct 2023 08:53:50 +0800 Subject: [PATCH 3/3] Bump version --- plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index a4413577..0c4d6a14 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.4.26 +# version: 2.4.27 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech