diff --git a/app/assets/javascripts/discourse-common/addon/config/environment.js b/app/assets/javascripts/discourse-common/addon/config/environment.js index f4dc97ced1a..5208c1f7568 100644 --- a/app/assets/javascripts/discourse-common/addon/config/environment.js +++ b/app/assets/javascripts/discourse-common/addon/config/environment.js @@ -19,6 +19,7 @@ export function isTesting() { // 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", dropFrom: "3.0.0.beta1", }); return false; diff --git a/app/assets/javascripts/discourse-common/addon/lib/get-owner.js b/app/assets/javascripts/discourse-common/addon/lib/get-owner.js index 94a12c2358b..27b31f533b8 100644 --- a/app/assets/javascripts/discourse-common/addon/lib/get-owner.js +++ b/app/assets/javascripts/discourse-common/addon/lib/get-owner.js @@ -33,7 +33,8 @@ export function getRegister(obj) { Object.defineProperty(target, "container", { get() { deprecated( - "Use `this.register` or `getOwner` instead of `this.container`" + "Use `this.register` or `getOwner` instead of `this.container`", + { id: "discourse.this-container" } ); return register; }, diff --git a/app/assets/javascripts/discourse-common/addon/lib/icon-library.js b/app/assets/javascripts/discourse-common/addon/lib/icon-library.js index a969a2a116d..b9a83de3d8b 100644 --- a/app/assets/javascripts/discourse-common/addon/lib/icon-library.js +++ b/app/assets/javascripts/discourse-common/addon/lib/icon-library.js @@ -169,6 +169,7 @@ registerIconRenderer({ deprecated(`use 'translatedTitle' option instead of 'translatedtitle'`, { since: "2.9.0.beta6", dropFrom: "2.10.0.beta1", + id: "discourse.icon-renderer-translatedtitle", }); params.translatedTitle = params.translatedtitle; } diff --git a/app/assets/javascripts/discourse-common/addon/lib/legacy-resolver.js b/app/assets/javascripts/discourse-common/addon/lib/legacy-resolver.js index 6ac223c53a9..6a3ab1d6d32 100644 --- a/app/assets/javascripts/discourse-common/addon/lib/legacy-resolver.js +++ b/app/assets/javascripts/discourse-common/addon/lib/legacy-resolver.js @@ -66,7 +66,11 @@ export function buildResolver(baseName) { if (fullName === "app-events:main") { deprecated( "`app-events:main` has been replaced with `service:app-events`", - { since: "2.4.0", dropFrom: "2.9.0.beta1" } + { + since: "2.4.0", + dropFrom: "2.9.0.beta1", + id: "discourse.app-events-main", + } ); return "service:app-events"; } @@ -84,7 +88,10 @@ export function buildResolver(baseName) { "route:tagsShow": "route:tagShow", })) { if (fullName === key) { - deprecated(`${key} was replaced with ${value}`, { since: "2.6.0" }); + deprecated(`${key} was replaced with ${value}`, { + since: "2.6.0", + id: "discourse.legacy-resolver-resolutions", + }); return value; } } diff --git a/app/assets/javascripts/discourse-common/addon/resolver.js b/app/assets/javascripts/discourse-common/addon/resolver.js index 2c18d4fb7ca..079161f604d 100644 --- a/app/assets/javascripts/discourse-common/addon/resolver.js +++ b/app/assets/javascripts/discourse-common/addon/resolver.js @@ -168,6 +168,7 @@ export function buildResolver(baseName) { { since: deprecationInfo.since, dropFrom: deprecationInfo.dropFrom, + id: "discourse.resolver-resolutions", } ); } @@ -264,7 +265,8 @@ export function buildResolver(baseName) { resolved = this.legacyResolver.resolveOther(legacyParsedName); if (resolved) { deprecated( - `Unable to resolve with new resolver, but resolved with legacy resolver: ${parsedName.fullName}` + `Unable to resolve with new resolver, but resolved with legacy resolver: ${parsedName.fullName}`, + { id: "discourse.legacy-resolver-fallback" } ); } } diff --git a/app/assets/javascripts/discourse-common/addon/utils/macro-alias.js b/app/assets/javascripts/discourse-common/addon/utils/macro-alias.js index bfcc2af2cca..7a2f4f87204 100644 --- a/app/assets/javascripts/discourse-common/addon/utils/macro-alias.js +++ b/app/assets/javascripts/discourse-common/addon/utils/macro-alias.js @@ -18,7 +18,8 @@ export default function macroAlias(fn) { return handleDescriptor(...params, fn); } else { deprecated( - `Importing ${fn.name} from 'discourse-common/utils/decorators' is deprecated. You should instead import it from '@ember/object/computed' directly.` + `Importing ${fn.name} from 'discourse-common/utils/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/app/assets/javascripts/discourse/app/components/bread-crumbs.js b/app/assets/javascripts/discourse/app/components/bread-crumbs.js index 4f0925706fa..cff17a5cc23 100644 --- a/app/assets/javascripts/discourse/app/components/bread-crumbs.js +++ b/app/assets/javascripts/discourse/app/components/bread-crumbs.js @@ -57,14 +57,16 @@ export default Component.extend({ @discourseComputed("category") parentCategory(category) { deprecated( - "The parentCategory property of the bread-crumbs component is deprecated" + "The parentCategory property of the bread-crumbs component is deprecated", + { id: "discourse.breadcrumbs.parentCategory" } ); return category && category.parentCategory; }, parentCategories: filter("categories", function (c) { deprecated( - "The parentCategories property of the bread-crumbs component is deprecated" + "The parentCategories property of the bread-crumbs component is deprecated", + { id: "discourse.breadcrumbs.parentCategories" } ); if ( c.id === this.site.get("uncategorized_category_id") && @@ -80,7 +82,8 @@ export default Component.extend({ @discourseComputed("parentCategories") parentCategoriesSorted(parentCategories) { deprecated( - "The parentCategoriesSorted property of the bread-crumbs component is deprecated" + "The parentCategoriesSorted property of the bread-crumbs component is deprecated", + { id: "discourse.breadcrumbs.parentCategoriesSorted" } ); if (this.siteSettings.fixed_category_positions) { return parentCategories; @@ -97,7 +100,8 @@ export default Component.extend({ @discourseComputed("category", "parentCategory") firstCategory(category, parentCategory) { deprecated( - "The firstCategory property of the bread-crumbs component is deprecated" + "The firstCategory property of the bread-crumbs component is deprecated", + { id: "discourse.breadcrumbs.firstCategory" } ); return parentCategory || category; }, @@ -105,7 +109,8 @@ export default Component.extend({ @discourseComputed("category", "parentCategory") secondCategory(category, parentCategory) { deprecated( - "The secondCategory property of the bread-crumbs component is deprecated" + "The secondCategory property of the bread-crumbs component is deprecated", + { id: "discourse.breadcrumbs.secondCategory" } ); return parentCategory && category; }, @@ -113,7 +118,8 @@ export default Component.extend({ @discourseComputed("firstCategory", "hideSubcategories") childCategories(firstCategory, hideSubcategories) { deprecated( - "The childCategories property of the bread-crumbs component is deprecated" + "The childCategories property of the bread-crumbs component is deprecated", + { id: "discourse.breadcrumbs.childCategories" } ); if (hideSubcategories) { return []; diff --git a/app/assets/javascripts/discourse/app/components/composer-message.js b/app/assets/javascripts/discourse/app/components/composer-message.js index 2fd8055775e..86483921f22 100644 --- a/app/assets/javascripts/discourse/app/components/composer-message.js +++ b/app/assets/javascripts/discourse/app/components/composer-message.js @@ -14,7 +14,8 @@ export default Component.extend({ actions: { closeMessage() { deprecated( - 'You should use `action=(closeMessage message)` instead of `action=(action "closeMessage")`' + 'You should use `action=(closeMessage message)` instead of `action=(action "closeMessage")`', + { id: "discourse.composer-message.closeMessage" } ); this.closeMessage(this.message); }, diff --git a/app/assets/javascripts/discourse/app/components/d-editor.js b/app/assets/javascripts/discourse/app/components/d-editor.js index 298dc542ecb..d31c7c5fe97 100644 --- a/app/assets/javascripts/discourse/app/components/d-editor.js +++ b/app/assets/javascripts/discourse/app/components/d-editor.js @@ -209,7 +209,9 @@ export function clearToolbarCallbacks() { } export function onToolbarCreate(func) { - deprecated("`onToolbarCreate` is deprecated, use the plugin api instead."); + deprecated("`onToolbarCreate` is deprecated, use the plugin api instead.", { + id: "discourse.d-editor.on-toolbar-create", + }); addToolbarCallback(func); } diff --git a/app/assets/javascripts/discourse/app/components/d-section.js b/app/assets/javascripts/discourse/app/components/d-section.js index 91bc8bfaadf..515f4b5ed75 100644 --- a/app/assets/javascripts/discourse/app/components/d-section.js +++ b/app/assets/javascripts/discourse/app/components/d-section.js @@ -18,6 +18,7 @@ export default class extends Component { deprecated("Uses boolean instead of string for scrollTop.", { since: "2.8.0.beta9", dropFrom: "2.9.0.beta1", + id: "discourse.d-section.scroll-top-boolean", }); return; diff --git a/app/assets/javascripts/discourse/app/components/header-extra-info.js b/app/assets/javascripts/discourse/app/components/header-extra-info.js index 81151b67e2b..51977030ddb 100644 --- a/app/assets/javascripts/discourse/app/components/header-extra-info.js +++ b/app/assets/javascripts/discourse/app/components/header-extra-info.js @@ -2,6 +2,7 @@ import deprecated from "discourse-common/lib/deprecated"; export function needsSecondRowIf() { deprecated( - "`needsSecondRowIf` is deprecated. Use widget hooks on `header-second-row`" + "`needsSecondRowIf` is deprecated. Use widget hooks on `header-second-row`", + { id: "discourse.header-extra-info.needs-second-row-if" } ); } diff --git a/app/assets/javascripts/discourse/app/components/highlight-text.js b/app/assets/javascripts/discourse/app/components/highlight-text.js index 6199140de3d..9d6f9626256 100644 --- a/app/assets/javascripts/discourse/app/components/highlight-text.js +++ b/app/assets/javascripts/discourse/app/components/highlight-text.js @@ -5,7 +5,8 @@ export default highlightSearch.extend({ init() { this._super(...arguments); deprecated( - "`highlight-text` component is deprecated, use the `highlight-search` instead." + "`highlight-text` component is deprecated, use the `highlight-search` instead.", + { id: "discourse.highlight-text-component" } ); }, }); diff --git a/app/assets/javascripts/discourse/app/components/mobile-nav.js b/app/assets/javascripts/discourse/app/components/mobile-nav.js index f0ea3e6138d..1d4b93a4a0b 100644 --- a/app/assets/javascripts/discourse/app/components/mobile-nav.js +++ b/app/assets/javascripts/discourse/app/components/mobile-nav.js @@ -19,6 +19,7 @@ export default Component.extend({ deprecated("{{mobile-nav}} no longer requires the currentPath property", { since: "2.7.0.beta4", dropFrom: "2.9.0.beta1", + id: "discourse.mobile-nav.currentPath", }); } }, diff --git a/app/assets/javascripts/discourse/app/components/plugin-connector.js b/app/assets/javascripts/discourse/app/components/plugin-connector.js index 22f5252e053..42f829efbfc 100644 --- a/app/assets/javascripts/discourse/app/components/plugin-connector.js +++ b/app/assets/javascripts/discourse/app/components/plugin-connector.js @@ -39,7 +39,10 @@ export default Component.extend({ key, computed("deprecatedArgs", () => { deprecated( - `The ${key} property is deprecated, but is being used in ${this.layoutName}` + `The ${key} property is deprecated, but is being used in ${this.layoutName}`, + { + id: "discourse.plugin-connector.deprecated-arg", + } ); return (this.deprecatedArgs || {})[key]; diff --git a/app/assets/javascripts/discourse/app/controllers/composer.js b/app/assets/javascripts/discourse/app/controllers/composer.js index a25874f18d0..9c0951ebd0e 100644 --- a/app/assets/javascripts/discourse/app/controllers/composer.js +++ b/app/assets/javascripts/discourse/app/controllers/composer.js @@ -1234,7 +1234,9 @@ export default Controller.extend({ if (!this.model.targetRecipients) { if (opts.usernames) { - deprecated("`usernames` is deprecated, use `recipients` instead."); + 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); diff --git a/app/assets/javascripts/discourse/app/controllers/discovery/topics.js b/app/assets/javascripts/discourse/app/controllers/discovery/topics.js index caa92925ba1..fb0be3912ff 100644 --- a/app/assets/javascripts/discourse/app/controllers/discovery/topics.js +++ b/app/assets/javascripts/discourse/app/controllers/discovery/topics.js @@ -71,7 +71,11 @@ const controllerOpts = { changeSort() { deprecated( "changeSort has been changed from an (action) to a (route-action)", - { since: "2.6.0", dropFrom: "2.7.0" } + { + since: "2.6.0", + dropFrom: "2.7.0", + id: "discourse.topics.change-sort", + } ); return routeAction("changeSort", this.router._router, ...arguments)(); }, diff --git a/app/assets/javascripts/discourse/app/initializers/inject-objects.js b/app/assets/javascripts/discourse/app/initializers/inject-objects.js index 4885d3cd44b..ea54bb1a7b9 100644 --- a/app/assets/javascripts/discourse/app/initializers/inject-objects.js +++ b/app/assets/javascripts/discourse/app/initializers/inject-objects.js @@ -17,6 +17,7 @@ export default { { since: "2.8", dropFrom: "2.9", + id: "discourse.global.site-settings", } ); return container.lookup("service:site-settings"); @@ -29,6 +30,7 @@ export default { { since: "2.8", dropFrom: "2.9", + id: "discourse.global.user", } ); return User; @@ -41,6 +43,7 @@ export default { { since: "2.8", dropFrom: "2.9", + id: "discourse.global.site", } ); return Site; diff --git a/app/assets/javascripts/discourse/app/initializers/jquery-plugins.js b/app/assets/javascripts/discourse/app/initializers/jquery-plugins.js index 60487deb30b..e9844f8dee8 100644 --- a/app/assets/javascripts/discourse/app/initializers/jquery-plugins.js +++ b/app/assets/javascripts/discourse/app/initializers/jquery-plugins.js @@ -19,7 +19,9 @@ export default { deprecated( "`bootbox.alert` is deprecated, please use the dialog service instead.", { + id: "discourse.bootbox", dropFrom: "3.1.0.beta5", + url: "https://meta.discourse.org/t/244902", } ); return dialog.alert(arguments[0]); @@ -34,7 +36,9 @@ export default { deprecated( "`bootbox` is now deprecated, please use the dialog service instead.", { + id: "discourse.bootbox", dropFrom: "3.1.0.beta5", + url: "https://meta.discourse.org/t/244902", } ); return originalDialog(...arguments); diff --git a/app/assets/javascripts/discourse/app/lib/category-hashtags.js b/app/assets/javascripts/discourse/app/lib/category-hashtags.js index b8ed69c74f5..4d8b6a02ab9 100644 --- a/app/assets/javascripts/discourse/app/lib/category-hashtags.js +++ b/app/assets/javascripts/discourse/app/lib/category-hashtags.js @@ -16,6 +16,7 @@ export function categoryHashtagTriggerRule(textarea, opts) { { since: "2.9.0.beta10", dropFrom: "3.0.0.beta1", + id: "discourse.category-hashtags.categoryHashtagTriggerRule", } ); return hashtagTriggerRule(textarea, opts); diff --git a/app/assets/javascripts/discourse/app/lib/click-track.js b/app/assets/javascripts/discourse/app/lib/click-track.js index fffea0068e5..fc7c2fa8ac3 100644 --- a/app/assets/javascripts/discourse/app/lib/click-track.js +++ b/app/assets/javascripts/discourse/app/lib/click-track.js @@ -18,6 +18,7 @@ export function isValidLink(link) { deprecated("isValidLink now expects an Element, not a jQuery object", { since: "2.9.0.beta7", + id: "discourse.click-track.is-valid-link-jquery", }); } diff --git a/app/assets/javascripts/discourse/app/lib/cookie.js b/app/assets/javascripts/discourse/app/lib/cookie.js index 8409200930e..43c0602e22e 100644 --- a/app/assets/javascripts/discourse/app/lib/cookie.js +++ b/app/assets/javascripts/discourse/app/lib/cookie.js @@ -76,7 +76,11 @@ export function removeCookie(key, options) { } if (window && window.$) { - const depOpts = { since: "2.6.0", dropFrom: "2.7.0" }; + const depOpts = { + since: "2.6.0", + dropFrom: "2.7.0", + id: "discourse.jquery-cookie", + }; window.$.cookie = function () { deprecated( "$.cookie is being removed from Discourse. Please import our cookie module and use that instead.", diff --git a/app/assets/javascripts/discourse/app/lib/formatter.js b/app/assets/javascripts/discourse/app/lib/formatter.js index 8465df26a16..66cd9991959 100644 --- a/app/assets/javascripts/discourse/app/lib/formatter.js +++ b/app/assets/javascripts/discourse/app/lib/formatter.js @@ -56,6 +56,7 @@ export function updateRelativeAge(elems) { deprecated("updateRelativeAge now expects a DOM NodeList", { since: "2.8.0.beta7", dropFrom: "2.9.0.beta1", + id: "discourse.formatter.update-relative-age-node-list", }); } diff --git a/app/assets/javascripts/discourse/app/lib/link-hashtags.js b/app/assets/javascripts/discourse/app/lib/link-hashtags.js index 5dee24413cb..0138379fec5 100644 --- a/app/assets/javascripts/discourse/app/lib/link-hashtags.js +++ b/app/assets/javascripts/discourse/app/lib/link-hashtags.js @@ -15,6 +15,7 @@ export function linkSeenHashtags(elem) { deprecated("linkSeenHashtags now expects a DOM node as first parameter", { since: "2.8.0.beta7", dropFrom: "2.9.0.beta1", + id: "discourse.link-hashtags.dom-node", }); } diff --git a/app/assets/javascripts/discourse/app/lib/link-mentions.js b/app/assets/javascripts/discourse/app/lib/link-mentions.js index 0ce78017c66..0af0ef6b443 100644 --- a/app/assets/javascripts/discourse/app/lib/link-mentions.js +++ b/app/assets/javascripts/discourse/app/lib/link-mentions.js @@ -74,6 +74,7 @@ export function linkSeenMentions(elem, siteSettings) { deprecated("linkSeenMentions now expects a DOM node as first parameter", { since: "2.8.0.beta7", dropFrom: "2.9.0.beta1", + id: "discourse.link-mentions.dom-node", }); } diff --git a/app/assets/javascripts/discourse/app/lib/offset-calculator.js b/app/assets/javascripts/discourse/app/lib/offset-calculator.js index bd1f8556d22..438bb5a5ffa 100644 --- a/app/assets/javascripts/discourse/app/lib/offset-calculator.js +++ b/app/assets/javascripts/discourse/app/lib/offset-calculator.js @@ -10,6 +10,7 @@ export function minimumOffset() { { since: "2.8.0.beta10", dropFrom: "2.9.0.beta2", + id: "discourse.offset-calculator.minimumOffset", } ); diff --git a/app/assets/javascripts/discourse/app/lib/plugin-api.js b/app/assets/javascripts/discourse/app/lib/plugin-api.js index fc20f67150c..30ddedef54c 100644 --- a/app/assets/javascripts/discourse/app/lib/plugin-api.js +++ b/app/assets/javascripts/discourse/app/lib/plugin-api.js @@ -531,7 +531,8 @@ class PluginApi { this.addCommunitySectionLink(args, name.match(/footerLinks/)); } catch { deprecated( - `Usage of \`api.decorateWidget('hamburger-menu:generalLinks')\` is incompatible with the \`enable_experimental_sidebar_hamburger\` site setting. Please use \`api.addCommunitySectionLink\` instead.` + `Usage of \`api.decorateWidget('hamburger-menu:generalLinks')\` is incompatible with the \`enable_experimental_sidebar_hamburger\` site setting. Please use \`api.addCommunitySectionLink\` instead.`, + { id: "discourse.decorate-widget.hamburger-widget-links" } ); } @@ -798,7 +799,8 @@ class PluginApi { addFlagProperty() { deprecated( - "addFlagProperty has been removed. Use the reviewable API instead." + "addFlagProperty has been removed. Use the reviewable API instead.", + { id: "discourse.add-flag-property" } ); } diff --git a/app/assets/javascripts/discourse/app/lib/plugin-connectors.js b/app/assets/javascripts/discourse/app/lib/plugin-connectors.js index 16ff7a63a6c..a276c1fe1be 100644 --- a/app/assets/javascripts/discourse/app/lib/plugin-connectors.js +++ b/app/assets/javascripts/discourse/app/lib/plugin-connectors.js @@ -109,7 +109,9 @@ export function buildArgsWithDeprecations(args, deprecatedArgs) { Object.keys(deprecatedArgs).forEach((key) => { Object.defineProperty(output, key, { get() { - deprecated(`${key} is deprecated`); + deprecated(`${key} is deprecated`, { + id: "discourse.plugin-connector.deprecated-arg", + }); return deprecatedArgs[key]; }, diff --git a/app/assets/javascripts/discourse/app/lib/theme-selector.js b/app/assets/javascripts/discourse/app/lib/theme-selector.js index 58d4d41fdc0..a4d56442dc6 100644 --- a/app/assets/javascripts/discourse/app/lib/theme-selector.js +++ b/app/assets/javascripts/discourse/app/lib/theme-selector.js @@ -11,7 +11,8 @@ export function currentThemeKey() { if (console && console.warn && console.trace) { // TODO: Remove this code Jan 2019 deprecated( - "'currentThemeKey' is is deprecated use 'currentThemeId' instead. A theme component may require updating." + "'currentThemeKey' is is deprecated use 'currentThemeId' instead. A theme component may require updating.", + { id: "discourse.current-theme-key" } ); } } diff --git a/app/assets/javascripts/discourse/app/lib/uploads.js b/app/assets/javascripts/discourse/app/lib/uploads.js index 02e0a2b6737..1ea697dcc17 100644 --- a/app/assets/javascripts/discourse/app/lib/uploads.js +++ b/app/assets/javascripts/discourse/app/lib/uploads.js @@ -296,7 +296,8 @@ export function getUploadMarkdown(upload) { export function displayErrorForUpload(data, siteSettings, fileName) { if (!fileName) { deprecated( - "Calling displayErrorForUpload without a fileName is deprecated and will be removed in a future version." + "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; } diff --git a/app/assets/javascripts/discourse/app/lib/utilities.js b/app/assets/javascripts/discourse/app/lib/utilities.js index 6af92d705af..a0096b0ee0a 100644 --- a/app/assets/javascripts/discourse/app/lib/utilities.js +++ b/app/assets/javascripts/discourse/app/lib/utilities.js @@ -335,6 +335,7 @@ export function safariHacksDisabled() { { since: "2.8.0.beta8", dropFrom: "2.9.0.beta1", + id: "discourse.safari-hacks-disabled", } ); diff --git a/app/assets/javascripts/discourse/app/models/composer.js b/app/assets/javascripts/discourse/app/models/composer.js index fdfc08c361b..267c2412d4f 100644 --- a/app/assets/javascripts/discourse/app/models/composer.js +++ b/app/assets/javascripts/discourse/app/models/composer.js @@ -777,7 +777,9 @@ const Composer = RestModel.extend({ } if (opts.usernames) { - deprecated("`usernames` is deprecated, use `recipients` instead."); + deprecated("`usernames` is deprecated, use `recipients` instead.", { + id: "discourse.composer.usernames", + }); } this.setProperties({ diff --git a/app/assets/javascripts/discourse/app/models/nav-item.js b/app/assets/javascripts/discourse/app/models/nav-item.js index c93a673ef42..bfc3260832b 100644 --- a/app/assets/javascripts/discourse/app/models/nav-item.js +++ b/app/assets/javascripts/discourse/app/models/nav-item.js @@ -243,6 +243,7 @@ NavItem.reopenClass({ deprecated("You must supply `buildList` with a `siteSettings` object", { since: "2.6.0", dropFrom: "2.7.0", + id: "discourse.nav-item.built-list-site-settings", }); args.siteSettings = getOwner(this).lookup("service:site-settings"); } diff --git a/app/assets/javascripts/discourse/app/models/post-stream.js b/app/assets/javascripts/discourse/app/models/post-stream.js index 6cc36267a0c..674ea63cf33 100644 --- a/app/assets/javascripts/discourse/app/models/post-stream.js +++ b/app/assets/javascripts/discourse/app/models/post-stream.js @@ -697,7 +697,10 @@ export default RestModel.extend({ * */ triggerNewPostInStream(postId, opts) { deprecated( - "Please use triggerNewPostsInStream, this method will be removed July 2021" + "Please use triggerNewPostsInStream, this method will be removed July 2021", + { + id: "discourse.post-stream.trigger-new-post", + } ); return this.triggerNewPostsInStream([postId], opts); }, diff --git a/app/assets/javascripts/discourse/app/models/site.js b/app/assets/javascripts/discourse/app/models/site.js index 6b1f1619e50..03e6ca0c1a5 100644 --- a/app/assets/javascripts/discourse/app/models/site.js +++ b/app/assets/javascripts/discourse/app/models/site.js @@ -229,6 +229,7 @@ if (typeof Discourse !== "undefined") { if (!warned) { deprecated("Import the Site class instead of using Discourse.Site", { since: "2.4.0", + id: "discourse.globals.site", }); warned = true; } diff --git a/app/assets/javascripts/discourse/app/models/store.js b/app/assets/javascripts/discourse/app/models/store.js index 42523e3e76b..cb928def5eb 100644 --- a/app/assets/javascripts/discourse/app/models/store.js +++ b/app/assets/javascripts/discourse/app/models/store.js @@ -6,5 +6,6 @@ deprecated( { since: "2.8.0.beta8", dropFrom: "2.9.0.beta1", + id: "discourse.models-store", } ); diff --git a/app/assets/javascripts/discourse/app/models/topic.js b/app/assets/javascripts/discourse/app/models/topic.js index 32aa5beceba..fbccc568e1f 100644 --- a/app/assets/javascripts/discourse/app/models/topic.js +++ b/app/assets/javascripts/discourse/app/models/topic.js @@ -240,13 +240,18 @@ const Topic = RestModel.extend({ @discourseComputed("unread_posts", "new_posts") totalUnread(unreadPosts, newPosts) { - deprecated("The totalUnread property of the topic model is deprecated"); + deprecated("The totalUnread property of the topic model is deprecated", { + id: "discourse.topic.totalUnread", + }); return unreadPosts || newPosts; }, @discourseComputed("unread_posts", "new_posts") displayNewPosts(unreadPosts, newPosts) { - deprecated("The displayNewPosts property of the topic model is deprecated"); + deprecated( + "The displayNewPosts property of the topic model is deprecated", + { id: "discourse.topic.totalUnread" } + ); return unreadPosts || newPosts; }, diff --git a/app/assets/javascripts/discourse/app/models/user.js b/app/assets/javascripts/discourse/app/models/user.js index c12ea209f89..4bfd9806e6e 100644 --- a/app/assets/javascripts/discourse/app/models/user.js +++ b/app/assets/javascripts/discourse/app/models/user.js @@ -1395,6 +1395,7 @@ if (typeof Discourse !== "undefined") { if (!warned) { deprecated("Import the User class instead of using Discourse.User", { since: "2.4.0", + id: "discourse.globals.user", }); warned = true; } diff --git a/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js b/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js index 8ba016714d6..5c2c3a609b4 100644 --- a/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js +++ b/app/assets/javascripts/discourse/tests/helpers/qunit-helpers.js @@ -275,7 +275,11 @@ export function acceptance(name, optionsOrCallback) { } else if (typeof optionsOrCallback === "object") { deprecated( `${name}: The second parameter to \`acceptance\` should be a function that encloses your tests.`, - { since: "2.6.0", dropFrom: "2.9.0.beta1" } + { + since: "2.6.0", + dropFrom: "2.9.0.beta1", + id: "discourse.qunit.acceptance-function", + } ); options = optionsOrCallback; } @@ -407,6 +411,7 @@ QUnit.assert.not = function (actual, message) { deprecated("assert.not() is deprecated. Use assert.notOk() instead.", { since: "2.9.0.beta1", dropFrom: "2.10.0.beta1", + id: "discourse.qunit.assert-not", }); this.pushResult({ diff --git a/app/assets/javascripts/discourse/tests/setup-tests.js b/app/assets/javascripts/discourse/tests/setup-tests.js index 6aba31ae171..41cab84dff9 100644 --- a/app/assets/javascripts/discourse/tests/setup-tests.js +++ b/app/assets/javascripts/discourse/tests/setup-tests.js @@ -231,6 +231,7 @@ export default function setupTests(config) { { since: "2.6.0.beta.4", dropFrom: "2.6.0", + id: "discourse.qunit.global-exists", } ); return exists; diff --git a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js index e0813c2310d..e614bf66a1f 100644 --- a/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js +++ b/app/assets/javascripts/pretty-text/addon/engines/discourse-markdown-it.js @@ -41,6 +41,7 @@ function createHelper( deprecated("`whiteList` has been replaced with `allowList`", { since: "2.6.0.beta.4", dropFrom: "2.7.0", + id: "discourse.markdown-it.whitelist", }); helper.allowList(info); }; diff --git a/app/assets/javascripts/pretty-text/addon/pretty-text.js b/app/assets/javascripts/pretty-text/addon/pretty-text.js index 58a0ae6f743..a6b0e5c69d5 100644 --- a/app/assets/javascripts/pretty-text/addon/pretty-text.js +++ b/app/assets/javascripts/pretty-text/addon/pretty-text.js @@ -11,6 +11,7 @@ export function registerOption() { { since: "2.8.0.beta9", dropFrom: "2.9.0.beta1", + id: "discourse.pretty-text.registerOption", } ); } diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit.js b/app/assets/javascripts/select-kit/addon/components/select-kit.js index 316e80749ce..304b6c3f5be 100644 --- a/app/assets/javascripts/select-kit/addon/components/select-kit.js +++ b/app/assets/javascripts/select-kit/addon/components/select-kit.js @@ -1073,7 +1073,11 @@ export default Component.extend( discourseSetup && discourseSetup.getAttribute("data-environment") === "development" ) { - deprecated(text, { since: "v2.4.0", dropFrom: "2.9.0.beta1" }); + deprecated(text, { + since: "v2.4.0", + dropFrom: "2.9.0.beta1", + id: "discourse.select-kit", + }); } },