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

fix: luxon toISODate, toISO and toSQLDate method could return null when an InvalidDate is provided #64919

Conversation

edoardomistretta
Copy link

@edoardomistretta edoardomistretta commented Mar 28, 2023

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

@typescript-bot typescript-bot added this to Needs Author Action in New Pull Request Status Board Mar 28, 2023
@edoardomistretta edoardomistretta changed the title fix: luxon DateTime method could return null when an InvalidDate is provided fix: luxon toISODate, toISO and toSQLDate method could return null when an InvalidDate is provided Mar 28, 2023
@edoardomistretta edoardomistretta marked this pull request as ready for review March 30, 2023 07:46
@typescript-bot
Copy link
Contributor

typescript-bot commented Mar 30, 2023

@edoardomistretta 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 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

Once every item on this list is checked, I'll ask you for permission to merge and publish the changes.

Inactive

This PR has been inactive for 31 days — it is considered abandoned, and therefore closed!


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 64919,
  "author": "edoardomistretta",
  "headCommitOid": "fa8c6811f1224985be8c1e01fd3760b349170c1c",
  "mergeBaseOid": "835c3caaf83b5d72e29dfd60e9413c612dc16e2c",
  "lastPushDate": "2023-03-28T08:43:45.000Z",
  "lastActivityDate": "2023-04-03T20:20:34.000Z",
  "maintainerBlessed": "Waiting for Code Reviews",
  "hasMergeConflict": true,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "luxon",
      "kind": "edit",
      "files": [
        {
          "path": "types/luxon/src/datetime.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/luxon/test/luxon-tests.module.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "FourwingsY",
        "jsiebern",
        "mastermatt",
        "pietrovismara",
        "dawnmist",
        "ycmjason",
        "Aitor1995",
        "peterblazejewicz",
        "carsonf",
        "hugofpsilva",
        "martin-badin"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "changereq",
      "reviewer": "CarsonF",
      "date": "2023-04-03T20:20:34.000Z"
    }
  ],
  "mainBotCommentID": 1489847634,
  "ciResult": "pass"
}

@typescript-bot typescript-bot moved this from Needs Author Action to Needs Maintainer Review in New Pull Request Status Board Mar 30, 2023
@typescript-bot
Copy link
Contributor

🔔 @FourwingsY @jsiebern @mastermatt @pietrovismara @dawnmist @ycmjason @Aitor1995 @peterblazejewicz @CarsonF @hugofpsilva @martin-badin — 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.

@CarsonF
Copy link
Contributor

CarsonF commented Mar 30, 2023

#58147

@edoardomistretta
Copy link
Author

Hi @CarsonF, this a breaking change but IMHO this is necessary.

At the moment developers are forced to know the internals of the method toX because the method could return a value that is not specified. It's like the method throws an error to catch but the developer doesn't know that the method could throw an error.

Developers are guided by types and interfaces instead of actual implementation so please consider this PR

@sheetalkamat sheetalkamat moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Apr 3, 2023
@CarsonF
Copy link
Contributor

CarsonF commented Apr 3, 2023

I hear you that there's a mismatch here. Let me see if I can address this in an elegant way.

I can tell you though that this PR and your PR to luxon proper are not going to be merged.
There's are multiple dozens of methods/getters who deal with invalid input/output, not just this one.
Also the luxon jsdocs don't type any of the invalid output types, so I doubt they'll deviate with those 3 methods

Copy link
Contributor

@CarsonF CarsonF left a comment

Choose a reason for hiding this comment

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

Superceded by #64995

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Apr 3, 2023
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Apr 3, 2023
@typescript-bot
Copy link
Contributor

@edoardomistretta 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
Copy link
Contributor

@edoardomistretta Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day!

@typescript-bot typescript-bot added the Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. label Apr 4, 2023
@typescript-bot typescript-bot added the Abandoned This PR had no activity for a long time, and is considered abandoned label Apr 27, 2023
@typescript-bot
Copy link
Contributor

@edoardomistretta I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on May 3rd (in a week) if the issues aren't addressed.

@typescript-bot typescript-bot removed this from Needs Author Action in New Pull Request Status Board May 5, 2023
@typescript-bot
Copy link
Contributor

@edoardomistretta To keep things tidy, we have to close PRs that aren't mergeable and don't have activity in the last month. No worries, though — please open a new PR if you'd like to continue with this change. Thank you!

@edoardomistretta edoardomistretta deleted the luxon-datetime-returns-string-or-null branch May 17, 2023 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Abandoned This PR had no activity for a long time, and is considered abandoned Critical package Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. Revision needed This PR needs code changes before it can be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants