discourse/app
David Taylor 270e98e45f
DEV: Include ember deprecation messages in production builds (#20587)
By default, Ember uses a babel transformation to strip out calls to `deprecate()` in production builds. Given that Discourse is a development platform for third-party themes/plugins, having deprecation messages visible in production is essential - many themes/plugins do not have comprehensive test-suites, and rely on production feedback to prompt changes. This commit patches Ember to print its deprecation messages to the console in production. In future we intend to improve the visibility of these to hosting providers and/or site admins.

There are two main parts to this commit:

1. Use yarn's 'resolutions' feature to point `babel-plugin-debug-macros` to a discourse-owned fork. This fork prevents `deprecate()` calls from being stripped. Relevant change can be found at https://github.com/discourse/babel-plugin-debug-macros/commit/d179d613bf

2. Introduce a production shim for Ember's deprecation library, including the `registerDeprecationHandler` API. The default implementation is stripped out of production builds via an `if(DEBUG)` wrapper.

Long term we hope that this kind of functionality can be made available in Ember itself via a flag.
2023-03-10 10:37:28 +00:00
..
assets DEV: Include ember deprecation messages in production builds (#20587) 2023-03-10 10:37:28 +00:00
controllers FEATURE: Configurable auto-bump cooldown (#20507) 2023-03-10 13:45:01 +08:00
helpers DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
jobs FIX: Don’t email suspended users from group PM 2023-03-08 15:53:53 +01:00
mailers DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
models FEATURE: Configurable auto-bump cooldown (#20507) 2023-03-10 13:45:01 +08:00
serializers FEATURE: Configurable auto-bump cooldown (#20507) 2023-03-10 13:45:01 +08:00
services DEV: Remove badge_granted_title column from user_profiles (#20476) 2023-03-08 13:37:20 +01:00
views SECURITY: Show only visible tags in metadata 2023-02-23 17:22:20 +01:00