DEV: Explicitly disable Ember string prototype extensions (#24110)

These have been deprecated for some time, and the vast majority of themes/plugins have already removed their use. The prototype extensions were unexpectedly disabled as a side effect of 895036bd7a (more details in https://github.com/discourse/discourse/pull/24101).

Given that restoring the functionality now involves significant complexity, and would only be delaying the inevitable removal in a matter of months, we've decided to keep them disabled. This commit explicitly sets the flag in the ember environment config to make things clearer.
This commit is contained in:
David Taylor 2023-10-26 11:16:57 +01:00 committed by GitHub
parent c88303bb27
commit d405305456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ module.exports = function (environment) {
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
Date: false,
String: false,
},
},
exportApplicationGlobal: true,

View File

@ -26,6 +26,7 @@ module ApplicationHelper
},
EXTEND_PROTOTYPES: {
Date: false,
String: false,
},
_APPLICATION_TEMPLATE_WRAPPER: false,
_DEFAULT_ASYNC_OBSERVERS: true,