Skip to content

chore(deps): bump ts-pattern from 4.3.0 to 5.9.0 - #3701

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/ts-pattern-5.9.0
Closed

chore(deps): bump ts-pattern from 4.3.0 to 5.9.0#3701
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/npm_and_yarn/ts-pattern-5.9.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 24, 2026

Copy link
Copy Markdown
Contributor

Bumps ts-pattern from 4.3.0 to 5.9.0.

Release notes

Sourced from ts-pattern's releases.

v5.9.0

New features

P.record patterns

To match a Record<Key, Value> (an object with consistent key and value types), you can use P.record(keyPattern, valuePattern). It takes a sub-pattern to match against the key, a sub-pattern to match against the value, and will match if all entries in the object match these two sub-patterns.

import { match, P } from 'ts-pattern';
type Input = Record<string, number>;
const input: Input = {
alice: 100,
bob: 85,
charlie: 92,
};
const output = match(input)
.with(P.record(P.string, P.number), (scores) => All user scores)
.with(P.record(P.string, P.string), (names) => All user names)
.otherwise(() => '');
console.log(output);
// => "All user scores"

You can also use P.record with a single argument P.record(valuePattern), which assumes string keys:

const userProfiles = {
  alice: { name: 'Alice', age: 25 },
  bob: { name: 'Bob', age: 30 },
};
const output = match(userProfiles)
.with(
P.record({ name: P.string, age: P.number }),
(profiles) => User profiles with name and age
)
.otherwise(() => 'Different format');
console.log(output);
// => "User profiles with name and age"

When using P.select in record patterns, you can extract all keys or all values as arrays:

... (truncated)

Commits

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jun 24, 2026
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard-app Error Error Jun 24, 2026 7:33am

Request Review

Bumps [ts-pattern](https://github.com/gvergnaud/ts-pattern) from 4.3.0 to 5.9.0.
- [Release notes](https://github.com/gvergnaud/ts-pattern/releases)
- [Commits](gvergnaud/ts-pattern@v4.3.0...v5.9.0)

---
updated-dependencies:
- dependency-name: ts-pattern
  dependency-version: 5.9.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/ts-pattern-5.9.0 branch from a0a0b55 to afb8d40 Compare June 24, 2026 07:32
@raviteja83 raviteja83 closed this Aug 31, 2026
@dependabot @github

dependabot Bot commented on behalf of github Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/ts-pattern-5.9.0 branch August 31, 2026 15:27
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.

1 participant