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

Add isLicensePlate and isLuhnNumber interface definitions to @ types/validator #69545

Merged
merged 1 commit into from May 11, 2024

Conversation

xiaoxizi2303
Copy link
Contributor

Add isLicensePlate and isLuhnNumber interface definitions to @ types/validator

@typescript-bot
Copy link
Contributor

typescript-bot commented May 7, 2024

@xiaoxizi2303 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
  • ✅ 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.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 69545,
  "author": "xiaoxizi2303",
  "headCommitOid": "7de94a1427df03b3b2ff6a04880ede57633204fa",
  "mergeBaseOid": "20f1d855d85510c51368984655e4133d520301a2",
  "lastPushDate": "2024-05-07T12:10:23.000Z",
  "lastActivityDate": "2024-05-11T09:27:53.000Z",
  "mergeOfferDate": "2024-05-08T15:37:09.000Z",
  "mergeRequestDate": "2024-05-11T09:27:53.000Z",
  "mergeRequestUser": "xiaoxizi2303",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "validator",
      "kind": "edit",
      "files": [
        {
          "path": "types/validator/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "tgfjt",
        "chrootsu",
        "IOAyman",
        "louy",
        "deptno",
        "builtinnya",
        "qqilihq",
        "keatz55",
        "MunifTanjim",
        "vlapo",
        "peterblazejewicz",
        "Mattewn99",
        "Almost-Infinity",
        "dcfreire"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "jakebailey",
      "date": "2024-05-08T15:36:29.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "codershiba",
      "date": "2024-05-08T12:21:51.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 2098260958,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Untested Change This PR does not touch tests labels May 7, 2024
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board May 7, 2024
@typescript-bot
Copy link
Contributor

Hey @xiaoxizi2303,

😒 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

🔔 @tgfjt @chrootsu @IOAyman @louy @deptno @builtinnya @qqilihq @keatz55 @MunifTanjim @vlapo @peterblazejewicz @Mattewn99 @Almost-Infinity @dcfreire — 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 7, 2024

Formatting

The following files are not formatted:

  1. types/validator/index.d.ts

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

Generated by 🚫 dangerJS against 7de94a1

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 7, 2024
export function isLicensePlate(str: string, locale:string): boolean;

/**
* check if the string passes the Luhn algorithm check.
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
* check if the string passes the Luhn algorithm check.
* Check if the string passes the [Luhn algorithm check](https://en.m.wikipedia.org/wiki/Luhn_algorithm).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified

@@ -808,6 +808,16 @@ declare namespace validator {
*/
export function isLength(str: string, options?: IsLengthOptions): boolean;

/**
* check if the string matches the format of a country's license plate.
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
* check if the string matches the format of a country's license plate.
* Check if the string matches the format of a country's license plate.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified

/**
* check if the string matches the format of a country's license plate.
*/
export function isLicensePlate(str: string, locale:string): boolean;
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
export function isLicensePlate(str: string, locale:string): boolean;
export function isLicensePlate(str: string, locale: 'cs-CZ' | 'de-DE' | 'de-LI' | 'en-IN' | 'es-AR' | 'hu-HU' | 'pt-BR' | 'pt-PT' | 'sq-AL' | 'sv-SE' | 'any'): boolean;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Modified

Copy link
Contributor

@codershiba codershiba left a comment

Choose a reason for hiding this comment

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

Please address comments

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label May 7, 2024
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Needs Author Action in New Pull Request Status Board May 7, 2024
@typescript-bot
Copy link
Contributor

@xiaoxizi2303 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 8, 2024
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board May 8, 2024
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 8, 2024
@typescript-bot
Copy link
Contributor

@codershiba 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 added the Other Approved This PR was reviewed and signed-off by a community member. label May 8, 2024
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels May 8, 2024
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board May 8, 2024
@typescript-bot
Copy link
Contributor

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

(@tgfjt, @chrootsu, @IOAyman, @louy, @deptno, @builtinnya, @qqilihq, @keatz55, @MunifTanjim, @vlapo, @peterblazejewicz, @Mattewn99, @Almost-Infinity, @dcfreire: you can do this too.)

@xiaoxizi2303
Copy link
Contributor Author

Hi, when will this pr be incorporated?

@jakebailey
Copy link
Member

You can merge the PR yourself by following the instructions above.

@xiaoxizi2303
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board May 11, 2024
@typescript-bot typescript-bot merged commit 9e5d3a6 into DefinitelyTyped:master May 11, 2024
4 checks passed
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Maintainer Approved Other Approved This PR was reviewed and signed-off by a community member. Self Merge This PR can now be self-merged by the PR author or an owner Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants