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
[@ember/string] augment @ember/string with htmlSafe and isHTMLSafe #50653
[@ember/string] augment @ember/string with htmlSafe and isHTMLSafe #50653
Conversation
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
@eramod I'd love it if you could test this on your code. |
@jamescdavis Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 50653,
"author": "jamescdavis",
"headCommitOid": "bf56063514bd6294ab082d8dbebd89a4e93c3eee",
"lastPushDate": "2021-01-15T19:03:44.000Z",
"lastActivityDate": "2021-01-18T17:03:30.000Z",
"maintainerBlessed": false,
"mergeOfferDate": "2021-01-18T17:01:34.000Z",
"mergeRequestDate": "2021-01-18T17:03:30.000Z",
"mergeRequestUser": "jamescdavis",
"hasMergeConflict": false,
"isFirstContribution": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "ember__string",
"kind": "edit",
"files": [
{
"path": "types/ember__string/ember__string-tests.ts",
"kind": "test"
},
{
"path": "types/ember__string/index.d.ts",
"kind": "definition"
}
],
"owners": [
"mike-north",
"chriskrycho",
"dfreeman",
"jamescdavis"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "dfreeman",
"date": "2021-01-18T17:00:58.000Z",
"isMaintainer": false
}
],
"ciResult": "pass"
} |
🔔 @mike-north @chriskrycho @dfreeman — please review this PR in the next few days. Be sure to explicitly select |
@jamescdavis Everything looks good here. Great job! I am ready to merge this PR (at bf56063) on your behalf. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@mike-north, @chriskrycho, @dfreeman: you can do this too.) |
Ready to merge |
I just published |
…g with htmlSafe and isHTMLSafe by @jamescdavis
#50545 prematurely removed
htmlSafe
andisHTMLSafe
from@ember/string
. This adds them back because they continue to be available to be imported from there in addition to@ember/template
(this is deprecated, but not removed). I've added them back using module augmentation so that they will augment the types shipped with the external@ember/string
package when present (it's a dependency ofember-data
starting withember-data@3.24
. Module augmentation does not allow simply re-exporting from@ember/template
, but, rather than completely redefine the types for these functions, I grab the parameter and return types from@ember/template
and use them here.I've opened emberjs/ember.js#19339 to actually deprecate this in the Ember codebase.
Please fill in this template.
npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition:
htmlSafe
andisHTMLSafe
are added to@ember/string
here(
Ember.String
is importable as@ember/string
in Ember)If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.