Skip to content

Conversation

@petercpwong
Copy link
Contributor

@petercpwong petercpwong commented Jun 3, 2024

Update stricter types for the sameSite property so it plays nicely with other libraries such as https://github.com/jshttp/cookie

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:
    sameSite?: true | false | "lax" | "strict" | "none" | undefined;
  • 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.

Update stricter types for the `sameSite` property so it plays nicely with other libraries such as https://github.com/jshttp/cookie
@typescript-bot
Copy link
Contributor

typescript-bot commented Jun 3, 2024

@petercpwong 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
  • ✅ 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": 69734,
  "author": "petercpwong",
  "headCommitOid": "d80f63e8ce74d9c99d194b384aa432aae7f1e404",
  "mergeBaseOid": "aaf94a0a6431f52c46dab26182f1156d79720d29",
  "lastPushDate": "2024-06-03T18:28:32.000Z",
  "lastActivityDate": "2024-06-12T08:07:34.000Z",
  "mergeOfferDate": "2024-06-11T20:42:32.000Z",
  "mergeRequestDate": "2024-06-12T08:07:34.000Z",
  "mergeRequestUser": "petercpwong",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "set-cookie-parser",
      "kind": "edit",
      "files": [
        {
          "path": "types/set-cookie-parser/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/set-cookie-parser/set-cookie-parser-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "nickp10",
        "singlebyted",
        "peterblazejewicz"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "peterblazejewicz",
      "date": "2024-06-11T20:41:55.000Z",
      "isMaintainer": true
    },
    {
      "type": "stale",
      "reviewer": "nickp10",
      "date": "2024-06-03T18:36:26.000Z",
      "abbrOid": "58e6407"
    }
  ],
  "mainBotCommentID": 2145859702,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Untested Change This PR does not touch tests labels Jun 3, 2024
@typescript-bot
Copy link
Contributor

🔔 @nickp10 @singlebyted @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.

@typescript-bot typescript-bot added the The CI failed When GH Actions fails label Jun 3, 2024
@typescript-bot
Copy link
Contributor

@petercpwong 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 added the Owner Approved A listed owner of this package signed off on the pull request. label Jun 3, 2024
@typescript-bot
Copy link
Contributor

⏳ Hi @petercpwong,

It's been a few days since this PR was approved by peterblazejewicz, nickp10 and we're waiting for you to fix the test failures and then for a maintainer approval.

If you would like to short-circuit another wait for a maintainer, you can edit some of the test files in the package which verify how the .d.ts files work. This would allow the PR to be merged by you or the DT module owners after a re-review.

@typescript-bot typescript-bot added The CI failed When GH Actions fails and removed Owner Approved A listed owner of this package signed off on the pull request. Maintainer Approved The CI failed When GH Actions fails Untested Change This PR does not touch tests labels Jun 11, 2024
@typescript-bot
Copy link
Contributor

@petercpwong 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 Jun 11, 2024
@DangerBotOSS
Copy link

Formatting

The following files are not formatted:

  1. types/set-cookie-parser/index.d.ts

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

Generated by 🚫 dangerJS against d80f63e

@typescript-bot
Copy link
Contributor

@peterblazejewicz, @nickp10 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 Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Jun 11, 2024
@typescript-bot
Copy link
Contributor

@nickp10 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?

@petercpwong
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 4dfd3f0 into DefinitelyTyped:master Jun 12, 2024
@nwalters512
Copy link
Contributor

nwalters512 commented Jun 28, 2024

Note that this change to the type doesn't actually reflect runtime behavior, as the result of setCookie.parse(setCookie.splitCookiesString(header)) will happily contain uppercase Strict and such, and in fact almost definitely will because the uppercase header values are what's actually documented and defined in the cookies standard (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie, https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-4.1.1). This change should be reverted.

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

None yet

Development

Successfully merging this pull request may close these issues.

6 participants