empress / ember-cli-showdown

Ember component to render markdown into HTML.
https://empress.github.io/ember-cli-showdown/
MIT License
101 stars 35 forks source link

feat: Import htmlSafe from @ember/template, not @ember/string. #107

Closed muziejus closed 2 years ago

muziejus commented 2 years ago

As far as I can tell, this is supposed to still just be deprecated, but it was giving a warning to the console in my 3.28 app:

WARNING in ./node_modules/ember-cli-showdown/components/markdown-to-html.js 42:11-19
export 'htmlSafe' (imported as 'htmlSafe') was not found in '@ember/string' (possible exports: camelize, capitalize, classify, dasherize, decamelize, getString, getStrings, setStrings, underscore, w)

but crashing in practice:

Uncaught (in promise) TypeError: (0 , _ember_string__WEBPACK_IMPORTED_MODULE_2__.htmlSafe) is not a function
    at Class.eval (markdown-to-html.js:56)
    at index.js:1937
    at untrack (validator.js:843)
    at ComputedProperty.get (index.js:1936)
    at Class.getter [as html] (index.js:1026)
    at getPossibleMandatoryProxyValue (index.js:1327)
    at _getProp (index.js:1392)
    at reference.js:214
    at reference.js:162
    at track (validator.js:827)

Possibly related to my using embroider on the app?

bitwolfe commented 2 years ago

Latest version breaks on Ember 3.27 as well without Embroider. @mansona can we get a release of this please?

drewpereli commented 2 years ago

This also breaks our app

mansona commented 2 years ago

This is very strange 🙈 I can't see any reason why this isn't failing tests before this change 🙃

anyway, the change is good! thanks for the contribution