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

Implement deprecation of @ember/string per RFC #20340

Closed
5 tasks done
kategengler opened this issue Jan 2, 2023 · 1 comment
Closed
5 tasks done

Implement deprecation of @ember/string per RFC #20340

kategengler opened this issue Jan 2, 2023 · 1 comment

Comments

@kategengler
Copy link
Member

kategengler commented Jan 2, 2023

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.

Todo

@kategengler
Copy link
Member Author

This is complete in ember-source

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

1 participant