Skip to content

Update node types.isMap tests #61389

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

Merged
merged 2 commits into from
Jul 22, 2022
Merged

Update node types.isMap tests #61389

merged 2 commits into from
Jul 22, 2022

Conversation

sandersn
Copy link
Contributor

@sandersn sandersn commented Jul 21, 2022

microsoft/TypeScript#49625 improves handling of unions in type predicates so that unions are correctly preserved. This breaks types.isMap in node.

For now I just changed the tests' expected type, but the type of isMap doesn't make much sense to me. It should probably be changed, but that's a much more complex task.

Edit: isSet is broken on node 14 too.

This break is tracked at microsoft/TypeScript#49988 although it's correct, I think, so not very likely to be reverted.

microsoft/TypeScript#49625 improves handling of
unions in type predicates so that unions are correctly preserved. This
breaks types.isMap in node.

For now I just changed the tests' expected type, but the type of isMap doesn't
make much sense to me. It should probably be changed, but that's a much
more complex task.

This break is tracked at
microsoft/TypeScript#49988 although it's
correct, I think,  so not very likely to be reverted.
@typescript-bot
Copy link
Contributor

typescript-bot commented Jul 21, 2022

@sandersn Thank you for submitting this PR!

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 failed
  • 🕐 Most recent commit is approved by a DT maintainer

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",
  "now": "-",
  "pr_number": 61389,
  "author": "sandersn",
  "headCommitOid": "de41ab6c557ab2f8d667d37c179fdb4ce7d1c93e",
  "mergeBaseOid": "0096577e5a57944e0e1fb5ac71dee1187147bf09",
  "lastPushDate": "2022-07-22T15:44:30.000Z",
  "lastActivityDate": "2022-07-22T16:06:05.000Z",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/test/util_types.ts",
          "kind": "test"
        },
        {
          "path": "types/node/v14/test/util.ts",
          "kind": "test"
        },
        {
          "path": "types/node/v16/test/util_types.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "Microsoft",
        "DefinitelyTyped",
        "jkomyno",
        "alvis",
        "r3nya",
        "btoueg",
        "smac89",
        "touffy",
        "DeividasBakanas",
        "eyqs",
        "Hannes-Magnusson-CK",
        "hoo29",
        "kjin",
        "ajafff",
        "islishude",
        "mwiktorczyk",
        "mohsen1",
        "n-e",
        "galkin",
        "parambirs",
        "eps1lon",
        "SimonSchick",
        "ThomasdenH",
        "WilcoBakker",
        "wwwy3y3",
        "samuela",
        "kuehlein",
        "bhongy",
        "chyzwar",
        "trivikr",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "peterblazejewicz",
        "addaleax",
        "victorperin",
        "ZYSzys",
        "NodeJS",
        "LinusU",
        "wafuwafu13",
        "mcollina"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "mcollina",
      "date": "2022-07-22T16:06:05.000Z",
      "isMaintainer": false
    },
    {
      "type": "stale",
      "reviewer": "peterblazejewicz",
      "date": "2022-07-21T18:39:47.000Z",
      "abbrOid": "59e7b9d"
    }
  ],
  "mainBotCommentID": 1191814022,
  "ciResult": "fail",
  "ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/de41ab6c557ab2f8d667d37c179fdb4ce7d1c93e/checks?check_suite_id=7480486468"
}

@typescript-bot
Copy link
Contributor

Copy link
Member

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

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

LGTM!

@typescript-bot
Copy link
Contributor

@sandersn 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.

Copy link
Contributor

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. The CI failed When GH Actions fails labels Jul 22, 2022
@typescript-bot
Copy link
Contributor

@sandersn 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.

@sandersn
Copy link
Contributor Author

The only test failure is in weak-napi. It's unrelated to this change, although it is a result of microsoft/TypeScript#49625 too.

@sandersn sandersn merged commit 87c7553 into master Jul 22, 2022
@sandersn sandersn deleted the update-node-types.isMap-tests branch July 22, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Owner Approved A listed owner of this package signed off on the pull request. The CI failed When GH Actions fails
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants