You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to implement the long-ago RFC'd deprecation of the internal @ember/string package in place of the published addon @ember/string.
This issue is to summarize what I find:
There was an aborted attempt to deprecate import { htmlSafe, isHTMLSafe } from '@ember/string' (with the new import being import { htmlSafe, isHTMLSafe } from @ember/template`).
Current status, on a newly generated app on 4.9.3:
import { htmlSafe } from `@ember/string`;
htmlSafe('foo'); // errors (0, _string.htmlSafe) is not a function
import { htmlSafe } from `@ember/template`;
htmlSafe('foo'); // success
On a newly generated app on 4.9.3, with ember-data removed:
import { htmlSafe } from `@ember/string`;
htmlSafe('foo') // success
import { htmlSafe } from `@ember/template`;
htmlSafe('foo'); // success
If the addon @ember/string is included, it clobbers the internal @ember/string. To solve this, htmlSafe and isHTMLSafe should be added to the addon @ember/string with deprecations pointing to the imports from @ember/template. I have confirmed that the deprecations, when added back to the internal @ember/string, do not trigger when using the @ember/template imports (this was the original issue that led to the deprecation being backed out).
The htmlSafe/isHTMLSafe import from @ember/template was added in 3.8.
I'm attempting to implement the long-ago RFC'd deprecation of the internal
@ember/string
package in place of the published addon@ember/string
.This issue is to summarize what I find:
There was an aborted attempt to deprecate
import { htmlSafe, isHTMLSafe } from '@ember/string'
(with the new import beingimport { htmlSafe, isHTMLSafe } from
@ember/template`).Current status, on a newly generated app on 4.9.3:
On a newly generated app on 4.9.3, with ember-data removed:
If the addon
@ember/string
is included, it clobbers the internal@ember/string
. To solve this,htmlSafe
andisHTMLSafe
should be added to the addon@ember/string
with deprecations pointing to the imports from@ember/template
. I have confirmed that the deprecations, when added back to the internal@ember/string
, do not trigger when using the@ember/template
imports (this was the original issue that led to the deprecation being backed out).The
htmlSafe/isHTMLSafe
import from@ember/template
was added in 3.8.Todo
htmlSafe
andisHTMLSafe
to the addon@ember/string
with errors pointing to the imports from@ember/template
. AddhtmlSafe
andisHTMLSafe
exported methods. These will error when called, telling the user to import from@ember/template
. ember-string#367htmlSafe
andisHTMLSafe
from@ember/string
. They have moved to@ember/template
. #20341Ember.String.htmlSafe
(and all other methods) are still available onEmber
when doingimport Ember from 'ember'
. Deprecate accessingString
on the global import. Deprecate @ember/string when used from ember-source; point users to add the@ember/string
addon #20344@ember/string
, tell users to add addon Deprecate @ember/string when used from ember-source; point users to add the@ember/string
addon #20344Ember.STRINGS
Deprecate @ember/string when used from ember-source; point users to add the@ember/string
addon #20344The text was updated successfully, but these errors were encountered: