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

[@types/selenium-webdriver]: split Chromium into a new file #69487

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

sangcnguyen
Copy link

  • add chromium.d.ts
  • add tests for chromium
  • remove some obsolete functions and add more functions

Please fill in this template.

Select one of these and delete the others:

If adding a new definition:

  • The package does not already provide its own types, or cannot have its .d.ts files generated via --declaration
  • If this is for an npm package, match the name. If not, do not conflict with the name of an npm package.
  • Create it with dts-gen --dt, not by basing it on an existing project.
  • Represents shape of module/library correctly
  • tsconfig.json should have noImplicitAny, noImplicitThis, strictNullChecks, and strictFunctionTypes set to true.

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 package.json.

If removing a declaration:

  • If a package was never on Definitely Typed, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

- add tests for chromium
- remove some obsolete functions and add more functions
@typescript-bot
Copy link
Contributor

typescript-bot commented May 1, 2024

@sangcnguyen Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because 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

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by a DT maintainer

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": 69487,
  "author": "sangcnguyen",
  "headCommitOid": "815f0f0700b3a1d217a826b34a7d04719bba7f57",
  "mergeBaseOid": "64828b61751341bfdb2bd5ba88ef61c1f1f77cb8",
  "lastPushDate": "2024-05-01T17:45:11.000Z",
  "lastActivityDate": "2024-05-17T20:13:53.000Z",
  "mergeOfferDate": "2024-05-17T20:14:30.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "selenium-webdriver",
      "kind": "edit",
      "files": [
        {
          "path": "types/selenium-webdriver/chrome.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/chromium.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/edge.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/firefox.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/ie.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/lib/command.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/lib/input.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/lib/webdriver.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/selenium-webdriver/safari.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/selenium-webdriver/test/chrome.ts",
          "kind": "test"
        },
        {
          "path": "types/selenium-webdriver/test/chromium.ts",
          "kind": "test"
        },
        {
          "path": "types/selenium-webdriver/test/edge.ts",
          "kind": "test"
        },
        {
          "path": "types/selenium-webdriver/test/firefox.ts",
          "kind": "test"
        },
        {
          "path": "types/selenium-webdriver/test/index.ts",
          "kind": "test"
        },
        {
          "path": "types/selenium-webdriver/tsconfig.json",
          "kind": "package-meta-ok"
        }
      ],
      "owners": [
        "BillArmstrong",
        "Kuniwak",
        "cnishina",
        "SupernaviX",
        "bendxn",
        "oddui",
        "beta-vulgaris",
        "Dzenly",
        "AutomatedTester",
        "1pete",
        "SinghHrmn",
        "shubhsheth"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "sandersn",
      "date": "2024-05-17T20:13:53.000Z",
      "isMaintainer": true
    },
    {
      "type": "stale",
      "reviewer": "jakebailey",
      "date": "2024-05-10T21:49:36.000Z",
      "abbrOid": "b393e5a"
    },
    {
      "type": "stale",
      "reviewer": "SupernaviX",
      "date": "2024-05-05T00:53:35.000Z",
      "abbrOid": "29837a4"
    }
  ],
  "mainBotCommentID": 2088829993,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Edits Owners This PR adds or removes owners Critical package labels May 1, 2024
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board May 1, 2024
@typescript-bot
Copy link
Contributor

🔔 @BillArmstrong @Kuniwak @cnishina @SupernaviX @bendxn @oddui @beta-vulgaris @Dzenly @AutomatedTester @1pete @SinghHrmn @shubhsheth — 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.

@DangerBotOSS
Copy link

DangerBotOSS commented May 1, 2024

Formatting

The following files are not formatted:

  1. types/selenium-webdriver/package.json
  2. types/selenium-webdriver/chromium.d.ts
  3. types/selenium-webdriver/safari.d.ts
  4. types/selenium-webdriver/firefox.d.ts
  5. types/selenium-webdriver/index.d.ts
as well as these 4 other files...

types/selenium-webdriver/lib/webdriver.d.ts, types/selenium-webdriver/test/chromium.ts, types/selenium-webdriver/test/firefox.ts, types/selenium-webdriver/test/chrome.ts

Consider running pnpm dprint fmt on these files to make review easier.

Generated by 🚫 dangerJS against 815f0f0

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 1, 2024
Copy link
Contributor

@SupernaviX SupernaviX left a comment

Choose a reason for hiding this comment

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

