-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
fix(jsdom): reference dom
lib in source
#57432
Conversation
@SimenB Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PRCode ReviewsThis PR can be merged once it's reviewed by a DT maintainer. 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. InactiveThis PR has been inactive for 18 days — please merge or say something if there's a problem, otherwise it will be closed! Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 57432,
"author": "SimenB",
"headCommitOid": "3f281304f0dba154b6e5d76de3c3ba34efeee362",
"lastPushDate": "2021-11-30T13:06:00.000Z",
"lastActivityDate": "2021-12-20T08:06:48.000Z",
"mergeOfferDate": "2021-12-01T17:41:07.000Z",
"mergeRequestDate": "2021-12-20T08:06:48.000Z",
"mergeRequestUser": "SimenB",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Popular",
"pkgInfo": [
{
"name": "jsdom",
"kind": "edit",
"files": [
{
"path": "types/jsdom/base.d.ts",
"kind": "definition"
},
{
"path": "types/jsdom/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"leonard-thieu",
"palmfjord",
"ExE-Boss"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Popular"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "orta",
"date": "2021-12-01T17:40:33.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 982619491,
"ciResult": "pass"
} |
Hey @SimenB, 😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module. This can potentially save days of time for you! |
🔔 @leonard-thieu @palmfjord @ExE-Boss — please review this PR in the next few days. Be sure to explicitly select |
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.
Yeah, this is implicitly dependent on the DOM types ( for example updating the DOM types meant updating types in here, e.g. #54052 ) so I think this is a pretty reasonable change
@SimenB: Everything looks good here. I am ready to merge this PR (at 3f28130) 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! ❤️ (@leonard-thieu, @palmfjord, @ExE-Boss: you can do this too.) |
(Orta asked med to await more feedback, which is why I haven't landed it) |
As I said in #54052 (comment):
|
We could be waiting for an unknown amount of time for a separate import of those types without the globals, its a constant debate in the dom-lib-generator chat room in discord |
Since these types depend on dom types I think it makes sense for them to reference then directly, rather than declaring it indirectly via a (unshipped) tsconfig.json. The larger issue I have no opinion on. And in Jest i just removed |
Re-ping @SimenB / @leonard-thieu, @palmfjord, @ExE-Boss: This PR has been ready to merge for over a week, and I haven't seen any requests to merge it. I will close it on Dec 31st (in three weeks) if this doesn't happen. (If there's no reason to avoid merging it, please do so. Otherwise, if it shouldn't be merged or if it needs more time, please close it or turn it into a draft.) |
Ready to merge |
This is similar to DefinitelyTyped#57432 `jsdom` has supported iterable APIs as early as v6.5.0 https://github.com/jsdom/jsdom/blob/6.5.0/Changelog.md#650 So `dom.iterable` *should* be added alongside the `dom` lib.
This is similar to DefinitelyTyped#57432 `jsdom` has supported iterable APIs as early as v6.5.0 https://github.com/jsdom/jsdom/blob/6.5.0/Changelog.md#650 So `dom.iterable` *should* be added alongside the `dom` lib.
This is similar to DefinitelyTyped#57432 `jsdom` has supported iterable APIs as early as v6.5.0 https://github.com/jsdom/jsdom/blob/6.5.0/Changelog.md#650 So `dom.iterable` *should* be added alongside the `dom` lib.
This is similar to #57432 `jsdom` has supported iterable APIs as early as v6.5.0 https://github.com/jsdom/jsdom/blob/6.5.0/Changelog.md#650 So `dom.iterable` *should* be added alongside the `dom` lib.
Please fill in this template.
npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition:
See jestjs/jest#12098
Having some DOM types that does not pollute the global namespace would be better, but 🤷