A platform for community discussion. Free, open, simple.
DEV: Drop 58 JS deprecations (#45504)
David Taylore902c456d0e5
diff --git a/.skills/discourse-writing-js-tests/SKILL.md b/.skills/discourse-writing-js-tests/SKILL.mdindex e0463c7f280..dd25cb6271b 100644--- a/.skills/discourse-writing-js-tests/SKILL.md+++ b/.skills/discourse-writing-js-tests/SKILL.md@@ -199,8 +199,7 @@ import siteFixtures from "discourse/tests/fixtures/site-fixtures";- **DOM lookup helpers**: `query()`, `exists()`, `count()`, `visible()`, `invisible()`,`fixture()`. **Prefer `assert.dom(...)` for assertions and `find()` / `findAll()` forelements in new tests** — reach for these only when matching existing style.-- **Deprecated, do not use**: `queryAll()` — use `findAll()` or `assert.dom(...)` instead;- `discourseModule` — use QUnit's `module` instead.+- **Deprecated, do not use**: `queryAll()` — use `findAll()` or `assert.dom(...)` instead.## Custom assertionsdiff --git a/app/assets/stylesheets/common/select-kit/_index.scss b/app/assets/stylesheets/common/select-kit/_index.scssindex 7c5a4f074c1..818ba46b8dc 100644--- a/app/assets/stylesheets/common/select-kit/_index.scss+++ b/app/assets/stylesheets/common/select-kit/_index.scss@@ -10,7 +10,6 @@@import "email-group-user-chooser";@import "flair-row";@import "future-date-input-selector";-@import "icon-picker";@import "list-setting";@import "multi-select";@import "notifications-button";diff --git a/app/assets/stylesheets/common/select-kit/icon-picker.scss b/app/assets/stylesheets/common/select-kit/icon-picker.scssdeleted file mode 100644index 904c71b80af..00000000000--- a/app/assets/stylesheets/common/select-kit/icon-picker.scss+++ /dev/null@@ -1,9 +0,0 @@-.select-kit {- &.icon-picker {- .multi-select-header {- .select-kit-selected-name .d-icon {- color: var(--primary-high);- }- }- }-}diff --git a/docs/developer-guides/docs/03-code-internals/22-form-kit.md b/docs/developer-guides/docs/03-code-internals/22-form-kit.mdindex 7f1f4c8f2e4..cc29f176db8 100644--- a/docs/developer-guides/docs/03-code-internals/22-form-kit.md+++ b/docs/developer-guides/docs/03-code-internals/22-form-kit.md@@ -738,7 +738,7 @@ Passes the picker context through to `<EmojiPicker />`.## Icon-Renders an `<IconPicker />` component.+Renders a `<DIconGridPicker />` component.**Example**diff --git a/docs/developer-guides/docs/04-plugins/10-markdown-it-extension.md b/docs/developer-guides/docs/04-plugins/10-markdown-it-extension.mdindex ed858f1cb86..80b6584f126 100644--- a/docs/developer-guides/docs/04-plugins/10-markdown-it-extension.md+++ b/docs/developer-guides/docs/04-plugins/10-markdown-it-extension.md@@ -46,12 +46,12 @@ export function setup(helper) {opts.features["your-extension"] = !!siteSettings.enable_my_plugin;});- // whitelist any attributes that you need to support,+ // allow any attributes that you need to support,// otherwise our sanitizer will strip them- helper.whiteList(["div.amazingness"]);+ helper.allowList(["div.amazingness"]);// you can also do fancy stuff like this- helper.whiteList({+ helper.allowList({custom(tag, name, value) {if ((tag === "a" || tag === "li") && name === "id") {return !!value.match(/^fn(ref)?\d+$/);diff --git a/frontend/discourse-markdown-it/src/setup.js b/frontend/discourse-markdown-it/src/setup.jsindex ea7d86bd551..ec182f6a08c 100644--- a/frontend/discourse-markdown-it/src/setup.js+++ b/frontend/discourse-markdown-it/src/setup.js@@ -1,5 +1,4 @@import { textReplace } from "pretty-text/text-replace";-import deprecated from "discourse/lib/deprecated";import { cloneJSON } from "discourse/lib/object";import makeEngine, { cook } from "./engine.js";@@ -291,15 +290,6 @@ class API {this.#setup("allowList", [this.#name, info]);}- whiteList(info) {- deprecated("`whiteList` has been replaced with `allowList`", {- since: "2.6.0.beta.4",- id: "discourse.markdown-it.whitelist",- });-- this.allowList(info);- }-registerOptions(callback) {this.#setup("registerOptions", [this.#name, callback]);}diff --git a/frontend/discourse/app/components/d-section.gjs b/frontend/discourse/app/components/d-section.gjsdeleted file mode 100644index aecec355dc7..00000000000--- a/frontend/discourse/app/components/d-section.gjs+++ /dev/null@@ -1,34 +0,0 @@-import Component from "@glimmer/component";-import { concat } from "@ember/helper";-import bodyClass from "discourse/helpers/body-class";-import deprecated from "discourse/lib/deprecated";--// Can add a body class from within a component-export default class DSection extends Component {- constructor() {- super(...arguments);- deprecated(- `<DSection> is deprecated. Use {{body-class "foo-page" "bar"}} and/or <section></section> instead.`,- {- since: "3.2.0.beta1",- id: "discourse.d-section",- }- );- }-- <template>- {{#if @pageClass}}- {{bodyClass (concat @pageClass "-page")}}- {{/if}}-- {{#if @bodyClass}}- {{bodyClass @bodyClass}}- {{/if}}-- {{#if (neq @tagName "")}}- <section class={{@class}} id={{@id}} ...attributes>{{yield}}</section>- {{else}}- {{yield}}- {{/if}}- </template>-}diff --git a/frontend/discourse/app/components/header-extra-info.js b/frontend/discourse/app/components/header-extra-info.jsdeleted file mode 100644index b4a63b4e568..00000000000--- a/frontend/discourse/app/components/header-extra-info.js+++ /dev/null@@ -1,8 +0,0 @@-import deprecated from "discourse/lib/deprecated";--export function needsSecondRowIf() {- deprecated(- "`needsSecondRowIf` is deprecated. Use widget hooks on `header-second-row`",- { id: "discourse.header-extra-info.needs-second-row-if" }- );-}diff --git a/frontend/discourse/app/components/plugin-connector.js b/frontend/discourse/app/components/plugin-connector.jsindex d370e719cd3..8fe45580a20 100644--- a/frontend/discourse/app/components/plugin-connector.js+++ b/frontend/discourse/app/components/plugin-connector.js@@ -1,24 +1,11 @@/* eslint-disable ember/no-classic-components, ember/require-tagless-components */import Component from "@ember/component";import { computed, defineProperty } from "@ember/object";-import { afterRender } from "discourse/lib/decorators";import {buildArgsWithDeprecations,deprecatedArgumentValue,} from "discourse/lib/outlet-args";-let _decorators = {};--// Don't call this directly: use `plugin-api/decoratePluginOutlet`-export function addPluginOutletDecorator(outletName, callback) {- _decorators[outletName] = _decorators[outletName] || [];- _decorators[outletName].push(callback);-}--export function resetDecorators() {- _decorators = {};-}-export default class PluginConnector extends Component {init() {super.init(...arguments);@@ -75,12 +62,6 @@ export default class PluginConnector extends Component {connectorClass?.setupComponent?.call(this, merged, this);}- didReceiveAttrs() {- super.didReceiveAttrs(...arguments);-- this._decoratePluginOutlets();- }-willDestroyElement() {super.willDestroyElement(...arguments);@@ -93,11 +74,4 @@ export default class PluginConnector extends Component {const action = connectorClass?.actions?.[name];return action ? action.call(this, ...args) : super.send(name, ...args);}-- @afterRender- _decoratePluginOutlets() {- (_decorators[this.connector.outletName] || []).forEach((dec) =>- dec(this.element, this.args)- );- }}diff --git a/frontend/discourse/app/components/plugin-outlet.gjs b/frontend/discourse/app/components/plugin-outlet.gjsindex df1926a5c44..7db27b53828 100644--- a/frontend/discourse/app/components/plugin-outlet.gjs+++ b/frontend/discourse/app/components/plugin-outlet.gjs@@ -4,7 +4,6 @@ import { DEBUG } from "@glimmer/env";import { cached } from "@glimmer/tracking";import ClassicComponent from "@ember/component";import { concat } from "@ember/helper";-import { get } from "@ember/object";import { getOwner } from "@ember/owner";import { service } from "@ember/service";import curryComponent from "ember-curry-component";@@ -18,8 +17,6 @@ import {renderedConnectorsFor,} from "discourse/lib/plugin-connectors";-const GET_DEPRECATION_MSG =- "Plugin outlet context is no longer an EmberObject - using `get()` is deprecated.";const ARGS_DEPRECATION_MSG ="PluginOutlet arguments should now be passed using `@outletArgs=` instead of `@args=`";@@ -347,12 +344,6 @@ export default class PluginOutlet extends Component {context = {...helperContext(),- get() {- deprecated(GET_DEPRECATION_MSG, {- id: "discourse.plugin-outlet-context-get",- });- return get(this, ...arguments);- },};constructor() {diff --git a/frontend/discourse/app/components/sidebar/section-link.gjs b/frontend/discourse/app/components/sidebar/section-link.gjsindex 9a924d40606..f197814524a 100644--- a/frontend/discourse/app/components/sidebar/section-link.gjs+++ b/frontend/discourse/app/components/sidebar/section-link.gjs@@ -9,7 +9,6 @@ import { LinkTo } from "@ember/routing";import { schedule } from "@ember/runloop";import { service } from "@ember/service";import { bind } from "discourse/lib/decorators";-import deprecated from "discourse/lib/deprecated";import dConcatClass from "discourse/ui-kit/helpers/d-concat-class";import dIcon from "discourse/ui-kit/helpers/d-icon";import SectionLinkPrefix from "./section-link-prefix.gjs";@@ -82,14 +81,6 @@ export default class SectionLink extends Component {classNames.push(this.args.linkClass);}- if (this.args.class) {- deprecated("SectionLink's @class arg has been renamed to @linkClass", {- id: "discourse.section-link-class-arg",- since: "3.2.0.beta4",- });- classNames.push(this.args.class);- }-if (this.args.href && this.args.href === this.args.exactUrlMatch?.value) {classNames.push("exact-url-match");}diff --git a/frontend/discourse/app/components/user-menu/menu.gjs b/frontend/discourse/app/components/user-menu/menu.gjsindex a798301f97b..f92e84c3a58 100644--- a/frontend/discourse/app/components/user-menu/menu.gjs+++ b/frontend/discourse/app/components/user-menu/menu.gjs@@ -2,14 +2,12 @@ import Component from "@glimmer/component";import { cached, tracked } from "@glimmer/tracking";import { concat, fn } from "@ember/helper";import { action } from "@ember/object";-import { getOwner } from "@ember/owner";import didInsert from "@ember/render-modifiers/modifiers/did-insert";import { service } from "@ember/service";import PluginOutlet from "discourse/components/plugin-outlet";import MenuTab from "discourse/components/user-menu/menu-tab";import lazyHash from "discourse/helpers/lazy-hash";import { bind } from "discourse/lib/decorators";-import deprecated from "discourse/lib/deprecated";import getUrl from "discourse/lib/get-url";import { wantsNewWindow } from "discourse/lib/intercept-click";import UserMenuTab, { CUSTOM_TABS_CLASSES } from "discourse/lib/user-menu/tab";@@ -204,18 +202,6 @@ const CORE_OTHER_NOTIFICATIONS_TAB = class extends UserMenuTab {}};-function resolvePanelComponent(owner, panelComponent) {- if (typeof panelComponent === "string") {- const nameForConsole = JSON.stringify(panelComponent);- deprecated(- `user-menu tab panelComponent must be passed as a component class (passed ${nameForConsole})`,- { id: "discourse.user-menu.panel-component-class" }- );- return owner.resolveRegistration(`component:${panelComponent}`);- }- return panelComponent;-}-export default class UserMenu extends Component {@service appEvents;@service currentUser;@@ -333,10 +319,7 @@ export default class UserMenu extends Component {event.preventDefault();this.currentTabId = tab.id;- this.currentPanelComponent = resolvePanelComponent(- getOwner(this),- tab.panelComponent- );+ this.currentPanelComponent = tab.panelComponent;this.appEvents.trigger("user-menu:tab-click", tab.id);this.currentNotificationTypes = tab.notificationTypes;diff --git a/frontend/discourse/app/controllers/application.js b/frontend/discourse/app/controllers/application.jsindex dc2a864fc93..0f5938848df 100644--- a/frontend/discourse/app/controllers/application.js+++ b/frontend/discourse/app/controllers/application.js@@ -5,7 +5,6 @@ import { service } from "@ember/service";import { dasherize } from "@ember/string";import runAfterFramePaint from "discourse/lib/after-frame-paint";import discourseDebounce from "discourse/lib/debounce";-import deprecated from "discourse/lib/deprecated";import EmbedMode from "discourse/lib/embed-mode";import { isTesting } from "discourse/lib/environment";@@ -54,14 +53,6 @@ export default class ApplicationController extends Controller {return this.footer.showFooter;}- set showFooter(value) {- deprecated(- "showFooter state is now stored in the `footer` service, and should be controlled by adding the {{hideApplicationFooter}} helper to an Ember template.",- { id: "discourse.application-show-footer" }- );- this.footer.showFooter = value;- }-get isCurrentAdminRoute() {return this.router.currentRouteName?.startsWith("admin");}diff --git a/frontend/discourse/app/controllers/composer.js b/frontend/discourse/app/controllers/composer.jsindex 404f1f20769..8a6e7af76ad 100644--- a/frontend/discourse/app/controllers/composer.js+++ b/frontend/discourse/app/controllers/composer.js@@ -2,7 +2,6 @@ import {addPopupMenuOption,clearPopupMenuOptions,} from "discourse/lib/composer/custom-popup-menu-options";-import deprecated from "discourse/lib/deprecated";import Composer, {addComposerSaveErrorCallback,clearComposerSaveErrorCallback,@@ -12,22 +11,9 @@ import Composer, {export default Composer;-function clearPopupMenuOptionsCallback() {- deprecated(- "`clearPopupMenuOptionsCallback` is deprecated without replacement as the cleanup is handled automatically.",- {- id: "discourse.composer-controller.clear-popup-menu-options-callback",- since: "3.2",- }- );-- clearPopupMenuOptions();-}-export {addComposerSaveErrorCallback,addPopupMenuOption,clearComposerSaveErrorCallback,clearPopupMenuOptions,- clearPopupMenuOptionsCallback,};diff --git a/frontend/discourse/app/deprecation-workflow.js b/frontend/discourse/app/deprecation-workflow.jsindex dead4998975..b147e5ae7e2 100644--- a/frontend/discourse/app/deprecation-workflow.js+++ b/frontend/discourse/app/deprecation-workflow.js@@ -321,96 +321,38 @@ const workflows = [// To keep warnings meaningful and prevent overflowing users with them,// we should only add values here after fixing core and official plugins...[- "discourse.add-saveable-user-option-field","discourse.add-toolbar-popup-menu-options-callback",- "discourse.add-user-menu-glyph",- "discourse.application-show-footer","discourse.avatar-utils",- "discourse.base-url","discourse.bound-date",- "discourse.capitalize-string",- "discourse.category-hashtags.categoryHashtagTriggerRule",- "discourse.category-list.categories",- "discourse.category-list.listForParent",- "discourse.chat.addToolbarButton",- "discourse.click-track.is-valid-link-jquery","discourse.component-template-resolving",- "discourse.composer-controller.clear-popup-menu-options-callback",- "discourse.composer.usernames",- "discourse.computed-html-safe",- "discourse.create-store-helper",- "discourse.createNewMessageViaParams",- "discourse.createNewTopicViaParams",- "discourse.current-theme-key",- "discourse.d-editor.on-toolbar-create",- "discourse.d-popover",- "discourse.d-section",- "discourse.decorate-plugin-outlet","discourse.deprecated-resolver-normalization",- "discourse.discourse-module",- "discourse.discovery-topics-controller","discourse.ember-computed-decorators",- "discourse.fa-icon","discourse.form-kit.legacy-field-yield","discourse.format-age",- "discourse.formatter.update-relative-age-node-list","discourse.get-owner-with-fallback",- "discourse.get-url-helper","discourse.global.site","discourse.global.site-settings","discourse.global.user","discourse.hbs-extension","discourse.es6-extension",- "discourse.header-extra-info.needs-second-row-if","discourse.header-service-topic",- "discourse.hide-popover",- "discourse.html-helper","discourse.html-safe-helper",- "discourse.icon-picker",- "discourse.icon-renderer-translatedtitle",- "discourse.inline-date",- "discourse.is-legacy-ember",- "discourse.jquery-cookie","discourse.legacy-array-like-object.proxied-array","discourse.legacy-topic-list",- "discourse.markdown-it.whitelist","discourse.modify-class-model",- "discourse.nav-item.built-list-site-settings",- "discourse.navigation-category-controller",- "discourse.number-field",- "discourse.offset-calculator.minimumOffset","discourse.plugin-outlet-args","discourse.plugin-outlet-classic-args-clash","discourse.plugin-outlet-classic-hooks",- "discourse.plugin-outlet-context-get","discourse.post-stream.first-post-id",- "discourse.post-stream.trigger-new-post",- "discourse.pretty-text.registerOption","discourse.qunit-helpers.jquery-selector","discourse.qunit-helpers.query-all","discourse.register-connector-class-legacy",- "discourse.register-raw-helper",- "discourse.register-unbound","discourse.resolver-resolutions",- "discourse.safari-hacks-disabled",- "discourse.section-link-class-arg","discourse.select-kit-resolved-components",- "discourse.show-popover",- "discourse.site.is-mobile-device","discourse.static-viewport-initialization",- "discourse.tag-show-controller","discourse.template-action", // removed in Ember 6.0, but we have a polyfill"discourse.text.cook-async",- "discourse.this-container",- "discourse.topic-list-find",- "discourse.topic.totalUnread",- "discourse.uploads.display-error-for-upload",- "discourse.user-menu.panel-component-class",- "discourse.user.resolved-timezone","discourse.user.userOptions",- "discourse.utils-decorators-import",- "discourse.utils-decorators-observes",- "discourse.utils-decorators-on",/^discourse\.native-array-extensions\..+$/,].map((matchId) => ({ handler: "notify-admin", matchId })),diff --git a/frontend/discourse/app/discourse-common-loader-shims.js b/frontend/discourse/app/discourse-common-loader-shims.jsindex e32bbf36356..8009b4d82f6 100644--- a/frontend/discourse/app/discourse-common-loader-shims.js+++ b/frontend/discourse/app/discourse-common-loader-shims.js@@ -5,9 +5,6 @@ import loaderShim from "discourse/lib/loader-shim";loaderShim("discourse-common/helpers/base-path", () =>importSync("discourse/ui-kit/helpers/d-base-path"));-loaderShim("discourse-common/helpers/base-url", () =>- importSync("discourse/helpers/base-url")-);loaderShim("discourse-common/helpers/bound-i18n", () =>importSync("discourse/helpers/bound-i18n"));@@ -20,9 +17,6 @@ loaderShim("discourse-common/helpers/component-for-row", () =>loaderShim("discourse-common/helpers/d-icon", () =>importSync("discourse/ui-kit/helpers/d-icon"));-loaderShim("discourse-common/helpers/fa-icon", () =>- importSync("discourse/helpers/fa-icon")-);loaderShim("discourse-common/helpers/get-url", () =>importSync("discourse/lib/get-url"));@@ -106,9 +100,6 @@ loaderShim("discourse-common/utils/handle-descriptor", () =>loaderShim("discourse-common/utils/is-descriptor", () =>importSync("discourse/lib/is-descriptor"));-loaderShim("discourse-common/utils/macro-alias", () =>- importSync("discourse/lib/macro-alias")-);loaderShim("discourse-common/utils/multi-cache", () =>importSync("discourse/lib/multi-cache"));diff --git a/frontend/discourse/app/helpers/base-url.js b/frontend/discourse/app/helpers/base-url.jsdeleted file mode 100644index 5ef660f87a2..00000000000--- a/frontend/discourse/app/helpers/base-url.js+++ /dev/null@@ -1,9 +0,0 @@-import deprecated from "discourse/lib/deprecated";-import getUrl from "discourse/lib/get-url";--export default function baseUrl() {- deprecated("Use `{{base-path}}` instead of `{{base-url}}`", {- id: "discourse.base-url",- });- return getUrl("");-}diff --git a/frontend/discourse/app/helpers/capitalize-string.js b/frontend/discourse/app/helpers/capitalize-string.jsdeleted file mode 100644index b43ad11febc..00000000000--- a/frontend/discourse/app/helpers/capitalize-string.js+++ /dev/null@@ -1,9 +0,0 @@-import deprecated from "discourse/lib/deprecated";--export default function capitalizeString(str) {- deprecated("capitalize-string helper is deprecated", {- id: "discourse.capitalize-string",- since: "3.1.0.beta6",- });- return str[0].toUpperCase() + str.slice(1);-}diff --git a/frontend/discourse/app/helpers/fa-icon.js b/frontend/discourse/app/helpers/fa-icon.jsdeleted file mode 100644index 3cf2cfdb52c..00000000000--- a/frontend/discourse/app/helpers/fa-icon.js+++ /dev/null@@ -1,14 +0,0 @@-import { trustHTML } from "@ember/template";-import deprecated from "discourse/lib/deprecated";-import { renderIcon } from "discourse/lib/icon-library";--export function iconHTML(id, params) {- return renderIcon("string", id, params);-}--export default function faIcon(icon, params) {- deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}", {- id: "discourse.fa-icon",- });- return trustHTML(iconHTML(icon, params));-}diff --git a/frontend/discourse/app/helpers/get-url.js b/frontend/discourse/app/helpers/get-url.jsdeleted file mode 100644index b80028cf856..00000000000--- a/frontend/discourse/app/helpers/get-url.js+++ /dev/null@@ -1,13 +0,0 @@-import deprecated from "discourse/lib/deprecated";-import actualGetUrl from "discourse/lib/get-url";--export default function getUrl(value) {- deprecated(- "Importing from 'discourse/helpers/get-url' is deprecated. Use 'discourse/lib/get-url' instead.",- {- id: "discourse.get-url-helper",- since: "3.5.0.beta8-dev",- }- );- return actualGetUrl(value);-}diff --git a/frontend/discourse/app/helpers/inline-date.js b/frontend/discourse/app/helpers/inline-date.jsdeleted file mode 100644index 75935f7889b..00000000000--- a/frontend/discourse/app/helpers/inline-date.js+++ /dev/null@@ -1,14 +0,0 @@-import deprecated from "discourse/lib/deprecated";-import { relativeAge } from "discourse/lib/formatter";--export default function inlineDate(dt) {- deprecated("inline-date helper is deprecated", {- id: "discourse.inline-date",- since: "3.1.0.beta6",- });-- if (dt.value) {- dt = dt.value();- }- return relativeAge(new Date(dt));-}diff --git a/frontend/discourse/app/instance-initializers/auto-load-modules.js b/frontend/discourse/app/instance-initializers/auto-load-modules.jsindex 9a02796796e..db104a41310 100644--- a/frontend/discourse/app/instance-initializers/auto-load-modules.js+++ b/frontend/discourse/app/instance-initializers/auto-load-modules.js@@ -1,21 +1,8 @@import { setOwner } from "@ember/owner";import { createHelperContext, registerHelpers } from "discourse/lib/helpers";-function isThemeOrPluginHelper(path) {- return (- path.includes("/helpers/") &&- (path.startsWith("discourse/theme-") ||- path.startsWith("discourse/plugins/")) &&- !path.endsWith("-test")- );-}-export function autoLoadModules(owner, registry) {Object.keys(requirejs.entries).forEach((entry) => {- if (isThemeOrPluginHelper(entry)) {- // Once the discourse.register-unbound deprecation is resolved, we can remove this eager loading- requirejs(entry, null, null, true);- }if (entry.includes("/widgets/") && !entry.endsWith("-test")) {requirejs(entry, null, null, true);}diff --git a/frontend/discourse/app/instance-initializers/discovery-controller-shims.js b/frontend/discourse/app/instance-initializers/discovery-controller-shims.jsdeleted file mode 100644index d56a2437c5d..00000000000--- a/frontend/discourse/app/instance-initializers/discovery-controller-shims.js+++ /dev/null@@ -1,105 +0,0 @@-import EmberObject from "@ember/object";-import { dependentKeyCompat } from "@ember/object/compat";-import { service } from "@ember/service";-import deprecated from "discourse/lib/deprecated";--let reopenedClasses = [];--function ControllerShim(resolverName, deprecationId) {- return class AbstractControllerShim extends EmberObject {- static printDeprecation() {- deprecated(- `${resolverName} no longer exists, and this shim will eventually be removed. To fetch information about the current discovery route, use the discovery service instead.`,- {- id: deprecationId,- }- );- }-- static reopen() {- this.printDeprecation();- reopenedClasses.push(resolverName);- return super.reopen(...arguments);- }-- @service discovery;-- constructor() {- super(...arguments);- this.constructor.printDeprecation();- }- };-}--class NavigationCategoryControllerShim extends ControllerShim(- "controller:navigation/category",- "discourse.navigation-category-controller"-) {- @dependentKeyCompat- get category() {- this.constructor.printDeprecation();- return this.discovery.category;- }-}--class DiscoveryTopicsControllerShim extends ControllerShim(- "controller:discovery/topics",- "discourse.discovery-topics-controller"-) {- @dependentKeyCompat- get model() {- this.constructor.printDeprecation();- if (this.discovery.onDiscoveryRoute) {- return this.discovery.currentTopicList;- }- }-- @dependentKeyCompat- get category() {- this.constructor.printDeprecation();- if (this.discovery.onDiscoveryRoute) {- return this.discovery.category;- }- }-}--class TagShowControllerShim extends ControllerShim(- "controller:tag-show",- "discourse.tag-show-controller"-) {- @dependentKeyCompat- get tag() {- this.constructor.printDeprecation();- return this.discovery.tag;- }-}--export default {- initialize(container) {- container.register(- "controller:navigation/category",- NavigationCategoryControllerShim- );-- container.register(- "controller:discovery/topics",- DiscoveryTopicsControllerShim- );-- container.register("controller:tag-show", TagShowControllerShim);-- container.lookup("service:router").on("routeDidChange", (transition) => {- const destination = transition.to?.name;- if (- destination?.startsWith("discovery.") ||- destination?.startsWith("tags.show") ||- destination === "tag.show"- ) {- // Ensure any reopened shims are initialized in case anything has added observers- reopenedClasses.forEach((resolverName) =>- container.lookup(resolverName)- );- }- });- },-};diff --git a/frontend/discourse/app/lib/category-hashtags.js b/frontend/discourse/app/lib/category-hashtags.jsindex e627fbf0fda..532ff260927 100644--- a/frontend/discourse/app/lib/category-hashtags.js+++ b/frontend/discourse/app/lib/category-hashtags.js@@ -1,6 +1,3 @@-import deprecated from "discourse/lib/deprecated";-import { hashtagTriggerRule } from "discourse/lib/hashtag-autocomplete";-export const SEPARATOR = ":";export function replaceSpan($elem, categorySlug, categoryLink, type) {@@ -9,14 +6,3 @@ export function replaceSpan($elem, categorySlug, categoryLink, type) {`<a href="${categoryLink}" class="hashtag"${type}>#<span>${categorySlug}</span></a>`);}--export function categoryHashtagTriggerRule(textarea, opts) {- deprecated(- "categoryHashtagTriggerRule is being replaced by hashtagTriggerRule and the new hashtag-autocomplete plugin APIs",- {- since: "2.9.0.beta10",- id: "discourse.category-hashtags.categoryHashtagTriggerRule",- }- );- return hashtagTriggerRule(opts);-}diff --git a/frontend/discourse/app/lib/click-track.js b/frontend/discourse/app/lib/click-track.jsindex 27a40e472a9..710c9f7c00a 100644--- a/frontend/discourse/app/lib/click-track.js+++ b/frontend/discourse/app/lib/click-track.js@@ -1,7 +1,5 @@-import jQuery from "jquery";import { Promise } from "rsvp";import { ajax } from "discourse/lib/ajax";-import deprecated from "discourse/lib/deprecated";import { isTesting } from "discourse/lib/environment";import { getOwnerWithFallback } from "discourse/lib/get-owner";import getURL, { samePrefix } from "discourse/lib/get-url";@@ -11,15 +9,6 @@ import User from "discourse/models/user";import { i18n } from "discourse-i18n";export function isValidLink(link) {- if (link instanceof jQuery) {- link = link[0];-- deprecated("isValidLink now expects an Element, not a jQuery object", {- since: "2.9.0.beta7",- id: "discourse.click-track.is-valid-link-jquery",- });- }-// .hashtag/.hashtag-cooked == category/tag link// .back == quote back ^ buttonif (diff --git a/frontend/discourse/app/lib/computed.js b/frontend/discourse/app/lib/computed.jsindex 2c3b89db0ba..61778d9397a 100644--- a/frontend/discourse/app/lib/computed.js+++ b/frontend/discourse/app/lib/computed.js@@ -1,6 +1,5 @@import { computed } from "@ember/object";import { trustHTML as htmlSafeTemplateHelper } from "@ember/template";-import deprecated from "discourse/lib/deprecated";import getURL from "discourse/lib/get-url";import { deepEqual } from "discourse/lib/object";import { i18n } from "discourse-i18n";@@ -104,20 +103,6 @@ export function trustHTML(...args) {});}-/**- @deprecated Use `trustHTML` instead.-**/-export function htmlSafe(...args) {- deprecated(- "`htmlSafe` from 'discourse/lib/computed' is deprecated. Use `trustHTML` instead.",- {- id: "discourse.computed-html-safe",- since: "2026.3.0",- }- );- return trustHTML(...args);-}-/**Uses an Ember String `fmt` call to format a string. See:http://emberjs.com/api/classes/Ember.String.html#method_fmtdiff --git a/frontend/discourse/app/lib/cookie.js b/frontend/discourse/app/lib/cookie.jsindex f3498943ed1..d61308da90b 100644--- a/frontend/discourse/app/lib/cookie.js+++ b/frontend/discourse/app/lib/cookie.js@@ -1,5 +1,3 @@-import deprecated from "discourse/lib/deprecated";-const pluses = /\+/g;function parseCookieValue(s) {@@ -76,25 +74,4 @@ export function removeCookie(key, options) {return !cookie(key);}-if (window && window.$) {- const depOpts = {- since: "2.6.0",- id: "discourse.jquery-cookie",- };- window.$.cookie = function () {- deprecated(- "$.cookie is being removed from Discourse. Please import our cookie module and use that instead.",- depOpts- );- return cookie(...arguments);- };- window.$.removeCookie = function () {- deprecated(- "$.removeCookie is being removed from Discourse. Please import our cookie module and use that instead.",- depOpts- );- return removeCookie(...arguments);- };-}-export default cookie;diff --git a/frontend/discourse/app/lib/d-popover.js b/frontend/discourse/app/lib/d-popover.jsdeleted file mode 100644index 0818f7346d1..00000000000--- a/frontend/discourse/app/lib/d-popover.js+++ /dev/null@@ -1,13 +0,0 @@-import deprecated from "discourse/lib/deprecated";--export function showPopover() {- deprecated("`showPopover` is deprecated. Use tooltip service instead.", {- id: "discourse.show-popover",- });-}--export function hidePopover() {- deprecated("`hidePopover` is deprecated. Use tooltip service instead.", {- id: "discourse.hide-popover",- });-}diff --git a/frontend/discourse/app/lib/decorators.js b/frontend/discourse/app/lib/decorators.jsindex 9b8aa038a5a..273bef3a7d6 100644--- a/frontend/discourse/app/lib/decorators.js+++ b/frontend/discourse/app/lib/decorators.js@@ -1,48 +1,12 @@import { observer } from "@ember/object";-import {- alias as EmberAlias,- and as EmberAnd,- bool as EmberBool,- collect as EmberCollect,- empty as EmberEmpty,- equal as EmberEqual,- filter as EmberFilter,- filterBy as EmberFilterBy,- gt as EmberGt,- gte as EmberGte,- lt as EmberLt,- lte as EmberLte,- map as EmberMap,- mapBy as EmberMapBy,- match as EmberMatch,- max as EmberMax,- min as EmberMin,- none as EmberNone,- not as EmberNot,- notEmpty as EmberNotEmpty,- oneWay as EmberOneWay,- or as EmberOr,- reads as EmberReads,- setDiff as EmberSetDiff,- sort as EmberSort,- sum as EmberSum,- union as EmberUnion,- uniq as EmberUniq,-} from "@ember/object/computed";import CoreObject from "@ember/object/core";import { on as emberOn } from "@ember/object/evented";import { bind as emberBind, schedule } from "@ember/runloop";-import {- observes as emberObservesDecorator,- on as emberOnDecorator,-} from "@ember-decorators/object";import discourseDebounce from "discourse/lib/debounce";import decoratorAlias from "discourse/lib/decorator-alias";-import deprecated from "discourse/lib/deprecated";import extractValue from "discourse/lib/extract-value";import handleDescriptor from "discourse/lib/handle-descriptor";import isDescriptor from "discourse/lib/is-descriptor";-import macroAlias from "discourse/lib/macro-alias";/*** A decorator that creates computed properties with dependent keys.@@ -179,62 +143,27 @@ export function debounce(delay, immediate = false) {export function on(...onParams) {return function (target) {if (target instanceof CoreObject) {- deprecated(- `Using 'on' from 'discourse/lib/decorators' as a class property decorator is deprecated. You should import it from '@ember-decorators/object' instead.`,- { id: "discourse.utils-decorators-on", from: "3.1.0.beta2" }+ throw new Error(+ "`on` from 'discourse/lib/decorators' only works with `.extend()`. Import it from '@ember-decorators/object' for native classes.");- return emberOnDecorator(...onParams)(...arguments);- } else {- return decoratorAlias(- emberOn,- "Can not `on` without event names"- )(...onParams)(...arguments);}+ return decoratorAlias(+ emberOn,+ "Can not `on` without event names"+ )(...onParams)(...arguments);};}export function observes(...observeParams) {return function (target) {if (target instanceof CoreObject) {- deprecated(- `Using 'observes' from 'discourse/lib/decorators' as a class property decorator is deprecated. You should import it from '@ember-decorators/object' instead.`,- { id: "discourse.utils-decorators-observes", from: "3.1.0.beta2" }+ throw new Error(+ "`observes` from 'discourse/lib/decorators' only works with `.extend()`. Import it from '@ember-decorators/object' for native classes.");- return emberObservesDecorator(...observeParams)(...arguments);- } else {- return decoratorAlias(- observer,- "Can not `observe` without property names"- )(...observeParams)(...arguments);}+ return decoratorAlias(+ observer,+ "Can not `observe` without property names"+ )(...observeParams)(...arguments);};}--export const alias = macroAlias(EmberAlias);-export const and = macroAlias(EmberAnd);-export const bool = macroAlias(EmberBool);-export const collect = macroAlias(EmberCollect);-export const empty = macroAlias(EmberEmpty);-export const equal = macroAlias(EmberEqual);-export const filter = macroAlias(EmberFilter);-export const filterBy = macroAlias(EmberFilterBy);-export const gt = macroAlias(EmberGt);-export const gte = macroAlias(EmberGte);-export const lt = macroAlias(EmberLt);-export const lte = macroAlias(EmberLte);-export const map = macroAlias(EmberMap);-export const mapBy = macroAlias(EmberMapBy);-export const match = macroAlias(EmberMatch);-export const max = macroAlias(EmberMax);-export const min = macroAlias(EmberMin);-export const none = macroAlias(EmberNone);-export const not = macroAlias(EmberNot);-export const notEmpty = macroAlias(EmberNotEmpty);-export const oneWay = macroAlias(EmberOneWay);-export const or = macroAlias(EmberOr);-export const reads = macroAlias(EmberReads);-export const setDiff = macroAlias(EmberSetDiff);-export const sort = macroAlias(EmberSort);-export const sum = macroAlias(EmberSum);-export const union = macroAlias(EmberUnion);-export const uniq = macroAlias(EmberUniq);diff --git a/frontend/discourse/app/lib/environment.js b/frontend/discourse/app/lib/environment.jsindex 457ecd4c6f2..d824a2771ee 100644--- a/frontend/discourse/app/lib/environment.js+++ b/frontend/discourse/app/lib/environment.js@@ -1,5 +1,4 @@import { isTesting as embroiderIsTesting } from "@embroider/macros";-import deprecated from "discourse/lib/deprecated";export const INPUT_DELAY = 250;@@ -25,14 +24,6 @@ export function isRailsTesting() {return environment === "test";}-// Generally means "before we migrated to Ember CLI"-export function isLegacyEmber() {- deprecated("`isLegacyEmber()` is now deprecated and always returns false", {- id: "discourse.is-legacy-ember",- });- return false;-}-export function isDevelopment() {return environment === "development";}diff --git a/frontend/discourse/app/lib/formatter.js b/frontend/discourse/app/lib/formatter.jsindex c50bd62c5f8..e736907ccd2 100644--- a/frontend/discourse/app/lib/formatter.js+++ b/frontend/discourse/app/lib/formatter.js@@ -1,5 +1,3 @@-import jQuery from "jquery";-import deprecated from "discourse/lib/deprecated";import { helperContext, makeArray } from "discourse/lib/helpers";import I18n, { i18n } from "discourse-i18n";@@ -51,14 +49,6 @@ export function longDateNoYear(dt) {}export function updateRelativeAge(elems) {- if (elems instanceof jQuery) {- elems = elems.toArray();- deprecated("updateRelativeAge now expects a DOM NodeList", {- since: "2.8.0.beta7",- id: "discourse.formatter.update-relative-age-node-list",- });- }-if (!NodeList.prototype.isPrototypeOf(elems)) {elems = makeArray(elems);}diff --git a/frontend/discourse/app/lib/get-owner.js b/frontend/discourse/app/lib/get-owner.jsindex a434a756b38..2946fd11d2f 100644--- a/frontend/discourse/app/lib/get-owner.js+++ b/frontend/discourse/app/lib/get-owner.js@@ -37,8 +37,7 @@ export function setDefaultOwner(container) {setOwner(_default, container);}-// `this.container` is deprecated, but we can still build a container-like-// object for components to use+// Builds a container-like object for components to useexport function getRegister(obj) {const owner = getOwnerWithFallback(obj);const register = {@@ -50,18 +49,6 @@ export function getRegister(obj) {return owner._lookupFactory(...args);}},-- deprecateContainer(target) {- Object.defineProperty(target, "container", {- get() {- deprecated(- "Use `this.register` or `getOwner` instead of `this.container`",- { id: "discourse.this-container" }- );- return register;- },- });- },};setOwner(register, owner);diff --git a/frontend/discourse/app/lib/helpers.ts b/frontend/discourse/app/lib/helpers.tsindex ce5b07d3685..c13a67a4826 100644--- a/frontend/discourse/app/lib/helpers.ts+++ b/frontend/discourse/app/lib/helpers.ts@@ -1,8 +1,6 @@import Helper from "@ember/component/helper";import type { RegisterOptions } from "@ember/owner";import { dasherize } from "@ember/string";-import { trustHTML } from "@ember/template";-import deprecated from "discourse/lib/deprecated";import type Session from "discourse/models/session";import type Site from "discourse/models/site";import type TopicTrackingState from "discourse/models/topic-tracking-state";@@ -22,21 +20,6 @@ export function makeArray<T>(obj: T | T[] | null | undefined): T[] {return Array.isArray(obj) ? obj : [obj];}-export function htmlHelper(fn: (...args: unknown[]) => unknown) {- deprecated(- `htmlHelper is deprecated. Use a plain function and \`htmlSafe()\` from "@ember/template" instead.`,- { id: "discourse.html-helper" }- );-- return Helper.helper(function (this: unknown, ...args: unknown[]) {- args =- args.length > 1- ? (args[0] as unknown[]).concat({ hash: args[args.length - 1] })- : args;- return trustHTML((fn.apply(this, args) || "") as string);- });-}-/** The subset of the owner's registry {@link registerHelpers} writes into. */export interface HelperRegistry {register(fullName: string, factory: unknown, options?: RegisterOptions): void;@@ -88,34 +71,3 @@ export function createHelperContext(ctx: HelperContext) {export function helperContext() {return _helperContext;}--/**- * Register a helper for Ember and raw-hbs. This exists for- * legacy reasons, and should be avoided in new code. Instead, you should- * do `export default ...` from a `helpers/*.js` file.- */-export function registerUnbound(- name: string,- fn: (...args: unknown[]) => unknown-) {- deprecated(- `[registerUnbound ${name}] registerUnbound is deprecated. Instead, you should export a default function from 'discourse/helpers/${name}.js'.`,- { id: "discourse.register-unbound" }- );-- _helpers[name] = class extends Helper {- compute(params: unknown[], args: unknown) {- return fn(...params, args);- }- };-}--/**- * Register a helper for raw-hbs only- */-export function registerRawHelper(name: string) {- deprecated(- `[registerRawHelper ${name}] the raw handlebars system has been removed, so calls to registerRawHelper should be removed.`,- { id: "discourse.register-raw-helper" }- );-}diff --git a/frontend/discourse/app/lib/icon-library.js b/frontend/discourse/app/lib/icon-library.jsindex a13247ec344..ad89a14088d 100644--- a/frontend/discourse/app/lib/icon-library.js+++ b/frontend/discourse/app/lib/icon-library.js@@ -1,4 +1,3 @@-import deprecated from "discourse/lib/deprecated";import { isDevelopment } from "discourse/lib/environment";import escape from "discourse/lib/escape";import { i18n } from "discourse-i18n";@@ -170,14 +169,6 @@ registerIconRenderer({)}">${html}</span>`;}- if (params.translatedtitle) {- deprecated(`use 'translatedTitle' option instead of 'translatedtitle'`, {- since: "2.9.0.beta6",- id: "discourse.icon-renderer-translatedtitle",- });- params.translatedTitle = params.translatedtitle;- }-if (params.translatedTitle) {html = `<span class="svg-icon-title" title="${escape(params.translatedTitlediff --git a/frontend/discourse/app/lib/macro-alias.js b/frontend/discourse/app/lib/macro-alias.jsdeleted file mode 100644index 3cb6f1e5db4..00000000000--- a/frontend/discourse/app/lib/macro-alias.js+++ /dev/null@@ -1,29 +0,0 @@-import deprecated from "discourse/lib/deprecated";-import isDescriptor from "discourse/lib/is-descriptor";--function handleDescriptor(target, property, desc, fn, params = []) {- return {- enumerable: desc.enumerable,- configurable: desc.configurable,- writable: desc.writable,- initializer() {- return fn(...params);- },- };-}--export default function macroAlias(fn) {- return function (...params) {- if (isDescriptor(params[params.length - 1])) {- return handleDescriptor(...params, fn);- } else {- deprecated(- `Importing ${fn.name} from 'discourse/lib/decorators' is deprecated. You should instead import it from '@ember/object/computed' directly.`,- { id: "discourse.utils-decorators-import" }- );- return function (target, property, desc) {- return handleDescriptor(target, property, desc, fn, params);- };- }- };-}diff --git a/frontend/discourse/app/lib/offset-calculator.js b/frontend/discourse/app/lib/offset-calculator.jsindex 03c92bcbf4c..0c90e345aec 100644--- a/frontend/discourse/app/lib/offset-calculator.js+++ b/frontend/discourse/app/lib/offset-calculator.js@@ -1,32 +1,7 @@-import deprecated from "discourse/lib/deprecated";-export function scrollTopFor(y) {return y - offsetCalculator();}-export function minimumOffset() {- deprecated(- "The minimumOffset() helper is deprecated, please use headerOffset() instead.",- {- since: "2.8.0.beta10",- id: "discourse.offset-calculator.minimumOffset",- }- );-- const header = document.querySelector("header.d-header"),- iPadNav = document.querySelector(".footer-nav-ipad .footer-nav"),- iPadNavHeight = iPadNav ? iPadNav.offsetHeight : 0;-- // if the header has a positive offset from the top of the window, we need to include the offset- // this covers cases where a site has a custom header above d-header (covers fixed and unfixed)- const headerWrap = document.querySelector(".d-header-wrap"),- headerWrapOffset = headerWrap.getBoundingClientRect();-- return header- ? header.offsetHeight + headerWrapOffset.top + iPadNavHeight- : 0;-}-export function headerOffset() {return (parseInt(diff --git a/frontend/discourse/app/lib/plugin-api.gjs b/frontend/discourse/app/lib/plugin-api.gjsindex 23d7c3e64fc..61674bd542a 100644--- a/frontend/discourse/app/lib/plugin-api.gjs+++ b/frontend/discourse/app/lib/plugin-api.gjs@@ -18,7 +18,6 @@ import { addGlobalNotice } from "discourse/components/global-notice";import { headerButtonsDAG } from "discourse/components/header";import { headerIconsDAG } from "discourse/components/header/icons";import { registeredTabs } from "discourse/components/more-topics";-import { addPluginOutletDecorator } from "discourse/components/plugin-connector";import { STREAM_HTML_DECORATOR } from "discourse/components/post/cooked-html";import { addGroupPostSmallActionCode } from "discourse/components/post/small-action";import {@@ -1592,28 +1591,6 @@ class _PluginApi {addTagsHtmlCallback(callback, options);}- /**- * Adds a glyph to the legacy user menu after bookmarks- * WARNING: there is limited space there- *- * example:- *- * api.addUserMenuGlyph({- * title: 'awesome.label',- * className: 'my-class',- * icon: 'my-icon',- * data: { url: `/some/path` },- * });- *- * To customize the new user menu, see api.registerUserMenuTab- */- addUserMenuGlyph() {- deprecated(- "addUserMenuGlyph has been removed. Use api.registerUserMenuTab instead.",- { id: "discourse.add-user-menu-glyph" }- );- }-/*** Adds a callback to be called before rendering any post that* that returns custom classes to add to the post@@ -2114,35 +2091,6 @@ class _PluginApi {addPluginDocumentTitleCounter(counterFunction);}- /**- *- * Used for decorating the rendered HTML content of a plugin-outlet after it's been rendered- *- * `callback` will be called when it is time to decorate it.- *- * For example, to add a yellow background to a connector:- *- * ```- * api.decoratePluginOutlet(- * "discovery-list-container-top",- * (elem, args) => {- * if (elem.classList.contains("foo")) {- * elem.style.backgroundColor = "yellow";- * }- * }- * );- * ```- *- * @deprecated because modifying an Ember-rendered DOM tree can lead to very unexpected errors. Use CSS or plugin outlet connectors instead- **/- decoratePluginOutlet(outletName, callback, opts) {- deprecated(- "decoratePluginOutlet is deprecated because modifying an Ember-rendered DOM tree can lead to very unexpected errors. Use CSS or plugin outlet connectors instead",- { id: "discourse.decorate-plugin-outlet" }- );- addPluginOutletDecorator(outletName, callback, opts || {});- }-/*** Used to set the min and max height for the topic timeline scroll area on desktop. Pass object with min/max key value pairs.* Example:@@ -2346,21 +2294,6 @@ class _PluginApi {}}- /**- * @deprecated Use `addSaveableUserOption` instead- */- addSaveableUserOptionField(fieldName, options = {}) {- deprecated(- "`addSaveableUserOptionField` has been renamed to `addSaveableUserOption`",- {- id: "discourse.add-saveable-user-option-field",- since: "2026.3",- }- );-- this.addSaveableUserOption(fieldName, options);- }-/*** Ensures custom_fields are saved on a specific preferences page.* Custom fields are stored in the user_custom_fields table.diff --git a/frontend/discourse/app/lib/theme-selector.js b/frontend/discourse/app/lib/theme-selector.jsindex 37b7f436912..a883d367df4 100644--- a/frontend/discourse/app/lib/theme-selector.js+++ b/frontend/discourse/app/lib/theme-selector.js@@ -1,5 +1,4 @@import cookie, { removeCookie } from "discourse/lib/cookie";-import deprecated from "discourse/lib/deprecated";import { i18n } from "discourse-i18n";// Matches CORE_THEMES in app/models/theme.rb@@ -10,17 +9,6 @@ const keySelector = "meta[name=discourse_theme_id]";const COOKIE_NAME = "theme_ids";const COOKIE_EXPIRY_DAYS = 365;-export function currentThemeKey() {- // eslint-disable-next-line no-console- if (console && console.warn && console.trace) {- // TODO: Remove this code Jan 2019- deprecated(- "'currentThemeKey' is deprecated use 'currentThemeId' instead. A theme component may require updating.",- { id: "discourse.current-theme-key" }- );- }-}-export function currentThemeIds() {const themeIds = [];const elem = document.querySelector(keySelector);diff --git a/frontend/discourse/app/lib/uploads.js b/frontend/discourse/app/lib/uploads.jsindex 4e0b127e74c..34edc8a2e52 100644--- a/frontend/discourse/app/lib/uploads.js+++ b/frontend/discourse/app/lib/uploads.js@@ -3,7 +3,6 @@ import {MAX_RATE_LIMIT_RETRY_SECONDS,rateLimitWaitSeconds,} from "discourse/lib/ajax-error";-import deprecated from "discourse/lib/deprecated";import { getOwnerWithFallback } from "discourse/lib/get-owner";import { humanizeList } from "discourse/lib/text";import { capabilities } from "discourse/services/capabilities";@@ -350,14 +349,6 @@ export function displayErrorForBulkUpload(errors) {}export function displayErrorForUpload(data, siteSettings, fileName) {- if (!fileName) {- deprecated(- "Calling displayErrorForUpload without a fileName is deprecated and will be removed in a future version.",- { id: "discourse.uploads.display-error-for-upload" }- );- fileName = data.files[0].name;- }-if (isRateLimitError(data)) {displayRateLimitError(data);return;diff --git a/frontend/discourse/app/lib/utilities.js b/frontend/discourse/app/lib/utilities.jsindex 2b27ad747a8..7ea6b8760e7 100644--- a/frontend/discourse/app/lib/utilities.js+++ b/frontend/discourse/app/lib/utilities.js@@ -329,18 +329,6 @@ export function determinePostReplaceSelection({}}-export function safariHacksDisabled() {- deprecated(- "`safariHacksDisabled()` is deprecated, it now always returns `false`",- {- since: "2.8.0.beta8",- id: "discourse.safari-hacks-disabled",- }- );-- return false;-}-const toArray = (items) => {items = items || [];diff --git a/frontend/discourse/app/loader-shims.js b/frontend/discourse/app/loader-shims.jsindex 1795d387296..3236d3e78a0 100644--- a/frontend/discourse/app/loader-shims.js+++ b/frontend/discourse/app/loader-shims.js@@ -142,9 +142,6 @@ loaderShim("pretty-text/oneboxer", () => importSync("pretty-text/oneboxer"));loaderShim("pretty-text/oneboxer-cache", () =>importSync("pretty-text/oneboxer-cache"));-loaderShim("pretty-text/pretty-text", () =>- importSync("pretty-text/pretty-text")-);loaderShim("pretty-text/sanitizer", () => importSync("pretty-text/sanitizer"));loaderShim("pretty-text/text-replace", () =>importSync("pretty-text/text-replace")diff --git a/frontend/discourse/app/models/category-list.ts b/frontend/discourse/app/models/category-list.tsindex 68e69908c42..d6a1133ebc7 100644--- a/frontend/discourse/app/models/category-list.ts+++ b/frontend/discourse/app/models/category-list.ts@@ -1,7 +1,6 @@import { tracked } from "@glimmer/tracking";import { ajax } from "discourse/lib/ajax";import { bind } from "discourse/lib/decorators";-import deprecated from "discourse/lib/deprecated";import { number } from "discourse/lib/formatter";import LegacyArrayLikeObject from "discourse/lib/legacy-array-like-object";import PreloadStore from "discourse/lib/preload-store";@@ -162,21 +161,6 @@ export default class CategoryList extends LegacyArrayLikeObject<Category> {return record;}- /**- * @deprecated Use list() instead- */- static listForParent(- store: StoreService,- parentCategory: Pick<Category, "id"> | null- ) {- deprecated(- "The listForParent method of CategoryList is deprecated. Use list instead",- { id: "discourse.category-list.listForParent" }- );-- return CategoryList.list(store, parentCategory);- }-/*** Fetches and creates a list of categories*@@ -230,7 +214,11 @@ export default class CategoryList extends LegacyArrayLikeObject<Category> {attrs?: CategoryListCreateAttrs<M>): M;- static create(attrs: Partial<CategoryList> & Record<string, unknown> = {}) {+ static create(+ attrs: Partial<CategoryList> & {+ categories?: Category[];+ } & Record<string, unknown> = {}+ ) {const { categories, ...properties } = attrs;return super.create({ content: categories, ...properties });}@@ -244,17 +232,6 @@ export default class CategoryList extends LegacyArrayLikeObject<Category> {@autoTrackedArray topics?: Topic[];store!: StoreService;- /**- * @deprecated use the category list instance instead- */- get categories() {- deprecated(- "Using `CategoryList.categories` property is deprecated. Use `CategoryList.content` instead",- { id: "discourse.category-list.categories" }- );- return this.content;- }-/*** Loads more categories from the server*/diff --git a/frontend/discourse/app/models/composer.ts b/frontend/discourse/app/models/composer.tsindex 48aa3e7b044..19f45014c44 100644--- a/frontend/discourse/app/models/composer.ts+++ b/frontend/discourse/app/models/composer.ts@@ -11,7 +11,6 @@ import type DialogService from "discourse/dialog-holder/services/dialog";import type { AjaxError } from "discourse/lib/ajax";import { extractError, throwAjaxError } from "discourse/lib/ajax-error";import { tinyAvatar } from "discourse/lib/avatar-utils";-import deprecated from "discourse/lib/deprecated";import { QUOTE_REGEXP } from "discourse/lib/quote";import { serializeTags } from "discourse/lib/serialize-tags";import { prioritizeNameFallback } from "discourse/lib/settings";@@ -117,8 +116,6 @@ export interface ComposerOpenOptions {reply?: string | null;title?: string | null;recipients?: string;- /** Deprecated in favor of recipients. */- usernames?: string;composerTime?: number;typingTime?: number;whisper?: boolean;@@ -1663,19 +1660,13 @@ export default class Composer extends RestModel {throw new Error("draft sequence is required");}- if (opts.usernames) {- deprecated("`usernames` is deprecated, use `recipients` instead.", {- id: "discourse.composer.usernames",- });- }-this.setProperties({draftKey: opts.draftKey,draftSequence: opts.draftSequence,composeState: opts.composerState || OPEN,action: opts.action,topic: opts.topic,- targetRecipients: opts.usernames || opts.recipients,+ targetRecipients: opts.recipients,composerTotalOpened: opts.composerTime,typingTime: opts.typingTime,whisper: opts.whisper,diff --git a/frontend/discourse/app/models/nav-item.ts b/frontend/discourse/app/models/nav-item.tsindex 7b8d6b6da5b..857e2ff81f9 100644--- a/frontend/discourse/app/models/nav-item.ts+++ b/frontend/discourse/app/models/nav-item.ts@@ -3,7 +3,6 @@ import EmberObject, { computed } from "@ember/object";import { dependentKeyCompat } from "@ember/object/compat";import type RouterService from "@ember/routing/router-service";import { service } from "@ember/service";-import deprecated from "discourse/lib/deprecated";import { getOwnerWithFallback } from "discourse/lib/get-owner";import getURL from "discourse/lib/get-url";import { deepMerge } from "discourse/lib/object";@@ -230,25 +229,14 @@ export default class NavItem extends EmberObject {static buildList(category: Category | undefined,- args?: NavItemOptions+ args: NavItemOptions & Required<Pick<NavItemOptions, "siteSettings">>): NavItem[] {- args = args || {};-if (category) {args.category = category;}- if (!args.siteSettings) {- deprecated("You must supply `buildList` with a `siteSettings` object", {- since: "2.6.0",- id: "discourse.nav-item.built-list-site-settings",- });- args.siteSettings = getOwnerWithFallback(this).lookup(- "service:site-settings"- );- }let items: (string | NavItem | null)[] =- args.siteSettings!.top_menu.split("|");+ args.siteSettings.top_menu.split("|");const user = getOwnerWithFallback(this).lookup("service:current-user");if (user?.unified_new_enabled) {diff --git a/frontend/discourse/app/models/post-stream.ts b/frontend/discourse/app/models/post-stream.tsindex ce2e4177ce9..349e7b95487 100644--- a/frontend/discourse/app/models/post-stream.ts+++ b/frontend/discourse/app/models/post-stream.ts@@ -881,19 +881,6 @@ export default class PostStream extends RestModel {});}- /* mainly for backwards compatibility with plugins, used in quick messages plugin- * TODO: remove July 2022- * */- triggerNewPostInStream(postId: number, opts?: LoadOptions) {- deprecated(- "Please use triggerNewPostsInStream, this method will be removed July 2021",- {- id: "discourse.post-stream.trigger-new-post",- }- );- return this.triggerNewPostsInStream([postId], opts);- }-/**Finds and adds posts to the stream by id. Typically this would happen if we receive a messagefrom the message bus indicating there's a new post. We'll only insert it if we currentlydiff --git a/frontend/discourse/app/models/site.ts b/frontend/discourse/app/models/site.tsindex 07a1fd351d9..4fe91bf54c6 100644--- a/frontend/discourse/app/models/site.ts+++ b/frontend/discourse/app/models/site.ts@@ -461,21 +461,6 @@ export default class Site extends RestModel {);}- @dependentKeyCompat- get isMobileDevice(): boolean {- deprecated(- "Site.isMobileDevice is deprecated. Use `site.mobileView` and `site.desktopView` instead for " +- "viewport-based values or `capabilities.isMobileDevice` for user-agent based detection.",- {- id: "discourse.site.is-mobile-device",- since: "3.5.0.beta9-dev",- url: "https://meta.discourse.org/t/367810",- }- );-- return this.mobileView;- }-@dependentKeyCompatget categoriesById() {return new Map(this.categories.map((c) => [c.id, c]));diff --git a/frontend/discourse/app/models/topic-list.ts b/frontend/discourse/app/models/topic-list.tsindex b58838f6eae..dc23fcded50 100644--- a/frontend/discourse/app/models/topic-list.ts+++ b/frontend/discourse/app/models/topic-list.ts@@ -6,8 +6,6 @@ import { isEmpty } from "@ember/utils";import { Promise } from "rsvp";import { ajax } from "discourse/lib/ajax";import { removeValuesFromArray } from "discourse/lib/array-tools";-import deprecated from "discourse/lib/deprecated";-import { getOwnerWithFallback } from "discourse/lib/get-owner";import { autoTrackedArray } from "discourse/lib/tracked-tools";import { applyValueTransformer } from "discourse/lib/transformer";import type {@@ -248,26 +246,6 @@ export default class TopicList extends RestModel {return json;}- static find(- filter: string,- params: TopicListParams- ): globalThis.Promise<TopicList> {- deprecated(- `TopicList.find is deprecated. Use \`findFiltered("topicList")\` on the \`store\` service instead.`,- {- id: "discourse.topic-list-find",- since: "3.1.0.beta5",- }- );-- // TODO(typescript-pending): remove this lookup assertion when getOwnerWithFallback publishes typed service lookups.- const store = getOwnerWithFallback(this).lookup("service:store");- return (store as StoreService).findFiltered("topicList", {- filter,- params,- });- }-/** Hide the category when it has no children. */static hideUniformCategory(list: TopicList, category: Category | undefined) {list.set("hideCategory", !displayCategoryInList(list.site, category));diff --git a/frontend/discourse/app/models/topic.ts b/frontend/discourse/app/models/topic.tsindex fa5e87648c8..0bf8a023e36 100644--- a/frontend/discourse/app/models/topic.ts+++ b/frontend/discourse/app/models/topic.ts@@ -9,7 +9,6 @@ import { ajax } from "discourse/lib/ajax";import { popupAjaxError } from "discourse/lib/ajax-error";import { removeValuesFromArray } from "discourse/lib/array-tools";import { TOPIC_VISIBILITY_REASONS } from "discourse/lib/constants";-import deprecated from "discourse/lib/deprecated";import { longDate } from "discourse/lib/formatter";import getURL from "discourse/lib/get-url";import {@@ -1055,23 +1054,6 @@ export default class Topic extends RestModel {return `${getURL("/t/")}${slug}/${this.id}`;}- @computed("unread_posts", "new_posts")- get totalUnread() {- deprecated("The totalUnread property of the topic model is deprecated", {- id: "discourse.topic.totalUnread",- });- return this.unread_posts || this.new_posts;- }-- @computed("unread_posts", "new_posts")- get displayNewPosts() {- deprecated(- "The displayNewPosts property of the topic model is deprecated",- { id: "discourse.topic.totalUnread" }- );- return this.unread_posts || this.new_posts;- }-@computed("last_read_post_number", "url", "is_nested_view")get lastReadUrl() {if (this.is_nested_view) {diff --git a/frontend/discourse/app/models/user.ts b/frontend/discourse/app/models/user.tsindex 43ec11a2b26..a9395c8ab25 100644--- a/frontend/discourse/app/models/user.ts+++ b/frontend/discourse/app/models/user.ts@@ -2056,18 +2056,6 @@ export default class User extends RestModel.extend(Evented) {}}- resolvedTimezone() {- deprecated(- "user.resolvedTimezone() has been deprecated. Use user.user_option.timezone instead",- {- id: "discourse.user.resolved-timezone",- since: "2.9.0.beta12",- }- );-- return this.user_option!.timezone;- }-calculateMutedIds(notificationLevel: number,id: number,diff --git a/frontend/discourse/app/routes/application.js b/frontend/discourse/app/routes/application.jsindex ec4bdcedc11..35a17e347fb 100644--- a/frontend/discourse/app/routes/application.js+++ b/frontend/discourse/app/routes/application.js@@ -3,7 +3,6 @@ import { getOwner } from "@ember/owner";import { service } from "@ember/service";import NotActivatedModal from "discourse/components/modal/not-activated";import { RouteException } from "discourse/controllers/exception";-import deprecated from "discourse/lib/deprecated";import EmbedMode from "discourse/lib/embed-mode";import getURL from "discourse/lib/get-url";import logout from "discourse/lib/logout";@@ -219,39 +218,6 @@ export default class ApplicationRoute extends DiscourseRoute {user.checkEmail();}- @action- createNewTopicViaParams(title, body, categoryId, tags) {- deprecated(- "createNewTopicViaParam on the application route is deprecated. Use the composer service instead",- { id: "discourse.createNewTopicViaParams" }- );- this.composer.openNewTopic({- title,- body,- categoryId,- tags,- });- }-- @action- createNewMessageViaParams({- recipients = "",- topicTitle = "",- topicBody = "",- hasGroups = false,- } = {}) {- deprecated(- "createNewMessageViaParams on the application route is deprecated. Use the composer service instead",- { id: "discourse.createNewMessageViaParams" }- );- this.composer.openNewMessage({- recipients,- title: topicTitle,- body: topicBody,- hasGroups,- });- }-@action_collectTitleTokens(tokens) {tokens.push(this.siteTitle);diff --git a/frontend/discourse/app/services/composer.js b/frontend/discourse/app/services/composer.jsindex f39af72dfac..c99a4ae99bc 100644--- a/frontend/discourse/app/services/composer.js+++ b/frontend/discourse/app/services/composer.js@@ -21,7 +21,6 @@ import { customPopupMenuOptions } from "discourse/lib/composer/custom-popup-menuimport { USER_OPTION_COMPOSITION_MODES } from "discourse/lib/constants";import discourseDebounce from "discourse/lib/debounce";import { bind } from "discourse/lib/decorators";-import deprecated from "discourse/lib/deprecated";import { isRailsTesting } from "discourse/lib/environment";import prepareFormTemplateData, {getFormTemplateObject,@@ -2011,15 +2010,8 @@ export default class ComposerService extends Service {locale: this._initialLocale(opts),});- if (!this.model.targetRecipients) {- if (opts.usernames) {- deprecated("`usernames` is deprecated, use `recipients` instead.", {- id: "discourse.composer.usernames",- });- this.model.set("targetRecipients", opts.usernames);- } else if (opts.recipients) {- this.model.set("targetRecipients", opts.recipients);- }+ if (!this.model.targetRecipients && opts.recipients) {+ this.model.set("targetRecipients", opts.recipients);}if (diff --git a/frontend/discourse/app/ui-kit-shims.js b/frontend/discourse/app/ui-kit-shims.jsindex b5436a7f07c..565450ebfa9 100644--- a/frontend/discourse/app/ui-kit-shims.js+++ b/frontend/discourse/app/ui-kit-shims.js@@ -161,9 +161,6 @@ loaderShim("discourse/components/load-more", () =>loaderShim("discourse/components/nav-item", () =>importSync("discourse/ui-kit/d-nav-item"));-loaderShim("discourse/components/number-field", () =>- importSync("discourse/ui-kit/d-number-field")-);loaderShim("discourse/components/password-field", () =>importSync("discourse/ui-kit/d-password-field"));diff --git a/frontend/discourse/app/ui-kit/d-editor.gjs b/frontend/discourse/app/ui-kit/d-editor.gjsindex f060b22db0b..c5bc6f41f7e 100644--- a/frontend/discourse/app/ui-kit/d-editor.gjs+++ b/frontend/discourse/app/ui-kit/d-editor.gjs@@ -25,7 +25,6 @@ import UserAutocompleteResults from "discourse/components/user-autocomplete-resuimport Toolbar from "discourse/lib/composer/toolbar";import { USER_OPTION_COMPOSITION_MODES } from "discourse/lib/constants";import discourseDebounce from "discourse/lib/debounce";-import deprecated from "discourse/lib/deprecated";import { isTesting } from "discourse/lib/environment";import { getRegister } from "discourse/lib/get-owner";import { hashtagAutocompleteOptions } from "discourse/lib/hashtag-autocomplete";@@ -61,13 +60,6 @@ export function clearToolbarCallbacks() {_createCallbacks = [];}-export function onToolbarCreate(func) {- deprecated("`onToolbarCreate` is deprecated, use the plugin api instead.", {- id: "discourse.d-editor.on-toolbar-create",- });- addToolbarCallback(func);-}-@classNames("d-editor")export default class DEditor extends Component {@service emojiStore;diff --git a/frontend/discourse/app/ui-kit/d-number-field.js b/frontend/discourse/app/ui-kit/d-number-field.jsdeleted file mode 100644index 9dab0cf2244..00000000000--- a/frontend/discourse/app/ui-kit/d-number-field.js+++ /dev/null@@ -1,62 +0,0 @@-import { computed } from "@ember/object";-import { classNameBindings } from "@ember-decorators/component";-import deprecated from "discourse/lib/deprecated";-import { allowOnlyNumericInput } from "discourse/lib/utilities";-import DTextField from "discourse/ui-kit/d-text-field";-import { i18n } from "discourse-i18n";--@classNameBindings("invalid")-export default class DNumberField extends DTextField {- init() {- super.init(...arguments);- deprecated(- `NumberField component is deprecated. Use native <input> elements instead.\ne.g. <input {{on "input" (with-event-value (fn (mut this.value)))}} type="number" value={{this.value}} />`,- {- id: "discourse.number-field",- since: "3.2.0.beta5",- }- );- }-- @computed("number")- get value() {- if (this.number === null) {- return "";- }- return parseInt(this.number, 10);- }-- set value(value) {- const num = parseInt(value, 10);- if (isNaN(num)) {- this.set("invalid", true);- this.set("number", null);- } else {- this.set("invalid", false);- this.set("number", num);- }- }-- get _minNumber() {- if (!this.get("min")) {- return;- }- return parseInt(this.get("min"), 10);- }-- get _maxNumber() {- if (!this.get("max")) {- return;- }- return parseInt(this.get("max"), 10);- }-- @computed("placeholderKey")- get placeholder() {- return this.placeholderKey ? i18n(this.placeholderKey) : "";- }-- keyDown(event) {- allowOnlyNumericInput(event, this._minNumber && this._minNumber < 0);- }-}diff --git a/frontend/discourse/float-kit/components/d-popover.gts b/frontend/discourse/float-kit/components/d-popover.gtsdeleted file mode 100644index 55a43615165..00000000000--- a/frontend/discourse/float-kit/components/d-popover.gts+++ /dev/null@@ -1,55 +0,0 @@-import Component from "@glimmer/component";-import { service } from "@ember/service";-import { modifier } from "ember-modifier";-import type TooltipService from "discourse/float-kit/services/tooltip";-import deprecated from "discourse/lib/deprecated";--interface DPopoverSignature {- Blocks: {- /** The trigger followed by the popover content. */- default: [];- };-}--/**- * A legacy wrapper that turns its first child into a tooltip trigger and its- * second child into that tooltip's content, registering the pair through the- * `tooltip` service. It exists only for backwards compatibility.- *- * @deprecated Use `<DTooltip />` or the `tooltip` service instead.- */-export default class DPopover extends Component<DPopoverSignature> {- @service declare tooltip: TooltipService;-- registerDTooltip = modifier((element: HTMLElement) => {- deprecated(- "`<DPopover />` is deprecated. Use `<DTooltip />` or the `tooltip` service instead.",- { id: "discourse.d-popover" }- );-- const trigger = element.children[0];- const content = element.children[1];-- if (!trigger || !content) {- return;- }-- // The deprecated popover hands the tooltip a detached DOM node as its content,- // which the option bag types as a renderable `string`; cast at this boundary.- const instance = this.tooltip.register(trigger, {- content: content as unknown as string,- });-- content.remove();-- return () => {- instance.destroy();- };- });-- <template>- <div style="display:inline-flex;" {{this.registerDTooltip}}>- {{yield}}- </div>- </template>-}diff --git a/frontend/discourse/select-kit/components/icon-picker.js b/frontend/discourse/select-kit/components/icon-picker.jsdeleted file mode 100644index 4201b068203..00000000000--- a/frontend/discourse/select-kit/components/icon-picker.js+++ /dev/null@@ -1,107 +0,0 @@-import { action, computed } from "@ember/object";-import { classNames } from "@ember-decorators/component";-import { ajax } from "discourse/lib/ajax";-import deprecated from "discourse/lib/deprecated";-import { makeArray } from "discourse/lib/helpers";-import { convertIconClass } from "discourse/lib/icon-library";-import { addExtraSpriteSymbols } from "discourse/lib/svg-sprite-loader";-import FilterForMore from "discourse/select-kit/components/filter-for-more";-import MultiSelectComponent from "discourse/select-kit/components/multi-select";-import {- MAIN_COLLECTION,- pluginApiIdentifiers,- selectKitOptions,-} from "discourse/select-kit/components/select-kit";--const MORE_ICONS_COLLECTION = "MORE_ICONS_COLLECTION";--@classNames("icon-picker")-@pluginApiIdentifiers("icon-picker")-@selectKitOptions({ ignoreMissingIcons: true })-export default class IconPicker extends MultiSelectComponent {- init() {- super.init(...arguments);-- deprecated(- "IconPicker (SelectKit) is deprecated. Use `DIconGridPicker` instead.",- { id: "discourse.icon-picker", since: "2026.3" }- );-- this._cachedIconsList = null;- this._cachedHasMore = false;- this._hasMore = false;-- this.insertAfterCollection(MAIN_COLLECTION, MORE_ICONS_COLLECTION);- }-- @computed("value.[]")- get content() {- return makeArray(this.value).map(this._processIcon);- }-- modifyComponentForCollection(collection) {- if (collection === MORE_ICONS_COLLECTION) {- return FilterForMore;- }- }-- modifyContentForCollection(collection) {- if (collection === MORE_ICONS_COLLECTION) {- return {- shouldShowMoreTip: this._hasMore,- };- }- }-- search(filter = "") {- if (filter === "" && this._cachedIconsList?.length) {- this._hasMore = this._cachedHasMore;- return this._cachedIconsList;- } else {- return ajax("/svg-sprite/picker-search", {- data: {- filter,- only_available: this.onlyAvailable,- },- }).then((response) => {- addExtraSpriteSymbols(response.icons);- const icons = response.icons.map(this._processIcon);- if (filter === "") {- this._cachedIconsList = icons;- this._cachedHasMore = response.has_more;- }- this._hasMore = response.has_more;- return icons;- });- }- }-- willDestroyElement() {- super.willDestroyElement(...arguments);-- this._cachedIconsList = null;- this._cachedHasMore = false;- this._hasMore = false;- }-- _processIcon(icon) {- const iconName = typeof icon === "object" ? icon.id : icon,- strippedIconName = convertIconClass(iconName);-- return {- id: iconName,- name: iconName,- icon: strippedIconName,- };- }-- @action- _onChange(value, item) {- if (this.selectKit.options.maximum === 1) {- value = value.length ? value[0] : null;- item = item.length ? item[0] : null;- }-- this.onChange?.(value, item);- }-}diff --git a/frontend/discourse/tests/helpers/component-test.js b/frontend/discourse/tests/helpers/component-test.jsindex f2c4d52a6ce..985c64ce7cd 100644--- a/frontend/discourse/tests/helpers/component-test.js+++ b/frontend/discourse/tests/helpers/component-test.js@@ -31,11 +31,9 @@ export function setupRenderingTest(hooks, opts = {}) {opts.stubRouter ??= false;hooks.beforeEach(function () {- if (!hooks.usingDiscourseModule) {- this.siteSettings = currentSettings();- this.registry ||= this.owner.__registry__;- this.container = this.owner;- }+ this.siteSettings = currentSettings();+ this.registry ||= this.owner.__registry__;+ this.container = this.owner;this.site = Site.current();this.session = Session.current();diff --git a/frontend/discourse/tests/helpers/create-store.js b/frontend/discourse/tests/helpers/create-store.jsdeleted file mode 100644index 94d81e9df22..00000000000--- a/frontend/discourse/tests/helpers/create-store.js+++ /dev/null@@ -1,108 +0,0 @@-import RestAdapter from "discourse/adapters/rest";-import TopicListAdapter from "discourse/adapters/topic-list";-import deprecated from "discourse/lib/deprecated";-import KeyValueStore from "discourse/lib/key-value-store";-import RestModel from "discourse/models/rest";-import Site from "discourse/models/site";-import TopicTrackingState from "discourse/models/topic-tracking-state";-import { buildResolver } from "discourse/resolver";-import Store from "discourse/services/store";-import { currentSettings } from "discourse/tests/helpers/site-settings";--class CatAdapter extends RestAdapter {- primaryKey = "cat_id";-}--class CachedCatAdapter extends RestAdapter {- primaryKey = "cat_id";- cache = true;-- apiNameFor() {- return "cat";- }-}--class CachedCat extends RestModel {- init(...args) {- // Simulate an implicit injection- Object.defineProperty(this, "injectedProperty", {- writable: false,- enumerable: true,- value: "hello world",- });- return super.init(...args);- }-}--export default function (customLookup = () => {}) {- deprecated(- `create-store helper is deprecated. Please use regular Store service instead, e.g.- \`getOwner(this).lookup("service:store")\`- `,- {- since: "2.9.0.beta12",- id: "discourse.create-store-helper",- }- );-- const resolver = buildResolver("discourse").create({- namespace: { modulePrefix: "discourse" },- });-- // Normally this would happen in inject-discourse-objects.- // However, `create-store` is used by unit tests which do not init the application.- Site.current();-- return Store.create({- register: {- lookup(type) {- if (type === "adapter:cat") {- this._catAdapter =- this._catAdapter || CatAdapter.create({ owner: this });- return this._catAdapter;- }- if (type === "adapter:cached-cat") {- this._cachedCatAdapter =- this._cachedCatAdapter || CachedCatAdapter.create({ owner: this });- return this._cachedCatAdapter;- }- if (type === "adapter:rest") {- if (!this._restAdapter) {- this._restAdapter = RestAdapter.create({ owner: this });- }- return this._restAdapter;- }- if (type === "adapter:topicList") {- this._topicListAdapter =- this._topicListAdapter || TopicListAdapter.create({ owner: this });- return this._topicListAdapter;- }- if (type === "service:key-value-store") {- this._kvs = this._kvs || new KeyValueStore();- return this._kvs;- }- if (type === "service:topic-tracking-state") {- this._tracker = this._tracker || TopicTrackingState.create();- return this._tracker;- }- if (type === "service:site-settings") {- this._settings = this._settings || currentSettings();- return this._settings;- }- return customLookup(type);- },-- lookupFactory(type) {- const split = type.split(":");- if (type === "model:cached-cat") {- return CachedCat;- }- return resolver.resolveOther({- type: split[0],- fullNameWithoutType: split[1],- root: {},- });- },- },- });-}diff --git a/frontend/discourse/tests/helpers/qunit-helpers.js b/frontend/discourse/tests/helpers/qunit-helpers.jsindex 70f402ca6a4..a21ede6ef00 100644--- a/frontend/discourse/tests/helpers/qunit-helpers.js+++ b/frontend/discourse/tests/helpers/qunit-helpers.js@@ -30,7 +30,6 @@ import { clearPluginDocumentTitleCounters } from "discourse/components/d-documenimport { clearExtraHeaderButtons as clearExtraGlimmerHeaderButtons } from "discourse/components/header";import { clearExtraHeaderIcons as clearExtraGlimmerHeaderIcons } from "discourse/components/header/icons";import { clearRegisteredTabs } from "discourse/components/more-topics";-import { resetDecorators as resetPluginOutletDecorators } from "discourse/components/plugin-connector";import { resetGroupPostSmallActionCodes } from "discourse/components/post/small-action";import { resetItemSelectCallbacks } from "discourse/components/search-menu/results/assistant-item";import { resetQuickSearchRandomTips } from "discourse/components/search-menu/results/random-quick-tip";@@ -232,7 +231,6 @@ export function testCleanup(app) {clearOutletCache();clearHTMLCache();clearRewrites();- resetPluginOutletDecorators();resetUsernameDecorators();resetOneboxCache();resetInlineOneboxCache();@@ -320,52 +318,6 @@ function cleanupCssGeneratorTags() {document.querySelector("style#hashtag-css-generator")?.remove();}-export function discourseModule(name, options) {- deprecated(- `${name}: \`discourseModule\` is deprecated. Use QUnit's \`module\` instead.`,- { id: "discourse.discourse-module", since: "3.4.0.beta3-dev" }- );-- if (typeof options === "function") {- module(name, function (hooks) {- hooks.beforeEach(function () {- this.container = getOwnerWithFallback(this);- this.registry = this.container.registry;- this.owner = this.container;- this.siteSettings = currentSettings();- });-- this.getController = function (controllerName, properties) {- let controller = this.container.lookup(`controller:${controllerName}`);- controller.application = {};- controller.siteSettings = this.siteSettings;- if (properties) {- controller.setProperties(properties);- }- return controller;- };-- this.moduleName = name;-- hooks.usingDiscourseModule = true;- options.call(this, hooks);- });-- return;- }-- module(name, {- beforeEach() {- this.container = getOwnerWithFallback(this);- this.siteSettings = currentSettings();- options?.beforeEach?.call(this);- },- afterEach() {- options?.afterEach?.call(this);- },- });-}-export function addPretenderCallback(name, fn) {if (name && fn) {if (_pretenderCallbacks[name]) {diff --git a/frontend/discourse/tests/integration/components/d-section-test.gjs b/frontend/discourse/tests/integration/components/d-section-test.gjsdeleted file mode 100644index 3aa4e3f02c3..00000000000--- a/frontend/discourse/tests/integration/components/d-section-test.gjs+++ /dev/null@@ -1,24 +0,0 @@-import { render } from "@ember/test-helpers";-import { module, test } from "qunit";-import DSection from "discourse/components/d-section";-import { withSilencedDeprecationsAsync } from "discourse/lib/deprecated";-import { setupRenderingTest } from "discourse/tests/helpers/component-test";--module("Integration | Component | DSection", function (hooks) {- setupRenderingTest(hooks);-- test("can set classes on the body element", async function (assert) {- await withSilencedDeprecationsAsync("discourse.d-section", async () => {- await render(- <template>- <DSection class="special" @bodyClass="foo bar" @pageClass="test">- testing!- </DSection>- </template>- );- });-- assert.dom(".special").hasText("testing!");- assert.strictEqual(document.body.className, "test-page foo bar");- });-});diff --git a/frontend/discourse/tests/integration/components/number-field-test.gjs b/frontend/discourse/tests/integration/components/number-field-test.gjsdeleted file mode 100644index 574f621d724..00000000000--- a/frontend/discourse/tests/integration/components/number-field-test.gjs+++ /dev/null@@ -1,83 +0,0 @@-import { fillIn, render, triggerKeyEvent } from "@ember/test-helpers";-import { module, test } from "qunit";-import { withSilencedDeprecationsAsync } from "discourse/lib/deprecated";-import { setupRenderingTest } from "discourse/tests/helpers/component-test";-import DNumberField from "discourse/ui-kit/d-number-field";--module("Integration | Component | NumberField", function (hooks) {- setupRenderingTest(hooks);-- test("number field", async function (assert) {- this.set("value", 123);-- await withSilencedDeprecationsAsync("discourse.number-field", async () => {- await render(- <template>- <DNumberField @classNames="number-field-test" @value={{this.value}} />- </template>- );- });-- await fillIn(".number-field-test", "33");-- assert.strictEqual(- this.get("value"),- 33,- "value is changed when the input is a valid number"- );-- await fillIn(".number-field-test", "");- await triggerKeyEvent(".number-field-test", "keydown", 66); // b-- assert.strictEqual(- this.get("value"),- "",- "value is cleared when the input is NaN"- );- });-- test("number field | min value", async function (assert) {- this.set("value", "");-- await withSilencedDeprecationsAsync("discourse.number-field", async () => {- await render(- <template>- <DNumberField- @classNames="number-field-test"- @min="1"- @value={{this.value}}- />- </template>- );- });-- await triggerKeyEvent(".number-field-test", "keydown", 189); // -- await triggerKeyEvent(".number-field-test", "keydown", 49); // 1-- assert.strictEqual(- this.get("value"),- "",- "value is cleared when the input is less than the min"- );-- await withSilencedDeprecationsAsync("discourse.number-field", async () => {- await render(- <template>- <DNumberField- @classNames="number-field-test"- @min="-10"- @value={{this.value}}- />- </template>- );- });-- await fillIn(".number-field-test", "-1");-- assert.strictEqual(- this.get("value"),- -1,- "negative input allowed when min is negative"- );- });-});diff --git a/frontend/discourse/tests/integration/components/plugin-outlet-decorator-test.gjs b/frontend/discourse/tests/integration/components/plugin-outlet-decorator-test.gjsdeleted file mode 100644index 662d6c85f24..00000000000--- a/frontend/discourse/tests/integration/components/plugin-outlet-decorator-test.gjs+++ /dev/null@@ -1,71 +0,0 @@-import { render } from "@ember/test-helpers";-import { hbs } from "ember-cli-htmlbars";-import { module, test } from "qunit";-import PluginOutlet from "discourse/components/plugin-outlet";-import lazyHash from "discourse/helpers/lazy-hash";-import { withSilencedDeprecations } from "discourse/lib/deprecated";-import { withPluginApi } from "discourse/lib/plugin-api";-import { setupRenderingTest } from "discourse/tests/helpers/component-test";-import { registerTemporaryModule } from "../../helpers/temporary-module-helper.js";--const PREFIX = "discourse/plugins/some-plugin/templates/connectors";--module("Plugin Outlet - Decorator", function (hooks) {- setupRenderingTest(hooks);-- hooks.beforeEach(() => {- registerTemporaryModule(`${PREFIX}/my-outlet-name/foo`, hbs`FOO`);- registerTemporaryModule(`${PREFIX}/my-outlet-name/bar`, hbs`BAR`);-- withPluginApi((api) => {- withSilencedDeprecations("discourse.decorate-plugin-outlet", () => {- api.decoratePluginOutlet(- "my-outlet-name",- (elem, args) => {- if (elem.classList.contains("foo")) {- elem.style.backgroundColor = "yellow";- elem.classList.toggle("has-value", !!args.value);- }- },- { id: "yellow-decorator" }- );- });- });- });-- test("Calls the plugin callback with the rendered outlet", async function (assert) {- await render(- <template>- <PluginOutlet @connectorTagName="div" @name="my-outlet-name" />- </template>- );-- assert.dom(".my-outlet-name-outlet.foo").exists();- assert- .dom(".my-outlet-name-outlet.foo")- .hasAttribute("style", "background-color: yellow;");- assert- .dom(".my-outlet-name-outlet.bar")- .doesNotHaveStyle("backgroundColor");-- await render(- <template>- <PluginOutlet- @connectorTagName="div"- @name="my-outlet-name"- @outletArgs={{lazyHash value=true}}- />- </template>- );-- assert.dom(".my-outlet-name-outlet.foo").hasClass("has-value");-- await render(- <template>- <PluginOutlet @connectorTagName="div" @name="my-outlet-name" />- </template>- );-- assert.dom(".my-outlet-name-outlet.foo").doesNotHaveClass("has-value");- });-});diff --git a/frontend/discourse/tests/unit/models/post-stream-test.js b/frontend/discourse/tests/unit/models/post-stream-test.jsindex 73830f3c930..1848d9aec00 100644--- a/frontend/discourse/tests/unit/models/post-stream-test.js+++ b/frontend/discourse/tests/unit/models/post-stream-test.js@@ -1288,7 +1288,7 @@ module("Unit | Model | post-stream", function (hooks) {);});- test("triggerNewPostInStream for ignored posts", async function (assert) {+ test("triggerNewPostsInStream for ignored posts", async function (assert) {const postStream = buildStream.call(this, 280, [1]);const store = getOwner(this).lookup("service:store");const user = store.createRecord("user", {diff --git a/frontend/discourse/tests/unit/utils/decorators-test.js b/frontend/discourse/tests/unit/utils/decorators-test.jsindex f3cdd27fa9c..e373844bce9 100644--- a/frontend/discourse/tests/unit/utils/decorators-test.js+++ b/frontend/discourse/tests/unit/utils/decorators-test.js@@ -12,7 +12,6 @@ import discourseComputed, {observes,on,} from "discourse/lib/decorators";-import { withSilencedDeprecations } from "discourse/lib/deprecated";import { setupRenderingTest } from "discourse/tests/helpers/component-test";// eslint-disable-next-line ember/no-classic-classes@@ -215,19 +214,7 @@ module("Unit | Utils | decorators", function (hooks) {assert.strictEqual(stub.counter, 6);});- test("@observes works via .extend and native class syntax", async function (assert) {- let NativeClassWithObserver;- withSilencedDeprecations("discourse.utils-decorators-observes", () => {- NativeClassWithObserver = class extends EmberObject {- counter = 0;-- @observes("value")- incrementCounter() {- this.set("counter", this.counter + 1);- }- };- });-+ test("@observes works via .extend", async function (assert) {// eslint-disable-next-line ember/no-classic-classesconst ExtendWithObserver = EmberObject.extend({counter: 0,@@ -237,17 +224,6 @@ module("Unit | Utils | decorators", function (hooks) {},});- const nativeClassTest = NativeClassWithObserver.create();- nativeClassTest.set("value", "one");- await settled();- nativeClassTest.set("value", "two");- await settled();- assert.strictEqual(- nativeClassTest.counter,- 2,- "observer triggered for native class"- );-const extendTest = ExtendWithObserver.create();extendTest.set("value", "one");await settled();@@ -256,19 +232,17 @@ module("Unit | Utils | decorators", function (hooks) {assert.strictEqual(extendTest.counter, 2, "observer triggered for .extend");});- test("@on works via .extend and native class syntax", async function (assert) {- let NativeClassWithOn;- withSilencedDeprecations("discourse.utils-decorators-on", () => {- NativeClassWithOn = class extends EmberObject {- counter = 0;-- @on("init")- incrementCounter() {- this.set("counter", this.counter + 1);- }- };- });+ test("@observes throws on a native class", function (assert) {+ assert.throws(() => {+ // eslint-disable-next-line no-unused-vars+ class NativeClassWithObserver extends EmberObject {+ @observes("value")+ incrementCounter() {}+ }+ }, /only works with `\.extend\(\)`/);+ });+ test("@on works via .extend", function (assert) {// eslint-disable-next-line ember/no-classic-classesconst ExtendWithOn = EmberObject.extend({counter: 0,@@ -278,14 +252,17 @@ module("Unit | Utils | decorators", function (hooks) {},});- const nativeClassTest = NativeClassWithOn.create();- assert.strictEqual(- nativeClassTest.counter,- 1,- "on triggered for native class"- );-const extendTest = ExtendWithOn.create();assert.strictEqual(extendTest.counter, 1, "on triggered for .extend");});++ test("@on throws on a native class", function (assert) {+ assert.throws(() => {+ // eslint-disable-next-line no-unused-vars+ class NativeClassWithOn extends EmberObject {+ @on("init")+ incrementCounter() {}+ }+ }, /only works with `\.extend\(\)`/);+ });});diff --git a/frontend/discourse/type-tests/models/discovery-test.ts b/frontend/discourse/type-tests/models/discovery-test.tsindex dae02db2c02..98144a5a45c 100644--- a/frontend/discourse/type-tests/models/discovery-test.ts+++ b/frontend/discourse/type-tests/models/discovery-test.ts@@ -39,6 +39,7 @@ declare const categoryList: CategoryList;declare const html: TrustedHTML;declare const user: User;declare const options: NavItemOptions;+declare const siteSettings: NonNullable<NavItemOptions["siteSettings"]>;declare const api: Parameters<Parameters<typeof withPluginApi>[0]>[0];/* Store registration: every spelling callers use resolves to the class. */@@ -112,7 +113,6 @@ expectTypeOf(TopicList.topicsFrom(store, list)).toEqualTypeOf<TopicList.topicsFrom(store, list, { listKey: "shared_drafts" });TopicList.hideUniformCategory(list, category);TopicList.hideUniformCategory(list, undefined);-expectTypeOf(TopicList.find("latest", {})).resolves.toEqualTypeOf<TopicList>();/* Topic posters and participants are hydrated by the list. */@@ -140,9 +140,11 @@ expectTypeOf().toEqualTypeOf<NavItem | null>();NavItem.fromText("latest");expectTypeOf(- NavItem.buildList(category, { noSubcategories: true })+ NavItem.buildList(category, { noSubcategories: true, siteSettings })).toEqualTypeOf<NavItem[]>();-NavItem.buildList(undefined);+NavItem.buildList(undefined, { siteSettings });+// @ts-expect-error buildList needs siteSettings+NavItem.buildList(category, { noSubcategories: true });expectTypeOf(NavItem.pathFor("latest", { category, noSubcategories: true })).toEqualTypeOf<string>();@@ -225,7 +227,6 @@ expectTypeOf(categoryList.parentCategory).toEqualTypeOf<>();// Only the combined categories-and-topics page supplies topics.expectTypeOf(categoryList.topics).toEqualTypeOf<Topic[] | undefined>();-expectTypeOf(categoryList.categories).toEqualTypeOf<Category[]>();expectTypeOf(categoryList.loadMore()).resolves.toEqualTypeOf<void>();/* Subclasses keep their own factories. */@@ -341,7 +342,7 @@ const descriptor: NavigationBarItem = {},};api.addNavigationBarItem(descriptor);-NavItem.buildList(category, options);+NavItem.buildList(category, { ...options, siteSettings });/* No any leaks. */@@ -375,5 +376,4 @@ expectTypeOf<OwnAnyKeys<CategoryList, EmberObject>>().toEqualTypeOf<never>();// Existing JS fixtures and factories use ID-only parent contexts.CategoryList.categoriesFrom(store, {}, { id: 1 });CategoryList.list(store, { id: 1 });-CategoryList.listForParent(store, { id: 1 });CategoryList.create({ parentCategory: { id: 1 } });diff --git a/frontend/discourse/type-tests/models/site-test.ts b/frontend/discourse/type-tests/models/site-test.tsindex acb5c2e1b31..47ead3a6836 100644--- a/frontend/discourse/type-tests/models/site-test.ts+++ b/frontend/discourse/type-tests/models/site-test.ts@@ -294,7 +294,6 @@ expectTypeOf(site.topicCountDesc).toEqualTypeOf<string[]>();expectTypeOf(site.isReadOnly).toEqualTypeOf<boolean | undefined>();expectTypeOf(site.desktopView).toEqualTypeOf<boolean>();expectTypeOf(site.mobileView).toEqualTypeOf<boolean>();-expectTypeOf(site.isMobileDevice).toEqualTypeOf<boolean>();expectTypeOf(site.categoriesByCount).toEqualTypeOf<Category[]>();expectTypeOf(site.categoriesById).toEqualTypeOf<Map<number, Category>>();expectTypeOf(site.categoriesByParentId).toEqualTypeOf<diff --git a/frontend/discourse/type-tests/models/topic-test.ts b/frontend/discourse/type-tests/models/topic-test.tsindex 6e3deaf5ec2..111b24aaeaf 100644--- a/frontend/discourse/type-tests/models/topic-test.ts+++ b/frontend/discourse/type-tests/models/topic-test.ts@@ -356,8 +356,6 @@ expectTypeOf(topic.searchContext).toEqualTypeOf<{type: "topic";id: number;}>();-expectTypeOf(topic.totalUnread).toEqualTypeOf<number | undefined>();-expectTypeOf(topic.displayNewPosts).toEqualTypeOf<number | undefined>();expectTypeOf(topic.viewsHeat).toEqualTypeOf<"heatmap-high" | "heatmap-med" | "heatmap-low" | null>();diff --git a/frontend/pretty-text/addon/pretty-text.js b/frontend/pretty-text/addon/pretty-text.jsdeleted file mode 100644index d0ffc89f852..00000000000--- a/frontend/pretty-text/addon/pretty-text.js+++ /dev/null@@ -1,11 +0,0 @@-import deprecated from "discourse/lib/deprecated";--export function registerOption() {- deprecated(- "`registerOption() from `pretty-text` is deprecated. Use `helper.registerOptions()` instead.",- {- since: "2.8.0.beta9",- id: "discourse.pretty-text.registerOption",- }- );-}diff --git a/plugins/chat/assets/javascripts/discourse/services/chat.js b/plugins/chat/assets/javascripts/discourse/services/chat.jsindex 1b327f51467..29de4c0a08c 100644--- a/plugins/chat/assets/javascripts/discourse/services/chat.js+++ b/plugins/chat/assets/javascripts/discourse/services/chat.js@@ -7,7 +7,6 @@ import { popupAjaxError } from "discourse/lib/ajax-error";import { uniqueItemsFromArray } from "discourse/lib/array-tools";import { AUTO_GROUPS } from "discourse/lib/constants";import { bind } from "discourse/lib/decorators";-import deprecated from "discourse/lib/deprecated";import EmbedMode from "discourse/lib/embed-mode";import { applyValueTransformer } from "discourse/lib/transformer";import {@@ -408,13 +407,6 @@ export default class Chat extends Service {});}- addToolbarButton() {- deprecated(- "Use the new chat API `api.registerChatComposerButton` instead of `chat.addToolbarButton`",- { id: "discourse.chat.addToolbarButton" }- );- }-@actiontoggleDrawer() {this.chatStateManager.didToggleDrawer();diff --git a/plugins/discourse-workflows/assets/stylesheets/common/configurator/configurator.scss b/plugins/discourse-workflows/assets/stylesheets/common/configurator/configurator.scssindex db509518bc0..5783649d7d3 100644--- a/plugins/discourse-workflows/assets/stylesheets/common/configurator/configurator.scss+++ b/plugins/discourse-workflows/assets/stylesheets/common/configurator/configurator.scss@@ -118,7 +118,6 @@> .combo-box,> .d-native-select,- > .icon-picker,> .select-kit.combo-box.category-chooser,> .user-chooser,> .mini-tag-chooser,