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

Allow Node TLS's 'alpnProtocol' to be false #55490

Merged
merged 3 commits into from Aug 31, 2021

Conversation

pimterry
Copy link
Contributor

Tiny change: as documented (in the node docs and the comment already present here) alpnProtocol is false when no ALPN protocol is selected.

I've left undefined here too, as it was before - I'm not sure if that can occur in some cases as well, e.g. when ALPN isn't configured at all, or isn't supported in the TLS version, etc.


Please fill in this template.

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://nodejs.org/api/tls.html#tls_event_secureconnection (already documented in the comment here in these types)
  • 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.

@typescript-bot
Copy link
Contributor

typescript-bot commented Aug 30, 2021

@pimterry 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 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": 55490,
  "author": "pimterry",
  "headCommitOid": "6dd579e362f8e1fb9d7c5c02865cee6d83c95d61",
  "lastPushDate": "2021-08-31T12:12:01.000Z",
  "lastActivityDate": "2021-08-31T16:34:45.000Z",
  "mergeOfferDate": "2021-08-31T16:34:21.000Z",
  "mergeRequestDate": "2021-08-31T16:34:45.000Z",
  "mergeRequestUser": "pimterry",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "node",
      "kind": "edit",
      "files": [
        {
          "path": "types/node/tls.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v12/tls.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/node/v14/tls.d.ts",
          "kind": "definition"
        }
      ],
      "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",
        "nguymin4",
        "yoursunny",
        "qwelias",
        "ExE-Boss",
        "Ryan-Willpower",
        "peterblazejewicz",
        "addaleax",
        "JasonHK",
        "victorperin",
        "ZYSzys",
        "NodeJS",
        "LinusU"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "peterblazejewicz",
      "date": "2021-08-31T16:33:47.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "LinusU",
      "date": "2021-08-31T12:13:33.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 908321457,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Untested Change This PR does not touch tests labels Aug 30, 2021
@typescript-bot
Copy link
Contributor

Hey @pimterry,

😒 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 typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Aug 30, 2021
@typescript-bot
Copy link
Contributor

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Aug 30, 2021
@peterblazejewicz
Copy link
Member

This needs to be amended in both LTS version IMO

This appears to only be the value before the socket handshake
completes, or if it fails entirely.
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Aug 31, 2021
Copy link
Contributor

@LinusU LinusU left a comment

Choose a reason for hiding this comment

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

👍

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Aug 31, 2021
@pimterry
Copy link
Contributor Author

This needs to be amended in both LTS version IMO

Done

I've also investigated the possible values further. It's not formally documented, but the actual 'not yet set' value is null, not undefined, so I've updated the types to match. That can be seen by:

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Aug 31, 2021
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 typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Aug 31, 2021
@typescript-bot
Copy link
Contributor

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

(@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, @nguymin4, @yoursunny, @qwelias, @ExE-Boss, @Ryan-Willpower, @peterblazejewicz, @addaleax, @JasonHK, @victorperin, @ZYSzys, @nodejs, @LinusU: you can do this too.)

@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board Aug 31, 2021
@pimterry
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 Aug 31, 2021
@typescript-bot typescript-bot merged commit c134157 into DefinitelyTyped:master Aug 31, 2021
@typescript-bot
Copy link
Contributor

I just published @types/node@16.7.9 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/node@14.17.13 to npm.

@typescript-bot
Copy link
Contributor

I just published @types/node@12.20.22 to npm.

@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Maintainer Approved 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 Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants