Skip to content

Update chance types to be module-first, global-second#74939

Merged
typescript-bot merged 4 commits intoDefinitelyTyped:masterfrom
chriskrycho:invert-chance-types
May 1, 2026
Merged

Update chance types to be module-first, global-second#74939
typescript-bot merged 4 commits intoDefinitelyTyped:masterfrom
chriskrycho:invert-chance-types

Conversation

@chriskrycho
Copy link
Copy Markdown
Contributor

This maintains the existing API contract; it simply “inverts” how it is accomplished, and makes it much easier to name specific types from the package and in particular makes it possible to name the Chance instance type without relying on the global being visible in the types.


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: https://chancejs.com/usage/node.html
  • 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.

@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 30, 2026

@chriskrycho Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

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 type definition owners or DT maintainers

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": 74939,
  "author": "chriskrycho",
  "headCommitOid": "e0d9063cd529eb4353dcbf6e29ea3491657f7f72",
  "mergeBaseOid": "de9d7a2a0f0fa222ad71babffd3144df176d3410",
  "lastPushDate": "2026-04-30T21:46:17.000Z",
  "lastActivityDate": "2026-05-01T18:28:56.000Z",
  "mergeOfferDate": "2026-05-01T13:36:56.000Z",
  "mergeRequestDate": "2026-05-01T18:28:56.000Z",
  "mergeRequestUser": "chriskrycho",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "tooManyCommits": false,
  "tooManyReviews": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "chance",
      "kind": "edit",
      "files": [
        {
          "path": "types/chance/chance-tests.ts",
          "kind": "test"
        },
        {
          "path": "types/chance/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "cbowdon",
        "brikou",
        "cafesanu",
        "colbywhite",
        "NewDark90",
        "jacobez",
        "peterblazejewicz"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "colbywhite",
      "date": "2026-05-01T13:36:17.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 4356375240,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Edits Infrastructure labels Apr 30, 2026
@typescript-bot typescript-bot moved this to Waiting for Code Reviews in Pull Request Status Board Apr 30, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @cbowdon @brikou @cafesanu @colbywhite @NewDark90 @jacobez @peterblazejewicz — 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.

@chriskrycho chriskrycho force-pushed the invert-chance-types branch from def5cd0 to 9c57478 Compare April 30, 2026 21:47
@typescript-bot typescript-bot added The CI failed When GH Actions fails and removed Edits Infrastructure labels Apr 30, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

@chriskrycho 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 that are failing do not end up on the list of PRs for the DT maintainers to review.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in Pull Request Status Board Apr 30, 2026
These were not new, but they're being flagged as new by dint of the
change, and it's great to get them fix.ed
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Apr 30, 2026
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in Pull Request Status Board Apr 30, 2026
@DangerBotOSS
Copy link
Copy Markdown

Formatting

The following files are not formatted:

  1. types/chance/index.d.ts

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

Generated by 🚫 dangerJS against e0d9063

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels May 1, 2026
@typescript-bot
Copy link
Copy Markdown
Contributor

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

(@cbowdon, @brikou, @cafesanu, @colbywhite, @NewDark90, @jacobez, @peterblazejewicz: you can do this too.)

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in Pull Request Status Board May 1, 2026
@chriskrycho
Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in Pull Request Status Board May 1, 2026
@typescript-bot typescript-bot merged commit e8ea3b4 into DefinitelyTyped:master May 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. 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

Projects

Status: Recently Merged

Development

Successfully merging this pull request may close these issues.

4 participants