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): Fix JSDOM types in JavaScript code #43315

Merged
merged 2 commits into from Mar 23, 2020

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Mar 22, 2020

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: vm: introduce vm.Context nodejs/node#30709
  • 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.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

review?(@orta, @RyanCavanaugh): The bot seems to have choked.

@typescript-bot
Copy link
Contributor

typescript-bot commented Mar 22, 2020

@ExE-Boss Thank you for submitting this PR!

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

🔔 @leonard-thieu @palmfjord - 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.

Status

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

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "pr_number": 43315,
  "author": "ExE-Boss",
  "owners": [
    "leonard-thieu",
    "palmfjord",
    "ExE-Boss"
  ],
  "dangerLevel": "ScopedAndConfiguration",
  "headCommitAbbrOid": "3cfa021",
  "headCommitOid": "3cfa021549dc7740e1ca30745eccc6136dee55a0",
  "mergeIsRequested": false,
  "stalenessInDays": 0,
  "lastCommitDate": "2020-03-22T18:45:17.000Z",
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43315/files",
  "hasMergeConflict": false,
  "authorIsOwner": true,
  "isFirstContribution": false,
  "popularityLevel": "Popular",
  "anyPackageIsNew": false,
  "packages": [
    "jsdom"
  ],
  "files": [
    {
      "filePath": "types/jsdom/index.d.ts",
      "kind": "definition",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/package.json",
      "kind": "package-meta",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/ts3.1/index.d.ts",
      "kind": "definition",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/ts3.1/jsdom-tests.ts",
      "kind": "test",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/ts3.4/index.d.ts",
      "kind": "definition",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/ts3.4/jsdom-tests.ts",
      "kind": "test",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/ts3.5/index.d.ts",
      "kind": "definition",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/ts3.5/jsdom-tests.ts",
      "kind": "test",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/ts3.6/index.d.ts",
      "kind": "definition",
      "package": "jsdom"
    },
    {
      "filePath": "types/jsdom/ts3.6/jsdom-tests.ts",
      "kind": "test",
      "package": "jsdom"
    }
  ],
  "otherApprovalCount": 0,
  "ownerApprovalCount": 0,
  "maintainerApprovalCount": 0,
  "hasDismissedReview": false,
  "travisResult": "pass",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 0,
  "isChangesRequested": false
}

@typescript-bot typescript-bot added Where is Travis? Popular package This PR affects a popular package (as counted by NPM download counts). Author is Owner The author of this PR is a listed owner of the package. labels Mar 22, 2020
@typescript-bot
Copy link
Contributor

@ExE-Boss The Travis CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot typescript-bot moved this from Other to Needs Author Action in New Pull Request Status Board Mar 22, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Mar 22, 2020
Comment on lines -53 to +56
getInternalVMContext(): DOMWindow;
getInternalVMContext(): Context;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The internal VM context may eventually stop being a Windownodejs/node#30709.

Comment on lines -187 to +198
interface DOMWindow extends Pick<Window, Exclude<keyof Window, 'top' | 'self' | 'window'>>, Context {
interface DOMWindow extends Pick<Window, Exclude<keyof Window, 'top' | 'self' | 'window'>> {
[key: string]: any;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vm.Context will eventually become a class: nodejs/node#30709.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Other in New Pull Request Status Board Mar 22, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Mar 22, 2020

@ExE-Boss Thank you for submitting this PR!

🔔 @leonard-thieu @palmfjord - 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.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot
Copy link
Contributor

Since you're a listed owner and the build passed, this PR is fast-tracked. A maintainer will merge shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@typescript-bot typescript-bot added Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. Where is Travis? and removed Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. Where is Travis? labels Mar 22, 2020
@typescript-bot typescript-bot added Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. Where is Travis? Critical package Popular package This PR affects a popular package (as counted by NPM download counts). Author is Owner The author of this PR is a listed owner of the package. and removed Critical package Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. Where is Travis? Author is Owner The author of this PR is a listed owner of the package. Popular package This PR affects a popular package (as counted by NPM download counts). labels Mar 22, 2020
@orta
Copy link
Collaborator

orta commented Mar 22, 2020

Wow, those bots are really fighting it out

@orta orta merged commit b567b73 into DefinitelyTyped:master Mar 23, 2020
Pull Request Status Board automation moved this from Check and Merge to Done Mar 23, 2020
@typescript-bot
Copy link
Contributor

I just published @types/jsdom@16.1.1 to npm.

@ExE-Boss ExE-Boss deleted the types/jsdom/fix-js branch March 23, 2020 17:40
@orta orta removed this from Waiting for Code Reviews in New Pull Request Status Board May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author is Owner The author of this PR is a listed owner of the package. Popular package This PR affects a popular package (as counted by NPM download counts).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants