effect 2.0.0-next.48 → 2.0.0-next.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/Cache/dist/effect-Cache.cjs.dev.js +17 -17
  2. package/Cache/dist/effect-Cache.cjs.prod.js +17 -17
  3. package/Cause/dist/effect-Cause.cjs.dev.js +2 -2
  4. package/Cause/dist/effect-Cause.cjs.prod.js +2 -2
  5. package/Channel/dist/effect-Channel.cjs.dev.js +38 -29
  6. package/Channel/dist/effect-Channel.cjs.mjs +1 -0
  7. package/Channel/dist/effect-Channel.cjs.prod.js +38 -29
  8. package/Channel/dist/effect-Channel.esm.js +10 -2
  9. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +24 -24
  10. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +24 -24
  11. package/Chunk/dist/effect-Chunk.cjs.dev.js +10 -1
  12. package/Chunk/dist/effect-Chunk.cjs.mjs +1 -0
  13. package/Chunk/dist/effect-Chunk.cjs.prod.js +10 -1
  14. package/Chunk/dist/effect-Chunk.esm.js +10 -2
  15. package/Clock/dist/effect-Clock.cjs.dev.js +7 -7
  16. package/Clock/dist/effect-Clock.cjs.prod.js +7 -7
  17. package/Config/dist/effect-Config.cjs.dev.js +4 -4
  18. package/Config/dist/effect-Config.cjs.prod.js +4 -4
  19. package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +6 -6
  20. package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +6 -6
  21. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +1 -1
  22. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +1 -1
  23. package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +1 -1
  24. package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +1 -1
  25. package/Console/dist/effect-Console.cjs.dev.js +21 -21
  26. package/Console/dist/effect-Console.cjs.prod.js +21 -21
  27. package/Data/dist/effect-Data.cjs.dev.js +23 -23
  28. package/Data/dist/effect-Data.cjs.prod.js +23 -23
  29. package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +7 -7
  30. package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +7 -7
  31. package/Deferred/dist/effect-Deferred.cjs.dev.js +2 -2
  32. package/Deferred/dist/effect-Deferred.cjs.prod.js +2 -2
  33. package/Effect/dist/effect-Effect.cjs.dev.js +23 -23
  34. package/Effect/dist/effect-Effect.cjs.prod.js +23 -23
  35. package/Exit/dist/effect-Exit.cjs.dev.js +2 -2
  36. package/Exit/dist/effect-Exit.cjs.prod.js +2 -2
  37. package/Fiber/dist/effect-Fiber.cjs.dev.js +18 -18
  38. package/Fiber/dist/effect-Fiber.cjs.prod.js +18 -18
  39. package/FiberRef/dist/effect-FiberRef.cjs.dev.js +18 -18
  40. package/FiberRef/dist/effect-FiberRef.cjs.prod.js +18 -18
  41. package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +3 -3
  42. package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +3 -3
  43. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +4 -4
  44. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +4 -4
  45. package/GroupBy/dist/effect-GroupBy.cjs.dev.js +30 -30
  46. package/GroupBy/dist/effect-GroupBy.cjs.prod.js +30 -30
  47. package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +18 -18
  48. package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +18 -18
  49. package/Layer/dist/effect-Layer.cjs.dev.js +24 -24
  50. package/Layer/dist/effect-Layer.cjs.prod.js +24 -24
  51. package/List/dist/effect-List.cjs.dev.js +7 -0
  52. package/List/dist/effect-List.cjs.mjs +1 -0
  53. package/List/dist/effect-List.cjs.prod.js +7 -0
  54. package/List/dist/effect-List.esm.js +7 -1
  55. package/LogLevel/dist/effect-LogLevel.cjs.dev.js +2 -2
  56. package/LogLevel/dist/effect-LogLevel.cjs.prod.js +2 -2
  57. package/Logger/dist/effect-Logger.cjs.dev.js +22 -22
  58. package/Logger/dist/effect-Logger.cjs.prod.js +22 -22
  59. package/Metric/dist/effect-Metric.cjs.dev.js +104 -22
  60. package/Metric/dist/effect-Metric.cjs.prod.js +104 -22
  61. package/Metric/dist/effect-Metric.esm.js +88 -6
  62. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +1 -1
  63. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +1 -1
  64. package/MetricHook/dist/effect-MetricHook.cjs.dev.js +1 -1
  65. package/MetricHook/dist/effect-MetricHook.cjs.prod.js +1 -1
  66. package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +18 -18
  67. package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +18 -18
  68. package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +2 -2
  69. package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +2 -2
  70. package/Pool/dist/effect-Pool.cjs.dev.js +18 -18
  71. package/Pool/dist/effect-Pool.cjs.prod.js +18 -18
  72. package/PubSub/dist/effect-PubSub.cjs.dev.js +17 -17
  73. package/PubSub/dist/effect-PubSub.cjs.prod.js +17 -17
  74. package/Queue/dist/effect-Queue.cjs.dev.js +17 -17
  75. package/Queue/dist/effect-Queue.cjs.prod.js +17 -17
  76. package/Random/dist/effect-Random.cjs.dev.js +7 -7
  77. package/Random/dist/effect-Random.cjs.prod.js +7 -7
  78. package/Ref/dist/effect-Ref.cjs.dev.js +3 -3
  79. package/Ref/dist/effect-Ref.cjs.prod.js +3 -3
  80. package/Reloadable/dist/effect-Reloadable.cjs.dev.js +22 -22
  81. package/Reloadable/dist/effect-Reloadable.cjs.prod.js +22 -22
  82. package/Request/dist/effect-Request.cjs.dev.js +17 -17
  83. package/Request/dist/effect-Request.cjs.prod.js +17 -17
  84. package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +24 -24
  85. package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +24 -24
  86. package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +24 -24
  87. package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +24 -24
  88. package/Resource/dist/effect-Resource.cjs.dev.js +20 -20
  89. package/Resource/dist/effect-Resource.cjs.prod.js +20 -20
  90. package/Runtime/dist/effect-Runtime.cjs.dev.js +19 -19
  91. package/Runtime/dist/effect-Runtime.cjs.prod.js +19 -19
  92. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +22 -22
  93. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +22 -22
  94. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +1 -1
  95. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +1 -1
  96. package/STM/dist/effect-STM.cjs.dev.js +32 -32
  97. package/STM/dist/effect-STM.cjs.prod.js +32 -32
  98. package/Schedule/dist/effect-Schedule.cjs.dev.js +12 -12
  99. package/Schedule/dist/effect-Schedule.cjs.prod.js +12 -12
  100. package/Scheduler/dist/effect-Scheduler.cjs.dev.js +2 -2
  101. package/Scheduler/dist/effect-Scheduler.cjs.prod.js +2 -2
  102. package/Scope/dist/effect-Scope.cjs.dev.js +16 -16
  103. package/Scope/dist/effect-Scope.cjs.prod.js +16 -16
  104. package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +23 -23
  105. package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +23 -23
  106. package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +20 -20
  107. package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +20 -20
  108. package/Sink/dist/effect-Sink.cjs.dev.js +27 -27
  109. package/Sink/dist/effect-Sink.cjs.prod.js +27 -27
  110. package/Stream/dist/effect-Stream.cjs.dev.js +30 -30
  111. package/Stream/dist/effect-Stream.cjs.prod.js +30 -30
  112. package/Streamable/dist/effect-Streamable.cjs.dev.js +30 -30
  113. package/Streamable/dist/effect-Streamable.cjs.prod.js +30 -30
  114. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +29 -29
  115. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +29 -29
  116. package/Supervisor/dist/effect-Supervisor.cjs.dev.js +22 -22
  117. package/Supervisor/dist/effect-Supervisor.cjs.prod.js +22 -22
  118. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +19 -19
  119. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +19 -19
  120. package/TArray/dist/effect-TArray.cjs.dev.js +34 -34
  121. package/TArray/dist/effect-TArray.cjs.prod.js +34 -34
  122. package/TDeferred/dist/effect-TDeferred.cjs.dev.js +33 -33
  123. package/TDeferred/dist/effect-TDeferred.cjs.prod.js +33 -33
  124. package/TMap/dist/effect-TMap.cjs.dev.js +35 -35
  125. package/TMap/dist/effect-TMap.cjs.prod.js +35 -35
  126. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +32 -32
  127. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +32 -32
  128. package/TPubSub/dist/effect-TPubSub.cjs.dev.js +34 -34
  129. package/TPubSub/dist/effect-TPubSub.cjs.prod.js +34 -34
  130. package/TQueue/dist/effect-TQueue.cjs.dev.js +34 -34
  131. package/TQueue/dist/effect-TQueue.cjs.prod.js +34 -34
  132. package/TRandom/dist/effect-TRandom.cjs.dev.js +34 -34
  133. package/TRandom/dist/effect-TRandom.cjs.prod.js +34 -34
  134. package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +32 -32
  135. package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +32 -32
  136. package/TRef/dist/effect-TRef.cjs.dev.js +34 -34
  137. package/TRef/dist/effect-TRef.cjs.mjs +0 -1
  138. package/TRef/dist/effect-TRef.cjs.prod.js +34 -34
  139. package/TRef/dist/effect-TRef.esm.js +3 -2
  140. package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +33 -33
  141. package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +33 -33
  142. package/TSet/dist/effect-TSet.cjs.dev.js +35 -35
  143. package/TSet/dist/effect-TSet.cjs.prod.js +35 -35
  144. package/Take/dist/effect-Take.cjs.dev.js +24 -24
  145. package/Take/dist/effect-Take.cjs.prod.js +24 -24
  146. package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +12 -12
  147. package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +12 -12
  148. package/TestClock/dist/effect-TestClock.cjs.dev.js +21 -21
  149. package/TestClock/dist/effect-TestClock.cjs.prod.js +21 -21
  150. package/TestContext/dist/effect-TestContext.cjs.dev.js +23 -23
  151. package/TestContext/dist/effect-TestContext.cjs.prod.js +23 -23
  152. package/TestLive/dist/effect-TestLive.cjs.dev.js +7 -7
  153. package/TestLive/dist/effect-TestLive.cjs.prod.js +7 -7
  154. package/TestServices/dist/effect-TestServices.cjs.dev.js +23 -23
  155. package/TestServices/dist/effect-TestServices.cjs.prod.js +23 -23
  156. package/TestSized/dist/effect-TestSized.cjs.dev.js +2 -2
  157. package/TestSized/dist/effect-TestSized.cjs.prod.js +2 -2
  158. package/Tracer/dist/effect-Tracer.cjs.dev.js +7 -7
  159. package/Tracer/dist/effect-Tracer.cjs.prod.js +7 -7
  160. package/dist/{Ref-6608e3b6.cjs.prod.js → Ref-23b67ad9.cjs.prod.js} +1 -1
  161. package/dist/{Ref-548003d1.cjs.dev.js → Ref-c75b5362.cjs.dev.js} +1 -1
  162. package/dist/{cache-d7096ab5.cjs.prod.js → cache-7b144c1f.cjs.prod.js} +3 -3
  163. package/dist/{cache-7953c9ae.cjs.dev.js → cache-e3d6cc01.cjs.dev.js} +3 -3
  164. package/dist/{circular-b6cc8a1d.cjs.prod.js → circular-105d525c.cjs.prod.js} +4 -4
  165. package/dist/{circular-894f44de.cjs.prod.js → circular-3761aff7.cjs.prod.js} +6 -6
  166. package/dist/{circular-8568ddf2.cjs.dev.js → circular-8baf0205.cjs.dev.js} +6 -6
  167. package/dist/{circular-171d6971.cjs.dev.js → circular-cbfc1699.cjs.dev.js} +4 -4
  168. package/dist/{config-615bcaef.cjs.prod.js → config-6a5f97fe.cjs.prod.js} +2 -2
  169. package/dist/{config-ea74e7d0.cjs.dev.js → config-887520b4.cjs.dev.js} +2 -2
  170. package/dist/{configProvider-3877a6ec.cjs.prod.js → configProvider-098f7113.cjs.prod.js} +3 -3
  171. package/dist/{configProvider-089a1159.cjs.dev.js → configProvider-8567470d.cjs.dev.js} +3 -3
  172. package/dist/{core-365f89c2.cjs.dev.js → core-6815193e.cjs.dev.js} +3 -2
  173. package/dist/{core-8ccae4e2.cjs.prod.js → core-8072a539.cjs.prod.js} +2 -2
  174. package/dist/{core-3908bc43.cjs.prod.js → core-84667e8d.cjs.prod.js} +3 -2
  175. package/dist/{core-3d37486a.cjs.dev.js → core-e6f9fdbe.cjs.dev.js} +2 -2
  176. package/dist/{core-effect-37a0d753.cjs.prod.js → core-effect-520abd3d.cjs.prod.js} +5 -5
  177. package/dist/{core-effect-c529ccac.cjs.dev.js → core-effect-5700daea.cjs.dev.js} +5 -5
  178. package/dist/{dataSource-d125d7af.cjs.dev.js → dataSource-0ca8ef42.cjs.dev.js} +2 -2
  179. package/dist/{dataSource-0e407d86.cjs.prod.js → dataSource-17adc342.cjs.prod.js} +2 -2
  180. package/dist/declarations/src/Channel.d.ts +7 -0
  181. package/dist/declarations/src/Channel.d.ts.map +1 -1
  182. package/dist/declarations/src/Chunk.d.ts +11 -1
  183. package/dist/declarations/src/Chunk.d.ts.map +1 -1
  184. package/dist/declarations/src/Data.d.ts +5 -5
  185. package/dist/declarations/src/Data.d.ts.map +1 -1
  186. package/dist/declarations/src/HashMap.d.ts +30 -0
  187. package/dist/declarations/src/HashMap.d.ts.map +1 -1
  188. package/dist/declarations/src/List.d.ts +8 -0
  189. package/dist/declarations/src/List.d.ts.map +1 -1
  190. package/dist/declarations/src/Metric.d.ts +88 -6
  191. package/dist/declarations/src/Metric.d.ts.map +1 -1
  192. package/dist/declarations/src/TRef.d.ts.map +1 -1
  193. package/dist/{defaultServices-a933c201.cjs.dev.js → defaultServices-193b11dc.cjs.dev.js} +2 -2
  194. package/dist/{defaultServices-1c3db777.cjs.prod.js → defaultServices-4c3bf140.cjs.prod.js} +2 -2
  195. package/dist/{fiber-2858bd1f.cjs.prod.js → fiber-a1a5e429.cjs.prod.js} +2 -2
  196. package/dist/{fiber-13587a5a.cjs.dev.js → fiber-cbdeec72.cjs.dev.js} +2 -2
  197. package/dist/{fiberRefs-abe2a811.cjs.dev.js → fiberRefs-8d2401f9.cjs.dev.js} +1 -1
  198. package/dist/{fiberRefs-ea1edd57.cjs.prod.js → fiberRefs-f631451c.cjs.prod.js} +1 -1
  199. package/dist/{fiberRuntime-9fafeaab.cjs.prod.js → fiberRuntime-4691f31b.cjs.prod.js} +10 -10
  200. package/dist/{fiberRuntime-ebcb168f.cjs.dev.js → fiberRuntime-7cb6cd44.cjs.dev.js} +10 -10
  201. package/dist/{groupBy-050e6b17.cjs.dev.js → groupBy-239a6e6e.cjs.dev.js} +10 -7
  202. package/dist/{groupBy-93f35a1d.cjs.prod.js → groupBy-5174c302.cjs.prod.js} +10 -7
  203. package/dist/{layer-09807eda.cjs.dev.js → layer-961b15ae.cjs.dev.js} +8 -8
  204. package/dist/{layer-fc5b5ca7.cjs.prod.js → layer-d1c204db.cjs.prod.js} +8 -8
  205. package/dist/{patch-e72c6c2f.cjs.prod.js → patch-1771b466.cjs.prod.js} +1 -1
  206. package/dist/{patch-2f545954.cjs.dev.js → patch-32cc7202.cjs.dev.js} +1 -1
  207. package/dist/{pool-7c9cd8e9.cjs.dev.js → pool-3890e6ce.cjs.dev.js} +5 -5
  208. package/dist/{pool-9370f703.cjs.prod.js → pool-f178fcc7.cjs.prod.js} +5 -5
  209. package/dist/{query-6cd164ab.cjs.dev.js → query-39c40fa6.cjs.dev.js} +3 -3
  210. package/dist/{query-8147932f.cjs.prod.js → query-a6b58e39.cjs.prod.js} +3 -3
  211. package/dist/{queue-06ce789d.cjs.dev.js → queue-4c4bdc04.cjs.dev.js} +2 -2
  212. package/dist/{queue-6afe5f19.cjs.prod.js → queue-5342a8d5.cjs.prod.js} +2 -2
  213. package/dist/{registry-5c67df33.cjs.prod.js → registry-6fbdb4e3.cjs.prod.js} +1 -1
  214. package/dist/{registry-35e8eb48.cjs.dev.js → registry-ec8b84a2.cjs.dev.js} +1 -1
  215. package/dist/{runtime-d41d839b.cjs.prod.js → runtime-3295bc3c.cjs.prod.js} +4 -4
  216. package/dist/{runtime-fb1c1c19.cjs.dev.js → runtime-43b9e2bb.cjs.dev.js} +4 -4
  217. package/dist/{schedule-64057679.cjs.prod.js → schedule-6431754b.cjs.prod.js} +3 -3
  218. package/dist/{schedule-0e1db444.cjs.dev.js → schedule-a4be407d.cjs.dev.js} +3 -3
  219. package/dist/{scopedRef-7a6d42f7.cjs.prod.js → scopedRef-7c2bf3f3.cjs.prod.js} +6 -6
  220. package/dist/{scopedRef-2ea09a4f.cjs.dev.js → scopedRef-9032002a.cjs.dev.js} +6 -6
  221. package/dist/{singleProducerAsyncInput-97f74016.cjs.dev.js → singleProducerAsyncInput-82e5c80c.cjs.dev.js} +1 -1
  222. package/dist/{singleProducerAsyncInput-8b8ad112.cjs.prod.js → singleProducerAsyncInput-879852ad.cjs.prod.js} +1 -1
  223. package/dist/{sink-6d1a77bf.cjs.prod.js → sink-95371737.cjs.prod.js} +16 -18
  224. package/dist/{sink-ebf2fbdb.cjs.dev.js → sink-e4280f95.cjs.dev.js} +16 -18
  225. package/dist/{stm-dbec85f1.cjs.dev.js → stm-4bf1a928.cjs.dev.js} +3 -3
  226. package/dist/{stm-4a6de085.cjs.prod.js → stm-f792171c.cjs.prod.js} +3 -3
  227. package/dist/{stream-f7345889.cjs.prod.js → stream-254329d0.cjs.prod.js} +12 -11
  228. package/dist/{stream-478aa5a8.cjs.dev.js → stream-c498ce8a.cjs.dev.js} +12 -11
  229. package/dist/{synchronizedRef-432b4455.cjs.prod.js → synchronizedRef-5420532c.cjs.prod.js} +1 -1
  230. package/dist/{synchronizedRef-fa63e917.cjs.dev.js → synchronizedRef-cfe99d53.cjs.dev.js} +1 -1
  231. package/dist/{tArray-b30ccc3e.cjs.prod.js → tArray-7f227674.cjs.prod.js} +3 -3
  232. package/dist/{tArray-0c9045e7.cjs.dev.js → tArray-996f4aba.cjs.dev.js} +3 -3
  233. package/dist/{tMap-001c791c.cjs.prod.js → tMap-811797bf.cjs.prod.js} +4 -4
  234. package/dist/{tMap-0625df1d.cjs.dev.js → tMap-b9665a82.cjs.dev.js} +4 -4
  235. package/dist/{tQueue-cdbf9130.cjs.dev.js → tQueue-0c15312e.cjs.dev.js} +3 -3
  236. package/dist/{tQueue-6accdd70.cjs.prod.js → tQueue-8a6a0244.cjs.prod.js} +3 -3
  237. package/dist/{tRef-8b60d85b.cjs.prod.js → tRef-2892ee02.cjs.prod.js} +1 -1
  238. package/dist/{tRef-b5bae36d.cjs.dev.js → tRef-44d17d07.cjs.dev.js} +1 -1
  239. package/internal/cause.esm.js +2 -1
  240. package/internal/channel.esm.js +26 -28
  241. package/internal/core-stream.esm.js +1 -1
  242. package/internal/groupBy.esm.js +8 -5
  243. package/internal/sink.esm.js +11 -11
  244. package/internal/stream.esm.js +9 -9
  245. package/package.json +6 -5
  246. package/src/Channel.ts +10 -0
  247. package/src/Chunk.ts +12 -1
  248. package/src/Data.ts +15 -5
  249. package/src/HashMap.ts +30 -0
  250. package/src/List.ts +9 -0
  251. package/src/Metric.ts +88 -6
  252. package/src/TRef.ts +1 -1
  253. package/src/internal/cause.ts +1 -1
  254. package/src/internal/channel.ts +84 -91
  255. package/src/internal/groupBy.ts +7 -3
  256. package/src/internal/stream.ts +8 -5
  257. package/src/tsconfig.json +9 -1
  258. /package/dist/{RuntimeFlagsPatch-902b4680.cjs.prod.js → RuntimeFlagsPatch-35ed8dee.cjs.prod.js} +0 -0
  259. /package/dist/{RuntimeFlagsPatch-cf423492.cjs.dev.js → RuntimeFlagsPatch-9cbc441d.cjs.dev.js} +0 -0
  260. /package/dist/{boundaries-bfd86b3e.cjs.prod.js → boundaries-26f0dc82.cjs.prod.js} +0 -0
  261. /package/dist/{boundaries-b5265184.cjs.dev.js → boundaries-6eea221f.cjs.dev.js} +0 -0
  262. /package/dist/{configSecret-e7bb51da.cjs.dev.js → configSecret-23cf1a3f.cjs.dev.js} +0 -0
  263. /package/dist/{configSecret-9b941a86.cjs.prod.js → configSecret-663cfb59.cjs.prod.js} +0 -0
  264. /package/dist/{hook-2c94278c.cjs.dev.js → hook-8e8bee6a.cjs.dev.js} +0 -0
  265. /package/dist/{hook-9af5cf52.cjs.prod.js → hook-c2815d51.cjs.prod.js} +0 -0
  266. /package/dist/{pathPatch-f3064fa9.cjs.prod.js → pathPatch-312bd492.cjs.prod.js} +0 -0
  267. /package/dist/{pathPatch-9fa78980.cjs.dev.js → pathPatch-45b09159.cjs.dev.js} +0 -0
  268. /package/dist/{take-15455ae3.cjs.prod.js → take-981a87eb.cjs.prod.js} +0 -0
  269. /package/dist/{take-1c250e7a.cjs.dev.js → take-bfd0a3ed.cjs.dev.js} +0 -0
package/src/Chunk.ts CHANGED
@@ -823,7 +823,7 @@ export const last = <A>(self: Chunk<A>): Option<A> => get(self, self.length - 1)
823
823
  export const unsafeLast = <A>(self: Chunk<A>): A => unsafeGet(self, self.length - 1)
824
824
 
825
825
  /**
826
- * Returns an effect whose success is mapped by the specified f function.
826
+ * Returns a chunk with the elements mapped by the specified f function.
827
827
  *
828
828
  * @since 2.0.0
829
829
  * @category mapping
@@ -836,6 +836,17 @@ export const map: {
836
836
  of(f(self.backing.a, 0)) :
837
837
  unsafeFromArray(pipe(toReadonlyArray(self), RA.map((a, i) => f(a, i)))))
838
838
 
839
+ /**
840
+ * Returns a non empty chunk with the elements mapped by the specified f function.
841
+ *
842
+ * @since 2.0.0
843
+ * @category mapping
844
+ */
845
+ export const mapNonEmpty: {
846
+ <A, B>(f: (a: A, i: number) => B): (self: NonEmptyChunk<A>) => NonEmptyChunk<B>
847
+ <A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => B): NonEmptyChunk<B>
848
+ } = map as any
849
+
839
850
  /**
840
851
  * Statefully maps over the chunk, producing new elements of type `B`.
841
852
  *
package/src/Data.ts CHANGED
@@ -164,11 +164,21 @@ export const Structural: new<A>(
164
164
  * @since 2.0.0
165
165
  * @category models
166
166
  */
167
- export type TaggedEnum<A extends Record<string, Record<string, any>>> = {
168
- readonly [Tag in keyof A]: Data<
169
- Readonly<Types.Simplify<A[Tag] & { _tag: Tag }>>
170
- >
171
- }[keyof A]
167
+ export type TaggedEnum<
168
+ A extends Record<string, Record<string, any>> & UntaggedChildren<A>
169
+ > = keyof A extends infer Tag
170
+ ? Tag extends keyof A ? Data<{ readonly [K in `_tag` | keyof A[Tag]]: K extends `_tag` ? Tag : A[Tag][K] }>
171
+ : never
172
+ : never
173
+
174
+ type ChildrenAreTagged<A> = keyof A extends infer K ? K extends keyof A ? "_tag" extends keyof A[K] ? true
175
+ : false
176
+ : never
177
+ : never
178
+
179
+ type UntaggedChildren<A> = true extends ChildrenAreTagged<A>
180
+ ? "It looks like you're trying to create a tagged enum, but one or more of its members already has a `_tag` property."
181
+ : unknown
172
182
 
173
183
  /**
174
184
  * @since 2.0.0
package/src/HashMap.ts CHANGED
@@ -35,6 +35,36 @@ export declare namespace HashMap {
35
35
  * @category models
36
36
  */
37
37
  export type UpdateFn<V> = (option: Option<V>) => Option<V>
38
+ /**
39
+ * This type-level utility extracts the key type `K` from a `HashMap<K, V>` type.
40
+ *
41
+ * @example
42
+ * import * as HashMap from "effect/HashMap"
43
+ *
44
+ * declare const hm: HashMap.HashMap<string, number>
45
+ *
46
+ * // $ExpectType string
47
+ * type K = HashMap.HashMap.Key<typeof hm>
48
+ *
49
+ * @since 2.0.0
50
+ * @category type-level
51
+ */
52
+ export type Key<T extends HashMap<any, any>> = [T] extends [HashMap<infer _K, infer _V>] ? _K : never
53
+ /**
54
+ * This type-level utility extracts the value type `V` from a `HashMap<K, V>` type.
55
+ *
56
+ * @example
57
+ * import * as HashMap from "effect/HashMap"
58
+ *
59
+ * declare const hm: HashMap.HashMap<string, number>
60
+ *
61
+ * // $ExpectType number
62
+ * type V = HashMap.HashMap.Value<typeof hm>
63
+ *
64
+ * @since 2.0.0
65
+ * @category type-level
66
+ */
67
+ export type Value<T extends HashMap<any, any>> = [T] extends [HashMap<infer _K, infer _V>] ? _V : never
38
68
  }
39
69
 
40
70
  /**
package/src/List.ts CHANGED
@@ -736,6 +736,15 @@ export const map: {
736
736
  }
737
737
  })
738
738
 
739
+ /**
740
+ * @since 2.0.0
741
+ * @category combinators
742
+ */
743
+ export const mapNonEmpty: {
744
+ <A, B>(f: (a: A) => B): (self: Cons<A>) => Cons<B>
745
+ <A, B>(self: Cons<A>, f: (a: A) => B): Cons<B>
746
+ } = map as any
747
+
739
748
  /**
740
749
  * Partition a list into two lists, where the first list contains all elements
741
750
  * that did not satisfy the specified predicate, and the second list contains
package/src/Metric.ts CHANGED
@@ -156,7 +156,26 @@ export const mapInput: {
156
156
  } = internal.mapInput
157
157
 
158
158
  /**
159
- * A counter, which can be incremented by numbers.
159
+ * Represents a Counter metric that tracks cumulative numerical values over time.
160
+ * Counters can be incremented and decremented and provide a running total of changes.
161
+ *
162
+ * @param name - The name of the counter metric.
163
+ * @param options - An optional configuration for the counter:
164
+ * - description - A description of the counter.
165
+ * - bigint - Indicates if the counter uses 'bigint' data type.
166
+ * - incremental - Set to 'true' for a counter that only increases. With this configuration, Effect ensures that non-incremental updates have no impact on the counter, making it exclusively suitable for counting upwards.
167
+ *
168
+ * @example
169
+ * import * as Metric from "effect/Metric"
170
+ *
171
+ * const numberCounter = Metric.counter("count", {
172
+ * description: "A number counter"
173
+ * });
174
+ *
175
+ * const bigintCounter = Metric.counter("count", {
176
+ * description: "A bigint counter",
177
+ * bigint: true
178
+ * });
160
179
  *
161
180
  * @since 2.0.0
162
181
  * @category constructors
@@ -181,8 +200,16 @@ export const counter: {
181
200
  } = internal.counter
182
201
 
183
202
  /**
184
- * A string histogram metric, which keeps track of the counts of different
185
- * strings.
203
+ * Creates a Frequency metric to count occurrences of events.
204
+ * Frequency metrics are used to count the number of times specific events or incidents occur.
205
+ *
206
+ * @param name - The name of the Frequency metric.
207
+ * @param description - An optional description of the Frequency metric.
208
+ *
209
+ * @example
210
+ * import * as Metric from "effect/Metric"
211
+ *
212
+ * const errorFrequency = Metric.frequency("error_frequency", "Counts the occurrences of errors.");
186
213
  *
187
214
  * @since 2.0.0
188
215
  * @category constructors
@@ -212,7 +239,25 @@ export const fromMetricKey: <Type extends MetricKeyType.MetricKeyType<any, any>>
212
239
  internal.fromMetricKey
213
240
 
214
241
  /**
215
- * A gauge, which can be set to a value.
242
+ * Represents a Gauge metric that tracks and reports a single numerical value at a specific moment.
243
+ * Gauges are suitable for metrics that represent instantaneous values, such as memory usage or CPU load.
244
+ *
245
+ * @param name - The name of the gauge metric.
246
+ * @param options - An optional configuration for the gauge:
247
+ * - description - A description of the gauge metric.
248
+ * - bigint - Indicates if the counter uses 'bigint' data type.
249
+ *
250
+ * @example
251
+ * import * as Metric from "effect/Metric"
252
+ *
253
+ * const numberGauge = Metric.gauge("memory_usage", {
254
+ * description: "A gauge for memory usage"
255
+ * });
256
+ *
257
+ * const bigintGauge = Metric.gauge("cpu_load", {
258
+ * description: "A gauge for CPU load",
259
+ * bigint: true
260
+ * });
216
261
  *
217
262
  * @since 2.0.0
218
263
  * @category constructors
@@ -223,8 +268,21 @@ export const gauge: {
223
268
  } = internal.gauge
224
269
 
225
270
  /**
226
- * A numeric histogram metric, which keeps track of the count of numbers that
227
- * fall in bins with the specified boundaries.
271
+ * Represents a Histogram metric that records observations in specified value boundaries.
272
+ * Histogram metrics are useful for measuring the distribution of values within a range.
273
+ *
274
+ * @param name - The name of the histogram metric.
275
+ * @param boundaries - The boundaries for defining the histogram's value ranges.
276
+ * @param description - A description of the histogram metric.
277
+ *
278
+ * @example
279
+ * import * as Metric from "effect/Metric"
280
+ * import * as MetricBoundaries from "effect/MetricBoundaries"
281
+ *
282
+ * const latencyHistogram = Metric.histogram("latency_histogram",
283
+ * MetricBoundaries.linear({ start: 0, width: 10, count: 11 }),
284
+ * "Measures the distribution of request latency."
285
+ * );
228
286
  *
229
287
  * @since 2.0.0
230
288
  * @category constructors
@@ -311,6 +369,30 @@ export const succeed: <Out>(out: Out) => Metric<void, unknown, Out> = internal.s
311
369
  export const sync: <Out>(evaluate: LazyArg<Out>) => Metric<void, unknown, Out> = internal.sync
312
370
 
313
371
  /**
372
+ * Creates a Summary metric that records observations and calculates quantiles.
373
+ * Summary metrics provide statistical information about a set of values, including quantiles.
374
+ *
375
+ * @param options - An object with configuration options for the Summary metric:
376
+ * - name - The name of the Summary metric.
377
+ * - maxAge - The maximum age of observations to retain.
378
+ * - maxSize - The maximum number of observations to keep.
379
+ * - error - The error percentage when calculating quantiles.
380
+ * - quantiles - An `Chunk` of quantiles to calculate (e.g., [0.5, 0.9]).
381
+ * - description - An optional description of the Summary metric.
382
+ *
383
+ * @example
384
+ * import * as Metric from "effect/Metric"
385
+ * import * as Chunk from "effect/Chunk"
386
+ *
387
+ * const responseTimesSummary = Metric.summary({
388
+ * name: "response_times_summary",
389
+ * maxAge: "60 seconds", // Retain observations for 60 seconds.
390
+ * maxSize: 1000, // Keep a maximum of 1000 observations.
391
+ * error: 0.01, // Allow a 1% error when calculating quantiles.
392
+ * quantiles: Chunk.make(0.5, 0.9, 0.99), // Calculate 50th, 90th, and 99th percentiles.
393
+ * description: "Measures the distribution of response times."
394
+ * });
395
+ *
314
396
  * @since 2.0.0
315
397
  * @category constructors
316
398
  */
package/src/TRef.ts CHANGED
@@ -53,7 +53,7 @@ export interface TRef<A> {
53
53
  /**
54
54
  * @since 2.0.0
55
55
  */
56
- export namespace TRef {
56
+ export declare namespace TRef {
57
57
  /**
58
58
  * @since 2.0.0
59
59
  */
@@ -59,7 +59,7 @@ const proto = {
59
59
  return { _id: "Cause", _tag: this._tag, failure: toJSON(this.error) }
60
60
  case "Sequential":
61
61
  case "Parallel":
62
- return { _id: "Cause", _tag: this._tag, errors: toJSON(prettyErrors(this)) }
62
+ return { _id: "Cause", _tag: this._tag, left: toJSON(this.left), right: toJSON(this.right) }
63
63
  }
64
64
  },
65
65
  toString<E>(this: Cause.Cause<E>) {
@@ -1176,6 +1176,7 @@ export const mergeAllWith = (
1176
1176
  > =>
1177
1177
  pipe(
1178
1178
  Effect.gen(function*($) {
1179
+ const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : concurrency
1179
1180
  const input = yield* $(singleProducerAsyncInput.make<
1180
1181
  InErr & InErr1,
1181
1182
  InElem & InElem1,
@@ -1196,9 +1197,8 @@ export const mergeAllWith = (
1196
1197
  )
1197
1198
  const lastDone = yield* $(Ref.make<Option.Option<OutDone>>(Option.none()))
1198
1199
  const errorSignal = yield* $(Deferred.make<never, void>())
1199
- const withPermits = concurrency === "unbounded" ?
1200
- ((_: number) => identity) :
1201
- (yield* $(Effect.makeSemaphore(concurrency))).withPermits
1200
+ const withPermits = (yield* $(Effect.makeSemaphore(concurrencyN)))
1201
+ .withPermits
1202
1202
  const pull = yield* $(toPull(channels))
1203
1203
  const evaluatePull = (
1204
1204
  pull: Effect.Effect<Env | Env1, OutErr | OutErr1, Either.Either<OutDone, OutElem>>
@@ -1216,23 +1216,21 @@ export const mergeAllWith = (
1216
1216
  })
1217
1217
  ),
1218
1218
  Effect.repeatUntil(Option.isSome),
1219
- Effect.flatMap(Option.match({
1220
- onNone: () => Effect.unit,
1221
- onSome: (outDone) =>
1222
- Ref.update(
1223
- lastDone,
1224
- Option.match({
1225
- onNone: () => Option.some(outDone),
1226
- onSome: (lastDone) => Option.some(f(lastDone, outDone))
1227
- })
1228
- )
1229
- })),
1219
+ Effect.flatMap((outDone) =>
1220
+ Ref.update(
1221
+ lastDone,
1222
+ Option.match({
1223
+ onNone: () => Option.some(outDone.value),
1224
+ onSome: (lastDone) => Option.some(f(lastDone, outDone.value))
1225
+ })
1226
+ )
1227
+ ),
1230
1228
  Effect.catchAllCause((cause) =>
1231
1229
  Cause.isInterrupted(cause) ?
1232
1230
  Effect.failCause(cause) :
1233
1231
  pipe(
1234
1232
  Queue.offer(queue, Effect.failCause(cause)),
1235
- Effect.zipRight(Deferred.succeed<never, void>(errorSignal, void 0)),
1233
+ Effect.zipRight(Deferred.succeed(errorSignal, void 0)),
1236
1234
  Effect.asUnit
1237
1235
  )
1238
1236
  )
@@ -1246,88 +1244,83 @@ export const mergeAllWith = (
1246
1244
  ),
1247
1245
  onSuccess: Either.match({
1248
1246
  onLeft: (outDone) =>
1249
- Effect.raceWith(Deferred.await(errorSignal), withPermits(concurrency as number)(Effect.unit), {
1250
- onSelfDone: (_, permitAcquisition) => pipe(Fiber.interrupt(permitAcquisition), Effect.as(false)),
1247
+ Effect.raceWith(Deferred.await(errorSignal), withPermits(concurrencyN)(Effect.unit), {
1248
+ onSelfDone: (_, permitAcquisition) => Effect.as(Fiber.interrupt(permitAcquisition), false),
1251
1249
  onOtherDone: (_, failureAwait) =>
1252
- pipe(
1250
+ Effect.zipRight(
1253
1251
  Fiber.interrupt(failureAwait),
1254
- Effect.zipRight(
1255
- pipe(
1256
- Ref.get(lastDone),
1257
- Effect.flatMap(Option.match({
1258
- onNone: () => Queue.offer(queue, Effect.succeed(Either.left(outDone))),
1259
- onSome: (lastDone) => Queue.offer(queue, Effect.succeed(Either.left(f(lastDone, outDone))))
1260
- })),
1261
- Effect.as(false)
1262
- )
1252
+ pipe(
1253
+ Ref.get(lastDone),
1254
+ Effect.flatMap(Option.match({
1255
+ onNone: () => Queue.offer(queue, Effect.succeed(Either.left(outDone))),
1256
+ onSome: (lastDone) => Queue.offer(queue, Effect.succeed(Either.left(f(lastDone, outDone))))
1257
+ })),
1258
+ Effect.as(false)
1263
1259
  )
1264
1260
  )
1265
1261
  }),
1266
1262
  onRight: (channel) =>
1267
- pipe(
1268
- mergeStrategy,
1269
- _mergeStrategy.match({
1270
- onBackPressure: () =>
1271
- Effect.gen(function*($) {
1272
- const latch = yield* $(Deferred.make<never, void>())
1273
- const raceEffects: Effect.Effect<Env | Env1, OutErr | OutErr1, void> = pipe(
1274
- queueReader,
1275
- core.pipeTo(channel),
1276
- toPull,
1277
- Effect.flatMap((pull) =>
1278
- pipe(
1279
- evaluatePull(pull),
1280
- Effect.race(Deferred.await(errorSignal))
1281
- )
1282
- ),
1283
- Effect.scoped
1284
- )
1285
- yield* $(
1286
- Deferred.succeed<never, void>(latch, void 0),
1287
- Effect.zipRight(raceEffects),
1288
- withPermits(1),
1289
- Effect.forkScoped
1290
- )
1291
- yield* $(Deferred.await(latch))
1292
- const errored = yield* $(Deferred.isDone(errorSignal))
1293
- return !errored
1294
- }),
1295
- onBufferSliding: () =>
1296
- Effect.gen(function*($) {
1297
- const canceler = yield* $(Deferred.make<never, void>())
1298
- const latch = yield* $(Deferred.make<never, void>())
1299
- const size = yield* $(Queue.size(cancelers))
1300
- yield* $(
1301
- Queue.take(cancelers),
1302
- Effect.flatMap((_) => Deferred.succeed<never, void>(_, void 0)),
1303
- Effect.when(() => concurrency === "unbounded" ? false : size >= concurrency)
1304
- )
1305
- yield* $(Queue.offer(cancelers, canceler))
1306
- const raceEffects: Effect.Effect<Env | Env1, OutErr | OutErr1, void> = pipe(
1307
- queueReader,
1308
- core.pipeTo(channel),
1309
- toPull,
1310
- Effect.flatMap((pull) =>
1311
- pipe(
1312
- evaluatePull(pull),
1313
- Effect.race(Deferred.await(errorSignal)),
1314
- Effect.race(Deferred.await(canceler))
1315
- )
1316
- ),
1317
- Effect.scoped
1318
- )
1319
- yield* $(
1320
- Deferred.succeed<never, void>(latch, void 0),
1321
- Effect.zipRight(raceEffects),
1322
- withPermits(1),
1323
- Effect.forkScoped
1324
- )
1325
- yield* $(Deferred.await(latch))
1326
- const errored = yield* $(Deferred.isDone(errorSignal))
1327
- return !errored
1328
- })
1329
- })
1330
- )
1263
+ _mergeStrategy.match(mergeStrategy, {
1264
+ onBackPressure: () =>
1265
+ Effect.gen(function*($) {
1266
+ const latch = yield* $(Deferred.make<never, void>())
1267
+ const raceEffects: Effect.Effect<Env | Env1, OutErr | OutErr1, void> = pipe(
1268
+ queueReader,
1269
+ core.pipeTo(channel),
1270
+ toPull,
1271
+ Effect.flatMap((pull) =>
1272
+ Effect.race(
1273
+ evaluatePull(pull),
1274
+ Deferred.await(errorSignal)
1275
+ )
1276
+ ),
1277
+ Effect.scoped
1278
+ )
1279
+ yield* $(
1280
+ Deferred.succeed<never, void>(latch, void 0),
1281
+ Effect.zipRight(raceEffects),
1282
+ withPermits(1),
1283
+ Effect.forkScoped
1284
+ )
1285
+ yield* $(Deferred.await(latch))
1286
+ const errored = yield* $(Deferred.isDone(errorSignal))
1287
+ return !errored
1288
+ }),
1289
+ onBufferSliding: () =>
1290
+ Effect.gen(function*($) {
1291
+ const canceler = yield* $(Deferred.make<never, void>())
1292
+ const latch = yield* $(Deferred.make<never, void>())
1293
+ const size = yield* $(Queue.size(cancelers))
1294
+ yield* $(
1295
+ Queue.take(cancelers),
1296
+ Effect.flatMap((_) => Deferred.succeed<never, void>(_, void 0)),
1297
+ Effect.when(() => size >= concurrencyN)
1298
+ )
1299
+ yield* $(Queue.offer(cancelers, canceler))
1300
+ const raceEffects: Effect.Effect<Env | Env1, OutErr | OutErr1, void> = pipe(
1301
+ queueReader,
1302
+ core.pipeTo(channel),
1303
+ toPull,
1304
+ Effect.flatMap((pull) =>
1305
+ pipe(
1306
+ evaluatePull(pull),
1307
+ Effect.race(Deferred.await(errorSignal)),
1308
+ Effect.race(Deferred.await(canceler))
1309
+ )
1310
+ ),
1311
+ Effect.scoped
1312
+ )
1313
+ yield* $(
1314
+ Deferred.succeed<never, void>(latch, void 0),
1315
+ Effect.zipRight(raceEffects),
1316
+ withPermits(1),
1317
+ Effect.forkScoped
1318
+ )
1319
+ yield* $(Deferred.await(latch))
1320
+ const errored = yield* $(Deferred.isDone(errorSignal))
1321
+ return !errored
1322
+ })
1323
+ })
1331
1324
  })
1332
1325
  }),
1333
1326
  Effect.repeatWhile(identity),
@@ -35,6 +35,10 @@ const groupByVariance = {
35
35
  _V: (_: never) => _
36
36
  }
37
37
 
38
+ /** @internal */
39
+ export const isGroupBy = (u: unknown): u is GroupBy.GroupBy<unknown, unknown, unknown, unknown> =>
40
+ typeof u === "object" && u != null && GroupByTypeId in u
41
+
38
42
  /** @internal */
39
43
  export const evaluate = dual<
40
44
  <K, E, V, R2, E2, A>(
@@ -47,7 +51,7 @@ export const evaluate = dual<
47
51
  options?: { readonly bufferSize?: number }
48
52
  ) => Stream.Stream<R2 | R, E | E2, A>
49
53
  >(
50
- 3,
54
+ (args) => isGroupBy(args[0]),
51
55
  <R, K, E, V, R2, E2, A>(
52
56
  self: GroupBy.GroupBy<R, E, K, V>,
53
57
  f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>,
@@ -122,7 +126,7 @@ export const groupBy = dual<
122
126
  options?: { readonly bufferSize?: number }
123
127
  ) => GroupBy.GroupBy<R2 | R, E2 | E, K, V>
124
128
  >(
125
- (args) => typeof args[0] !== "function",
129
+ (args) => stream.isStream(args[0]),
126
130
  <R, E, A, R2, E2, K, V>(
127
131
  self: Stream.Stream<R, E, A>,
128
132
  f: (a: A) => Effect.Effect<R2, E2, readonly [K, V]>,
@@ -240,7 +244,7 @@ export const mapEffectOptions = dual<
240
244
  if (options?.key) {
241
245
  return evaluate(
242
246
  groupByKey(self, options.key, { bufferSize: options.bufferSize }),
243
- (_, s) => pipe(s, stream.mapEffectSequential(f))
247
+ (_, s) => stream.mapEffectSequential(s, f)
244
248
  )
245
249
  }
246
250
 
@@ -2613,12 +2613,12 @@ export const flatMap = dual<
2613
2613
  )
2614
2614
  )
2615
2615
  ),
2616
- (n) =>
2616
+ (_) =>
2617
2617
  new StreamImpl(
2618
2618
  pipe(
2619
2619
  toChannel(self),
2620
2620
  channel.concatMap(channel.writeChunk),
2621
- channel.mergeMap((out) => toChannel(f(out)), { concurrency: n, bufferSize })
2621
+ channel.mergeMap((out) => toChannel(f(out)), options as any)
2622
2622
  )
2623
2623
  )
2624
2624
  )
@@ -2635,7 +2635,7 @@ export const matchConcurrency = <A>(
2635
2635
  case undefined:
2636
2636
  return sequential()
2637
2637
  case "unbounded":
2638
- return bounded(Number.POSITIVE_INFINITY)
2638
+ return bounded(Number.MAX_SAFE_INTEGER)
2639
2639
  default:
2640
2640
  return concurrency > 1 ? bounded(concurrency) : sequential()
2641
2641
  }
@@ -2980,10 +2980,13 @@ export const fromIteratorSucceed = <A>(
2980
2980
  }
2981
2981
  builder = []
2982
2982
  let count = 0
2983
- while (count < maxChunkSize && !next.done) {
2983
+ while (next.done === false) {
2984
2984
  builder.push(next.value)
2985
- next = iterator.next()
2986
2985
  count = count + 1
2986
+ if (count >= maxChunkSize) {
2987
+ break
2988
+ }
2989
+ next = iterator.next()
2987
2990
  }
2988
2991
  if (count > 0) {
2989
2992
  return pipe(
package/src/tsconfig.json CHANGED
@@ -33,7 +33,15 @@
33
33
  "target": "ES2021",
34
34
  "module": "ES6",
35
35
  "incremental": true,
36
- "removeComments": false
36
+ "removeComments": false,
37
+ "paths": {
38
+ "effect": [
39
+ "./index.ts"
40
+ ],
41
+ "effect/*": [
42
+ "./*.ts"
43
+ ]
44
+ }
37
45
  },
38
46
  "include": [
39
47
  "**/*"