From 1f70537968aafb3261ad23f07c65437164f41ae2 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 6 Feb 2025 16:42:21 +0000 Subject: [PATCH] DEV: Bump dependencies and fix linting (#236) --- .../discourse/components/house-ads-chooser.js | 2 +- .../components/house-ads-list-setting.js | 2 +- .../discourse/components/house-ads-setting.js | 12 +- .../discourse/components/modal/preview.gjs | 2 +- .../admin-plugins-house-ads-show.js | 6 +- .../routes/admin-plugins-house-ads-show.js | 4 +- .../discourse/components/ad-component.js | 2 +- .../discourse/components/ad-slot.js | 2 +- .../discourse/components/adbutler-ad.js | 4 +- .../components/amazon-product-links.js | 2 +- .../discourse/components/carbonads-ad.js | 2 +- .../discourse/components/google-adsense.js | 4 +- .../discourse/components/google-dfp-ad.js | 4 +- .../discourse/components/house-ad.js | 2 +- package.json | 13 +- pnpm-lock.yaml | 1317 +++++++++-------- 16 files changed, 768 insertions(+), 612 deletions(-) diff --git a/admin/assets/javascripts/discourse/components/house-ads-chooser.js b/admin/assets/javascripts/discourse/components/house-ads-chooser.js index 1fb1995..fcde111 100644 --- a/admin/assets/javascripts/discourse/components/house-ads-chooser.js +++ b/admin/assets/javascripts/discourse/components/house-ads-chooser.js @@ -1,6 +1,6 @@ import { computed } from "@ember/object"; import { classNames } from "@ember-decorators/component"; -import { makeArray } from "discourse-common/lib/helpers"; +import { makeArray } from "discourse/lib/helpers"; import MultiSelectComponent from "select-kit/components/multi-select"; @classNames("house-ads-chooser") diff --git a/admin/assets/javascripts/discourse/components/house-ads-list-setting.js b/admin/assets/javascripts/discourse/components/house-ads-list-setting.js index 911ad89..69f0ecd 100644 --- a/admin/assets/javascripts/discourse/components/house-ads-list-setting.js +++ b/admin/assets/javascripts/discourse/components/house-ads-list-setting.js @@ -1,7 +1,7 @@ import { action } from "@ember/object"; import { mapBy } from "@ember/object/computed"; import { classNames } from "@ember-decorators/component"; -import { makeArray } from "discourse-common/lib/helpers"; +import { makeArray } from "discourse/lib/helpers"; import HouseAdsSetting from "discourse/plugins/discourse-adplugin/discourse/components/house-ads-setting"; @classNames("house-ads-setting house-ads-list-setting") diff --git a/admin/assets/javascripts/discourse/components/house-ads-setting.js b/admin/assets/javascripts/discourse/components/house-ads-setting.js index bf5937a..b028f53 100644 --- a/admin/assets/javascripts/discourse/components/house-ads-setting.js +++ b/admin/assets/javascripts/discourse/components/house-ads-setting.js @@ -3,8 +3,8 @@ import { action } from "@ember/object"; import { classNames } from "@ember-decorators/component"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; -import { i18n, propertyNotEqual } from "discourse/lib/computed"; -import I18n from "I18n"; +import { i18n as computedI18n, propertyNotEqual } from "discourse/lib/computed"; +import { i18n } from "discourse-i18n"; @classNames("house-ads-setting") export default class HouseAdsSetting extends Component { @@ -12,8 +12,8 @@ export default class HouseAdsSetting extends Component { saving = false; savingStatus = ""; - @i18n("name", "admin.adplugin.house_ads.%@.title") title; - @i18n("name", "admin.adplugin.house_ads.%@.description") help; + @computedI18n("name", "admin.adplugin.house_ads.%@.title") title; + @computedI18n("name", "admin.adplugin.house_ads.%@.description") help; @propertyNotEqual("adValue", "value") changed; init() { @@ -26,7 +26,7 @@ export default class HouseAdsSetting extends Component { if (!this.get("saving")) { this.setProperties({ saving: true, - savingStatus: I18n.t("saving"), + savingStatus: i18n("saving"), }); ajax(`/admin/plugins/pluginad/house_settings/${this.get("name")}.json`, { @@ -38,7 +38,7 @@ export default class HouseAdsSetting extends Component { adSettings.set(this.get("name"), this.get("adValue")); this.setProperties({ value: this.get("adValue"), - savingStatus: I18n.t("saved"), + savingStatus: i18n("saved"), }); }) .catch(popupAjaxError) diff --git a/admin/assets/javascripts/discourse/components/modal/preview.gjs b/admin/assets/javascripts/discourse/components/modal/preview.gjs index 08794b9..f9ff54d 100644 --- a/admin/assets/javascripts/discourse/components/modal/preview.gjs +++ b/admin/assets/javascripts/discourse/components/modal/preview.gjs @@ -1,6 +1,6 @@ import { htmlSafe } from "@ember/template"; import DModal from "discourse/components/d-modal"; -import i18n from "discourse-common/helpers/i18n"; +import { i18n } from "discourse-i18n"; const Preview =