From 997c1137631911354c2366bb628147c4a3e0ae0e Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Thu, 30 Nov 2017 14:53:53 -0800 Subject: [PATCH] [CLEANUP] Remove Ember.Handlebars.SafeString --- packages/ember-glimmer/lib/index.ts | 3 +-- packages/ember-glimmer/lib/utils/string.ts | 14 -------------- packages/ember/lib/index.js | 7 +------ packages/ember/tests/reexports_test.js | 1 - 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/packages/ember-glimmer/lib/index.ts b/packages/ember-glimmer/lib/index.ts index e6484511aa7..c73a1affb95 100644 --- a/packages/ember-glimmer/lib/index.ts +++ b/packages/ember-glimmer/lib/index.ts @@ -273,8 +273,7 @@ export { SafeString, escapeExpression, htmlSafe, - isHTMLSafe, - getSafeString as _getSafeString, + isHTMLSafe } from './utils/string'; export { Renderer, diff --git a/packages/ember-glimmer/lib/utils/string.ts b/packages/ember-glimmer/lib/utils/string.ts index a6d3f32614d..e50e40bcf47 100644 --- a/packages/ember-glimmer/lib/utils/string.ts +++ b/packages/ember-glimmer/lib/utils/string.ts @@ -20,20 +20,6 @@ export class SafeString { } } -export function getSafeString() { - deprecate( - 'Ember.Handlebars.SafeString is deprecated in favor of Ember.String.htmlSafe', - false, - { - id: 'ember-htmlbars.ember-handlebars-safestring', - until: '3.0.0', - url: 'https://emberjs.com/deprecations/v2.x#toc_use-ember-string-htmlsafe-over-ember-handlebars-safestring', - }, - ); - - return SafeString; -} - const escape = { '&': '&', '<': '<', diff --git a/packages/ember/lib/index.js b/packages/ember/lib/index.js index 03ff501ed02..894870524ac 100644 --- a/packages/ember/lib/index.js +++ b/packages/ember/lib/index.js @@ -467,8 +467,7 @@ import { escapeExpression, isHTMLSafe, getTemplates, - setTemplates, - _getSafeString + setTemplates } from 'ember-glimmer'; Ember.Component = Component; @@ -489,10 +488,6 @@ let EmberHandlebars = Ember.Handlebars = Ember.Handlebars || {}; let EmberHTMLBars = Ember.HTMLBars = Ember.HTMLBars || {}; let EmberHandleBarsUtils = EmberHandlebars.Utils = EmberHandlebars.Utils || {}; -Object.defineProperty(EmberHandlebars, 'SafeString', { - get: _getSafeString -}); - EmberHTMLBars.template = EmberHandlebars.template = template; EmberHandleBarsUtils.escapeExpression = escapeExpression; EmberString.htmlSafe = htmlSafe; diff --git a/packages/ember/tests/reexports_test.js b/packages/ember/tests/reexports_test.js index 7285cd855f1..a2bf90618ee 100644 --- a/packages/ember/tests/reexports_test.js +++ b/packages/ember/tests/reexports_test.js @@ -143,7 +143,6 @@ QUnit.module('ember reexports'); ['TextField', 'ember-glimmer', 'TextField'], ['TEMPLATES', 'ember-glimmer', { get: 'getTemplates', set: 'setTemplates' }], ['Handlebars.template', 'ember-glimmer', 'template'], - ['Handlebars.SafeString', 'ember-glimmer', { get: '_getSafeString' }], ['Handlebars.Utils.escapeExpression', 'ember-glimmer', 'escapeExpression'], ['String.htmlSafe', 'ember-glimmer', 'htmlSafe'],