Skip to content

Bump ts-pattern from 5.7.0 to 5.7.1#160

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/ts-pattern-5.7.1
Open

Bump ts-pattern from 5.7.0 to 5.7.1#160
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/npm_and_yarn/ts-pattern-5.7.1

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github May 28, 2025

Bumps ts-pattern from 5.7.0 to 5.7.1.

Release notes

Sourced from ts-pattern's releases.

v5.7.1

Type inference bug fixes

This new release fixes the following bug in exhaustiveness checking when matching on optional properties:

type Input = { type?: 'one' } | { type: 'two' };
const f1 = (input: Input) =>
match(input)
.with({ type: 'one' }, () => {})
.with({ type: 'two' }, () => {})
.exhaustive(); // shouldn't type-check, but does 👎
const f2 = (input: Input) =>
match(input)
.with({ type: 'one' }, () => {})
.with({ type: 'two' }, () => {})
.with({ type: undefined }, () => {}) // <- the type key needs to be present.
.exhaustive();  // shouldn't type-check, but does 👎

These two cases don't type check anymore. They fail with a NonExhaustiveError<{ type?: undefined; }>. To fix it, you should do:

type Input = { type?: 'one' } | { type: 'two' };
const f = (input: Input) =>
match(input)
.with({ type: 'one' }, () => {})
.with({ type: 'two' }, () => {})
.with({ type: P.optional(undefined) }, () => {}) // <- the type property may not be there
.exhaustive(); // ✅

This is a purely type-level change, the runtime behavior is still the same.

What's Changed

Full Changelog: gvergnaud/ts-pattern@v5.7.0...v5.7.1

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [ts-pattern](https://github.com/gvergnaud/ts-pattern) from 5.7.0 to 5.7.1.
- [Release notes](https://github.com/gvergnaud/ts-pattern/releases)
- [Commits](gvergnaud/ts-pattern@v5.7.0...v5.7.1)

---
updated-dependencies:
- dependency-name: ts-pattern
  dependency-version: 5.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels May 28, 2025
@netlify
Copy link

netlify bot commented May 28, 2025

Deploy Preview for algovi ready!

Name Link
🔨 Latest commit 7e37711
🔍 Latest deploy log https://app.netlify.com/projects/algovi/deploys/683726a7cc59150008220ee8
😎 Deploy Preview https://deploy-preview-160--algovi.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants