repo stringlengths 5 53 | pr_number int32 1 321k | task_type stringclasses 2
values | issue_text stringlengths 0 81.2k | pr_title stringlengths 1 319 | pr_body stringlengths 0 105k | base_sha stringlengths 40 40 | head_sha stringlengths 40 40 | gold_diff stringlengths 0 202M | changed_files listlengths 0 100 | review_threads listlengths 0 100 | test_patch stringlengths 0 23.4M | merged bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
tymondesigns/jwt-auth | 1,775 | issue_to_patch | Fix PR #1616 | Closes #1616 | d0d67c052bc13db84ce910aa8b89145b342c8e6d | 5ce763512708f2b46c79bb4a75511b58dfc13bf5 | diff --git a/src/Blacklist.php b/src/Blacklist.php
index 3c0e3c8a4..13d89bfb4 100644
--- a/src/Blacklist.php
+++ b/src/Blacklist.php
@@ -71,6 +71,11 @@ public function add(Payload $payload)
return $this->addForever($payload);
}
+ // if we have already added this token to the blacklist
+ ... | [
"src/Blacklist.php",
"tests/BlacklistTest.php"
] | [] | diff --git a/tests/BlacklistTest.php b/tests/BlacklistTest.php
index 3c1def81d..8ee57dff8 100644
--- a/tests/BlacklistTest.php
+++ b/tests/BlacklistTest.php
@@ -70,6 +70,11 @@ public function it_should_add_a_valid_token_to_the_blacklist()
$refreshTTL = 20161;
+ $this->storage->shouldReceive('get')
+... | true | |
tymondesigns/jwt-auth | 1,751 | issue_to_patch | Update LICENSE | The year is not required, and having to update this every year seems pointless. | ef07317a33f5b5269f8f4e6db11d879223134646 | 52658622cbbc573da5aca6706439178575ab5b59 | diff --git a/LICENSE b/LICENSE
index ebd746db8..90712983c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2018 Sean Tymon
+Copyright (c) Sean Tymon
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation fi... | [
"LICENSE"
] | [] | true | ||
tymondesigns/jwt-auth | 1,752 | issue_to_patch | Apply fixes from StyleCI | This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).
---
For more information, click [here](https://github.styleci.io/analyses/XWvAMG). | fffdad22c57cdbb68ec4ee6cebb35e5097de9bc5 | df3e42b828dec7dc8a9661e2e9a218267f404720 | diff --git a/src/Claims/Collection.php b/src/Claims/Collection.php
index 8b2e1747c..5b7929a9f 100644
--- a/src/Claims/Collection.php
+++ b/src/Claims/Collection.php
@@ -21,7 +21,8 @@ class Collection extends IlluminateCollection
/**
* Get a Claim instance by it's unique name.
*/
- public function ge... | [
"src/Claims/Collection.php",
"src/JWT.php",
"src/JWTGuard.php",
"tests/Claims/DatetimeClaimTest.php",
"tests/PayloadTest.php"
] | [] | diff --git a/tests/Claims/DatetimeClaimTest.php b/tests/Claims/DatetimeClaimTest.php
index b17361a6f..335fe1014 100644
--- a/tests/Claims/DatetimeClaimTest.php
+++ b/tests/Claims/DatetimeClaimTest.php
@@ -11,7 +11,6 @@
namespace Tymon\JWTAuth\Test\Claims;
-use Mockery;
use DateTime;
use DateInterval;
use Carbon... | true | |
tymondesigns/jwt-auth | 1,680 | issue_to_patch | Add information for a setup with multiple guards | It is possible in laravel to specify multiple guards, the docs should reflect how to specify the guard type if the api guard is not set as the default.
auth('api')->login(); will trigger the custom jwt api guard for example. | e190b6a75372e7e5e3a6d2cf0e4456313412299f | 3ef681b722d23858f78fb21db4527d5ace38c3cd | diff --git a/docs/auth-guard.md b/docs/auth-guard.md
index 98f0668dc..75fa7e606 100644
--- a/docs/auth-guard.md
+++ b/docs/auth-guard.md
@@ -2,6 +2,15 @@
The following methods are available on the Auth guard instance.
+### Multiple Guards
+
+If the newly created 'api' guard is not set as a default guard or you hav... | [
"docs/auth-guard.md"
] | [] | true | ||
tymondesigns/jwt-auth | 1,718 | issue_to_patch | Apply fixes from StyleCI | This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).
---
For more information, click [here](https://github.styleci.io/analyses/qxovba). | 29cad6f156ebcb0423347d807443c861acd2b2ae | 7a8ba465e3a67619bc0e926c07770285436a7fbb | diff --git a/src/Builder.php b/src/Builder.php
index 6779ce65f..3478cf589 100644
--- a/src/Builder.php
+++ b/src/Builder.php
@@ -13,7 +13,6 @@
namespace Tymon\JWTAuth;
-use Tymon\JWTAuth\Claims;
use Illuminate\Support\Arr;
use Illuminate\Http\Request;
use function Tymon\JWTAuth\Support\now;
| [
"src/Builder.php"
] | [] | true | ||
tymondesigns/jwt-auth | 1,703 | issue_to_patch | Apply fixes from StyleCI | This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).
---
For more information, click [here](https://github.styleci.io/analyses/8PLmVR). | cc5f79c9e04905bf033cbebdbae992b6ee5c7efe | 868969da91c599a132eea67e8b406e69aee0f4ff | diff --git a/config/config.php b/config/config.php
index ff7e0d2eb..2d46f70f5 100644
--- a/config/config.php
+++ b/config/config.php
@@ -1,5 +1,14 @@
<?php
+/*
+ * This file is part of jwt-auth.
+ *
+ * (c) Sean Tymon <tymon148@gmail.com>
+ *
+ * For the full copyright and license information, please view the LICENS... | [
"config/config.php",
"tests/Validators/PayloadValidatorTest.php"
] | [] | diff --git a/tests/Validators/PayloadValidatorTest.php b/tests/Validators/PayloadValidatorTest.php
index 5b988fcac..7e0ef8644 100644
--- a/tests/Validators/PayloadValidatorTest.php
+++ b/tests/Validators/PayloadValidatorTest.php
@@ -148,7 +148,7 @@ public function it_should_set_the_required_claims()
$this->a... | true | |
tymondesigns/jwt-auth | 1,702 | issue_to_patch | Apply fixes from StyleCI | This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).
---
For more information, click [here](https://github.styleci.io/analyses/XZk24a). | 6a7769aa7f42e03a5bb7ed943564c9bd694af3be | 801e3d688cf2f4fb4ab34a3d56ed44d46b751e7c | diff --git a/src/Claims/DatetimeTrait.php b/src/Claims/DatetimeTrait.php
index 0c4860e6a..b9e7e37fa 100644
--- a/src/Claims/DatetimeTrait.php
+++ b/src/Claims/DatetimeTrait.php
@@ -21,8 +21,8 @@
use function Tymon\JWTAuth\Support\is_past;
use function Tymon\JWTAuth\Support\is_future;
use function Tymon\JWTAuth\Suppo... | [
"src/Claims/DatetimeTrait.php",
"src/Claims/IssuedAt.php",
"src/Claims/NotBefore.php"
] | [] | true | ||
tymondesigns/jwt-auth | 1,699 | issue_to_patch | Apply fixes from StyleCI | This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).
---
For more information, click [here](https://github.styleci.io/analyses/87eG50). | bd138b01d8bd7a00659f3d9c1e8d50d66e6715a2 | c0fa72c05aca20ffaf25373b6768bfe93a8f599a | diff --git a/src/Claims/NotBefore.php b/src/Claims/NotBefore.php
index c18a38896..3a23538f4 100644
--- a/src/Claims/NotBefore.php
+++ b/src/Claims/NotBefore.php
@@ -11,7 +11,6 @@
namespace Tymon\JWTAuth\Claims;
-use Tymon\JWTAuth\Exceptions\InvalidClaimException;
use Tymon\JWTAuth\Exceptions\TokenInvalidException... | [
"src/Claims/NotBefore.php"
] | [] | true | ||
tymondesigns/jwt-auth | 1,696 | issue_to_patch | Apply fixes from StyleCI | This pull request applies code style fixes from an analysis carried out by [StyleCI](https://github.styleci.io).
---
For more information, click [here](https://github.styleci.io/analyses/XaY6gV). | d4dc39834c3e00d659e8f42caba7fa15ada29f63 | 4112fc6400cec0be63987a00dd63678856d5b169 | diff --git a/src/Payload.php b/src/Payload.php
index 9035e9235..bdd49686d 100644
--- a/src/Payload.php
+++ b/src/Payload.php
@@ -16,7 +16,6 @@
use Countable;
use ArrayAccess;
use JsonSerializable;
-use Tymon\JWTAuth\Token;
use BadMethodCallException;
use Illuminate\Support\Arr;
use Tymon\JWTAuth\Claims\Claim;
dif... | [
"src/Payload.php",
"src/Token.php"
] | [] | true | ||
type-challenges/type-challenges | 38,034 | issue_to_patch | Incorrect usage of @ts-expect-error in 00003-medium-omit
Hi
In the test cases for the Omit challenge, the following line is present:
// @ts-expect-error
type error = MyOmit<Todo, 'description' | 'invalid'>
interface Todo {
title: string
description: string
completed: boolean
}
This expects an error because 'i... | fix: remove incorrect @ts-expect-error from Omit (00003) test cases | ## Summary
Removes the `@ts-expect-error` test case from the Omit challenge (00003-medium-omit) that incorrectly expected an error when passing keys not present in `T`.
## Problem
The test cases included:
```ts
// @ts-expect-error
type error = MyOmit<Todo, 'description' | 'invalid'>
```
This expected solutions to ... | 928da7b386f95bedd9e2534022b00d21fa86d2f5 | d927fb5d97046f8d0dc12eb70b5bbed611906923 | diff --git a/questions/00003-medium-omit/test-cases.ts b/questions/00003-medium-omit/test-cases.ts
index 2f0de2058..c6b10ef43 100644
--- a/questions/00003-medium-omit/test-cases.ts
+++ b/questions/00003-medium-omit/test-cases.ts
@@ -6,9 +6,6 @@ type cases = [
Expect<Equal<Expected3, MyOmit<Todo1, 'description' | 'co... | [
"questions/00003-medium-omit/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 38,036 | issue_to_patch | 2946 - ObjectEntries: Bug in test cases?
Hi,
The following tests conflict with each other.
Expect<Equal<ObjectEntries<Partial<Model>>, ModelEntries>>,
-> This one is expecting that undefined is removed
Expect<Equal<ObjectEntries<{ key: string | undefined }>, ['key', string | undefined]>>
-> This one is expecting ... | fix: correct ObjectEntries (02946) test case for Partial<Model> | Fixes #37968
## Summary
The `ObjectEntries<Partial<Model>>` test case expected `ModelEntries` (no `undefined` in value types), but `Partial<Model>` adds `| undefined` to each property. This contradicts the test on line 16 which correctly preserves `undefined` in `{ key: string | undefined }`.
Since TypeScript cannot... | 928da7b386f95bedd9e2534022b00d21fa86d2f5 | f0aa5c8a4a49208f6bb0ba8129bec5606decd2f9 | diff --git a/questions/02946-medium-objectentries/test-cases.ts b/questions/02946-medium-objectentries/test-cases.ts
index b97d8bf6b..be772fc49 100644
--- a/questions/02946-medium-objectentries/test-cases.ts
+++ b/questions/02946-medium-objectentries/test-cases.ts
@@ -7,10 +7,11 @@ interface Model {
}
type ModelEnt... | [
"questions/02946-medium-objectentries/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 37,698 | issue_to_patch | chore(deps): bump js-yaml from 4.1.0 to 4.1.1 | Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md">js-yaml's changelog</a>.</em></p>
<blockquote>
<h2>[4.1.1] - 2025-11-12</h2>
<h3>Security</h3>
<ul>
<li>Fix prototype po... | 10634c753718b6f20b3e9a820486adb0d7833686 | 71ea914fc64dba977f4a453c58796b344f938145 | diff --git a/package.json b/package.json
index 2d0e8fefd..5c9a097aa 100644
--- a/package.json
+++ b/package.json
@@ -18,7 +18,7 @@
"esno": "^4.0.0",
"fast-glob": "^3.3.2",
"fs-extra": "^11.2.0",
- "js-yaml": "^4.1.0",
+ "js-yaml": "^4.1.1",
"lz-string": "^1.5.0"
},
"devDependencies": {
d... | [
"package.json",
"pnpm-lock.yaml",
"scripts/package.json"
] | [] | true | ||
type-challenges/type-challenges | 19,750 | issue_to_patch | IsEqual
> Please follow the template and fill the info. A PR will be auto-generated and always reflect on your changes.
>
> Detailed solution/guide is not required, but please be sure the challenge is solvable.
## Info
Basic info of your challenge questions,
```yaml
difficulty: medium
title: IsEqual
tags... | #19749 - IsEqual | This is an auto-generated PR that auto reflect on #19749, please go to #19749 for discussion or making changes.
Closes #19749 | 8e1383dda4925705795d04c6fd0385a5280a816f | 4715e3745519218c697585fc1c38735a6b18fe86 | diff --git a/questions/19749-medium-isequal/README.md b/questions/19749-medium-isequal/README.md
new file mode 100644
index 000000000..62ac8098f
--- /dev/null
+++ b/questions/19749-medium-isequal/README.md
@@ -0,0 +1,13 @@
+Implements the equal operator that returns a boolean for whether the two given types are equal. ... | [
"questions/19749-medium-isequal/README.md",
"questions/19749-medium-isequal/info.yml",
"questions/19749-medium-isequal/template.ts",
"questions/19749-medium-isequal/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 37,975 | issue_to_patch | chore(deps-dev): bump lodash from 4.17.21 to 4.17.23 | Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/lodash/lodash/commit/dec55b7a3b382da075e2eac90089b4cd00a26cbb"><code>dec55b7</code></a> Bump main to v4.17.23 (<a href="https://redirect.github.com/lodash/lodash/issues/608... | 00122042c4c58f12227e97c68235dfde1fd2129d | 2d19a7cd4de4df6083e83aaf765ab1c023ece7e7 | diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 70feac03b..772bcaaa7 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -26,7 +26,7 @@ importers:
devDependencies:
'@antfu/eslint-config':
specifier: ^2.6.0
- version: 2.6.0(@vue/compiler-sfc@3.5.16)(eslint@8.56.0)(typescript@5.3.3)
+ ... | [
"pnpm-lock.yaml"
] | [] | true | ||
type-challenges/type-challenges | 37,666 | issue_to_patch | docs(i18n): Correct Korean translation; clarify English prompt | - Rewrite unnatural/mistranslated Korean description for accuracy and readability
- Align English prompt with TypeScript terminology and keep parity with Korean
- No functional changes
---
cc @Tap-Kim 제가 출제한 문제에 관심을 가지고 번역해 주신 점 감사드립니다. | b36c05c9cdf6b42f9540f95a87bb8a7b874d000c | fab7eaae1445c82e005a654f23b6867b6519e0cd | diff --git a/questions/18220-medium-filter/README.ko.md b/questions/18220-medium-filter/README.ko.md
index 1d8abd177..449da0cd5 100644
--- a/questions/18220-medium-filter/README.ko.md
+++ b/questions/18220-medium-filter/README.ko.md
@@ -1,6 +1,6 @@
<!--info-header-start--><h1>Filter <img src="https://img.shields.io/ba... | [
"questions/18220-medium-filter/README.ko.md",
"questions/18220-medium-filter/README.md"
] | [] | true | ||
type-challenges/type-challenges | 37,665 | issue_to_patch | chore(meta): Update GitHub username to @mu-hun | - Replace old my handle with @mu-hun
- Change name from "Muhun Kim" to "Mu-Hun"
- No functional changes
| b36c05c9cdf6b42f9540f95a87bb8a7b874d000c | 7cc1812011eb234c39fd99d6441d2cea05808345 | diff --git a/questions/18220-medium-filter/README.ko.md b/questions/18220-medium-filter/README.ko.md
index 1d8abd177..db6ef4fe2 100644
--- a/questions/18220-medium-filter/README.ko.md
+++ b/questions/18220-medium-filter/README.ko.md
@@ -1,6 +1,6 @@
-<!--info-header-start--><h1>Filter <img src="https://img.shields.io/ba... | [
"questions/18220-medium-filter/README.ko.md",
"questions/18220-medium-filter/README.md",
"questions/18220-medium-filter/info.yml"
] | [] | true | ||
type-challenges/type-challenges | 29,068 | issue_to_patch | chore(deps-dev): bump word-wrap from 1.2.3 to 1.2.4 | Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/jonschlinkert/word-wrap/releases">word-wrap's releases</a>.</em></p>
<blockquote>
<h2>1.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Remove default i... | 602bda6d259dc9904d726c4cee134df68354c263 | 15b9f54aaaf840e912a0e3bed7a34bf003bff140 | diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dd80d3ed6..70feac03b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2569,6 +2569,7 @@ packages:
levn: 0.4.1
prelude-ls: 1.2.1
type-check: 0.4.0
+ word-wrap: 1.2.4
dev: true
/p-limit@2.3.0:
@@ -3171,6 +3172,9 @@ packages:
... | [
"pnpm-lock.yaml"
] | [] | true | ||
type-challenges/type-challenges | 29,356 | issue_to_patch | chore(deps-dev): bump json5 from 1.0.1 to 1.0.2 | Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/json5/json5/releases">json5's releases</a>.</em></p>
<blockquote>
<h2>v1.0.2</h2>
<ul>
<li>Fix: Properties with the name <code>__proto__</code> are added to objec... | b504acc7bba8e4fb32018053af5c6bddbf9397cc | a15e769c0780302a86aa7f9a05428beba66dacf8 | diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c47870568..dd80d3ed6 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2312,6 +2312,13 @@ packages:
resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==}
dev: true
+ /json5/1.0.2:
+ r... | [
"pnpm-lock.yaml"
] | [] | true | ||
type-challenges/type-challenges | 29,358 | issue_to_patch | chore(deps-dev): bump semver from 5.7.1 to 5.7.2 | Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/npm/node-semver/releases">semver's releases</a>.</em></p>
<blockquote>
<h2>v5.7.2</h2>
<h2><a href="https://github.com/npm/node-semver/compare/v5.7.1...v5.7.... | 2df3c81498edc87122c9ce159537c9223f07d05f | d32238efb60f608e3deeb81459a5e245a301aba7 | diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9e9178c23..c47870568 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -2523,7 +2523,7 @@ packages:
dependencies:
hosted-git-info: 2.8.8
resolve: 1.22.0
- semver: 5.7.1
+ semver: 5.7.2
validate-npm-package-license: 3.0.4
dev: ... | [
"pnpm-lock.yaml"
] | [] | true | ||
type-challenges/type-challenges | 36,633 | issue_to_patch | chore(deps): bump micromatch from 4.0.4 to 4.0.8 | Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.4 to 4.0.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/micromatch/micromatch/releases">micromatch's releases</a>.</em></p>
<blockquote>
<h2>4.0.8</h2>
<p>Ultimate release that fixes both CVE-2024-4067 a... | 6b8d788ce38bd89d39d6bffaab67d2e0bdd5bb14 | 4a12dac1debf208a83480bd6129b6b8666afa384 | diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d3be6b914..9e9178c23 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -280,8 +280,8 @@ packages:
js-tokens: 4.0.0
dev: true
- /@babel/parser@7.27.4:
- resolution: {integrity: sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/U... | [
"pnpm-lock.yaml"
] | [] | true | ||
type-challenges/type-challenges | 37,304 | issue_to_patch | docs: add solution link to typescriptpro.com | Follow-up to #37293
@antfu If it's fine for you I would also add the following (in a follow-up PR) - otherwise I'll leave it to this.
## Add link with text in the following section
> ⚡️ Start the challenge on [TypeScriptPro](https://typescriptpro.com/challenges)
<img width="755" height="181" alt="image" s... | e267da6e5eed15286bee4184ad1acb5df6eb177a | c3d49ac382ddbb7792cc6774f97898d77b8e5877 | diff --git a/README.md b/README.md
index 1c64114f6..cc2742831 100644
--- a/README.md
+++ b/README.md
@@ -81,6 +81,7 @@ You can also use some existing type utility libraries such as [type-fest](https:
- [Type Challenges Solutions](https://github.com/ghaiklor/type-challenges-solutions)
- [Type Gymnastics](https://githu... | [
"README.md"
] | [] | true | ||
type-challenges/type-challenges | 36,652 | issue_to_patch | Please translate this sentence into Português
> High-quality types can help improve projects' maintainability while avoiding potential bugs.
>
> This project is aimed at helping you better understand how the type system works, writing your own utilities, or just having fun with the challenges. We are also trying to f... | i18n: translate to pt-br | Changed README.pt-BR.md Portuguese Brazil translation.
resolves: https://github.com/type-challenges/type-challenges/issues/36605 | 6b8d788ce38bd89d39d6bffaab67d2e0bdd5bb14 | 7a864af3132e42f9bab1e9458922198f12c823c3 | diff --git a/README.pt-BR.md b/README.pt-BR.md
index 1d473dd5b..7a77350d0 100644
--- a/README.pt-BR.md
+++ b/README.pt-BR.md
@@ -27,10 +27,10 @@
Tipos de alta qualidade podem ajudar a melhorar a capacidade de manutenção dos projetos, evitando possíveis bugs.
-Existem várias bibliotecas incríveis de utilitários de ... | [
"README.pt-BR.md"
] | [] | true | |
type-challenges/type-challenges | 36,622 | issue_to_patch | refactor: use an object spread instead of Object.assign | use an object spread instead of Object.assign for better readability | 64a7ac759405363876d2d23559cc65b38ddbd6ac | 8b0717a463fbd5f70d46f1f762a6840a1f9601ac | diff --git a/scripts/loader.ts b/scripts/loader.ts
index 305c3adfc..b09e4d0b5 100644
--- a/scripts/loader.ts
+++ b/scripts/loader.ts
@@ -105,7 +105,7 @@ export async function loadQuizByNo(no: number | string) {
}
export function resolveInfo(quiz: Quiz, locale: string = defaultLocale) {
- const info = Object.assign... | [
"scripts/loader.ts"
] | [] | true | ||
type-challenges/type-challenges | 36,623 | issue_to_patch | chore: update ansis from v3 to v4 | update ansis from v3 to v4
- <https://github.com/webdiscus/ansis/blob/master/CHANGELOG.md> | 64a7ac759405363876d2d23559cc65b38ddbd6ac | b1fecc6c36cc4a24db01ddcc9f375ef7ea5f5246 | diff --git a/package.json b/package.json
index 9938e26be..2d0e8fefd 100644
--- a/package.json
+++ b/package.json
@@ -29,7 +29,7 @@
"@types/lz-string": "^1.5.0",
"@types/node": "^20.10.5",
"@types/prompts": "^2.4.9",
- "ansis": "^3.12.0",
+ "ansis": "^4.1.0",
"eslint": "^8.56.0",
"prompts"... | [
"package.json",
"pnpm-lock.yaml"
] | [] | true | ||
type-challenges/type-challenges | 35,949 | issue_to_patch | #03057 add-error-cases | ## Info
```plain-text
difficulty : easy
title : Push
number : 03057
# tags: array
```
## Explanation
In this TypeScript playground, all test cases pass even when using any, which makes it might prevent beginners from recognizing the risks of any.
any is compatible with all types, so the type checker does n... | 986b79d21ab9c67ba5b3e08f710d9e077f1821a5 | 1ad12957a68ac05f41a8c3aafd8e84ae795f314b | diff --git a/questions/03057-easy-push/test-cases.ts b/questions/03057-easy-push/test-cases.ts
index 3621f394e..00e4c7d48 100644
--- a/questions/03057-easy-push/test-cases.ts
+++ b/questions/03057-easy-push/test-cases.ts
@@ -5,3 +5,10 @@ type cases = [
Expect<Equal<Push<[1, 2], '3'>, [1, 2, '3']>>,
Expect<Equal<P... | [
"questions/03057-easy-push/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 36,620 | issue_to_patch | refactor: remove unnecessary cast | remove unnecessary cast | cba6405d3b3eeddba6d6888e12e62189e9cb1235 | 1cde857341d25ae6bc82ef92587dd6f3a3f20107 | diff --git a/scripts/readme.ts b/scripts/readme.ts
index fd24108c1..d83d06c15 100644
--- a/scripts/readme.ts
+++ b/scripts/readme.ts
@@ -91,7 +91,7 @@ function getAllTags(quizzes: Quiz[], locale: string) {
for (const quiz of quizzes) {
const info = resolveInfo(quiz, locale)
for (const tag of (info?.tags ||... | [
"scripts/readme.ts",
"scripts/translate.ts"
] | [] | true | ||
type-challenges/type-challenges | 36,619 | issue_to_patch | chore: fix typos | fix typos | 20e6abfc0c2595793e5ccc48f7c151a5c662a9d1 | 8719f2c035fed692ef6c19c66215e6e18bea4fef | diff --git a/questions/00106-medium-trimleft/README.ja.md b/questions/00106-medium-trimleft/README.ja.md
index 794496d2d..20a439813 100644
--- a/questions/00106-medium-trimleft/README.ja.md
+++ b/questions/00106-medium-trimleft/README.ja.md
@@ -5,7 +5,7 @@
例えば
```ts
-type trimed = TrimLeft<' Hello World '> // exp... | [
"questions/00106-medium-trimleft/README.ja.md",
"questions/00106-medium-trimleft/README.ko.md",
"questions/00106-medium-trimleft/README.md",
"questions/00106-medium-trimleft/README.zh-CN.md",
"questions/00108-medium-trim/README.ja.md",
"questions/00108-medium-trim/README.zh-CN.md",
"questions/00529-medi... | [] | true | ||
type-challenges/type-challenges | 36,606 | issue_to_patch | Can I remove ts-toolbelt, utility-types, and SimplyTyped from the README?
@antfu
Can I remove ts-toolbelt, utility-types, and SimplyTyped from the README?
At least, these are not being released no longer over 1 year.
- ts-toolbelt -> [last release](https://github.com/millsp/ts-toolbelt/commits/master/) is 4 years a... | docs: Update libraries written in README | resolve: https://github.com/type-challenges/type-challenges/issues/36590
and some fixes.
- Make `README.ja.md` more casual and familiar.
- Fix indentation of `README.ja.md`
- Add link to `./README.pt-BR.md` each file excluded `README.md` (this is already exists in `README.md`).
For files other than English and... | 8655d4358696a827d5bc478cd4260a7e89ec320a | 37825a720fca7acf7339bd20dc971fda7ab67eb9 | diff --git a/README.ja.md b/README.ja.md
index 1160855e2..355d8450e 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -1,31 +1,33 @@
<p align='center'>
-<img src='./screenshots/logo.svg' width='400'/>
+ <img src='./screenshots/logo.svg' width='400'/>
</p>
<p align='center'>
-TypeScript 型の課題集
+ TypeScript 型パズル集
</... | [
"README.ja.md",
"README.ko.md",
"README.md",
"README.zh-CN.md"
] | [] | true | |
type-challenges/type-challenges | 36,607 | issue_to_patch | chore(deps): bump braces from 3.0.2 to 3.0.3 | Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/micromatch/braces/commit/74b2db2938fad48a2ea54a9c8bf27a37a62c350d"><code>74b2db2</code></a> 3.0.3</li>
<li><a href="https://github.com/micromatch/braces/commit/88f1429a0f47... | 8655d4358696a827d5bc478cd4260a7e89ec320a | 421505f6d284e5d0769a803c9d60eecbbf422999 | diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e80ef7f6c..9a404ea35 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -26,7 +26,7 @@ importers:
devDependencies:
'@antfu/eslint-config':
specifier: ^2.6.0
- version: 2.6.0(@vue/compiler-sfc@3.3.13)(eslint@8.56.0)(typescript@5.3.3)
+ ... | [
"pnpm-lock.yaml"
] | [] | true | ||
type-challenges/type-challenges | 35,992 | issue_to_patch | New Challenge : MyUppercase
> Please follow the template and fill the info. A PR will be auto-generated and always reflect on your changes.
>
> Detailed solution/guide is not required, but please be sure the challenge is solvable.
## Info
Basic info of your challenge questions,
```yaml
difficulty: medium # medium /... | #35991 - MyUppercase | This is an auto-generated PR that auto reflect on #35991, please go to #35991 for discussion or making changes.
Closes #35991 | 986b79d21ab9c67ba5b3e08f710d9e077f1821a5 | 3a2648b0e6d5a21b3d0b96ecc86bae86718c03c7 | diff --git a/questions/35991-medium-myuppercase/README.md b/questions/35991-medium-myuppercase/README.md
new file mode 100644
index 000000000..9edfb31cc
--- /dev/null
+++ b/questions/35991-medium-myuppercase/README.md
@@ -0,0 +1,1 @@
+Implement `Uppercase<T>`, convert all letter to uppercase
diff --git a/questions/3599... | [
"questions/35991-medium-myuppercase/README.md",
"questions/35991-medium-myuppercase/info.yml",
"questions/35991-medium-myuppercase/template.ts",
"questions/35991-medium-myuppercase/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 36,334 | issue_to_patch | Created README.ja.md in 03062-medium-shift | Addition of Japanese translation | 811dbac9d1b4696764cc2023de233c1c30b3abe6 | c85b62407d116c53191d8fedf9a9bc9b3507f719 | diff --git a/questions/03062-medium-shift/README.ja.md b/questions/03062-medium-shift/README.ja.md
new file mode 100644
index 000000000..6ebe5b762
--- /dev/null
+++ b/questions/03062-medium-shift/README.ja.md
@@ -0,0 +1,11 @@
+<!--info-header-start--><h1>Shift <img src="https://img.shields.io/badge/-medium-d9901a" alt=... | [
"questions/03062-medium-shift/README.ja.md"
] | [] | true | ||
type-challenges/type-challenges | 36,206 | issue_to_patch | fix: Normalize JSON-related tags to `JSON` for consistency | I noticed that tags related to JSON were split into both `JSON` and `json`, so I’ve merged them under the unified `JSON` tag. As a first step, I updated the tags in the README as shown in the screenshot.
> Before

![image]... | 986b79d21ab9c67ba5b3e08f710d9e077f1821a5 | fa877d883024856b8accdf82ea22dcfc7bb02f53 | diff --git a/README.ja.md b/README.ja.md
index e8e997c18..6f08586ed 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -32,7 +32,7 @@ TypeScriptには [ts-toolbelt](https://github.com/millsp/ts-toolbelt), [utility-
> 以下のバッジをクリックすると、課題の詳細が表示されます。
<!--challenges-start-->
-<img src="https://img.shields.io/badge/%E3%81%8A%E8%... | [
"README.ja.md",
"README.ko.md",
"README.md",
"README.pt-BR.md",
"README.zh-CN.md",
"questions/06228-extreme-json-parser/README.md",
"questions/06228-extreme-json-parser/info.yml"
] | [] | true | ||
type-challenges/type-challenges | 36,008 | issue_to_patch | Added README.ja.md to 35252-medium-isalphabet | Japanese translation added. | 986b79d21ab9c67ba5b3e08f710d9e077f1821a5 | 16d09ba31c1f1c96cff6e2b4247116326bb88353 | diff --git a/questions/35252-medium-isalphabet/README.ja.md b/questions/35252-medium-isalphabet/README.ja.md
new file mode 100644
index 000000000..69c85797a
--- /dev/null
+++ b/questions/35252-medium-isalphabet/README.ja.md
@@ -0,0 +1,11 @@
+<!--info-header-start-->
+<h1>IsAlphabet <img src="https://img.shields.io/badg... | [
"questions/35252-medium-isalphabet/README.ja.md"
] | [] | true | ||
type-challenges/type-challenges | 35,909 | issue_to_patch | add a test-case with different type in PromiseAll generic | `const promiseAllTest6 = PromiseAll<Array<number | Promise<string>>>([1, 2, Promise.resolve("3")]);` | 986b79d21ab9c67ba5b3e08f710d9e077f1821a5 | 4399359c031c47dc8bcf2ffe9a638099649cb368 | diff --git a/questions/00020-medium-promise-all/test-cases.ts b/questions/00020-medium-promise-all/test-cases.ts
index 1b4c21818..daa090d07 100644
--- a/questions/00020-medium-promise-all/test-cases.ts
+++ b/questions/00020-medium-promise-all/test-cases.ts
@@ -4,10 +4,12 @@ const promiseAllTest1 = PromiseAll([1, 2, 3] ... | [
"questions/00020-medium-promise-all/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 36,043 | issue_to_patch | fix: correct tag to `template-literal` | This PR replaces `template literal` with `template-literal` for consistency and will fix the duplicate tag generation issue.
<img src="https://github.com/user-attachments/assets/3db113c7-8330-4809-bd4c-a47235c4b46c" width="400"> | 986b79d21ab9c67ba5b3e08f710d9e077f1821a5 | 53e6602d31260cb2563c750477c2380f1bf854ef | diff --git a/questions/25747-hard-isnegativenumber/info.yml b/questions/25747-hard-isnegativenumber/info.yml
index e10a7bdd9..1a6a575ee 100644
--- a/questions/25747-hard-isnegativenumber/info.yml
+++ b/questions/25747-hard-isnegativenumber/info.yml
@@ -1,6 +1,6 @@
difficulty: hard
title: IsNegativeNumber
-tags: numbe... | [
"questions/25747-hard-isnegativenumber/info.yml"
] | [] | true | ||
type-challenges/type-challenges | 34,133 | issue_to_patch | test(27133-medium-square): add test cases | I noticed that some solutions treat `100` as a special case. I think it shouldn’t be treated as such, so I added a test case with `101` . | d6ea08d3b8bec804c93f836d581bb50edf712937 | 6cb2337967711e41c26918d3e4a65f91529f45f8 | diff --git a/questions/27133-medium-square/test-cases.ts b/questions/27133-medium-square/test-cases.ts
index a76ae6268..18f10152c 100644
--- a/questions/27133-medium-square/test-cases.ts
+++ b/questions/27133-medium-square/test-cases.ts
@@ -6,10 +6,11 @@ type cases = [
Expect<Equal<Square<3>, 9>>,
Expect<Equal<S... | [
"questions/27133-medium-square/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 35,763 | issue_to_patch | feat: replace picocolors with ansis | Hello @antfu,
This PR replaces `picocolors` with a better alternative `ansis` that supports both CJS and ESM.
Ansis supports chained syntax for clean and readable code. | 0514c21cb22083f9d79581a9d727832b871b1911 | afbee4f16d693b151e96e294cc7e313bc838592d | diff --git a/package.json b/package.json
index 690568426..9938e26be 100644
--- a/package.json
+++ b/package.json
@@ -29,8 +29,8 @@
"@types/lz-string": "^1.5.0",
"@types/node": "^20.10.5",
"@types/prompts": "^2.4.9",
+ "ansis": "^3.12.0",
"eslint": "^8.56.0",
- "picocolors": "^1.0.0",
"pro... | [
"package.json",
"pnpm-lock.yaml",
"scripts/generate-play.ts"
] | [] | true | ||
type-challenges/type-challenges | 35,754 | issue_to_patch | docs(README): add japanese readme of 645 and 949 | I translated forrowing two challenges to Japanese.
- 00645-medium-diff
- 00949-medium-anyof
Please take a look this PR when you have time. | e9317f6b50c9fe28eaf54be36342159c9d9cf8f1 | 3b91d7b6082f2898c4add7c76bb257c5150cd2c3 | diff --git a/README.ja.md b/README.ja.md
index 3a2e16304..e8e997c18 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -32,7 +32,7 @@ TypeScriptには [ts-toolbelt](https://github.com/millsp/ts-toolbelt), [utility-
> 以下のバッジをクリックすると、課題の詳細が表示されます。
<!--challenges-start-->
-<img src="https://img.shields.io/badge/%E3%81%8A%E8%... | [
"README.ja.md",
"questions/00645-medium-diff/README.ja.md",
"questions/00645-medium-diff/README.ko.md",
"questions/00645-medium-diff/README.md",
"questions/00645-medium-diff/README.zh-CN.md",
"questions/00949-medium-anyof/README.ja.md",
"questions/00949-medium-anyof/README.ko.md",
"questions/00949-med... | [] | true | ||
type-challenges/type-challenges | 35,346 | issue_to_patch | docs(README): add chinese readme of 18142 | f11cbc4fd96b20b7c8728e78ef7e77375f8992e4 | 5b34bbf0db250aa46b0d76abc0f0011afd5a3894 | diff --git a/README.zh-CN.md b/README.zh-CN.md
index 2ad1f25a3..7ce4c4e0e 100644
--- a/README.zh-CN.md
+++ b/README.zh-CN.md
@@ -40,7 +40,7 @@
<br>
<!--challenges-start-->
-<img src="https://img.shields.io/badge/%E7%83%AD%E8%BA%AB-1-teal" alt="1"/><br><a href="./questions/00013-warm-hello-world/README.zh-CN.md" tar... | [
"README.zh-CN.md",
"questions/18142-medium-all/README.md",
"questions/18142-medium-all/README.zh-CN.md",
"questions/18142-medium-all/info.zh-CN.yml"
] | [] | true | |||
type-challenges/type-challenges | 35,315 | issue_to_patch | Valid Sudoku
> Please follow the template and fill the info. A PR will be auto-generated and always reflect on your changes.
>
> Detailed solution/guide is not required, but please be sure the challenge is solvable.
## Info
Check if a Sudoku solution is valid.
```yaml
difficulty: hard
title: Valid Sudoku
... | #35314 - Valid Sudoku | This is an auto-generated PR that auto reflect on #35314, please go to #35314 for discussion or making changes.
Closes #35314 | e3e90f33522bf90c6d7ecb267028d806ddf5c86a | 12da8f3340b342b388dd549d304ea3ba85e66c1d | diff --git a/questions/35314-hard-valid-sudoku/README.md b/questions/35314-hard-valid-sudoku/README.md
new file mode 100644
index 000000000..1fc94f32f
--- /dev/null
+++ b/questions/35314-hard-valid-sudoku/README.md
@@ -0,0 +1,16 @@
+Sudoku is a famous paper and pencil game. The goal of Sudoku is to fill a 9x9 grid with... | [
"questions/35314-hard-valid-sudoku/README.md",
"questions/35314-hard-valid-sudoku/info.yml",
"questions/35314-hard-valid-sudoku/template.ts",
"questions/35314-hard-valid-sudoku/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 35,273 | issue_to_patch | case(Integers Comparator): add consider decimal | Added a pattern for comparing decimals.
The policy for solving is that you can compare decimals by breaking them down before and after the decimal point. If there is a decimal point, you can look at the decimal point by recursing the Comparator only when the numbers before the decimal point are the same. | 0d821385e3315811c142c24db55bf35bed7ae966 | e16d3c2025ec7315d6e7f9e3949bace0b8d77efa | diff --git a/questions/00274-extreme-integers-comparator/test-cases.ts b/questions/00274-extreme-integers-comparator/test-cases.ts
index 176d55c7b..35ea50e61 100644
--- a/questions/00274-extreme-integers-comparator/test-cases.ts
+++ b/questions/00274-extreme-integers-comparator/test-cases.ts
@@ -33,4 +33,8 @@ type case... | [
"questions/00274-extreme-integers-comparator/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 34,858 | issue_to_patch | Defined Partial Record
## Info
```yaml
difficulty: medium
title: Defined Partial Record
# tags: union, utils, object-keys
```
## Question
<!--question-start-->
### Defined Partial Record
Using a Record with union types as keys doesn't allow you to make an object with only some of them
```ts
c... | #34857 - Defined Partial Record | This is an auto-generated PR that auto reflect on #34857, please go to #34857 for discussion or making changes.
Closes #34857 | c42690e2111d0df53003faa9acb3e937aa057cc0 | 309f85dca02e65aaf1b326c4aec40a9b3e095bd3 | diff --git a/questions/34857-medium-defined-partial-record/README.md b/questions/34857-medium-defined-partial-record/README.md
new file mode 100644
index 000000000..d67a202ba
--- /dev/null
+++ b/questions/34857-medium-defined-partial-record/README.md
@@ -0,0 +1,26 @@
+### Defined Partial Record
+
+
+Using a Record w... | [
"questions/34857-medium-defined-partial-record/README.md",
"questions/34857-medium-defined-partial-record/info.yml",
"questions/34857-medium-defined-partial-record/template.ts",
"questions/34857-medium-defined-partial-record/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 35,264 | issue_to_patch | docs(README): sudoku challenge recent links | 117ba7ebb2cc7d85a4adaa21bfa987d38cb6c164 | 34302cc3406299e6efa5479c5b76a3262519c519 | diff --git a/questions/31797-hard-sudoku/README.md b/questions/31797-hard-sudoku/README.md
index 009332786..ef74ba2bd 100644
--- a/questions/31797-hard-sudoku/README.md
+++ b/questions/31797-hard-sudoku/README.md
@@ -1,6 +1,6 @@
<!--info-header-start--><h1>Sudoku <img src="https://img.shields.io/badge/-hard-de3d37" al... | [
"questions/31797-hard-sudoku/README.md"
] | [] | true | |||
type-challenges/type-challenges | 35,263 | issue_to_patch | case(ValidDate): add consider Feb,Apr,Jun,Sep,Nov Last Date | add Test Case to [ValidDate](https://github.com/type-challenges/type-challenges/blob/main/questions/09155-hard-validdate/README.md)
Apr,Jun,Sep,Nov Last Date is 30.
However, this consideration is not in the test case, so it was added. | 5a9276242bac362dd0f31103de432e2e390d2670 | 1f491985a3b40fc23e5ba9dd1e35a1646c46af77 | diff --git a/questions/09155-hard-validdate/test-cases.ts b/questions/09155-hard-validdate/test-cases.ts
index 8e8db9c09..db18a96c4 100644
--- a/questions/09155-hard-validdate/test-cases.ts
+++ b/questions/09155-hard-validdate/test-cases.ts
@@ -9,6 +9,7 @@ type cases = [
Expect<Equal<ValidDate<'0132'>, false>>,
... | [
"questions/09155-hard-validdate/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 35,253 | issue_to_patch | New Challenge : IsAlphabet
> Please follow the template and fill the info. A PR will be auto-generated and always reflect on your changes.
>
> Detailed solution/guide is not required, but please be sure the challenge is solvable.
## Info
Basic info of your challenge questions,
```yaml
difficulty: medium # ... | #35252 - IsAlphabet | This is an auto-generated PR that auto reflect on #35252, please go to #35252 for discussion or making changes.
Closes #35252 | 086d4aafc0086f81862500e8084e9b9e585f9bb1 | d4adba19154bb1936ed63aeb893d11d155aa1c21 | diff --git a/questions/35252-medium-isalphabet/README.md b/questions/35252-medium-isalphabet/README.md
new file mode 100644
index 000000000..dfd79f453
--- /dev/null
+++ b/questions/35252-medium-isalphabet/README.md
@@ -0,0 +1,1 @@
+Determine if the given letter is an alphabet.
diff --git a/questions/35252-medium-isalph... | [
"questions/35252-medium-isalphabet/README.md",
"questions/35252-medium-isalphabet/info.yml",
"questions/35252-medium-isalphabet/template.ts",
"questions/35252-medium-isalphabet/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 35,046 | issue_to_patch | Longest Common Prefix
## Info
```yaml
difficulty: medium
title: Longest Common Prefix
# tags: array, string, template-literal
```
## Question
<!--question-start-->
### Longest Common Prefix
Write a type, `LongestCommonPrefix` that returns the longest common prefix string amongst a tuple of strings.
... | #35045 - Longest Common Prefix | This is an auto-generated PR that auto reflect on #35045, please go to #35045 for discussion or making changes.
Closes #35045 | 4882cbdc38f523784e09c628431b5935e804b582 | c775af97994a4938322e187fe9a5f3eae2f6d8f1 | diff --git a/questions/35045-medium-longest-common-prefix/README.md b/questions/35045-medium-longest-common-prefix/README.md
new file mode 100644
index 000000000..009d9caf8
--- /dev/null
+++ b/questions/35045-medium-longest-common-prefix/README.md
@@ -0,0 +1,14 @@
+### Longest Common Prefix
+
+Write a type, `LongestC... | [
"questions/35045-medium-longest-common-prefix/README.md",
"questions/35045-medium-longest-common-prefix/info.yml",
"questions/35045-medium-longest-common-prefix/template.ts",
"questions/35045-medium-longest-common-prefix/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 35,192 | issue_to_patch | New Challenge : trace
> テンプレートに従って内容を記入してください。PRは自動生成され、常にあなたの変更が反映されます。
>
> 詳細な解答/ガイドは必要ありませんが、課題が解決可能であることを確認してください。
## 基本情報
```yaml
# 難易度
difficulty: medium # easy / hard / extreme
# タイトル
title: Trace
# タグ
# tags: array,math # separate by comma
```
## 質問
<!--question-start-->
行列において、トレース... | #35191 - Trace | This is an auto-generated PR that auto reflect on #35191, please go to #35191 for discussion or making changes.
Closes #35191 | dab501c4665ce420cc7b3391f0602f8b7e055ef6 | cb3823283420cdd03b0cc71ad881c87012d70257 | diff --git a/questions/35191-medium-trace/README.ja.md b/questions/35191-medium-trace/README.ja.md
new file mode 100644
index 000000000..ea93408e7
--- /dev/null
+++ b/questions/35191-medium-trace/README.ja.md
@@ -0,0 +1,12 @@
+行列において、トレースは主対角成分の総和です。
+それを型システムを使って求めたいです。
+しかし、型で数を足すのは難しいため、代わりに主対角成分のユニオン型を求めてください。
+... | [
"questions/35191-medium-trace/README.ja.md",
"questions/35191-medium-trace/info.ja.yml",
"questions/35191-medium-trace/template.ts",
"questions/35191-medium-trace/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 35,204 | issue_to_patch | Fix typo on challenge 00189-easy-awaited | dab501c4665ce420cc7b3391f0602f8b7e055ef6 | 431a6c870d5806b64e134f2a524471f414e1248b | diff --git a/questions/00189-easy-awaited/README.md b/questions/00189-easy-awaited/README.md
index d2621e365..8779245a6 100644
--- a/questions/00189-easy-awaited/README.md
+++ b/questions/00189-easy-awaited/README.md
@@ -1,6 +1,6 @@
<!--info-header-start--><h1>Awaited <img src="https://img.shields.io/badge/-easy-7aad0... | [
"questions/00189-easy-awaited/README.md"
] | [] | true | |||
type-challenges/type-challenges | 35,225 | issue_to_patch | case(IsOdd): add 3e0 case | add Test Case to [IsOdd](https://github.com/type-challenges/type-challenges/blob/main/questions/30301-medium-isodd/README.md)
There is already a test case for `3e23`, which is always even because it represents 3×10^23.
However, in the case of `3e0`, it equals 3×10^0=3×1=3, which is odd.
In other words, when the ... | dab501c4665ce420cc7b3391f0602f8b7e055ef6 | 9785598a55d8f6531d59f1d1a69476a6e4617b7a | diff --git a/questions/30301-medium-isodd/test-cases.ts b/questions/30301-medium-isodd/test-cases.ts
index 6ac273bfa..691ee92d5 100644
--- a/questions/30301-medium-isodd/test-cases.ts
+++ b/questions/30301-medium-isodd/test-cases.ts
@@ -7,5 +7,6 @@ type cases = [
Expect<Equal<IsOdd<1926>, false>>,
Expect<Equal<I... | [
"questions/30301-medium-isodd/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 35,128 | issue_to_patch | case(#02257):remove zero case | in this challenge (#02257).
the describe is
> Given a number (always positive) as a type. Your type should return the number decreased by one.
so it should be a number more then zero.
but in cases `Equal<MinusOne<0>, -1>` happened .
i think should remove it.
| 4882cbdc38f523784e09c628431b5935e804b582 | a2edc583c1688c82c4e1eabbc9bd4d8383b911e1 | diff --git a/questions/02257-medium-minusone/test-cases.ts b/questions/02257-medium-minusone/test-cases.ts
index 6d34beaad..0945e1afa 100644
--- a/questions/02257-medium-minusone/test-cases.ts
+++ b/questions/02257-medium-minusone/test-cases.ts
@@ -6,6 +6,5 @@ type cases = [
Expect<Equal<MinusOne<3>, 2>>,
Expect<... | [
"questions/02257-medium-minusone/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 35,163 | issue_to_patch | chore: add Star History section to README | 4882cbdc38f523784e09c628431b5935e804b582 | beb02ee0eee9229a95d6cf7b0315586e202a18d2 | diff --git a/README.md b/README.md
index b644102ca..e46b157b7 100644
--- a/README.md
+++ b/README.md
@@ -148,6 +148,14 @@ This project was born from solving real-world types problem with [@hardfist](htt

+## [Star History](https://git... | [
"README.md"
] | [] | true | |||
type-challenges/type-challenges | 33,764 | issue_to_patch | Union to Object from key
> Please follow the template and fill the info. A PR will be auto-generated and always reflect on your changes.
>
> Detailed solution/guide is not required, but please be sure the challenge is solvable.
## Info
Union to Object from key
```yaml
difficulty: hard # medium / hard / ext... | #33763 - Union to Object from key | This is an auto-generated PR that auto reflect on #33763, please go to #33763 for discussion or making changes.
Closes #33763 | c42690e2111d0df53003faa9acb3e937aa057cc0 | 7cb672625cd998077bf987f64f8c2aa85571ed50 | diff --git a/questions/33763-hard-union-to-object-from-key/README.md b/questions/33763-hard-union-to-object-from-key/README.md
new file mode 100644
index 000000000..dd31b7e43
--- /dev/null
+++ b/questions/33763-hard-union-to-object-from-key/README.md
@@ -0,0 +1,1 @@
+Find the object containing the key in the union type... | [
"questions/33763-hard-union-to-object-from-key/README.md",
"questions/33763-hard-union-to-object-from-key/info.yml",
"questions/33763-hard-union-to-object-from-key/template.ts",
"questions/33763-hard-union-to-object-from-key/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 34,603 | issue_to_patch | fix: fix length of string 3 tests | The `Gened` type in the "Length of String 3" test cases produces the following error:

This PR fixes it by inferring the digits from the input recursively instead of doing it all at once. | 2a97d7fed25c5d6e554ec9090cd0421d8c197543 | deadb39349bf6037866f8ef820eb11891433467a | diff --git a/questions/31824-hard-length-of-string-3/test-cases.ts b/questions/31824-hard-length-of-string-3/test-cases.ts
index c374b1c3d..9640bdd64 100644
--- a/questions/31824-hard-length-of-string-3/test-cases.ts
+++ b/questions/31824-hard-length-of-string-3/test-cases.ts
@@ -18,15 +18,21 @@ type t3 = Reped<t2, 10>... | [
"questions/31824-hard-length-of-string-3/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 34,337 | issue_to_patch | Update info.yml | add related questions | 5a705fc9a5781a03140578a30af049d78a2a7026 | 632173baa2819c6aa56d19a6b7eeb4139772df35 | diff --git a/questions/34286-hard-take-elements/info.yml b/questions/34286-hard-take-elements/info.yml
index 305cb78b2..1fef24274 100644
--- a/questions/34286-hard-take-elements/info.yml
+++ b/questions/34286-hard-take-elements/info.yml
@@ -5,3 +5,4 @@ author:
github: Eirmas
name: Eirik Måseidvåg
+related: 216
| [
"questions/34286-hard-take-elements/info.yml"
] | [] | true | ||
type-challenges/type-challenges | 34,287 | issue_to_patch | Take Elements
## Info
```yaml
difficulty: hard
title: Take Elements
tags: array
```
## Question
<!--question-start-->
Implement a type `Take<N, Arr>` that returns the first `N` elements from an array `Arr`. If `N` is negative, return the last `|N|` elements
For example,
```ts
type T0 = Take<2, [1, 2... | #34286 - Take Elements | This is an auto-generated PR that auto reflect on #34286, please go to #34286 for discussion or making changes.
Closes #34286 | 6681d2bcb3f442f13e02a904021b4a1be4f643c2 | 52860f3b4def80c79f1ee45118f82e7c89933694 | diff --git a/questions/34286-hard-take-elements/README.md b/questions/34286-hard-take-elements/README.md
new file mode 100644
index 000000000..61d9e514e
--- /dev/null
+++ b/questions/34286-hard-take-elements/README.md
@@ -0,0 +1,11 @@
+Implement a type `Take<N, Arr>` that returns the first `N` elements from an array `A... | [
"questions/34286-hard-take-elements/README.md",
"questions/34286-hard-take-elements/info.yml",
"questions/34286-hard-take-elements/template.ts",
"questions/34286-hard-take-elements/test-cases.ts"
] | [] | true | |
type-challenges/type-challenges | 34,140 | issue_to_patch | test(27958-medium-checkrepeatedtuple): add test cases | Add some test cases. | d6ea08d3b8bec804c93f836d581bb50edf712937 | 5e9e128397052c0e404a894bb47d729c7d308051 | diff --git a/questions/27958-medium-checkrepeatedtuple/test-cases.ts b/questions/27958-medium-checkrepeatedtuple/test-cases.ts
index 0c0659159..b0d262996 100644
--- a/questions/27958-medium-checkrepeatedtuple/test-cases.ts
+++ b/questions/27958-medium-checkrepeatedtuple/test-cases.ts
@@ -1,5 +1,5 @@
import type { Equa... | [
"questions/27958-medium-checkrepeatedtuple/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 34,309 | issue_to_patch | test: add some test cases to 8989 | add some test cases to 8989
```ts
Expect<Equal<FindEles<[1, 2, number]>, [1, 2, number]>>
Expect<Equal<FindEles<[1, 2, number, number]>, [1, 2]>>
``` | 6681d2bcb3f442f13e02a904021b4a1be4f643c2 | c52d163e508437b0a81f3bb500bec01f1a323f7d | diff --git a/questions/09898-medium-zhao-chu-mu-biao-shu-zu-zhong-zhi-chu-xian-guo-yi-ci-de-yuan-su/test-cases.ts b/questions/09898-medium-zhao-chu-mu-biao-shu-zu-zhong-zhi-chu-xian-guo-yi-ci-de-yuan-su/test-cases.ts
index e7c74c110..ae2792e89 100644
--- a/questions/09898-medium-zhao-chu-mu-biao-shu-zu-zhong-zhi-chu-xi... | [
"questions/09898-medium-zhao-chu-mu-biao-shu-zu-zhong-zhi-chu-xian-guo-yi-ci-de-yuan-su/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 34,219 | issue_to_patch | test: add empty array case in 00015 | The last element of the empty array is never.
```
Expect<Equal<Last<[]>, never>>
``` | d6ea08d3b8bec804c93f836d581bb50edf712937 | ce546456f6a831b9038aa9f27746746b9ac310e2 | diff --git a/questions/00015-medium-last/test-cases.ts b/questions/00015-medium-last/test-cases.ts
index a13a8552c..5d5761d83 100644
--- a/questions/00015-medium-last/test-cases.ts
+++ b/questions/00015-medium-last/test-cases.ts
@@ -1,6 +1,7 @@
import type { Equal, Expect } from '@type-challenges/utils'
type cases ... | [
"questions/00015-medium-last/test-cases.ts"
] | [] | true | ||
type-challenges/type-challenges | 34,008 | issue_to_patch | Compare Array Length
> Please follow the template and fill the info. A PR will be auto-generated and always reflect on your changes.
>
> Detailed solution/guide is not required, but please be sure the challenge is solvable.
## Info
Basic info of your challenge questions,
```yaml
difficulty: medium
title: ... | #34007 - Compare Array Length | This is an auto-generated PR that auto reflect on #34007, please go to #34007 for discussion or making changes.
Closes #34007 | 9080836b5923f1716815e643342195d23b6a1617 | e495646c138c4851f2576c9bca0bb8437bfcadc4 | diff --git a/questions/34007-medium-compare-array-length/README.md b/questions/34007-medium-compare-array-length/README.md
new file mode 100644
index 000000000..76b141e70
--- /dev/null
+++ b/questions/34007-medium-compare-array-length/README.md
@@ -0,0 +1,5 @@
+Implement `CompareArrayLength` to compare two array length... | [
"questions/34007-medium-compare-array-length/README.md",
"questions/34007-medium-compare-array-length/info.yml",
"questions/34007-medium-compare-array-length/template.ts",
"questions/34007-medium-compare-array-length/test-cases.ts"
] | [] | true | |
typelevel/cats-effect | 4,592 | issue_to_patch | `@implicitNotFound` on `Ticker` says to use `ticked` but it's not part of the testkit | Fix `Ticker` @implicitNotFound message to reference testkit-available API | Closes #1875.
The `@implicitNotFound` message on `Ticker` in `testkit/shared/src/main/scala/cats/effect/testkit/TestInstances.scala` told users to `use \`in ticked { implicit ticker =>\``. But `ticked` is defined only in `tests/shared/src/test/scala/cats/effect/Runners.scala` (and, for property-based variants, in `tes... | d085024e6c5fb1d319908471d8c3899d4569356b | 328d694fb81299b7a630f6a0af0cf95b7b54760e | diff --git a/testkit/shared/src/main/scala/cats/effect/testkit/TestInstances.scala b/testkit/shared/src/main/scala/cats/effect/testkit/TestInstances.scala
index e85a143a3e..b481871fc1 100644
--- a/testkit/shared/src/main/scala/cats/effect/testkit/TestInstances.scala
+++ b/testkit/shared/src/main/scala/cats/effect/testk... | [
"testkit/shared/src/main/scala/cats/effect/testkit/TestInstances.scala"
] | [] | true | |
typelevel/cats-effect | 4,610 | issue_to_patch | Bump versions/3.x from `504db0c` to `6b91d3a` | Bumps [versions/3.x](https://github.com/typelevel/cats-effect) from `504db0c` to `6b91d3a`.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/typelevel/cats-effect/commit/6b91d3a60fc82276cb37fd86a50a3651c7f50f6f"><code>6b91d3a</code></a> Merge pull request <a href="https://redirect.github.com/ty... | 8851bccde1d16d19849cfd44912faf022ac7972b | 58e77eac7c27f8ce954f84028040c3a9f7f348a9 | diff --git a/versions/3.x b/versions/3.x
index 504db0c841..6b91d3a60f 160000
--- a/versions/3.x
+++ b/versions/3.x
@@ -1,1 +1,1 @@
-Subproject commit 504db0c841a1c2b824ae91359bd4d857b4b96432
+Subproject commit 6b91d3a60fc82276cb37fd86a50a3651c7f50f6f
| [
"versions/3.x"
] | [] | true | ||
typelevel/cats-effect | 4,609 | issue_to_patch | Bump versions/3.x from `d085024` to `504db0c` | Bumps [versions/3.x](https://github.com/typelevel/cats-effect) from `d085024` to `504db0c`.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/typelevel/cats-effect/commit/504db0c841a1c2b824ae91359bd4d857b4b96432"><code>504db0c</code></a> Merge pull request <a href="https://redirect.github.com/ty... | e30244800b3fbd945ce40637a319486c0eadcfc0 | 48dcb8f5f0295be2491c5a97ceb2427ec6904c22 | diff --git a/versions/3.x b/versions/3.x
index d085024e6c..504db0c841 160000
--- a/versions/3.x
+++ b/versions/3.x
@@ -1,1 +1,1 @@
-Subproject commit d085024e6c5fb1d319908471d8c3899d4569356b
+Subproject commit 504db0c841a1c2b824ae91359bd4d857b4b96432
| [
"versions/3.x"
] | [] | true | ||
typelevel/cats-effect | 4,569 | issue_to_patch | Workaround #4524 by synchronizing tasks set | Fixes https://github.com/typelevel/cats-effect/issues/4524. | d085024e6c5fb1d319908471d8c3899d4569356b | 7fcf2b8209d804377c9ad002d38189155f4c42f8 | diff --git a/kernel-testkit/shared/src/main/scala/cats/effect/kernel/testkit/TestContext.scala b/kernel-testkit/shared/src/main/scala/cats/effect/kernel/testkit/TestContext.scala
index c4857fceb7..d1926afc6e 100644
--- a/kernel-testkit/shared/src/main/scala/cats/effect/kernel/testkit/TestContext.scala
+++ b/kernel-test... | [
"kernel-testkit/shared/src/main/scala/cats/effect/kernel/testkit/TestContext.scala"
] | [
{
"comment": "To comply with our no-source-breaking-patches versioning scheme, we may want to hold off the deprecation until 3.8.",
"path": "kernel-testkit/shared/src/main/scala/cats/effect/kernel/testkit/TestContext.scala",
"hunk": "@@ -280,13 +280,21 @@ object TestContext {\n def apply(seed: String)... | true | ||
typelevel/cats-effect | 4,599 | issue_to_patch | Optimize Parallel instance in GenSpawnInstances to avoid allocation. | ### Motivation
Currently in `GenSpawnInstances`, the `Parallel` instance provides `.parallel` and `.sequential` as `def`s that instantiate a `new (M ~> F)` and `new (F ~> M)` on every invocation.
Because operations like `cats.Parallel.parTraverse` invoke `P.parallel(ma)` and `P.sequential(ma)` for *every item in t... | e81d9f007c64911cbe02e91317595f05de67304f | 496f744384ab67b9e3b1687a49c3ff484c02cf20 | diff --git a/kernel/shared/src/main/scala/cats/effect/kernel/instances/GenSpawnInstances.scala b/kernel/shared/src/main/scala/cats/effect/kernel/instances/GenSpawnInstances.scala
index 8ba75440c3..a19bf9e65b 100644
--- a/kernel/shared/src/main/scala/cats/effect/kernel/instances/GenSpawnInstances.scala
+++ b/kernel/shar... | [
"kernel/shared/src/main/scala/cats/effect/kernel/instances/GenSpawnInstances.scala"
] | [] | true | ||
typelevel/cats-effect | 4,606 | issue_to_patch | Remove Cirrus CI specific build instructions | see: #4590 | 424bfadf87c68c662659264dee0e18998ed84ed3 | 61ce97f259cea758c7f3b92d9da9bffbb4f0ea5d | diff --git a/.cirrus.yml b/.cirrus.yml
deleted file mode 100644
index 96800de902..0000000000
--- a/.cirrus.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-jvm_highcore_task:
- only_if: $CIRRUS_TAG != '' || $CIRRUS_PR != ''
- required_pr_labels: Cirrus JVM
- container:
- image: sbtscala/scala-sbt:eclipse-temurin-jammy-17.0.5_... | [
".cirrus.yml",
".cirrus/Dockerfile",
".github/dependabot.yml",
".github/workflows/ci.yml",
"build.sbt"
] | [] | true | ||
typelevel/cats-effect | 4,246 | issue_to_patch | Revert documentation format changes | Scalafmt 3.8.4 introduced some formatting bugs that are reverted with this pull request.
Issue in Scalafmt:
- https://github.com/scalameta/scalafmt/issues/4716
Bad formatting got merged to cats-effect in:
- https://github.com/typelevel/cats-effect/pull/4235 | cb3c29baf165c971815367d9119fdfac2b89e98d | 02753610767e32eb290032197d4f8264df390f79 | diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index 80ec8bee5b..425a777cf7 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -9,3 +9,6 @@ db6c201aad98cc3d19f67cc688dfa6332e2fb939
# Scala Steward: Reformat with scalafmt 3.8.4
97565e196071ba28bac911411b9c18bd0e6526e8
+
+# Revert docum... | [
".git-blame-ignore-revs",
"core/js/src/main/scala/cats/effect/IOApp.scala",
"core/jvm/src/main/scala/cats/effect/IOApp.scala",
"core/jvm/src/main/scala/cats/effect/IOPlatform.scala",
"core/jvm/src/main/scala/cats/effect/unsafe/FiberMonitor.scala",
"core/jvm/src/main/scala/cats/effect/unsafe/TimerHeap.scal... | [
{
"comment": "```suggestion\r\nba11dfe5b6ab7c9f45521dde7c110212629ac50f\r\n\r\n```",
"path": ".git-blame-ignore-revs",
"hunk": "@@ -9,3 +9,6 @@ db6c201aad98cc3d19f67cc688dfa6332e2fb939\n \n # Scala Steward: Reformat with scalafmt 3.8.4\n 97565e196071ba28bac911411b9c18bd0e6526e8\n+\n+# Revert documentati... | true | ||
typelevel/cats-effect | 4,246 | comment_to_fix | Revert documentation format changes | ```suggestion
ba11dfe5b6ab7c9f45521dde7c110212629ac50f
``` | cb3c29baf165c971815367d9119fdfac2b89e98d | 02753610767e32eb290032197d4f8264df390f79 | diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index 80ec8bee5b..425a777cf7 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -9,3 +9,6 @@ db6c201aad98cc3d19f67cc688dfa6332e2fb939
# Scala Steward: Reformat with scalafmt 3.8.4
97565e196071ba28bac911411b9c18bd0e6526e8
+
+# Revert docum... | [
".git-blame-ignore-revs"
] | [
{
"comment": "```suggestion\r\nba11dfe5b6ab7c9f45521dde7c110212629ac50f\r\n\r\n```",
"path": ".git-blame-ignore-revs",
"hunk": "@@ -9,3 +9,6 @@ db6c201aad98cc3d19f67cc688dfa6332e2fb939\n \n # Scala Steward: Reformat with scalafmt 3.8.4\n 97565e196071ba28bac911411b9c18bd0e6526e8\n+\n+# Revert documentati... | true | ||
typelevel/cats-effect | 4,598 | issue_to_patch | Optimize `liftOutcome` in `KleisliGenSpawn` to avoid allocation | Calling `bothOutcome` or `racePair` on a `Kleisli` evaluates `liftOutcome`,
which currently instantiates a new `FunctionK` and routes it through `mapK`.
This commit replaces the `mapK` invocation with a direct pattern match
on the `Outcome`. This optimization:
1. Eliminates the `FunctionK` allocation on every i... | 486d9a849d6706256864f06d7497a585f443b075 | 62c126eb1a754708aaa4aa276490e9581e9dfa11 | diff --git a/kernel/shared/src/main/scala/cats/effect/kernel/GenSpawn.scala b/kernel/shared/src/main/scala/cats/effect/kernel/GenSpawn.scala
index e77b284004..bfbdb55687 100644
--- a/kernel/shared/src/main/scala/cats/effect/kernel/GenSpawn.scala
+++ b/kernel/shared/src/main/scala/cats/effect/kernel/GenSpawn.scala
@@ -1... | [
"kernel/shared/src/main/scala/cats/effect/kernel/GenSpawn.scala"
] | [] | true | ||
typelevel/cats-effect | 4,601 | issue_to_patch | Remove unnecessary String interpolation from function showUnknown(). | Remove unnecessary String interpolation from function showUnknown().
Also rename local variable to what it really is (an error), to make this use consistent with the rest of file.
| 486d9a849d6706256864f06d7497a585f443b075 | cfcf921ce0ca3c16f073ed7d2a290682ed7a96be | diff --git a/kernel/shared/src/main/scala/cats/effect/kernel/Outcome.scala b/kernel/shared/src/main/scala/cats/effect/kernel/Outcome.scala
index 83815c30fe..7761725eae 100644
--- a/kernel/shared/src/main/scala/cats/effect/kernel/Outcome.scala
+++ b/kernel/shared/src/main/scala/cats/effect/kernel/Outcome.scala
@@ -127,8... | [
"kernel/shared/src/main/scala/cats/effect/kernel/Outcome.scala"
] | [] | true | ||
typelevel/cats-effect | 4,589 | issue_to_patch | Avoid allocations when calling Resource.liftK | Create a cached version of liftK so avoid allocations when method Resource.liftK is called. This is using the usual trick (relying on erasure).
This is a minor optimization (every little helps), but feel free to close the PR if you don't feel it's worth it.
| 505471ac040b7d357de624b85781aefecb24e98f | c2b358b33fd60b921518fdd1bca22c17f5611a41 | diff --git a/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala b/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala
index b0614eda9f..90f3fdc64e 100644
--- a/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala
+++ b/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala
@@ -9... | [
"kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala"
] | [
{
"comment": "Not essential, but this could be `private[this]`.",
"path": "kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala",
"hunk": "@@ -993,13 +993,16 @@ object Resource extends ResourceFOInstances0 with ResourceHOInstances0 with Reso\n def onFinalizeCase[F[_]: Applicative](release: E... | true | ||
typelevel/cats-effect | 4,589 | comment_to_fix | Avoid allocations when calling Resource.liftK | Not essential, but this could be `private[this]`. | 505471ac040b7d357de624b85781aefecb24e98f | c2b358b33fd60b921518fdd1bca22c17f5611a41 | diff --git a/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala b/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala
index b0614eda9f..90f3fdc64e 100644
--- a/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala
+++ b/kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala
@@ -9... | [
"kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala"
] | [
{
"comment": "Not essential, but this could be `private[this]`.",
"path": "kernel/shared/src/main/scala/cats/effect/kernel/Resource.scala",
"hunk": "@@ -993,13 +993,16 @@ object Resource extends ResourceFOInstances0 with ResourceHOInstances0 with Reso\n def onFinalizeCase[F[_]: Applicative](release: E... | true | ||
typelevel/cats-effect | 4,264 | issue_to_patch | Transfer tick state when replacing a blocked thread | 67661775caf68ecc3f725190d5d7023bb6f21b1c | 3ce8193fc4dd77020761248a933df81b1ff79d7b | diff --git a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala b/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala
index 3ebc6f3df2..7585e60113 100644
--- a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala
+++ b/core/jvm/src/main/scala/cats/effect/unsaf... | [
"core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala",
"core/jvm/src/main/scala/cats/effect/unsafe/WorkerThread.scala",
"tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala"
] | [
{
"comment": "Is `TransferState` mutable just to avoid always allocating a new instance? Or am I missing something?\r\n\r\n(Also, a possibly stupid idea: we could pack the 2 `Int`s into one `Long`... I think that way the `transferState` field could be avoided. But also, that would cause `java.lang.Long` object ... | diff --git a/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala b/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala
index 64ed2d07c3..3f24425b02 100644
--- a/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala
+++ b/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecifica... | true | ||
typelevel/cats-effect | 4,267 | issue_to_patch | Add NonEmptyHotswap | Also corrects the site docs for `Hotswap` so it conforms to the `Hotswap` API
Addresses #4268 | 5dd3af9ae722be012b50147e1216886001d7c0b9 | 9a32ef0a3e2dbd407a9e2183c61efed76ff9637e | diff --git a/docs/std/hotswap.md b/docs/std/hotswap.md
index 57ef66923f..16a859489f 100644
--- a/docs/std/hotswap.md
+++ b/docs/std/hotswap.md
@@ -10,35 +10,33 @@ Constructing a new [`Resource`](./resource.md) inside the body of a
until after the inner resource is released. Consider for example writing a
logger that ... | [
"docs/std/hotswap.md",
"std/shared/src/main/scala/cats/effect/std/Hotswap.scala",
"std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala",
"tests/shared/src/test/scala/cats/effect/std/HotswapSuite.scala",
"tests/shared/src/test/scala/cats/effect/std/NonEmptyHotswapSuite.scala"
] | [
{
"comment": "```suggestion\r\n state.flatModify {\r\n case Acquired(_, fin) =>\r\n next -> fin\r\n case Finalized =>\r\n val fin = next match {\r\n case Acquired(_, fin) => fin\r\n case _ => F.unit\r\n ... | diff --git a/tests/shared/src/test/scala/cats/effect/std/HotswapSuite.scala b/tests/shared/src/test/scala/cats/effect/std/HotswapSuite.scala
index 9da4563d5c..70c96098f7 100644
--- a/tests/shared/src/test/scala/cats/effect/std/HotswapSuite.scala
+++ b/tests/shared/src/test/scala/cats/effect/std/HotswapSuite.scala
@@ -2... | true | |
typelevel/cats-effect | 4,267 | comment_to_fix | Add NonEmptyHotswap | ```suggestion
state.flatModify {
case Acquired(_, fin) =>
next -> fin
case Finalized =>
val fin = next match {
case Acquired(_, fin) => fin
case _ => F.unit
}
Finalized ->... | 5dd3af9ae722be012b50147e1216886001d7c0b9 | 9a32ef0a3e2dbd407a9e2183c61efed76ff9637e | diff --git a/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala b/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala
new file mode 100644
index 0000000000..9430e7e76e
--- /dev/null
+++ b/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2020-20... | [
"std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala"
] | [
{
"comment": "```suggestion\r\n state.flatModify {\r\n case Acquired(_, fin) =>\r\n next -> fin\r\n case Finalized =>\r\n val fin = next match {\r\n case Acquired(_, fin) => fin\r\n case _ => F.unit\r\n ... | true | ||
typelevel/cats-effect | 4,267 | comment_to_fix | Add NonEmptyHotswap | Instead of duplicating the implementation, we should either implement one in terms of the other ... I believe either direction should be possible. | 5dd3af9ae722be012b50147e1216886001d7c0b9 | 9a32ef0a3e2dbd407a9e2183c61efed76ff9637e | diff --git a/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala b/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala
new file mode 100644
index 0000000000..9430e7e76e
--- /dev/null
+++ b/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2020-20... | [
"std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala"
] | [
{
"comment": "Instead of duplicating the implementation, we should either implement one in terms of the other ... I believe either direction should be possible.",
"path": "std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala",
"hunk": "@@ -0,0 +1,153 @@\n+/*\n+ * Copyright 2020-2024 Typelevel... | true | ||
typelevel/cats-effect | 4,267 | comment_to_fix | Add NonEmptyHotswap | This signature is actually unsafe, because you should never return `R` without acquiring the semaphore lock. See https://github.com/typelevel/cats-effect/pull/3480#discussion_r1125594833.
It must be either:
```suggestion
def swap(next: Resource[F, R]): F[Unit]
```
or:
```suggestion
def swap(next: Resourc... | 5dd3af9ae722be012b50147e1216886001d7c0b9 | 9a32ef0a3e2dbd407a9e2183c61efed76ff9637e | diff --git a/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala b/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala
new file mode 100644
index 0000000000..9430e7e76e
--- /dev/null
+++ b/std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2020-20... | [
"std/shared/src/main/scala/cats/effect/std/NonEmptyHotswap.scala"
] | [
{
"comment": "This signature is actually unsafe, because you should never return `R` without acquiring the semaphore lock. See https://github.com/typelevel/cats-effect/pull/3480#discussion_r1125594833.\r\n\r\nIt must be either:\r\n\r\n```suggestion\r\n def swap(next: Resource[F, R]): F[Unit]\r\n```\r\nor:\r\n`... | true | ||
typelevel/cats-effect | 4,267 | comment_to_fix | Add NonEmptyHotswap | We don't need to rollback this commit, we just need to reuse some ideas from the old implementation. Something like this:
```scala
override def get: Resource[F, Option[R]] =
Resource[F, Option[R]] { poll =>
poll(nes.get.allocated).flatMap {
case (Some(r), fin) => F.pure((Some(r), fin))
... | 5dd3af9ae722be012b50147e1216886001d7c0b9 | 9a32ef0a3e2dbd407a9e2183c61efed76ff9637e | diff --git a/std/shared/src/main/scala/cats/effect/std/Hotswap.scala b/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
index 581495e0ff..37f7755447 100644
--- a/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
+++ b/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
@@ -16,8 +16,7 @@
package cats... | [
"std/shared/src/main/scala/cats/effect/std/Hotswap.scala"
] | [
{
"comment": "We don't need to rollback this commit, we just need to reuse some ideas from the old implementation. Something like this:\r\n```scala\r\n override def get: Resource[F, Option[R]] =\r\n Resource[F, Option[R]] { poll =>\r\n poll(nes.get.allocated).flatMap {\r\n case (Some(r), fin) =>... | true | ||
typelevel/cats-effect | 4,267 | comment_to_fix | Add NonEmptyHotswap | This will land in 3.7.0, since we only introduce new APIs in minors (and reserve patch versions for bug fixes only).
```suggestion
@deprecated("Use Hotswap2", "3.7.0")
``` | 5dd3af9ae722be012b50147e1216886001d7c0b9 | 9a32ef0a3e2dbd407a9e2183c61efed76ff9637e | diff --git a/std/shared/src/main/scala/cats/effect/std/Hotswap.scala b/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
index 581495e0ff..37f7755447 100644
--- a/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
+++ b/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
@@ -16,8 +16,7 @@
package cats... | [
"std/shared/src/main/scala/cats/effect/std/Hotswap.scala"
] | [
{
"comment": "This will land in 3.7.0, since we only introduce new APIs in minors (and reserve patch versions for bug fixes only).\r\n\r\n```suggestion\r\n@deprecated(\"Use Hotswap2\", \"3.7.0\")\r\n```",
"path": "std/shared/src/main/scala/cats/effect/std/Hotswap.scala",
"hunk": "@@ -51,6 +50,7 @@ impor... | true | ||
typelevel/cats-effect | 4,267 | comment_to_fix | Add NonEmptyHotswap | the deprecation annotation still refer to **Hotswap2** | 5dd3af9ae722be012b50147e1216886001d7c0b9 | 9a32ef0a3e2dbd407a9e2183c61efed76ff9637e | diff --git a/std/shared/src/main/scala/cats/effect/std/Hotswap.scala b/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
index 581495e0ff..37f7755447 100644
--- a/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
+++ b/std/shared/src/main/scala/cats/effect/std/Hotswap.scala
@@ -16,8 +16,7 @@
package cats... | [
"std/shared/src/main/scala/cats/effect/std/Hotswap.scala"
] | [
{
"comment": "the deprecation annotation still refer to **Hotswap2**",
"path": "std/shared/src/main/scala/cats/effect/std/Hotswap.scala",
"hunk": "@@ -51,6 +50,7 @@ import cats.syntax.all._\n *\n * Ported from https://github.com/typelevel/fs2.\n */\n+@deprecated(\"Use Hotswap2\", \"3.7.0\")",
"re... | true | ||
typelevel/cats-effect | 4,270 | issue_to_patch | Poll on the 0th tick, check external queue on 32nd | Refactors the worker thread runloop so that I/O polling and external queue polling are no longer part of the same tick, and instead occur at opposite ends of the loop i.e. the 0th and 32nd ticks. The goal is to reduce the chance that the local queue overflows, by giving it a chance to work on tasks in-between polling t... | 65c5ba8edabd32ea7f16e1a126e09a550ec9e45f | 26e2672245016c649eac5deefbe08f12019136fa | diff --git a/core/jvm/src/main/java/cats/effect/unsafe/WorkStealingThreadPoolConstants.java b/core/jvm/src/main/java/cats/effect/unsafe/WorkStealingThreadPoolConstants.java
index 750f5c53b7..e5e98d1b71 100644
--- a/core/jvm/src/main/java/cats/effect/unsafe/WorkStealingThreadPoolConstants.java
+++ b/core/jvm/src/main/ja... | [
"core/jvm/src/main/java/cats/effect/unsafe/WorkStealingThreadPoolConstants.java",
"core/jvm/src/main/scala/cats/effect/unsafe/WorkerThread.scala"
] | [
{
"comment": "There's a couple ways we could encode this 🤷 \r\n\r\nAlso, random idea: what if we just completely unrolled the 64 ticks of the worker loop?",
"path": "core/jvm/src/main/scala/cats/effect/unsafe/WorkerThread.scala",
"hunk": "@@ -762,8 +762,8 @@ private[effect] final class WorkerThread[P <... | true | ||
typelevel/cats-effect | 4,279 | issue_to_patch | Run finalizers in `IO#unsafeRunTimed` | Follow-up to https://github.com/typelevel/cats-effect/pull/4167#issuecomment-2472346690. Runs finalizers `IO#unsafeRunTimed` if it times-out or is interrupted, but doesn't backpressure on their completion. | 792f27d9bc76b9b350c465accfe0f58553511972 | cfcfee1d2c2eaea30a2da35771fc355b05bdd127 | diff --git a/core/jvm/src/main/scala/cats/effect/IOPlatform.scala b/core/jvm/src/main/scala/cats/effect/IOPlatform.scala
index b7788f3571..514cec7c91 100644
--- a/core/jvm/src/main/scala/cats/effect/IOPlatform.scala
+++ b/core/jvm/src/main/scala/cats/effect/IOPlatform.scala
@@ -44,8 +44,9 @@ abstract private[effect] cl... | [
"core/jvm/src/main/scala/cats/effect/IOPlatform.scala",
"tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala"
] | [
{
"comment": "Can we reframe this test to avoid timing sensitivity? Using juc `CountDownLatch` would probably make that pretty easy.",
"path": "tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala",
"hunk": "@@ -50,6 +50,26 @@ trait IOPlatformSpecification extends DetectPlatform { self: Ba... | diff --git a/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala b/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala
index 3f24425b02..b04a21b617 100644
--- a/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala
+++ b/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecifica... | true | |
typelevel/cats-effect | 4,290 | issue_to_patch | Private type in a public signature
`IORuntime.createWorkStealingComputeThreadPool` is a public method. Its return type contains `WorkStealingThreadPool`, which is private. | Don't expose private WSTP type in method signature | Fixes https://github.com/typelevel/cats-effect/issues/4283. | d3dd96a353ba712665f69b07bd5a3d51bd7849f2 | 42cb1f7819357bae04d58b067c5ee83df721831c | diff --git a/core/jvm/src/main/scala/cats/effect/unsafe/IORuntimeCompanionPlatform.scala b/core/jvm/src/main/scala/cats/effect/unsafe/IORuntimeCompanionPlatform.scala
index 3f14d84b1d..f24f30d1b1 100644
--- a/core/jvm/src/main/scala/cats/effect/unsafe/IORuntimeCompanionPlatform.scala
+++ b/core/jvm/src/main/scala/cats/... | [
"core/jvm/src/main/scala/cats/effect/unsafe/IORuntimeCompanionPlatform.scala"
] | [] | true | |
typelevel/cats-effect | 4,295 | issue_to_patch | Use `LinkedTransferQueue` for handling cached threads | Replaces the `ConcurrentSkipListSet` with a `LinkedTransferQueue` for handling cached threads.
- we don't actually need any of the set-like features of the `ConcurrentSkipListSet`
- `LinkedTransferQueue` simplifies the logic: the transfer either succeeds or fails; no add-then-remove dance
- threads are polled in ord... | 712d37f78d83237b3aa6133487b4d9e48dbe40d9 | 519962d577d96bf90ddc4eaaa789b6ce9a56b7b6 | diff --git a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala b/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala
index b5d42d617a..5285de088b 100644
--- a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala
+++ b/core/jvm/src/main/scala/cats/effect/unsaf... | [
"core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala",
"core/jvm/src/main/scala/cats/effect/unsafe/WorkerThread.scala"
] | [] | true | ||
typelevel/cats-effect | 4,298 | issue_to_patch | fix: Nix development Enviroment & Readme Fix | ./build was failing inside nix development environment.
The main issues were:
- The `gifsicle` package can't run because it's dynamically linked
- `autoreconf` is missing, which is part of the `autoconf` package
As NixOS cannot run dynamically linked executables intended for generic linux environments out o... | 7102a235fd8beeeb8b13131552706c4127b0fb7a | d1bd48957815a968a1e8185d03451c6c634cd8dd | diff --git a/README.md b/README.md
index a9b7dcc8b8..e65c2f8519 100644
--- a/README.md
+++ b/README.md
@@ -137,7 +137,7 @@ To build the documentation site locally, the following dependencies are needed,
- Node (14.x ideally)
- Yarn (any version should work)
-NOTE: [Nix](https://nixos.org/) users can just run `nix-s... | [
"README.md",
"flake.nix"
] | [] | true | ||
typelevel/cats-effect | 4,302 | issue_to_patch | `Random#betweenDouble` and `#betweenFloat` overflow
https://github.com/scala/bug/issues/13098 also affects `cats.effect.std.Random`. | Fix betweenDouble/betweenFloat | Fixes #4300. Further reading: https://github.com/scala-js/scala-js/pull/5142. | ee58d4bbc3c328e83b4ef9dfbb0fabcf0b4bed8f | be03a233d442ad97ae95e80ffd35d5e235332646 | diff --git a/std/shared/src/main/scala/cats/effect/std/Random.scala b/std/shared/src/main/scala/cats/effect/std/Random.scala
index 3268db340b..a11e1214c5 100644
--- a/std/shared/src/main/scala/cats/effect/std/Random.scala
+++ b/std/shared/src/main/scala/cats/effect/std/Random.scala
@@ -331,25 +331,41 @@ object Random e... | [
"std/shared/src/main/scala/cats/effect/std/Random.scala",
"tests/shared/src/test/scala/cats/effect/std/RandomSpec.scala"
] | [] | diff --git a/tests/shared/src/test/scala/cats/effect/std/RandomSpec.scala b/tests/shared/src/test/scala/cats/effect/std/RandomSpec.scala
index 039f7a30d4..7a9bed915d 100644
--- a/tests/shared/src/test/scala/cats/effect/std/RandomSpec.scala
+++ b/tests/shared/src/test/scala/cats/effect/std/RandomSpec.scala
@@ -47,6 +47,... | true |
typelevel/cats-effect | 4,315 | issue_to_patch | Restore GraalVM Native Image test in CI | We lost this by mistake after https://github.com/typelevel/cats-effect/pull/4153. | 1237a37522b9c0a925110ddf7c8e1ac465064ba7 | 9a83de2bd08f204088ec8a4067f76e5b0a138e92 | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ed02b99a2d..55a570dde7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -45,8 +45,6 @@ jobs:
java: temurin@11
- scala: 3.3.4
java: temurin@21
- - scala: 3.3.4
- java: gr... | [
".github/workflows/ci.yml",
"build.sbt"
] | [] | true | ||
typelevel/cats-effect | 4,316 | issue_to_patch | Add `realTimeZonedDateTime` to `Clock` JVM extensions | Add realTimeZonedDateTime to Clock extensions for convenience
| 3e17905234106a5641b43513ac36be79b2f035f4 | 558393b3b12a11c4fd4e2544c8a4f1b6e5140d09 | diff --git a/core/jvm/src/main/scala/cats/effect/IOCompanionPlatform.scala b/core/jvm/src/main/scala/cats/effect/IOCompanionPlatform.scala
index 3deb7f61c5..c0b342c07a 100644
--- a/core/jvm/src/main/scala/cats/effect/IOCompanionPlatform.scala
+++ b/core/jvm/src/main/scala/cats/effect/IOCompanionPlatform.scala
@@ -19,7 ... | [
"core/jvm/src/main/scala/cats/effect/IOCompanionPlatform.scala",
"kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala"
] | [
{
"comment": "```suggestion\r\nprivate[effect] object ClockPlatform {\r\n```",
"path": "kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala",
"hunk": "@@ -16,10 +16,17 @@\n \n package cats.effect.kernel\n \n-import java.time.Instant\n+import java.time.{Instant, ZoneId, ZonedDateTime}... | true | ||
typelevel/cats-effect | 4,316 | comment_to_fix | Add `realTimeZonedDateTime` to `Clock` JVM extensions | ```suggestion
private[effect] object ClockPlatform {
``` | 3e17905234106a5641b43513ac36be79b2f035f4 | 558393b3b12a11c4fd4e2544c8a4f1b6e5140d09 | diff --git a/kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala b/kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala
index 73e1020578..be88727fbc 100644
--- a/kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala
+++ b/kernel/jvm-native/src/main/scala/cats/eff... | [
"kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala"
] | [
{
"comment": "```suggestion\r\nprivate[effect] object ClockPlatform {\r\n```",
"path": "kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala",
"hunk": "@@ -16,10 +16,17 @@\n \n package cats.effect.kernel\n \n-import java.time.Instant\n+import java.time.{Instant, ZoneId, ZonedDateTime}... | true | ||
typelevel/cats-effect | 4,316 | comment_to_fix | Add `realTimeZonedDateTime` to `Clock` JVM extensions | ```suggestion
self.applicative.map(realTimeInstant)(d => ZonedDateTime.ofInstant(d, ZoneOffset.UTC))
``` | 3e17905234106a5641b43513ac36be79b2f035f4 | 558393b3b12a11c4fd4e2544c8a4f1b6e5140d09 | diff --git a/kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala b/kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala
index 73e1020578..be88727fbc 100644
--- a/kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala
+++ b/kernel/jvm-native/src/main/scala/cats/eff... | [
"kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala"
] | [
{
"comment": "```suggestion\r\n self.applicative.map(realTimeInstant)(d => ZonedDateTime.ofInstant(d, ZoneOffset.UTC))\r\n```",
"path": "kernel/jvm-native/src/main/scala/cats/effect/kernel/ClockPlatform.scala",
"hunk": "@@ -16,10 +16,17 @@\n \n package cats.effect.kernel\n \n-import java.time.Instant... | true | ||
typelevel/cats-effect | 4,335 | issue_to_patch | Implement PollerMetrics for EpollSystem | Linked to: https://github.com/typelevel/cats-effect/issues/4314
This PR implements metrics tracking for read and write operations in the Poller class for the EpollSystem. It provides basic metrics reporting such as total submitted, succeeded, errored, and canceled operations and outstanding operations count. | 315feb7bdc2013c9448ab4344a5a1f8df804dcd3 | d2fd77f4d140afbb6bc940fedac74bfdfe1ab97f | diff --git a/core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala b/core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala
index e33664e645..cceb452931 100644
--- a/core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala
+++ b/core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala
@... | [
"core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala"
] | [
{
"comment": "Follow-up to https://github.com/typelevel/cats-effect/pull/4365. \r\n```suggestion\r\n override def toString: String = \"Epoll\"\r\n }\r\n```",
"path": "core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala",
"hunk": "@@ -181,6 +181,114 @@ object EpollSystem extends Polli... | true | ||
typelevel/cats-effect | 4,335 | comment_to_fix | Implement PollerMetrics for EpollSystem | Follow-up to https://github.com/typelevel/cats-effect/pull/4365.
```suggestion
override def toString: String = "Epoll"
}
``` | 315feb7bdc2013c9448ab4344a5a1f8df804dcd3 | d2fd77f4d140afbb6bc940fedac74bfdfe1ab97f | diff --git a/core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala b/core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala
index e33664e645..cceb452931 100644
--- a/core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala
+++ b/core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala
@... | [
"core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala"
] | [
{
"comment": "Follow-up to https://github.com/typelevel/cats-effect/pull/4365. \r\n```suggestion\r\n override def toString: String = \"Epoll\"\r\n }\r\n```",
"path": "core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala",
"hunk": "@@ -181,6 +181,114 @@ object EpollSystem extends Polli... | true | ||
typelevel/cats-effect | 4,336 | issue_to_patch | Implement PollerMetrics for KqueueSystem | Linked to: https://github.com/typelevel/cats-effect/issues/4314
This PR implements metrics tracking for read and write operations in the Poller class for the KqueueSystem. It provides basic metrics reporting such as total submitted, succeeded, errored, canceled operations and outstanding operations count. | 315feb7bdc2013c9448ab4344a5a1f8df804dcd3 | efb75ea9fd88bbec11d62a03c6ad83ed40cb95d7 | diff --git a/core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala b/core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala
index 5b835f590c..d87227211c 100644
--- a/core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala
+++ b/core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.sca... | [
"core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala"
] | [
{
"comment": "Follow-up to https://github.com/typelevel/cats-effect/pull/4365. \r\n```suggestion\r\n override def toString: String = \"Kqueue\"\r\n }\r\n```",
"path": "core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala",
"hunk": "@@ -161,13 +161,118 @@ object KqueueSystem extends P... | true | ||
typelevel/cats-effect | 4,336 | comment_to_fix | Implement PollerMetrics for KqueueSystem | Follow-up to https://github.com/typelevel/cats-effect/pull/4365.
```suggestion
override def toString: String = "Kqueue"
}
``` | 315feb7bdc2013c9448ab4344a5a1f8df804dcd3 | efb75ea9fd88bbec11d62a03c6ad83ed40cb95d7 | diff --git a/core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala b/core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala
index 5b835f590c..d87227211c 100644
--- a/core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala
+++ b/core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.sca... | [
"core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala"
] | [
{
"comment": "Follow-up to https://github.com/typelevel/cats-effect/pull/4365. \r\n```suggestion\r\n override def toString: String = \"Kqueue\"\r\n }\r\n```",
"path": "core/native/src/main/scala/cats/effect/unsafe/KqueueSystem.scala",
"hunk": "@@ -161,13 +161,118 @@ object KqueueSystem extends P... | true | ||
typelevel/cats-effect | 4,339 | issue_to_patch | Replace deprecated commands in build.sbt | 974331e82e2185b6f0668a01dd4e8a4dcdfa8d7f | ec76935631b5cd0ea7c3b261df5fd68a9078fd53 | diff --git a/build.sbt b/build.sbt
index 18a8ed968b..10a22044d9 100644
--- a/build.sbt
+++ b/build.sbt
@@ -15,7 +15,6 @@
*/
import java.io.File
-import java.util.concurrent.TimeUnit
import com.typesafe.tools.mima.core._
import com.github.sbt.git.SbtGit.GitKeys._
@@ -46,7 +45,6 @@ ThisBuild / tlUntaggedAreSnaps... | [
"build.sbt",
"project/CI.scala"
] | [] | true | |||
typelevel/cats-effect | 4,338 | issue_to_patch | SecureRandom.javaSecuritySecureRandom for two effect types | Im not sure this is the right and idiomatic way to implement this, but this greatly helps in real app wiring when you have to create instance for some effect G(for example ConnectioIO) when the wiring is done in F(IO for example)
This is my first PR here, please let me know if this should be done somehow differently | 553fdbbe62349a0d059213ed7af099db2cd98af4 | a332e322fb57176369ddd0f784d53c752da72592 | diff --git a/std/js/src/main/scala/cats/effect/std/SecureRandomCompanionPlatform.scala b/std/js/src/main/scala/cats/effect/std/SecureRandomCompanionPlatform.scala
index 95aaca72d3..4ffe111546 100644
--- a/std/js/src/main/scala/cats/effect/std/SecureRandomCompanionPlatform.scala
+++ b/std/js/src/main/scala/cats/effect/s... | [
"std/js/src/main/scala/cats/effect/std/SecureRandomCompanionPlatform.scala",
"std/jvm/src/main/scala/cats/effect/std/SecureRandomCompanionPlatform.scala",
"std/native/src/main/scala/cats/effect/std/SecureRandomCompanionPlatform.scala",
"std/shared/src/main/scala/cats/effect/std/SecureRandom.scala"
] | [] | true | ||
typelevel/cats-effect | 4,340 | issue_to_patch | Also interrupt pollers when shutting down the WSTP | As discussed in #4201. | 315feb7bdc2013c9448ab4344a5a1f8df804dcd3 | caf14516a1c154a7d32ad88df4da241af4b92177 | diff --git a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala b/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala
index 5285de088b..a7139724e9 100644
--- a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala
+++ b/core/jvm/src/main/scala/cats/effect/unsaf... | [
"core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala",
"tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala"
] | [
{
"comment": "I am wondering if we can just replace `workerThread.interrupt()` entirely, and if not, if there's a specific reason to call the interrupts in this order?\r\n\r\nI think `system.interrupt` should be sufficient, it's the only mechanism by which a worker thread can park.",
"path": "core/jvm/src/m... | diff --git a/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala b/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala
index b04a21b617..9c35359f71 100644
--- a/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala
+++ b/tests/jvm/src/test/scala/cats/effect/IOPlatformSpecifica... | true | |
typelevel/cats-effect | 4,340 | comment_to_fix | Also interrupt pollers when shutting down the WSTP | I am wondering if we can just replace `workerThread.interrupt()` entirely, and if not, if there's a specific reason to call the interrupts in this order?
I think `system.interrupt` should be sufficient, it's the only mechanism by which a worker thread can park. | 315feb7bdc2013c9448ab4344a5a1f8df804dcd3 | caf14516a1c154a7d32ad88df4da241af4b92177 | diff --git a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala b/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala
index 5285de088b..a7139724e9 100644
--- a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala
+++ b/core/jvm/src/main/scala/cats/effect/unsaf... | [
"core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingThreadPool.scala"
] | [
{
"comment": "I am wondering if we can just replace `workerThread.interrupt()` entirely, and if not, if there's a specific reason to call the interrupts in this order?\r\n\r\nI think `system.interrupt` should be sufficient, it's the only mechanism by which a worker thread can park.",
"path": "core/jvm/src/m... | true | ||
typelevel/cats-effect | 4,353 | issue_to_patch | Update submodule to Cats Effect 3.6.x | Closes #4342 | 288b77a388cd024fd150fae277f3ff26433b40a8 | 1bb68f72c7532eabd691e1be445cd37188619529 | diff --git a/.gitmodules b/.gitmodules
index c1f3555f42..905d514604 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -6,4 +6,4 @@
[submodule "Cats Effect 3"]
path = versions/3.x
url = git@github.com:typelevel/cats-effect.git
- branch = series/3.5.x
+ branch = series/3.6.x
diff --git a/versions/3.x b/versions/3.x
inde... | [
".gitmodules",
"versions/3.x"
] | [] | true | ||
typelevel/cats-effect | 4,343 | issue_to_patch | Allow `IO.onError` to be passed a total function
#4121 deprecated `IO.onError(f: Throwable => IO[Unit])` and added `def onError(pf: PartialFunction[Throwable, IO[Unit]])` to be used instead.
[Normally total functions can be passed in place of a partial function and Scala will automatically create a partial function w... | Make deprecated `IO.onError` package private | This is a repeat of #4341 targeting `series/3.6.x` instead. Fine with closing this one or the other one, no worries :)
closes #4329
This is a source breaking change for Scala 2.12 | 75a1cd64daa9a9fcfaa9e6f239b8e331ae280578 | ccd1ea07f29b4a34daf449a9bd429a0768599e51 | diff --git a/core/shared/src/main/scala/cats/effect/IO.scala b/core/shared/src/main/scala/cats/effect/IO.scala
index c88f487d82..89a5cc6292 100644
--- a/core/shared/src/main/scala/cats/effect/IO.scala
+++ b/core/shared/src/main/scala/cats/effect/IO.scala
@@ -591,7 +591,7 @@ sealed abstract class IO[+A] private () exten... | [
"core/shared/src/main/scala/cats/effect/IO.scala",
"tests/shared/src/test/scala-2.13+/not/cats/effect/IOCompilationSpec.scala"
] | [
{
"comment": "Can just put this into `IOSpec`.",
"path": "tests/shared/src/test/scala-2.13+/not/cats/effect/IOCompilationSpec.scala",
"hunk": "@@ -0,0 +1,26 @@\n+/*\n+ * Copyright 2020-2025 Typelevel\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this fi... | diff --git a/tests/shared/src/test/scala-2.13+/not/cats/effect/IOCompilationSpec.scala b/tests/shared/src/test/scala-2.13+/not/cats/effect/IOCompilationSpec.scala
new file mode 100644
index 0000000000..c5aca62a27
--- /dev/null
+++ b/tests/shared/src/test/scala-2.13+/not/cats/effect/IOCompilationSpec.scala
@@ -0,0 +1,26... | true |
typelevel/cats-effect | 4,362 | issue_to_patch | SN 0.5.6 -> 0.5.7 -> 0.5.8 | Notes so far:
- [ ] ~~There is something weird going on with exception stacktraces; I haven't been able to minimize so far. UPDATE: seems to work fine in CI, so possibly something is broken in my local environment.~~
- [ ] ~~`ioAppTestsNative` fails on `macos-14` and `ubuntu-22.04-arm`~~ | 6e62fc6fc4ded75a98ca798dc64a2faf004634b8 | 92d92eb49a7bdcbdd3afd375845dd138f06ee2d1 | diff --git a/build.sbt b/build.sbt
index e2aa5b60d0..2142a705f8 100644
--- a/build.sbt
+++ b/build.sbt
@@ -362,13 +362,12 @@ Global / tlCommandAliases ++= Map(
)
lazy val nativeTestSettings = Seq(
- nativeConfig ~= { c => // TODO: remove this when it seems to work
- c.withSourceLevelDebuggingConfig(_.enableAll)... | [
"build.sbt",
"core/native/src/main/scala/cats/effect/unsafe/EpollSystem.scala",
"ioapp-tests/src/test/scala/IOAppSuite.scala",
"project/plugins.sbt"
] | [
{
"comment": "This is not needed anymore on Scala Native 0.5.7",
"path": "build.sbt",
"hunk": "@@ -362,11 +362,14 @@ Global / tlCommandAliases ++= Map(\n )\n \n lazy val nativeTestSettings = Seq(\n- nativeConfig ~= { c => // TODO: remove this when it seems to work\n- c.withSourceLevelDebuggingConfig... | diff --git a/ioapp-tests/src/test/scala/IOAppSuite.scala b/ioapp-tests/src/test/scala/IOAppSuite.scala
index 5c1ebb1fe0..e3b8525f16 100644
--- a/ioapp-tests/src/test/scala/IOAppSuite.scala
+++ b/ioapp-tests/src/test/scala/IOAppSuite.scala
@@ -158,7 +158,15 @@ class IOAppSuite extends FunSuite {
test("pass all ar... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.