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

chore(deps): update dependency ts-pattern to v5.2.0 #60

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 23, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
ts-pattern 5.0.8 -> 5.2.0 age adoption passing confidence

Release Notes

gvergnaud/ts-pattern (ts-pattern)

v5.2.0

Compare Source

v5.1.2

Compare Source

The main thing

When combining P.nonNullable and P.nullish, you should get an exhaustive pattern matching expression, but the following case was incorrectly considered non-exhaustive:

declare const input: {
  nested: string | number | null | undefined;
};

const res = match(input)
  .with({ nested: P.nonNullable }, (x) => {/* ... */})
  .with({ nested: P.nullish }, (x) => {/* ... */})
  // should type-check
  .exhaustive();

This is fixed now.

What's Changed
New Contributors

Full Changelog: gvergnaud/ts-pattern@v5.1.1...v5.1.2

v5.1.1

Compare Source

What's Changed

Full Changelog: gvergnaud/ts-pattern@v5.1.0...v5.1.1

v5.1.0

Compare Source

New features
P.nonNullable wildcard

Add a new P.nonNullable pattern that will match any value except null or undefined.

import { match, P } from 'ts-pattern';

const input = null;

const output = match<number | null | undefined>(input)
  .with(P.nonNullable, () => 'it is a number!')
  .otherwise(() => 'it is either null or undefined!');

console.log(output);
// => 'it is either null or undefined!'

Closes #​60 #​154 #​190 and will be a work-around for #​143.

What's Changed

Full Changelog: gvergnaud/ts-pattern@v5.0.8...v5.1.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

changeset-bot bot commented May 23, 2024

⚠️ No Changeset found

Latest commit: 5da84cc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@renovate renovate bot force-pushed the renovate/ts-pattern-5.x branch from 902b856 to 66ea1e1 Compare May 24, 2024 08:41
@renovate renovate bot changed the title chore(deps): update dependency ts-pattern to v5.1.1 chore(deps): update dependency ts-pattern to v5.1.2 May 24, 2024
@renovate renovate bot force-pushed the renovate/ts-pattern-5.x branch from 66ea1e1 to 5da84cc Compare June 15, 2024 02:36
@renovate renovate bot changed the title chore(deps): update dependency ts-pattern to v5.1.2 chore(deps): update dependency ts-pattern to v5.2.0 Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants