Repository: remeda/remeda
Pull request #860 (2024-09-17 20:00:04)

chore(deps): bump vite from 5.3.5 to 5.4.6 in the npm_and_yarn group
Bumps the npm_and_yarn group with 1 update: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).

Updates `vite` from 5.3.5 to 5.4.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/vitejs/vite/releases">vite's releases</a>.</em></p>
<blockquote>
<h2>create-vite@5.4.0</h2>
<p>Please refer to <a href="https://github.com/vitejs/vite/blob/create-vite@5.4.0/packages/create-vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/vitejs/vite/blob/v5.4.6/packages/vite/CHANGELOG.md">vite's changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.4.6 (2024-09-16)<!-- raw HTML omitted --></h2>
<ul>
<li>fix: avoid DOM Clobbering gadget in <code>getRelativeUrlFromDocument</code> (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18115">#18115</a>) (<a href="https://github.com/vitejs/vite/commit/179b17773cf35c73ddb041f9e6c703fd9f3126af">179b177</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/18115">#18115</a></li>
<li>fix: fs raw query (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18112">#18112</a>) (<a href="https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34">6820bb3</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/18112">#18112</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.5 (2024-09-13)<!-- raw HTML omitted --></h2>
<ul>
<li>fix(preload): backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18098">#18098</a>, throw error preloading module as well (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18099">#18099</a>) (<a href="https://github.com/vitejs/vite/commit/faa2405e5d1da07a7c7fb6d48e887bf97a2f3dba">faa2405</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/18098">#18098</a> <a href="https://redirect.github.com/vitejs/vite/issues/18099">#18099</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.4 (2024-09-11)<!-- raw HTML omitted --></h2>
<ul>
<li>fix: backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17997">#17997</a>, ensure req.url matches moduleByEtag URL to avoid incorrect 304 (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18078">#18078</a>) (<a href="https://github.com/vitejs/vite/commit/74a79c53b2286c91739d1473945012b5d206eddf">74a79c5</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17997">#17997</a> <a href="https://redirect.github.com/vitejs/vite/issues/18078">#18078</a></li>
<li>fix: backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18063">#18063</a>, allow scanning exports from <code>script module</code> in svelte (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18077">#18077</a>) (<a href="https://github.com/vitejs/vite/commit/d90ba40474aa1da8e722e1660ba739621238e5ac">d90ba40</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/18063">#18063</a> <a href="https://redirect.github.com/vitejs/vite/issues/18077">#18077</a></li>
<li>fix(preload): backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18046">#18046</a>, allow ignoring dep errors (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18076">#18076</a>) (<a href="https://github.com/vitejs/vite/commit/8760293d6836dac554d1d6f214b8b09ed97cccd4">8760293</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/18046">#18046</a> <a href="https://redirect.github.com/vitejs/vite/issues/18076">#18076</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.3 (2024-09-03)<!-- raw HTML omitted --></h2>
<ul>
<li>fix: allow getting URL of JS files in publicDir (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17915">#17915</a>) (<a href="https://github.com/vitejs/vite/commit/943ece177e7709b3ba574e810afce347c51d4442">943ece1</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17915">#17915</a></li>
<li>fix: cjs warning respect the logLevel flag (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17993">#17993</a>) (<a href="https://github.com/vitejs/vite/commit/dc3c14f39fcd57867c8ae81b75ae768b53b4b880">dc3c14f</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17993">#17993</a></li>
<li>fix: improve CJS warning trace information (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17926">#17926</a>) (<a href="https://github.com/vitejs/vite/commit/5c5f82c84bb64309875b42eee9d4dd525ab42e8c">5c5f82c</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17926">#17926</a></li>
<li>fix: only remove entry assets handled by Vite core (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17916">#17916</a>) (<a href="https://github.com/vitejs/vite/commit/ebfaa7e6019783f308db5e759a6a67abb7cc626c">ebfaa7e</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17916">#17916</a></li>
<li>fix: waitForRequestIdle locked (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17982">#17982</a>) (<a href="https://github.com/vitejs/vite/commit/ad1376018a94b42540a8488d897cc520849e1228">ad13760</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17982">#17982</a></li>
<li>fix(css): fix directory index import in sass modern api (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17960">#17960</a>) (<a href="https://github.com/vitejs/vite/commit/9b001baa70c8489ac5550107c110a5dca281cda4">9b001ba</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17960">#17960</a></li>
<li>fix(css): fix sass <code>file://</code> reference (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17909">#17909</a>) (<a href="https://github.com/vitejs/vite/commit/561b940f6f963fbb78058a6e23b4adad53a2edb9">561b940</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17909">#17909</a></li>
<li>fix(css): fix sass modern source map (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17938">#17938</a>) (<a href="https://github.com/vitejs/vite/commit/d428e7e3a05f8da5ea00bb1b6a0827a5cc225899">d428e7e</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17938">#17938</a></li>
<li>fix(deps): bump tsconfck  (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17990">#17990</a>) (<a href="https://github.com/vitejs/vite/commit/8c661b20e92f33eb2e3ba3841b20dd6f6076f1ef">8c661b2</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17990">#17990</a></li>
<li>fix(html): rewrite assets url in &lt;template&gt; (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17988">#17988</a>) (<a href="https://github.com/vitejs/vite/commit/413c86aa971bc1ad8958578c929f45a368799f74">413c86a</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17988">#17988</a></li>
<li>fix(preload): add crossorigin attribute in CSS link tags (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17930">#17930</a>) (<a href="https://github.com/vitejs/vite/commit/15871c75e0722adeda23f771fd6c45fecba4d118">15871c7</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17930">#17930</a></li>
<li>chore: reduce diffs with v6 branch (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17942">#17942</a>) (<a href="https://github.com/vitejs/vite/commit/bf9065aa13da6a519014c3bc1d34cfb1cb49ccca">bf9065a</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17942">#17942</a></li>
<li>chore(deps): update all non-major dependencies (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17945">#17945</a>) (<a href="https://github.com/vitejs/vite/commit/cfb621e7a5a3e24d710a9af156e6855e73caf891">cfb621e</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17945">#17945</a></li>
<li>chore(deps): update all non-major dependencies (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17991">#17991</a>) (<a href="https://github.com/vitejs/vite/commit/0ca53cff9ff49108fcec75ff01d2445f9c2f2a4c">0ca53cf</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17991">#17991</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.2 (2024-08-20)<!-- raw HTML omitted --></h2>
<ul>
<li>chore: remove stale TODOs (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17866">#17866</a>) (<a href="https://github.com/vitejs/vite/commit/e012f296df583bd133d26399397bd4ae49de1497">e012f29</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17866">#17866</a></li>
<li>refactor: remove redundant prepend/strip base (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17887">#17887</a>) (<a href="https://github.com/vitejs/vite/commit/3b8f03d789ec3ef1a099c884759bd4e61b03ce7c">3b8f03d</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17887">#17887</a></li>
<li>fix: resolve relative URL generated by <code>renderBuiltUrl</code> passed to module preload (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/16084">#16084</a>) (<a href="https://github.com/vitejs/vite/commit/fac3a8ed6855c4ab3032957137b74f21ec501e72">fac3a8e</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/16084">#16084</a></li>
<li>feat: support originalFilename (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17867">#17867</a>) (<a href="https://github.com/vitejs/vite/commit/7d8c0e2dcbdea3a3465a1d87e259988e82561035">7d8c0e2</a>), closes <a href="https://redirect.github.com/vitejs/vite/issues/17867">#17867</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.1 (2024-08-15)<!-- raw HTML omitted --></h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/vitejs/vite/commit/f9691767ad763720065cc7c5c7f369f97b4e7ea8"><code>f969176</code></a> release: v5.4.6</li>
<li><a href="https://github.com/vitejs/vite/commit/179b17773cf35c73ddb041f9e6c703fd9f3126af"><code>179b177</code></a> fix: avoid DOM Clobbering gadget in <code>getRelativeUrlFromDocument</code> (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18115">#18115</a>)</li>
<li><a href="https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34"><code>6820bb3</code></a> fix: fs raw query (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18112">#18112</a>)</li>
<li><a href="https://github.com/vitejs/vite/commit/37881e71980ddbf6a93444c2d21b8ee6c076ad07"><code>37881e7</code></a> release: v5.4.5</li>
<li><a href="https://github.com/vitejs/vite/commit/faa2405e5d1da07a7c7fb6d48e887bf97a2f3dba"><code>faa2405</code></a> fix(preload): backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18098">#18098</a>, throw error preloading module as well (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18099">#18099</a>)</li>
<li><a href="https://github.com/vitejs/vite/commit/54c55dbffc86f21ae88a171a5af90c37876db226"><code>54c55db</code></a> release: v5.4.4</li>
<li><a href="https://github.com/vitejs/vite/commit/74a79c53b2286c91739d1473945012b5d206eddf"><code>74a79c5</code></a> fix: backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/17997">#17997</a>, ensure req.url matches moduleByEtag URL to avoid incorr...</li>
<li><a href="https://github.com/vitejs/vite/commit/d90ba40474aa1da8e722e1660ba739621238e5ac"><code>d90ba40</code></a> fix: backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18063">#18063</a>, allow scanning exports from <code>script module</code> in svelte (...</li>
<li><a href="https://github.com/vitejs/vite/commit/8760293d6836dac554d1d6f214b8b09ed97cccd4"><code>8760293</code></a> fix(preload): backport <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18046">#18046</a>, allow ignoring dep errors (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/18076">#18076</a>)</li>
<li><a href="https://github.com/vitejs/vite/commit/ccbfc1a06816ccf45b93cffa9f8c2b94d3ad97d3"><code>ccbfc1a</code></a> release: v5.4.3</li>
<li>Additional commits viewable in <a href="https://github.com/vitejs/vite/commits/v5.4.6/packages/vite">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vite&package-manager=npm_and_yarn&previous-version=5.3.5&new-version=5.4.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/remeda/remeda/network/alerts).

</details>

codesandbox-ci[bot]: This pull request is automatically built and testable in [CodeSandbox](https://codesandbox.io).

  To see build info of the built libraries, click [here](https://ci.codesandbox.io/status/remeda/remeda/pr/860/builds/542874) or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2bffaecd8e1273af7e30064dfbd3fe4110017e38:

|Sandbox| Source |
|--|--|
|[remeda-example-vanilla](https://codesandbox.io/s/remeda-example-vanilla-crvj5t)| Configuration |


Patch:
diff --git a/package-lock.json b/package-lock.json
index 3725faf..ba64b85 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1258,9 +1258,9 @@
       }
     },
     "node_modules/@rollup/rollup-android-arm-eabi": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.2.tgz",
-      "integrity": "sha512-OHflWINKtoCFSpm/WmuQaWW4jeX+3Qt3XQDepkkiFTsoxFc5BpF3Z5aDxFZgBqRjO6ATP5+b1iilp4kGIZVWlA==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.3.tgz",
+      "integrity": "sha512-MmKSfaB9GX+zXl6E8z4koOr/xU63AMVleLEa64v7R0QF/ZloMs5vcD1sHgM64GXXS1csaJutG+ddtzcueI/BLg==",
       "cpu": [
         "arm"
       ],
@@ -1271,9 +1271,9 @@
       ]
     },
     "node_modules/@rollup/rollup-android-arm64": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.2.tgz",
-      "integrity": "sha512-k0OC/b14rNzMLDOE6QMBCjDRm3fQOHAL8Ldc9bxEWvMo4Ty9RY6rWmGetNTWhPo+/+FNd1lsQYRd0/1OSix36A==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.3.tgz",
+      "integrity": "sha512-zrt8ecH07PE3sB4jPOggweBjJMzI1JG5xI2DIsUbkA+7K+Gkjys6eV7i9pOenNSDJH3eOr/jLb/PzqtmdwDq5g==",
       "cpu": [
         "arm64"
       ],
@@ -1284,9 +1284,9 @@
       ]
     },
     "node_modules/@rollup/rollup-darwin-arm64": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.2.tgz",
-      "integrity": "sha512-IIARRgWCNWMTeQH+kr/gFTHJccKzwEaI0YSvtqkEBPj7AshElFq89TyreKNFAGh5frLfDCbodnq+Ye3dqGKPBw==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.3.tgz",
+      "integrity": "sha512-P0UxIOrKNBFTQaXTxOH4RxuEBVCgEA5UTNV6Yz7z9QHnUJ7eLX9reOd/NYMO3+XZO2cco19mXTxDMXxit4R/eQ==",
       "cpu": [
         "arm64"
       ],
@@ -1297,9 +1297,9 @@
       ]
     },
     "node_modules/@rollup/rollup-darwin-x64": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.2.tgz",
-      "integrity": "sha512-52udDMFDv54BTAdnw+KXNF45QCvcJOcYGl3vQkp4vARyrcdI/cXH8VXTEv/8QWfd6Fru8QQuw1b2uNersXOL0g==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.3.tgz",
+      "integrity": "sha512-L1M0vKGO5ASKntqtsFEjTq/fD91vAqnzeaF6sfNAy55aD+Hi2pBI5DKwCO+UNDQHWsDViJLqshxOahXyLSh3EA==",
       "cpu": [
         "x64"
       ],
@@ -1310,9 +1310,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.2.tgz",
-      "integrity": "sha512-r+SI2t8srMPYZeoa1w0o/AfoVt9akI1ihgazGYPQGRilVAkuzMGiTtexNZkrPkQsyFrvqq/ni8f3zOnHw4hUbA==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.3.tgz",
+      "integrity": "sha512-btVgIsCjuYFKUjopPoWiDqmoUXQDiW2A4C3Mtmp5vACm7/GnyuprqIDPNczeyR5W8rTXEbkmrJux7cJmD99D2g==",
       "cpu": [
         "arm"
       ],
@@ -1323,9 +1323,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-arm-musleabihf": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.2.tgz",
-      "integrity": "sha512-+tYiL4QVjtI3KliKBGtUU7yhw0GMcJJuB9mLTCEauHEsqfk49gtUBXGtGP3h1LW8MbaTY6rSFIQV1XOBps1gBA==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.3.tgz",
+      "integrity": "sha512-zmjbSphplZlau6ZTkxd3+NMtE4UKVy7U4aVFMmHcgO5CUbw17ZP6QCgyxhzGaU/wFFdTfiojjbLG3/0p9HhAqA==",
       "cpu": [
         "arm"
       ],
@@ -1336,9 +1336,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-arm64-gnu": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.2.tgz",
-      "integrity": "sha512-OR5DcvZiYN75mXDNQQxlQPTv4D+uNCUsmSCSY2FolLf9W5I4DSoJyg7z9Ea3TjKfhPSGgMJiey1aWvlWuBzMtg==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.3.tgz",
+      "integrity": "sha512-nSZfcZtAnQPRZmUkUQwZq2OjQciR6tEoJaZVFvLHsj0MF6QhNMg0fQ6mUOsiCUpTqxTx0/O6gX0V/nYc7LrgPw==",
       "cpu": [
         "arm64"
       ],
@@ -1349,9 +1349,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-arm64-musl": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.2.tgz",
-      "integrity": "sha512-Hw3jSfWdUSauEYFBSFIte6I8m6jOj+3vifLg8EU3lreWulAUpch4JBjDMtlKosrBzkr0kwKgL9iCfjA8L3geoA==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.3.tgz",
+      "integrity": "sha512-MnvSPGO8KJXIMGlQDYfvYS3IosFN2rKsvxRpPO2l2cum+Z3exiExLwVU+GExL96pn8IP+GdH8Tz70EpBhO0sIQ==",
       "cpu": [
         "arm64"
       ],
@@ -1362,9 +1362,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.2.tgz",
-      "integrity": "sha512-rhjvoPBhBwVnJRq/+hi2Q3EMiVF538/o9dBuj9TVLclo9DuONqt5xfWSaE6MYiFKpo/lFPJ/iSI72rYWw5Hc7w==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.3.tgz",
+      "integrity": "sha512-+W+p/9QNDr2vE2AXU0qIy0qQE75E8RTwTwgqS2G5CRQ11vzq0tbnfBd6brWhS9bCRjAjepJe2fvvkvS3dno+iw==",
       "cpu": [
         "ppc64"
       ],
@@ -1375,9 +1375,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-riscv64-gnu": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.2.tgz",
-      "integrity": "sha512-EAz6vjPwHHs2qOCnpQkw4xs14XJq84I81sDRGPEjKPFVPBw7fwvtwhVjcZR6SLydCv8zNK8YGFblKWd/vRmP8g==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.3.tgz",
+      "integrity": "sha512-yXH6K6KfqGXaxHrtr+Uoy+JpNlUlI46BKVyonGiaD74ravdnF9BUNC+vV+SIuB96hUMGShhKV693rF9QDfO6nQ==",
       "cpu": [
         "riscv64"
       ],
@@ -1388,9 +1388,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-s390x-gnu": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.2.tgz",
-      "integrity": "sha512-IJSUX1xb8k/zN9j2I7B5Re6B0NNJDJ1+soezjNojhT8DEVeDNptq2jgycCOpRhyGj0+xBn7Cq+PK7Q+nd2hxLA==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.3.tgz",
+      "integrity": "sha512-R8cwY9wcnApN/KDYWTH4gV/ypvy9yZUHlbJvfaiXSB48JO3KpwSpjOGqO4jnGkLDSk1hgjYkTbTt6Q7uvPf8eg==",
       "cpu": [
         "s390x"
       ],
@@ -1401,9 +1401,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-x64-gnu": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.2.tgz",
-      "integrity": "sha512-OgaToJ8jSxTpgGkZSkwKE+JQGihdcaqnyHEFOSAU45utQ+yLruE1dkonB2SDI8t375wOKgNn8pQvaWY9kPzxDQ==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.3.tgz",
+      "integrity": "sha512-kZPbX/NOPh0vhS5sI+dR8L1bU2cSO9FgxwM8r7wHzGydzfSjLRCFAT87GR5U9scj2rhzN3JPYVC7NoBbl4FZ0g==",
       "cpu": [
         "x64"
       ],
@@ -1414,9 +1414,9 @@
       ]
     },
     "node_modules/@rollup/rollup-linux-x64-musl": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.2.tgz",
-      "integrity": "sha512-5V3mPpWkB066XZZBgSd1lwozBk7tmOkKtquyCJ6T4LN3mzKENXyBwWNQn8d0Ci81hvlBw5RoFgleVpL6aScLYg==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.3.tgz",
+      "integrity": "sha512-S0Yq+xA1VEH66uiMNhijsWAafffydd2X5b77eLHfRmfLsRSpbiAWiRHV6DEpz6aOToPsgid7TI9rGd6zB1rhbg==",
       "cpu": [
         "x64"
       ],
@@ -1427,9 +1427,9 @@
       ]
     },
     "node_modules/@rollup/rollup-win32-arm64-msvc": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.2.tgz",
-      "integrity": "sha512-ayVstadfLeeXI9zUPiKRVT8qF55hm7hKa+0N1V6Vj+OTNFfKSoUxyZvzVvgtBxqSb5URQ8sK6fhwxr9/MLmxdA==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.3.tgz",
+      "integrity": "sha512-9isNzeL34yquCPyerog+IMCNxKR8XYmGd0tHSV+OVx0TmE0aJOo9uw4fZfUuk2qxobP5sug6vNdZR6u7Mw7Q+Q==",
       "cpu": [
         "arm64"
       ],
@@ -1440,9 +1440,9 @@
       ]
     },
     "node_modules/@rollup/rollup-win32-ia32-msvc": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.2.tgz",
-      "integrity": "sha512-Mda7iG4fOLHNsPqjWSjANvNZYoW034yxgrndof0DwCy0D3FvTjeNo+HGE6oGWgvcLZNLlcp0hLEFcRs+UGsMLg==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.3.tgz",
+      "integrity": "sha512-nMIdKnfZfzn1Vsk+RuOvl43ONTZXoAPUUxgcU0tXooqg4YrAqzfKzVenqqk2g5efWh46/D28cKFrOzDSW28gTA==",
       "cpu": [
         "ia32"
       ],
@@ -1453,9 +1453,9 @@
       ]
     },
     "node_modules/@rollup/rollup-win32-x64-msvc": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.2.tgz",
-      "integrity": "sha512-DPi0ubYhSow/00YqmG1jWm3qt1F8aXziHc/UNy8bo9cpCacqhuWu+iSq/fp2SyEQK7iYTZ60fBU9cat3MXTjIQ==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.3.tgz",
+      "integrity": "sha512-fOvu7PCQjAj4eWDEuD8Xz5gpzFqXzGlxHZozHP4b9Jxv9APtdxL6STqztDzMLuRXEc4UpXGGhx029Xgm91QBeA==",
       "cpu": [
         "x64"
       ],
@@ -8492,11 +8492,10 @@
       }
     },
     "node_modules/picocolors": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz",
-      "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==",
-      "dev": true,
-      "license": "ISC"
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz",
+      "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
+      "dev": true
     },
     "node_modules/picomatch": {
       "version": "2.3.1",
@@ -8632,9 +8631,9 @@
       }
     },
     "node_modules/postcss": {
-      "version": "8.4.39",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz",
-      "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==",
+      "version": "8.4.47",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz",
+      "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==",
       "dev": true,
       "funding": [
         {
@@ -8650,11 +8649,10 @@
           "url": "https://github.com/sponsors/ai"
         }
       ],
-      "license": "MIT",
       "dependencies": {
         "nanoid": "^3.3.7",
-        "picocolors": "^1.0.1",
-        "source-map-js": "^1.2.0"
+        "picocolors": "^1.1.0",
+        "source-map-js": "^1.2.1"
       },
       "engines": {
         "node": "^10 || ^12 || >=14"
@@ -9203,9 +9201,9 @@
       "license": "MIT"
     },
     "node_modules/rollup": {
-      "version": "4.19.2",
-      "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.2.tgz",
-      "integrity": "sha512-6/jgnN1svF9PjNYJ4ya3l+cqutg49vOZ4rVgsDKxdl+5gpGPnByFXWGyfH9YGx9i3nfBwSu1Iyu6vGwFFA0BdQ==",
+      "version": "4.21.3",
+      "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.3.tgz",
+      "integrity": "sha512-7sqRtBNnEbcBtMeRVc6VRsJMmpI+JU1z9VTvW8D4gXIYQFz0aLcsE6rRkyghZkLfEgUZgVvOG7A5CVz/VW5GIA==",
       "dev": true,
       "dependencies": {
         "@types/estree": "1.0.5"
@@ -9218,22 +9216,22 @@
         "npm": ">=8.0.0"
       },
       "optionalDependencies": {
-        "@rollup/rollup-android-arm-eabi": "4.19.2",
-        "@rollup/rollup-android-arm64": "4.19.2",
-        "@rollup/rollup-darwin-arm64": "4.19.2",
-        "@rollup/rollup-darwin-x64": "4.19.2",
-        "@rollup/rollup-linux-arm-gnueabihf": "4.19.2",
-        "@rollup/rollup-linux-arm-musleabihf": "4.19.2",
-        "@rollup/rollup-linux-arm64-gnu": "4.19.2",
-        "@rollup/rollup-linux-arm64-musl": "4.19.2",
-        "@rollup/rollup-linux-powerpc64le-gnu": "4.19.2",
-        "@rollup/rollup-linux-riscv64-gnu": "4.19.2",
-        "@rollup/rollup-linux-s390x-gnu": "4.19.2",
-        "@rollup/rollup-linux-x64-gnu": "4.19.2",
-        "@rollup/rollup-linux-x64-musl": "4.19.2",
-        "@rollup/rollup-win32-arm64-msvc": "4.19.2",
-        "@rollup/rollup-win32-ia32-msvc": "4.19.2",
-        "@rollup/rollup-win32-x64-msvc": "4.19.2",
+        "@rollup/rollup-android-arm-eabi": "4.21.3",
+        "@rollup/rollup-android-arm64": "4.21.3",
+        "@rollup/rollup-darwin-arm64": "4.21.3",
+        "@rollup/rollup-darwin-x64": "4.21.3",
+        "@rollup/rollup-linux-arm-gnueabihf": "4.21.3",
+        "@rollup/rollup-linux-arm-musleabihf": "4.21.3",
+        "@rollup/rollup-linux-arm64-gnu": "4.21.3",
+        "@rollup/rollup-linux-arm64-musl": "4.21.3",
+        "@rollup/rollup-linux-powerpc64le-gnu": "4.21.3",
+        "@rollup/rollup-linux-riscv64-gnu": "4.21.3",
+        "@rollup/rollup-linux-s390x-gnu": "4.21.3",
+        "@rollup/rollup-linux-x64-gnu": "4.21.3",
+        "@rollup/rollup-linux-x64-musl": "4.21.3",
+        "@rollup/rollup-win32-arm64-msvc": "4.21.3",
+        "@rollup/rollup-win32-ia32-msvc": "4.21.3",
+        "@rollup/rollup-win32-x64-msvc": "4.21.3",
         "fsevents": "~2.3.2"
       }
     },
@@ -9730,11 +9728,10 @@
       }
     },
     "node_modules/source-map-js": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz",
-      "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==",
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
+      "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
       "dev": true,
-      "license": "BSD-3-Clause",
       "engines": {
         "node": ">=0.10.0"
       }
@@ -11272,14 +11269,14 @@
       }
     },
     "node_modules/vite": {
-      "version": "5.3.5",
-      "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.5.tgz",
-      "integrity": "sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==",
+      "version": "5.4.6",
+      "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.6.tgz",
+      "integrity": "sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==",
       "dev": true,
       "dependencies": {
         "esbuild": "^0.21.3",
-        "postcss": "^8.4.39",
-        "rollup": "^4.13.0"
+        "postcss": "^8.4.43",
+        "rollup": "^4.20.0"
       },
       "bin": {
         "vite": "bin/vite.js"
@@ -11298,6 +11295,7 @@
         "less": "*",
         "lightningcss": "^1.21.0",
         "sass": "*",
+        "sass-embedded": "*",
         "stylus": "*",
         "sugarss": "*",
         "terser": "^5.4.0"
@@ -11315,6 +11313,9 @@
         "sass": {
           "optional": true
         },
+        "sass-embedded": {
+          "optional": true
+        },
         "stylus": {
           "optional": true
         },
diff --git a/src/sumBy.ts b/src/sumBy.ts
index 7a04106..eb85ef7 100644
--- a/src/sumBy.ts
+++ b/src/sumBy.ts
@@ -1,7 +1,25 @@
 import { purry } from "./purry";
+import { type IterableContainer } from "./internal/types";
+
+type SumBy<
+  T extends IterableContainer,
+  U extends bigint | number,
+> = T extends readonly []
+  ? 0
+  : T extends readonly [unknown, ...ReadonlyArray<unknown>]
+    ? U
+    : U | 0;
 
 /**
- * Returns the sum of the elements of an array using the provided predicate.
+ * Returns the sum of the elements of an array using the provided mapper.
+ *
+ * Works for both `number` and `bigint` mappers, but not mappers that return both
+ * types.
+ *
+ * IMPORTANT: The result for empty arrays would be 0 (`number`) regardless of
+ * the type of the mapper; to avoid adding this to the return type for cases
+ * where the array is known to be non-empty you can use `hasAtLeast` or
+ * `isEmpty` to guard against this case.
  *
  * @param callbackfn - Predicate function.
  * @signature
@@ -11,16 +29,31 @@ import { purry } from "./purry";
  *      [{a: 5}, {a: 1}, {a: 3}],
  *      R.sumBy(x => x.a)
  *    ) // 9
+ *
+ *    R.pipe(
+ *      [{a: 5n}, {a: 1n}, {a: 3n}],
+ *      R.sumBy(x => x.a)
+ *    ) // 9n
  * @dataLast
  * @category Array
  */
-
-export function sumBy<T>(
-  callbackfn: (value: T, index: number, data: ReadonlyArray<T>) => number,
-): (items: ReadonlyArray<T>) => number;
+export function sumBy<T extends IterableContainer>(
+  callbackfn: (value: T[number], index: number, data: T) => number,
+): (items: T) => SumBy<T, number>;
+export function sumBy<T extends IterableContainer>(
+  callbackfn: (value: T[number], index: number, data: T) => bigint,
+): (items: T) => SumBy<T, bigint>;
 
 /**
- * Returns the sum of the elements of an array using the provided predicate.
+ * Returns the sum of the elements of an array using the provided mapper.
+ *
+ * Works for both `number` and `bigint` mappers, but not mappers that can return both
+ * types.
+ *
+ * IMPORTANT: The result for empty arrays would be 0 (`number`) regardless of
+ * the type of the mapper; to avoid adding this to the return type for cases
+ * where the array is known to be non-empty you can use `hasAtLeast` or
+ * `isEmpty` to guard against this case.
  *
  * @param data - The array.
  * @param callbackfn - Predicate function.
@@ -31,14 +64,22 @@ export function sumBy<T>(
  *      [{a: 5}, {a: 1}, {a: 3}],
  *      x => x.a
  *    ) // 9
+ *    R.sumBy(
+ *      [{a: 5n}, {a: 1n}, {a: 3n}],
+ *      x => x.a
+ *    ) // 9n
  * @dataFirst
  * @category Array
  */
 
-export function sumBy<T>(
-  data: ReadonlyArray<T>,
-  callbackfn: (value: T, index: number, data: ReadonlyArray<T>) => number,
-): number;
+export function sumBy<T extends IterableContainer>(
+  data: T,
+  callbackfn: (value: T[number], index: number, data: T) => number,
+): SumBy<T, number>;
+export function sumBy<T extends IterableContainer>(
+  data: T,
+  callbackfn: (value: T[number], index: number, data: T) => bigint,
+): SumBy<T, bigint>;
 
 export function sumBy(...args: ReadonlyArray<unknown>): unknown {
   return purry(sumByImplementation, args);
@@ -46,11 +87,28 @@ export function sumBy(...args: ReadonlyArray<unknown>): unknown {
 
 const sumByImplementation = <T>(
   array: ReadonlyArray<T>,
-  callbackfn: (value: T, index: number, data: ReadonlyArray<T>) => number,
-): number => {
-  let sum = 0;
-  for (const [index, item] of array.entries()) {
+  callbackfn: (
+    value: T,
+    index: number,
+    data: ReadonlyArray<T>,
+  ) => bigint | number,
+): bigint | number => {
+  const iter = array.entries();
+
+  const firstEntry = iter.next();
+  if (firstEntry.done ?? false) {
+    return 0;
+  }
+
+  const {
+    value: [, firstValue],
+  } = firstEntry;
+  let sum = callbackfn(firstValue, 0, array);
+  for (const [index, item] of iter) {
     const summand = callbackfn(item, index, array);
+
+    // @ts-expect-error [ts2365] -- Typescript can't infer that all elements will be a number of the same type.
+    // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
     sum += summand;
   }
   return sum;


Test patch:
diff --git a/src/sumBy.test-d.ts b/src/sumBy.test-d.ts
new file mode 100644
index 0000000..19d753e
--- /dev/null
+++ b/src/sumBy.test-d.ts
@@ -0,0 +1,100 @@
+import { sumBy } from "./sumBy";
+import { pipe } from "./pipe";
+import { constant } from "./constant";
+
+test("empty array", () => {
+  const result1 = sumBy([], constant(1n));
+  expectTypeOf(result1).toEqualTypeOf<0>();
+
+  const result2 = sumBy([], constant(1));
+  expectTypeOf(result2).toEqualTypeOf<0>();
+});
+
+test("disallow mixed mapper", () => {
+  const toNumberOrBigint = constant(1 as bigint | number);
+  // @ts-expect-error [ts2769]: Type `number | bigint` is not assignable to type number
+  // Type `number | bigint` is not assignable to type bigint
+  sumBy([], toNumberOrBigint);
+  // @ts-expect-error [ts2769]: Type `number | bigint` is not assignable to type number
+  // Type `number | bigint` is not assignable to type bigint
+  pipe([], sumBy(toNumberOrBigint));
+});
+
+describe("numbers", () => {
+  test("arbitrary arrays", () => {
+    const result = sumBy([] as Array<unknown>, constant(1));
+    expectTypeOf(result).toEqualTypeOf<number>();
+  });
+
+  test("arbitrary readonly arrays", () => {
+    const result = sumBy([] as ReadonlyArray<unknown>, constant(1));
+    expectTypeOf(result).toEqualTypeOf<number>();
+  });
+
+  test("arbitrary non-empty arrays", () => {
+    const result = sumBy([1, 2] as [unknown, ...Array<unknown>], constant(1));
+    expectTypeOf(result).toEqualTypeOf<number>();
+  });
+
+  test("consts", () => {
+    const result = sumBy([1, 2, 3] as const, constant(1));
+    expectTypeOf(result).toEqualTypeOf<number>();
+  });
+
+  test("fixed-size tuples", () => {
+    const result = sumBy([1, 2] as [unknown, unknown], constant(1));
+    expectTypeOf(result).toEqualTypeOf<number>();
+  });
+});
+
+describe("bigints", () => {
+  test("arbitrary arrays", () => {
+    const result = sumBy([] as Array<unknown>, constant(1n));
+    expectTypeOf(result).toEqualTypeOf<bigint | 0>();
+  });
+
+  test("arbitrary readonly arrays", () => {
+    const result = sumBy([] as ReadonlyArray<unknown>, constant(1n));
+    expectTypeOf(result).toEqualTypeOf<bigint | 0>();
+  });
+
+  test("arbitrary non-empty arrays", () => {
+    const result = sumBy(
+      [1n, 2n] as [unknown, ...Array<unknown>],
+      constant(1n),
+    );
+    expectTypeOf(result).toEqualTypeOf<bigint>();
+  });
+
+  test("consts", () => {
+    const result = sumBy([1n, 2n, 3n] as const, constant(1n));
+    expectTypeOf(result).toEqualTypeOf<bigint>();
+  });
+
+  test("fixed-size tuples", () => {
+    const result = sumBy([1n, 2n] as [unknown, unknown], constant(1n));
+    expectTypeOf(result).toEqualTypeOf<bigint>();
+  });
+});
+
+describe("dataLast", () => {
+  test("numbers", () => {
+    const result = pipe([1, 2, 3] as const, sumBy(constant(1)));
+    expectTypeOf(result).toEqualTypeOf<number>();
+  });
+
+  test("bigints", () => {
+    const result = pipe([1n, 2n, 3n] as const, sumBy(constant(1n)));
+    expectTypeOf(result).toEqualTypeOf<bigint>();
+  });
+
+  test("empty array number", () => {
+    const result = pipe([] as const, sumBy(constant(1)));
+    expectTypeOf(result).toEqualTypeOf<0>();
+  });
+
+  test("empty array bigint", () => {
+    const result = pipe([] as const, sumBy(constant(1n)));
+    expectTypeOf(result).toEqualTypeOf<0>();
+  });
+});
diff --git a/src/sumBy.test.ts b/src/sumBy.test.ts
index ff61225..c2aa0e3 100644
--- a/src/sumBy.test.ts
+++ b/src/sumBy.test.ts
@@ -17,6 +17,16 @@ describe("data first", () => {
       ),
     ).toEqual(25);
   });
+
+  test("works with bigint", () => {
+    expect(
+      sumBy([{ a: 1n }, { a: 2n }, { a: 4n }, { a: 5n }, { a: 3n }], prop("a")),
+    ).toEqual(15n);
+  });
+
+  it("should return 0 for an empty array", () => {
+    expect(sumBy([], prop("a"))).toBe(0);
+  });
 });
 
 describe("data last", () => {
@@ -29,6 +39,19 @@ describe("data last", () => {
     ).toEqual(15);
   });
 
+  test("works with bigint", () => {
+    expect(
+      pipe(
+        [{ a: 1n }, { a: 2n }, { a: 4n }, { a: 5n }, { a: 3n }],
+        sumBy(prop("a")),
+      ),
+    ).toEqual(15n);
+  });
+
+  it("should return 0 for an empty array", () => {
+    expect(pipe([], sumBy(prop("a")))).toBe(0);
+  });
+
   test("indexed", () => {
     const actual = pipe(
       [{ a: 1 }, { a: 2 }, { a: 4 }, { a: 5 }, { a: 3 }],