discourse/app/assets/javascripts/discourse-common/addon/lib
David Taylor 8958b4f76a
DEV: Rename custom getOwner to getOwnerWithFallback (#23437)
Our custom implementation of `getOwner` includes a fallback which returns an owner, even if the passed object does not have one set. This is confusing and creates a false sense of security. Generally if the fallback is used, it means there is a problem with the patterns being used.

This commit renames our custom implementation to `getOwnerWithFallback`, while maintaining the old `getOwner` export with a deprecation notice. Core code is updated to use the official `@ember/application` implementation, or the new `getOwnerWithFallback` function.

This commit updates all core uses of `{ getOwner } from discourse-common/lib/get-owner` to use `getOwnerWithFallback`. Future commits will work through and convert many of these to use the official `@ember/application` implementation
2023-09-26 14:30:52 +01:00
..
attribute-hook.js DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
avatar-utils.js DEV: Move avatar-utils into dedicated discourse-common module (#22517) 2023-07-12 09:06:16 +01:00
debounce.js FIX: reimplements chat audio into a service (#18983) 2022-11-11 13:11:41 +01:00
deprecated.js DEV: Fail core JS test runs if deprecations are triggered (#20614) 2023-03-10 10:39:42 +00:00
discourse-template-map.js DEV: Remove Ember.TEMPLATES and centralize template resolution rules (#19220) 2022-11-29 10:24:35 +00:00
dom-from-string.js DEV: Allow utility class domFromString to take in strings with multiple top level elements (#15548) 2022-01-12 19:49:24 +08:00
escape.js FIX: Escape Font Awesome icons (#12421) 2021-03-17 16:11:40 +03:00
get-owner.js DEV: Rename custom getOwner to getOwnerWithFallback (#23437) 2023-09-26 14:30:52 +01:00
get-url.js FIX: Validate asset url before replacing base url (#16438) 2023-01-30 07:32:48 +08:00
helpers.js DEV: Introduce RenderGlimmer for raw hbs (#23592) 2023-09-26 13:16:48 +01:00
icon-library.js FIX: Add REPLACEMENTS icons to styleguide 2022-12-15 09:12:18 -06:00
later.js DEV: Introduce discourseLater (#17532) 2022-07-17 00:50:49 +02:00
loader-shim.js DEV: add loader.js shims for packages used across bundles (#22703) 2023-08-09 12:04:41 +01:00
object.js DEV: prettier 2.2.1 (#11862) 2021-01-27 12:39:20 +01:00
popular-themes.js UX: update admin popular theme list (#23134) 2023-08-18 09:07:25 -04:00
raw-handlebars-helpers.js DEV: Extensively use startsWith() (#17540) 2022-07-17 20:16:39 +02:00
raw-handlebars.js DEV: Use DiscourseJsProcessor for theme template compilation (#18135) 2022-09-01 11:50:46 +01:00
raw-templates.js DEV: Allow plugin outlets to be defined using gjs (#23142) 2023-08-18 12:07:10 +01:00
suffix-trie.js PERF: Improve JS app boot speed by optimizing customResolve() (#14990) 2021-11-18 16:38:00 +00:00