This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts
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
..
admin Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
bootstrap-json DEV: Change enable_sidebar query param to navigation_menu (#20368) 2023-02-21 09:59:56 +08:00
confirm-new-email DEV: Update linting setup and fix issues (#17345) 2022-07-06 10:37:54 +02:00
dialog-holder Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
discourse DEV: Include ember deprecation messages in production builds (#20587) 2023-03-10 10:37:28 +00:00
discourse-common Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
discourse-ensure-deprecation-order DEV: Silence 3.x deprecations 2022-07-19 10:00:59 +01:00
discourse-hbr Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
discourse-plugins Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
discourse-widget-hbs Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
docs DEV: enforces eslint’s curly rule to the codebase (#10720) 2020-09-22 16:28:28 +02:00
ember-addons DEV: Remove ember-addons (#9559) 2020-04-28 10:14:49 -04:00
ember-cli-progress-ci DEV: Add progress output in CI during ember-cli build (#17977) 2022-08-17 22:39:52 +01:00
ember-production-deprecations DEV: Include ember deprecation messages in production builds (#20587) 2023-03-10 10:37:28 +00:00
locales UX/DEV: Review queue redesign fixes (#20239) 2023-03-02 16:40:53 +01:00
pretty-text Revert "DEV: Add crossOrigin to video tag (#20617)" (#20624) 2023-03-09 16:20:35 -07:00
select-kit DEV: Unsilence and resolve setting-on-hash deprecation (#20611) 2023-03-09 13:44:31 +00:00
truth-helpers Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
wizard Build(deps): Bump webpack in /app/assets/javascripts (#20598) 2023-03-08 23:24:51 +01:00
.licensee.json DEV: Have licensee check xmldom license (#18840) 2022-11-02 11:51:11 -04:00
.npmrc DEV: Prevent npm usage (#13945) 2021-08-04 22:04:58 +02:00
discourse-js-processor.js DEV: Update ember-cli-htmlbars to 6.2.0 (#20467) 2023-02-27 18:43:28 +01:00
handlebars-shim.js FIX: It seems sometimes shims are evaluated by older JS engines (#11813) 2021-01-22 10:41:01 -05:00
package.json DEV: Include ember deprecation messages in production builds (#20587) 2023-03-10 10:37:28 +00:00
polyfills.js Drop support for iOS < 15.7 (#19847) 2023-01-16 17:28:59 +00:00
service-worker.js.erb FEATURE: Enable service worker for Apple devices (#19643) 2023-01-30 13:23:19 -03:00
yarn.lock DEV: Include ember deprecation messages in production builds (#20587) 2023-03-10 10:37:28 +00:00