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
Revert "🤖 Merge PR #60691 [react] Allow TrustedHTML in `dangerously…
#60837
Revert "🤖 Merge PR #60691 [react] Allow TrustedHTML in `dangerously…
#60837
Conversation
…in `dangerouslySetInnerHTML` by @eps1lon" This reverts commit 9c58088. Reerts DefinitelyTyped#60691
|
@peterblazejewicz Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. 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": 60837,
"author": "peterblazejewicz",
"headCommitOid": "f358396cc7a27c427e61185f9e57e9e8c83882e0",
"mergeBaseOid": "5e9837afeea9dd75b9f69febd076e81d851977b4",
"lastPushDate": "2022-06-16T17:02:28.000Z",
"lastActivityDate": "2022-06-16T20:13:40.000Z",
"mergeOfferDate": "2022-06-16T20:05:08.000Z",
"mergeRequestDate": "2022-06-16T20:13:40.000Z",
"mergeRequestUser": "peterblazejewicz",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "react",
"kind": "edit",
"files": [
{
"path": "types/react/global.d.ts",
"kind": "definition"
},
{
"path": "types/react/index.d.ts",
"kind": "definition"
},
{
"path": "types/react/test/index.ts",
"kind": "test"
},
{
"path": "types/react/v16/global.d.ts",
"kind": "definition"
},
{
"path": "types/react/v16/index.d.ts",
"kind": "definition"
},
{
"path": "types/react/v16/test/index.ts",
"kind": "test"
},
{
"path": "types/react/v17/global.d.ts",
"kind": "definition"
},
{
"path": "types/react/v17/index.d.ts",
"kind": "definition"
},
{
"path": "types/react/v17/test/index.ts",
"kind": "test"
}
],
"owners": [
"johnnyreilly",
"bbenezech",
"pzavolinsky",
"ericanderson",
"DovydasNavickas",
"theruther4d",
"guilhermehubner",
"ferdaber",
"jrakotoharisoa",
"pascaloliv",
"hotell",
"franklixuefei",
"Jessidhia",
"saranshkataria",
"lukyth",
"eps1lon",
"zieka",
"dancerphil",
"dimitropoulos",
"disjukr",
"vhfmag",
"hellatan",
"priyanshurav"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "jakebailey",
"date": "2022-06-16T20:04:25.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 1157922375,
"ciResult": "pass"
} |
|
🔔 @johnnyreilly @bbenezech @pzavolinsky @ericanderson @DovydasNavickas @theruther4d @guilhermehubner @ferdaber @jrakotoharisoa @pascaloliv @Hotell @franklixuefei @Jessidhia @saranshkataria @lukyth @eps1lon @zieka @dancerphil @dimitropoulos @disjukr @vhfmag @hellatan @priyanshurav — please review this PR in the next few days. Be sure to explicitly select |
|
With this precedent any library can prevent shipping features in |
one can add |
|
But why this library? Next step will be me adding every existing DOM interface to |
|
I really do not know, it's optional for use as dependency, until formalized. DOMPurify wors that way, it adds this explicitely: /// <reference types="trusted-types"/>There is no enough momentu to make that api part of I'd like to just avoid situation people are forced to use skip lib check, I understand what you're folks doing with |
Have you tried reaching out to |
|
Sorry, I will not reach anybody, I understand a normal way is to revert a change that introduced unexpected outcomes. |
|
With the same rationale we won't be able to add |
|
Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files. react (unpkg)was missing the following properties:
|
|
Sorry, this is not subject of this PR (which is revert a change), sorry. I can honestly say I've made mistake with review of #60691, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally don't know much about trusted types, but it does seem like #60691 has broken things, so I think the safest thing thing to do right now is to revert it and try again, just to restore the status quo.
The way trusted-types does seem incongruent with the way lib.dom.d.ts is defined, so it would seem like its definitions should be change, but again, I am no trusted types expert.
|
Ready to merge 💘 |
…SetInnerHTML` by @eps1lon"
This reverts commit 9c58088.
We cannot force people to use skip lib check option to avoid introduced problem (
trusted-typesare custom types, not library type fromlib.dom, so default approach with overrides/redeclaration does not work and was missed on review)Reerts #60691