Mostly looks good! but there's some incorrect types in chromium.d.ts

types/selenium-webdriver/chromium.d.ts Outdated Show resolved Hide resolved
* @param {...(string|!Buffer|!Array<(string|!Buffer)>)} args The
* extensions to add.
*/
add(...args: string[] | Buffer[]): any;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
add(...args: string[] | Buffer[]): any;
add(...args: (string | Buffer)[]);

I think these types are more accurate. This lets you pass strings and buffers in the same call, and also doesn't return anything (just like the real impl)

Copy link
Author

Choose a reason for hiding this comment

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

All set! Could you do me a favor by reviewing it again?

* @see <https://w3c.github.io/permissions/#permission-registry> for valid
* names
*/
setPermission(name: string, state: "granted" | "denied" | "prompt"): Promise<Object>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
setPermission(name: string, state: "granted" | "denied" | "prompt"): Promise<Object>;
setPermission(name: string, state: "granted" | "denied" | "prompt"): Promise<object>;

typescript docs say that lowercase object is more appropriate than uppercase Object

Copy link
Author

Choose a reason for hiding this comment

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

Many thanks! I didn’t notice this, I overlooked it while typing.

types/selenium-webdriver/test/chromium.ts Outdated Show resolved Hide resolved
@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label May 4, 2024
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in New Pull Request Status Board May 4, 2024
@typescript-bot
Copy link
Contributor

@sangcnguyen One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you!

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label May 4, 2024
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board May 4, 2024
@typescript-bot
Copy link
Contributor

@SupernaviX Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 4, 2024
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board May 4, 2024
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label May 4, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board May 4, 2024
@typescript-bot
Copy link
Contributor

@sangcnguyen The CI build failed! Please review the logs for more information.

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

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label May 4, 2024
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board May 4, 2024
@typescript-bot typescript-bot added the The CI failed When GH Actions fails label May 4, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board May 4, 2024
@typescript-bot
Copy link
Contributor

@sangcnguyen The CI build failed! Please review the logs for more information.

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

Note: builds which are failing do not end up on the list of PRs for the DT maintainers to review.

@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board May 4, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 4, 2024
Copy link
Contributor

@SupernaviX SupernaviX left a comment

Choose a reason for hiding this comment

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

Looks good!

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 5, 2024
types/selenium-webdriver/.eslintrc.json Outdated Show resolved Hide resolved
types/selenium-webdriver/package.json Outdated Show resolved Hide resolved
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board May 7, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 7, 2024
@typescript-bot
Copy link
Contributor

@jakebailey Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot removed Owner Approved A listed owner of this package signed off on the pull request. Check Config Changes a module config files Edits Owners This PR adds or removes owners labels May 7, 2024
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board May 7, 2024
@typescript-bot
Copy link
Contributor

@jakebailey, @SupernaviX Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 7, 2024
@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label May 12, 2024
@typescript-bot
Copy link
Contributor

Re-ping @BillArmstrong, @Kuniwak, @cnishina, @SupernaviX, @bendxn, @oddui, @beta-vulgaris, @Dzenly, @AutomatedTester, @1pete, @SinghHrmn, @shubhsheth:

This PR has been out for over a week, yet I haven't seen any reviews.

Could someone please give it some attention? Thanks!

@sandersn
Copy link
Contributor

@sangcnguyen is this ready to go? I think the bot is being too careful here since little has changed since @SupernaviX 's review, and you sound confident that ChromiumWebDriver -> Driver is a good breaking change.

@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board May 17, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 17, 2024
@sangcnguyen
Copy link
Author

@sangcnguyen is this ready to go? I think the bot is being too careful here since little has changed since @SupernaviX 's review, and you sound confident that ChromiumWebDriver -> Driver is a good breaking change.

Hi @sandersn just a minor change. I reverted to the old name for compatibility.

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner and removed Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. labels May 17, 2024
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board May 17, 2024
@typescript-bot
Copy link
Contributor

@sangcnguyen: Everything looks good here. I am ready to merge this PR (at 815f0f0) 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! ❤️

(@BillArmstrong, @Kuniwak, @cnishina, @SupernaviX, @bendxn, @oddui, @beta-vulgaris, @Dzenly, @AutomatedTester, @1pete, @SinghHrmn, @shubhsheth: you can do this too.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner
Projects
New Pull Request Status Board
Waiting for Author to Merge
Development

Successfully merging this pull request may close these issues.

None yet

6 participants