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

Bump ts-pattern from 5.1.1 to 5.4.0 #415

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Oct 7, 2024

Bumps ts-pattern from 5.1.1 to 5.4.0.

Release notes

Sourced from ts-pattern's releases.

v5.4.0

The main thing β€” Faster type checking πŸš€

This release brings a significant perf improvement to exhaustiveness checking, which led to a ~16% decrease in the time to type-check the full test suite of TS-Pattern:

Category Before After Evolution (%)
Instantiations 6,735,991 4,562,378 -32.33%
Memory used 732,233K 746,454K 1.95%
Assignability cache size 209,959 205,926 -1.92%
Identity cache size 28,093 28,250 0.56%
Check time 5.78s 4.83s -16.44%

What's Changed

New Contributors

Full Changelog: gvergnaud/ts-pattern@v5.3.1...v5.4.0

v5.3.1

Pattern-matching on symbol keys

Symbols used to be ignored in object patterns. They are now taken into account:

const symbolA = Symbol('symbol-a');
const symbolB = Symbol('symbol-b');
const obj = { [symbolA]: { [symbolB]: 'foo' } };
if (isMatching({ [symbolA]: { [symbolB]: 'bar' } }, obj)) {
//  πŸ‘† Used to return true, now returns false!
//  Since TS-Pattern wasn't reading symbols, this pattern used to be equivalent
//  to the {} pattern that matches any value except null and undefined.
}

.exhaustive now throws a custom error

People have expressed the need to differentiate runtime errors that .exhaustive() might throw when the input is of an unexpected type from other runtime errors that could have happened in the same match expression. It's now possible with err instanceof NonExhaustiveError:

import { match, P, NonExhaustiveError }  from 'ts-pattern';
</tr></table> 

... (truncated)

Commits
  • 65a8567 5.4.0
  • e7fd119 Merge pull request #284 from changwoolab/fix/readonly-exhaustive
  • 5a1e7e0 Update tests/exhaustive-match.test.ts
  • 5196f04 chore: minor unit test modification
  • 979b358 refactor: uses helper utils
  • 980e4d0 refactor: move test to exhaustive-match.test.ts
  • c5778f3 code: remove unused type
  • e9c9ee8 Merge pull request #286 from gvergnaud/gvergnaud/improve-type-checking-perfor...
  • 8d23bc4 perf: improve type checking performance of BuildMany
  • e76182d Merge pull request #283 from gvergnaud/dependabot/npm_and_yarn/examples/gif-f...
  • Additional commits viewable in compare view

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.1.1 to 5.4.0.
- [Release notes](https://github.com/gvergnaud/ts-pattern/releases)
- [Commits](gvergnaud/ts-pattern@v5.1.1...v5.4.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Oct 7, 2024
Copy link

vercel bot commented Oct 7, 2024

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
landing βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Oct 7, 2024 9:01am

@dependabot dependabot bot requested a review from MajorTom327 October 7, 2024 08:57
@MajorTom327 MajorTom327 merged commit 81fb809 into main Oct 8, 2024
5 checks passed
@MajorTom327 MajorTom327 deleted the dependabot/npm_and_yarn/ts-pattern-5.4.0 branch October 8, 2024 00:08
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