-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
[hast] Add content maps #55187
[hast] Add content maps #55187
Conversation
@wooorm Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code 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": 55187,
"author": "wooorm",
"headCommitOid": "b93cf3902def233e35cc704c070bfdefa473eb48",
"lastPushDate": "2021-08-17T09:04:17.000Z",
"lastActivityDate": "2021-08-22T06:18:00.000Z",
"mergeOfferDate": "2021-08-21T21:25:49.000Z",
"mergeRequestDate": "2021-08-22T06:18:00.000Z",
"mergeRequestUser": "wooorm",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "hast",
"kind": "edit",
"files": [
{
"path": "types/hast/hast-tests.ts",
"kind": "test"
},
{
"path": "types/hast/index.d.ts",
"kind": "definition"
}
],
"owners": [
"lukeggchapman",
"rokt33r",
"ChristianMurphy"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "rbuckton",
"date": "2021-08-21T21:25:08.000Z",
"isMaintainer": true
},
{
"type": "approved",
"reviewer": "ChristianMurphy",
"date": "2021-08-17T14:07:55.000Z",
"isMaintainer": false
},
{
"type": "approved",
"reviewer": "remcohaszing",
"date": "2021-08-17T09:13:24.000Z",
"isMaintainer": false
}
],
"mainBotCommentID": 900125964,
"ciResult": "pass"
} |
🔔 @lukeggchapman @Rokt33r @ChristianMurphy — please review this PR in the next few days. Be sure to explicitly select |
/cc @remcohaszing |
@wooorm: Everything looks good here. I am ready to merge this PR (at b93cf39) on your behalf whenever you think it's ready. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@lukeggchapman, @Rokt33r, @ChristianMurphy: you can do this too.) |
Ready to merge |
I just published |
When using this utility, the raw type will automatically be added to hast in the correct places. See DefinitelyTyped/DefinitelyTyped#55187 for more information. This also improves the types by allowing an overload of omitted vfile.
When using this plugin, the raw type will automatically be added to hast in the correct places. See DefinitelyTyped/DefinitelyTyped#55187 for more information.
Similar to #54421, and #52375, this implements a map for the parents defined by hast. One specific example use case is to add raw nodes to the AST. Raw nodes are added by
mdast-util-to-hast
and either handled byhast-util-raw
or serialized untouched byhast-util-to-html
.Note for the reviewers: xast uses
ChildMap
s. mdast uses aContentMap
s. Preference?Please fill in this template.
npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition: