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

fix(jsdom): reference dom lib in source #57432

Merged
merged 2 commits into from Dec 20, 2021

Conversation

SimenB
Copy link
Contributor

@SimenB SimenB commented Nov 30, 2021

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • 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.

See jestjs/jest#12098

Having some DOM types that does not pollute the global namespace would be better, but 🤷

@typescript-bot
Copy link
Contributor

typescript-bot commented Nov 30, 2021

@SimenB Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

This PR can be merged once it's reviewed by a DT maintainer.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Only a DT maintainer can approve changes without tests

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.

Inactive

This 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"
}

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Untested Change This PR does not touch tests labels Nov 30, 2021
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Nov 30, 2021
@typescript-bot
Copy link
Contributor

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!

@typescript-bot
Copy link
Contributor

🔔 @leonard-thieu @palmfjord @ExE-Boss — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

Copy link
Collaborator

@orta orta left a 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

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Dec 1, 2021
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board Dec 1, 2021
@typescript-bot
Copy link
Contributor

@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:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@leonard-thieu, @palmfjord, @ExE-Boss: you can do this too.)

@SimenB
Copy link
Contributor Author

SimenB commented Dec 3, 2021

(Orta asked med to await more feedback, which is why I haven't landed it)

@ExE-Boss
Copy link
Contributor

ExE-Boss commented Dec 3, 2021

As I said in #54052 (comment):

Alternatively, @types/jsdom should depend on the upcoming @types/dom types:

@orta
Copy link
Collaborator

orta commented Dec 4, 2021

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

@SimenB
Copy link
Contributor Author

SimenB commented Dec 4, 2021

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 @types/jsdom due to this entirely, so not an issue for us at the moment

@typescript-bot
Copy link
Contributor

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.)

@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Dec 11, 2021
@SimenB
Copy link
Contributor Author

SimenB commented Dec 20, 2021

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Dec 20, 2021
@typescript-bot typescript-bot merged commit 5255baf into DefinitelyTyped:master Dec 20, 2021
@SimenB SimenB deleted the patch-4 branch December 20, 2021 08:07
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Dec 20, 2021
sodatea added a commit to sodatea/DefinitelyTyped that referenced this pull request Oct 18, 2022
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.
sodatea added a commit to sodatea/DefinitelyTyped that referenced this pull request Oct 18, 2022
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.
sodatea added a commit to sodatea/DefinitelyTyped that referenced this pull request Oct 18, 2022
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.
weswigham pushed a commit that referenced this pull request Nov 7, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintainer Approved Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner Unmerged The author did not merge the PR when it was ready. Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants