Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Incorrect "import htmlSafe from '@ember/string'" deprecation warning when importing from '@ember/template' #19393

Closed
urbany opened this issue Feb 10, 2021 · 4 comments
Assignees

Comments

@urbany
Copy link

urbany commented Feb 10, 2021

Hi everyone, after upgrating to latest stable [email protected] I'm getting:

DEPRECATION: Importing htmlSafe from '@ember/string' is deprecated. Please import htmlSafe from '@ember/template' instead. [deprecation id: ember-string.htmlsafe-ishtmlsafe]

the thing is my helper is importing correctly:
import { htmlSafe } from '@ember/template';
but when i check the compiled version on the browser it is compiling to:
Ember.String.htmlSafe

which is triggering the deprecation warning.

@locks suggested on Discord it might be related to https://github.com/ember-cli/ember-rfc176-data needing an update

@locks locks self-assigned this Feb 10, 2021
@urbany urbany changed the title [Bug] Incorrect htmlSafe from '@ember/string' deprecation warning when improting from '@ember/template' [Bug] Incorrect "import htmlSafe from '@ember/string'" deprecation warning when improting from '@ember/template' Feb 10, 2021
@urbany urbany changed the title [Bug] Incorrect "import htmlSafe from '@ember/string'" deprecation warning when improting from '@ember/template' [Bug] Incorrect "import htmlSafe from '@ember/string'" deprecation warning when importing from '@ember/template' Feb 10, 2021
@locks
Copy link
Contributor

locks commented Feb 11, 2021

We seem to have missed some necessary work for the correct implementation of the deprecation. I will be using this comment to track the necessary work.

Tracking

  • Nerf deprecation in a patch
  • export non-deprecated htmlSafe and isHTMLSafe from a private namespace in the Ember global, e.g. Ember._Template
  • figure out how to have per-Ember version mappings in ember-rfc176-data
  • incorporate change in babel-plugin-ember-modules-api-polyfill and ember-cli-babel
  • re-introduce deprecations for htmlSafe and isHTMLSafe
    • make sure that String.prototype.htmlSafe is deprecated

@jamescdavis
Copy link
Contributor

As the person who did the original deprecation PR, I apologize for the inconvenience!

@nadnoslen
Copy link

Not that big of a deal @jamescdavis 😉

@DLiblik
Copy link

DLiblik commented Apr 12, 2021

Not that big of a deal @jamescdavis 😉

Tell that to our CI server test logger LOL... just found this out today when our log files went super-nova recently

All good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants