@effectionx/worker 0.1.1 → 0.1.2

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 (213) hide show
  1. package/esm/worker.js +1 -1
  2. package/package.json +1 -4
  3. package/script/worker.js +2 -2
  4. package/esm/_dnt.shims.d.ts +0 -2
  5. package/esm/_dnt.shims.d.ts.map +0 -1
  6. package/esm/_dnt.shims.js +0 -57
  7. package/esm/deps/jsr.io/@std/assert/1.0.12/almost_equals.d.ts +0 -29
  8. package/esm/deps/jsr.io/@std/assert/1.0.12/almost_equals.d.ts.map +0 -1
  9. package/esm/deps/jsr.io/@std/assert/1.0.12/almost_equals.js +0 -46
  10. package/esm/deps/jsr.io/@std/assert/1.0.12/array_includes.d.ts +0 -24
  11. package/esm/deps/jsr.io/@std/assert/1.0.12/array_includes.d.ts.map +0 -1
  12. package/esm/deps/jsr.io/@std/assert/1.0.12/array_includes.js +0 -46
  13. package/esm/deps/jsr.io/@std/assert/1.0.12/assert.d.ts +0 -16
  14. package/esm/deps/jsr.io/@std/assert/1.0.12/assert.d.ts.map +0 -1
  15. package/esm/deps/jsr.io/@std/assert/1.0.12/assert.js +0 -22
  16. package/esm/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts +0 -26
  17. package/esm/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts.map +0 -1
  18. package/esm/deps/jsr.io/@std/assert/1.0.12/assertion_error.js +0 -30
  19. package/esm/deps/jsr.io/@std/assert/1.0.12/equal.d.ts +0 -17
  20. package/esm/deps/jsr.io/@std/assert/1.0.12/equal.d.ts.map +0 -1
  21. package/esm/deps/jsr.io/@std/assert/1.0.12/equal.js +0 -183
  22. package/esm/deps/jsr.io/@std/assert/1.0.12/equals.d.ts +0 -35
  23. package/esm/deps/jsr.io/@std/assert/1.0.12/equals.d.ts.map +0 -1
  24. package/esm/deps/jsr.io/@std/assert/1.0.12/equals.js +0 -58
  25. package/esm/deps/jsr.io/@std/assert/1.0.12/exists.d.ts +0 -18
  26. package/esm/deps/jsr.io/@std/assert/1.0.12/exists.d.ts.map +0 -1
  27. package/esm/deps/jsr.io/@std/assert/1.0.12/exists.js +0 -27
  28. package/esm/deps/jsr.io/@std/assert/1.0.12/fail.d.ts +0 -15
  29. package/esm/deps/jsr.io/@std/assert/1.0.12/fail.d.ts.map +0 -1
  30. package/esm/deps/jsr.io/@std/assert/1.0.12/fail.js +0 -20
  31. package/esm/deps/jsr.io/@std/assert/1.0.12/false.d.ts +0 -18
  32. package/esm/deps/jsr.io/@std/assert/1.0.12/false.d.ts.map +0 -1
  33. package/esm/deps/jsr.io/@std/assert/1.0.12/false.js +0 -22
  34. package/esm/deps/jsr.io/@std/assert/1.0.12/greater.d.ts +0 -20
  35. package/esm/deps/jsr.io/@std/assert/1.0.12/greater.d.ts.map +0 -1
  36. package/esm/deps/jsr.io/@std/assert/1.0.12/greater.js +0 -29
  37. package/esm/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.d.ts +0 -20
  38. package/esm/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.d.ts.map +0 -1
  39. package/esm/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.js +0 -29
  40. package/esm/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts +0 -23
  41. package/esm/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts.map +0 -1
  42. package/esm/deps/jsr.io/@std/assert/1.0.12/instance_of.js +0 -52
  43. package/esm/deps/jsr.io/@std/assert/1.0.12/is_error.d.ts +0 -25
  44. package/esm/deps/jsr.io/@std/assert/1.0.12/is_error.d.ts.map +0 -1
  45. package/esm/deps/jsr.io/@std/assert/1.0.12/is_error.js +0 -53
  46. package/esm/deps/jsr.io/@std/assert/1.0.12/less.d.ts +0 -19
  47. package/esm/deps/jsr.io/@std/assert/1.0.12/less.d.ts.map +0 -1
  48. package/esm/deps/jsr.io/@std/assert/1.0.12/less.js +0 -28
  49. package/esm/deps/jsr.io/@std/assert/1.0.12/less_or_equal.d.ts +0 -20
  50. package/esm/deps/jsr.io/@std/assert/1.0.12/less_or_equal.d.ts.map +0 -1
  51. package/esm/deps/jsr.io/@std/assert/1.0.12/less_or_equal.js +0 -29
  52. package/esm/deps/jsr.io/@std/assert/1.0.12/match.d.ts +0 -18
  53. package/esm/deps/jsr.io/@std/assert/1.0.12/match.d.ts.map +0 -1
  54. package/esm/deps/jsr.io/@std/assert/1.0.12/match.js +0 -26
  55. package/esm/deps/jsr.io/@std/assert/1.0.12/mod.d.ts +0 -44
  56. package/esm/deps/jsr.io/@std/assert/1.0.12/mod.d.ts.map +0 -1
  57. package/esm/deps/jsr.io/@std/assert/1.0.12/mod.js +0 -45
  58. package/esm/deps/jsr.io/@std/assert/1.0.12/not_equals.d.ts +0 -21
  59. package/esm/deps/jsr.io/@std/assert/1.0.12/not_equals.d.ts.map +0 -1
  60. package/esm/deps/jsr.io/@std/assert/1.0.12/not_equals.js +0 -33
  61. package/esm/deps/jsr.io/@std/assert/1.0.12/not_instance_of.d.ts +0 -20
  62. package/esm/deps/jsr.io/@std/assert/1.0.12/not_instance_of.d.ts.map +0 -1
  63. package/esm/deps/jsr.io/@std/assert/1.0.12/not_instance_of.js +0 -29
  64. package/esm/deps/jsr.io/@std/assert/1.0.12/not_match.d.ts +0 -18
  65. package/esm/deps/jsr.io/@std/assert/1.0.12/not_match.d.ts.map +0 -1
  66. package/esm/deps/jsr.io/@std/assert/1.0.12/not_match.js +0 -26
  67. package/esm/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.d.ts +0 -23
  68. package/esm/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.d.ts.map +0 -1
  69. package/esm/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.js +0 -32
  70. package/esm/deps/jsr.io/@std/assert/1.0.12/object_match.d.ts +0 -29
  71. package/esm/deps/jsr.io/@std/assert/1.0.12/object_match.d.ts.map +0 -1
  72. package/esm/deps/jsr.io/@std/assert/1.0.12/object_match.js +0 -167
  73. package/esm/deps/jsr.io/@std/assert/1.0.12/rejects.d.ts +0 -42
  74. package/esm/deps/jsr.io/@std/assert/1.0.12/rejects.d.ts.map +0 -1
  75. package/esm/deps/jsr.io/@std/assert/1.0.12/rejects.js +0 -53
  76. package/esm/deps/jsr.io/@std/assert/1.0.12/strict_equals.d.ts +0 -24
  77. package/esm/deps/jsr.io/@std/assert/1.0.12/strict_equals.d.ts.map +0 -1
  78. package/esm/deps/jsr.io/@std/assert/1.0.12/strict_equals.js +0 -57
  79. package/esm/deps/jsr.io/@std/assert/1.0.12/string_includes.d.ts +0 -18
  80. package/esm/deps/jsr.io/@std/assert/1.0.12/string_includes.d.ts.map +0 -1
  81. package/esm/deps/jsr.io/@std/assert/1.0.12/string_includes.js +0 -26
  82. package/esm/deps/jsr.io/@std/assert/1.0.12/throws.d.ts +0 -45
  83. package/esm/deps/jsr.io/@std/assert/1.0.12/throws.d.ts.map +0 -1
  84. package/esm/deps/jsr.io/@std/assert/1.0.12/throws.js +0 -44
  85. package/esm/deps/jsr.io/@std/assert/1.0.12/unimplemented.d.ts +0 -15
  86. package/esm/deps/jsr.io/@std/assert/1.0.12/unimplemented.d.ts.map +0 -1
  87. package/esm/deps/jsr.io/@std/assert/1.0.12/unimplemented.js +0 -20
  88. package/esm/deps/jsr.io/@std/assert/1.0.12/unreachable.d.ts +0 -15
  89. package/esm/deps/jsr.io/@std/assert/1.0.12/unreachable.d.ts.map +0 -1
  90. package/esm/deps/jsr.io/@std/assert/1.0.12/unreachable.js +0 -20
  91. package/esm/deps/jsr.io/@std/internal/1.0.6/build_message.d.ts +0 -82
  92. package/esm/deps/jsr.io/@std/internal/1.0.6/build_message.d.ts.map +0 -1
  93. package/esm/deps/jsr.io/@std/internal/1.0.6/build_message.js +0 -110
  94. package/esm/deps/jsr.io/@std/internal/1.0.6/diff.d.ts +0 -140
  95. package/esm/deps/jsr.io/@std/internal/1.0.6/diff.d.ts.map +0 -1
  96. package/esm/deps/jsr.io/@std/internal/1.0.6/diff.js +0 -276
  97. package/esm/deps/jsr.io/@std/internal/1.0.6/diff_str.d.ts +0 -99
  98. package/esm/deps/jsr.io/@std/internal/1.0.6/diff_str.d.ts.map +0 -1
  99. package/esm/deps/jsr.io/@std/internal/1.0.6/diff_str.js +0 -182
  100. package/esm/deps/jsr.io/@std/internal/1.0.6/format.d.ts +0 -2
  101. package/esm/deps/jsr.io/@std/internal/1.0.6/format.d.ts.map +0 -1
  102. package/esm/deps/jsr.io/@std/internal/1.0.6/format.js +0 -37
  103. package/esm/deps/jsr.io/@std/internal/1.0.6/styles.d.ts +0 -159
  104. package/esm/deps/jsr.io/@std/internal/1.0.6/styles.d.ts.map +0 -1
  105. package/esm/deps/jsr.io/@std/internal/1.0.6/styles.js +0 -207
  106. package/esm/deps/jsr.io/@std/internal/1.0.6/types.d.ts +0 -16
  107. package/esm/deps/jsr.io/@std/internal/1.0.6/types.d.ts.map +0 -1
  108. package/esm/deps/jsr.io/@std/internal/1.0.6/types.js +0 -3
  109. package/script/_dnt.shims.d.ts +0 -2
  110. package/script/_dnt.shims.d.ts.map +0 -1
  111. package/script/_dnt.shims.js +0 -60
  112. package/script/deps/jsr.io/@std/assert/1.0.12/almost_equals.d.ts +0 -29
  113. package/script/deps/jsr.io/@std/assert/1.0.12/almost_equals.d.ts.map +0 -1
  114. package/script/deps/jsr.io/@std/assert/1.0.12/almost_equals.js +0 -49
  115. package/script/deps/jsr.io/@std/assert/1.0.12/array_includes.d.ts +0 -24
  116. package/script/deps/jsr.io/@std/assert/1.0.12/array_includes.d.ts.map +0 -1
  117. package/script/deps/jsr.io/@std/assert/1.0.12/array_includes.js +0 -49
  118. package/script/deps/jsr.io/@std/assert/1.0.12/assert.d.ts +0 -16
  119. package/script/deps/jsr.io/@std/assert/1.0.12/assert.d.ts.map +0 -1
  120. package/script/deps/jsr.io/@std/assert/1.0.12/assert.js +0 -25
  121. package/script/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts +0 -26
  122. package/script/deps/jsr.io/@std/assert/1.0.12/assertion_error.d.ts.map +0 -1
  123. package/script/deps/jsr.io/@std/assert/1.0.12/assertion_error.js +0 -34
  124. package/script/deps/jsr.io/@std/assert/1.0.12/equal.d.ts +0 -17
  125. package/script/deps/jsr.io/@std/assert/1.0.12/equal.d.ts.map +0 -1
  126. package/script/deps/jsr.io/@std/assert/1.0.12/equal.js +0 -209
  127. package/script/deps/jsr.io/@std/assert/1.0.12/equals.d.ts +0 -35
  128. package/script/deps/jsr.io/@std/assert/1.0.12/equals.d.ts.map +0 -1
  129. package/script/deps/jsr.io/@std/assert/1.0.12/equals.js +0 -61
  130. package/script/deps/jsr.io/@std/assert/1.0.12/exists.d.ts +0 -18
  131. package/script/deps/jsr.io/@std/assert/1.0.12/exists.d.ts.map +0 -1
  132. package/script/deps/jsr.io/@std/assert/1.0.12/exists.js +0 -30
  133. package/script/deps/jsr.io/@std/assert/1.0.12/fail.d.ts +0 -15
  134. package/script/deps/jsr.io/@std/assert/1.0.12/fail.d.ts.map +0 -1
  135. package/script/deps/jsr.io/@std/assert/1.0.12/fail.js +0 -23
  136. package/script/deps/jsr.io/@std/assert/1.0.12/false.d.ts +0 -18
  137. package/script/deps/jsr.io/@std/assert/1.0.12/false.d.ts.map +0 -1
  138. package/script/deps/jsr.io/@std/assert/1.0.12/false.js +0 -25
  139. package/script/deps/jsr.io/@std/assert/1.0.12/greater.d.ts +0 -20
  140. package/script/deps/jsr.io/@std/assert/1.0.12/greater.d.ts.map +0 -1
  141. package/script/deps/jsr.io/@std/assert/1.0.12/greater.js +0 -32
  142. package/script/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.d.ts +0 -20
  143. package/script/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.d.ts.map +0 -1
  144. package/script/deps/jsr.io/@std/assert/1.0.12/greater_or_equal.js +0 -32
  145. package/script/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts +0 -23
  146. package/script/deps/jsr.io/@std/assert/1.0.12/instance_of.d.ts.map +0 -1
  147. package/script/deps/jsr.io/@std/assert/1.0.12/instance_of.js +0 -55
  148. package/script/deps/jsr.io/@std/assert/1.0.12/is_error.d.ts +0 -25
  149. package/script/deps/jsr.io/@std/assert/1.0.12/is_error.d.ts.map +0 -1
  150. package/script/deps/jsr.io/@std/assert/1.0.12/is_error.js +0 -56
  151. package/script/deps/jsr.io/@std/assert/1.0.12/less.d.ts +0 -19
  152. package/script/deps/jsr.io/@std/assert/1.0.12/less.d.ts.map +0 -1
  153. package/script/deps/jsr.io/@std/assert/1.0.12/less.js +0 -31
  154. package/script/deps/jsr.io/@std/assert/1.0.12/less_or_equal.d.ts +0 -20
  155. package/script/deps/jsr.io/@std/assert/1.0.12/less_or_equal.d.ts.map +0 -1
  156. package/script/deps/jsr.io/@std/assert/1.0.12/less_or_equal.js +0 -32
  157. package/script/deps/jsr.io/@std/assert/1.0.12/match.d.ts +0 -18
  158. package/script/deps/jsr.io/@std/assert/1.0.12/match.d.ts.map +0 -1
  159. package/script/deps/jsr.io/@std/assert/1.0.12/match.js +0 -29
  160. package/script/deps/jsr.io/@std/assert/1.0.12/mod.d.ts +0 -44
  161. package/script/deps/jsr.io/@std/assert/1.0.12/mod.d.ts.map +0 -1
  162. package/script/deps/jsr.io/@std/assert/1.0.12/mod.js +0 -61
  163. package/script/deps/jsr.io/@std/assert/1.0.12/not_equals.d.ts +0 -21
  164. package/script/deps/jsr.io/@std/assert/1.0.12/not_equals.d.ts.map +0 -1
  165. package/script/deps/jsr.io/@std/assert/1.0.12/not_equals.js +0 -36
  166. package/script/deps/jsr.io/@std/assert/1.0.12/not_instance_of.d.ts +0 -20
  167. package/script/deps/jsr.io/@std/assert/1.0.12/not_instance_of.d.ts.map +0 -1
  168. package/script/deps/jsr.io/@std/assert/1.0.12/not_instance_of.js +0 -32
  169. package/script/deps/jsr.io/@std/assert/1.0.12/not_match.d.ts +0 -18
  170. package/script/deps/jsr.io/@std/assert/1.0.12/not_match.d.ts.map +0 -1
  171. package/script/deps/jsr.io/@std/assert/1.0.12/not_match.js +0 -29
  172. package/script/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.d.ts +0 -23
  173. package/script/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.d.ts.map +0 -1
  174. package/script/deps/jsr.io/@std/assert/1.0.12/not_strict_equals.js +0 -35
  175. package/script/deps/jsr.io/@std/assert/1.0.12/object_match.d.ts +0 -29
  176. package/script/deps/jsr.io/@std/assert/1.0.12/object_match.d.ts.map +0 -1
  177. package/script/deps/jsr.io/@std/assert/1.0.12/object_match.js +0 -170
  178. package/script/deps/jsr.io/@std/assert/1.0.12/rejects.d.ts +0 -42
  179. package/script/deps/jsr.io/@std/assert/1.0.12/rejects.d.ts.map +0 -1
  180. package/script/deps/jsr.io/@std/assert/1.0.12/rejects.js +0 -56
  181. package/script/deps/jsr.io/@std/assert/1.0.12/strict_equals.d.ts +0 -24
  182. package/script/deps/jsr.io/@std/assert/1.0.12/strict_equals.d.ts.map +0 -1
  183. package/script/deps/jsr.io/@std/assert/1.0.12/strict_equals.js +0 -60
  184. package/script/deps/jsr.io/@std/assert/1.0.12/string_includes.d.ts +0 -18
  185. package/script/deps/jsr.io/@std/assert/1.0.12/string_includes.d.ts.map +0 -1
  186. package/script/deps/jsr.io/@std/assert/1.0.12/string_includes.js +0 -29
  187. package/script/deps/jsr.io/@std/assert/1.0.12/throws.d.ts +0 -45
  188. package/script/deps/jsr.io/@std/assert/1.0.12/throws.d.ts.map +0 -1
  189. package/script/deps/jsr.io/@std/assert/1.0.12/throws.js +0 -47
  190. package/script/deps/jsr.io/@std/assert/1.0.12/unimplemented.d.ts +0 -15
  191. package/script/deps/jsr.io/@std/assert/1.0.12/unimplemented.d.ts.map +0 -1
  192. package/script/deps/jsr.io/@std/assert/1.0.12/unimplemented.js +0 -23
  193. package/script/deps/jsr.io/@std/assert/1.0.12/unreachable.d.ts +0 -15
  194. package/script/deps/jsr.io/@std/assert/1.0.12/unreachable.d.ts.map +0 -1
  195. package/script/deps/jsr.io/@std/assert/1.0.12/unreachable.js +0 -23
  196. package/script/deps/jsr.io/@std/internal/1.0.6/build_message.d.ts +0 -82
  197. package/script/deps/jsr.io/@std/internal/1.0.6/build_message.d.ts.map +0 -1
  198. package/script/deps/jsr.io/@std/internal/1.0.6/build_message.js +0 -115
  199. package/script/deps/jsr.io/@std/internal/1.0.6/diff.d.ts +0 -140
  200. package/script/deps/jsr.io/@std/internal/1.0.6/diff.d.ts.map +0 -1
  201. package/script/deps/jsr.io/@std/internal/1.0.6/diff.js +0 -283
  202. package/script/deps/jsr.io/@std/internal/1.0.6/diff_str.d.ts +0 -99
  203. package/script/deps/jsr.io/@std/internal/1.0.6/diff_str.d.ts.map +0 -1
  204. package/script/deps/jsr.io/@std/internal/1.0.6/diff_str.js +0 -188
  205. package/script/deps/jsr.io/@std/internal/1.0.6/format.d.ts +0 -2
  206. package/script/deps/jsr.io/@std/internal/1.0.6/format.d.ts.map +0 -1
  207. package/script/deps/jsr.io/@std/internal/1.0.6/format.js +0 -63
  208. package/script/deps/jsr.io/@std/internal/1.0.6/styles.d.ts +0 -159
  209. package/script/deps/jsr.io/@std/internal/1.0.6/styles.d.ts.map +0 -1
  210. package/script/deps/jsr.io/@std/internal/1.0.6/styles.js +0 -242
  211. package/script/deps/jsr.io/@std/internal/1.0.6/types.d.ts +0 -16
  212. package/script/deps/jsr.io/@std/internal/1.0.6/types.d.ts.map +0 -1
  213. package/script/deps/jsr.io/@std/internal/1.0.6/types.js +0 -4
package/esm/worker.js CHANGED
@@ -1,4 +1,4 @@
1
- import { assert } from "./deps/jsr.io/@std/assert/1.0.12/mod.js";
1
+ import { assert } from "@std/assert";
2
2
  import { createSignal, each, Err, main, Ok, on, once, resource, scoped, spawn, withResolvers, } from "effection";
3
3
  /**
4
4
  * Entrypoint used in the worker that estaliblishes communication
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effectionx/worker",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "author": "engineering@frontside.com",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,5 @@
22
22
  "node": ">= 16"
23
23
  },
24
24
  "sideEffects": false,
25
- "dependencies": {
26
- "effection": "4.0.0-alpha.4"
27
- },
28
25
  "_generatedBy": "dnt@dev"
29
26
  }
package/script/worker.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.workerMain = workerMain;
4
4
  exports.useWorker = useWorker;
5
- const mod_js_1 = require("./deps/jsr.io/@std/assert/1.0.12/mod.js");
5
+ const assert_1 = require("@std/assert");
6
6
  const effection_1 = require("effection");
7
7
  /**
8
8
  * Entrypoint used in the worker that estaliblishes communication
@@ -175,7 +175,7 @@ function useWorker(url, options) {
175
175
  };
176
176
  worker.addEventListener("message", onclose);
177
177
  let first = yield* subscription.next();
178
- (0, mod_js_1.assert)(first.value.data.type === "open", `expected first message to arrive from worker to be of type "open", but was: ${first.value.data.type}`);
178
+ (0, assert_1.assert)(first.value.data.type === "open", `expected first message to arrive from worker to be of type "open", but was: ${first.value.data.type}`);
179
179
  yield* (0, effection_1.spawn)(function* () {
180
180
  let event = yield* (0, effection_1.once)(worker, "error");
181
181
  event.preventDefault();
@@ -1,2 +0,0 @@
1
- export declare const dntGlobalThis: Omit<typeof globalThis, never>;
2
- //# sourceMappingURL=_dnt.shims.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,gCAA2C,CAAC"}
package/esm/_dnt.shims.js DELETED
@@ -1,57 +0,0 @@
1
- const dntGlobals = {};
2
- export const dntGlobalThis = createMergeProxy(globalThis, dntGlobals);
3
- function createMergeProxy(baseObj, extObj) {
4
- return new Proxy(baseObj, {
5
- get(_target, prop, _receiver) {
6
- if (prop in extObj) {
7
- return extObj[prop];
8
- }
9
- else {
10
- return baseObj[prop];
11
- }
12
- },
13
- set(_target, prop, value) {
14
- if (prop in extObj) {
15
- delete extObj[prop];
16
- }
17
- baseObj[prop] = value;
18
- return true;
19
- },
20
- deleteProperty(_target, prop) {
21
- let success = false;
22
- if (prop in extObj) {
23
- delete extObj[prop];
24
- success = true;
25
- }
26
- if (prop in baseObj) {
27
- delete baseObj[prop];
28
- success = true;
29
- }
30
- return success;
31
- },
32
- ownKeys(_target) {
33
- const baseKeys = Reflect.ownKeys(baseObj);
34
- const extKeys = Reflect.ownKeys(extObj);
35
- const extKeysSet = new Set(extKeys);
36
- return [...baseKeys.filter((k) => !extKeysSet.has(k)), ...extKeys];
37
- },
38
- defineProperty(_target, prop, desc) {
39
- if (prop in extObj) {
40
- delete extObj[prop];
41
- }
42
- Reflect.defineProperty(baseObj, prop, desc);
43
- return true;
44
- },
45
- getOwnPropertyDescriptor(_target, prop) {
46
- if (prop in extObj) {
47
- return Reflect.getOwnPropertyDescriptor(extObj, prop);
48
- }
49
- else {
50
- return Reflect.getOwnPropertyDescriptor(baseObj, prop);
51
- }
52
- },
53
- has(_target, prop) {
54
- return prop in extObj || prop in baseObj;
55
- },
56
- });
57
- }
@@ -1,29 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` and `expected` are almost equal numbers
3
- * through a given tolerance. It can be used to take into account IEEE-754
4
- * double-precision floating-point representation limitations. If the values
5
- * are not almost equal then throw.
6
- *
7
- * The default tolerance is one hundred thousandth of a percent of the
8
- * expected value.
9
- *
10
- * @example Usage
11
- * ```ts ignore
12
- * import { assertAlmostEquals } from "@std/assert";
13
- *
14
- * assertAlmostEquals(0.01, 0.02); // Throws
15
- * assertAlmostEquals(1e-8, 1e-9); // Throws
16
- * assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
17
- * assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
18
- * assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
19
- * assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
20
- * ```
21
- *
22
- * @param actual The actual value to compare.
23
- * @param expected The expected value to compare.
24
- * @param tolerance The tolerance to consider the values almost equal. The
25
- * default is one hundred thousandth of a percent of the expected value.
26
- * @param msg The optional message to include in the error.
27
- */
28
- export declare function assertAlmostEquals(actual: number, expected: number, tolerance?: number, msg?: string): void;
29
- //# sourceMappingURL=almost_equals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"almost_equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/almost_equals.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,EAClB,GAAG,CAAC,EAAE,MAAM,QAmBb"}
@@ -1,46 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- /**
5
- * Make an assertion that `actual` and `expected` are almost equal numbers
6
- * through a given tolerance. It can be used to take into account IEEE-754
7
- * double-precision floating-point representation limitations. If the values
8
- * are not almost equal then throw.
9
- *
10
- * The default tolerance is one hundred thousandth of a percent of the
11
- * expected value.
12
- *
13
- * @example Usage
14
- * ```ts ignore
15
- * import { assertAlmostEquals } from "@std/assert";
16
- *
17
- * assertAlmostEquals(0.01, 0.02); // Throws
18
- * assertAlmostEquals(1e-8, 1e-9); // Throws
19
- * assertAlmostEquals(1.000000001e-8, 1.000000002e-8); // Doesn't throw
20
- * assertAlmostEquals(0.01, 0.02, 0.1); // Doesn't throw
21
- * assertAlmostEquals(0.1 + 0.2, 0.3, 1e-16); // Doesn't throw
22
- * assertAlmostEquals(0.1 + 0.2, 0.3, 1e-17); // Throws
23
- * ```
24
- *
25
- * @param actual The actual value to compare.
26
- * @param expected The expected value to compare.
27
- * @param tolerance The tolerance to consider the values almost equal. The
28
- * default is one hundred thousandth of a percent of the expected value.
29
- * @param msg The optional message to include in the error.
30
- */
31
- export function assertAlmostEquals(actual, expected, tolerance, msg) {
32
- if (Object.is(actual, expected)) {
33
- return;
34
- }
35
- const delta = Math.abs(expected - actual);
36
- if (tolerance === undefined) {
37
- tolerance = isFinite(expected) ? Math.abs(expected * 1e-7) : 1e-7;
38
- }
39
- if (delta <= tolerance) {
40
- return;
41
- }
42
- const msgSuffix = msg ? `: ${msg}` : ".";
43
- const f = (n) => Number.isInteger(n) ? n : n.toExponential();
44
- throw new AssertionError(`Expected actual: "${f(actual)}" to be close to "${f(expected)}": \
45
- delta "${f(delta)}" is greater than "${f(tolerance)}"${msgSuffix}`);
46
- }
@@ -1,24 +0,0 @@
1
- /** An array-like object (`Array`, `Uint8Array`, `NodeList`, etc.) that is not a string */
2
- export type ArrayLikeArg<T> = ArrayLike<T> & object;
3
- /**
4
- * Make an assertion that `actual` includes the `expected` values. If not then
5
- * an error will be thrown.
6
- *
7
- * Type parameter can be specified to ensure values under comparison have the
8
- * same type.
9
- *
10
- * @example Usage
11
- * ```ts ignore
12
- * import { assertArrayIncludes } from "@std/assert";
13
- *
14
- * assertArrayIncludes([1, 2], [2]); // Doesn't throw
15
- * assertArrayIncludes([1, 2], [3]); // Throws
16
- * ```
17
- *
18
- * @typeParam T The type of the elements in the array to compare.
19
- * @param actual The array-like object to check for.
20
- * @param expected The array-like object to check for.
21
- * @param msg The optional message to display if the assertion fails.
22
- */
23
- export declare function assertArrayIncludes<T>(actual: ArrayLikeArg<T>, expected: ArrayLikeArg<T>, msg?: string): void;
24
- //# sourceMappingURL=array_includes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"array_includes.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/array_includes.ts"],"names":[],"mappings":"AAMA,0FAA0F;AAC1F,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EACvB,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EACzB,GAAG,CAAC,EAAE,MAAM,QAwBb"}
@@ -1,46 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { equal } from "./equal.js";
4
- import { format } from "../../internal/1.0.6/format.js";
5
- import { AssertionError } from "./assertion_error.js";
6
- /**
7
- * Make an assertion that `actual` includes the `expected` values. If not then
8
- * an error will be thrown.
9
- *
10
- * Type parameter can be specified to ensure values under comparison have the
11
- * same type.
12
- *
13
- * @example Usage
14
- * ```ts ignore
15
- * import { assertArrayIncludes } from "@std/assert";
16
- *
17
- * assertArrayIncludes([1, 2], [2]); // Doesn't throw
18
- * assertArrayIncludes([1, 2], [3]); // Throws
19
- * ```
20
- *
21
- * @typeParam T The type of the elements in the array to compare.
22
- * @param actual The array-like object to check for.
23
- * @param expected The array-like object to check for.
24
- * @param msg The optional message to display if the assertion fails.
25
- */
26
- export function assertArrayIncludes(actual, expected, msg) {
27
- const missing = [];
28
- for (let i = 0; i < expected.length; i++) {
29
- let found = false;
30
- for (let j = 0; j < actual.length; j++) {
31
- if (equal(expected[i], actual[j])) {
32
- found = true;
33
- break;
34
- }
35
- }
36
- if (!found) {
37
- missing.push(expected[i]);
38
- }
39
- }
40
- if (missing.length === 0) {
41
- return;
42
- }
43
- const msgSuffix = msg ? `: ${msg}` : ".";
44
- msg = `Expected actual: "${format(actual)}" to include: "${format(expected)}"${msgSuffix}\nmissing: ${format(missing)}`;
45
- throw new AssertionError(msg);
46
- }
@@ -1,16 +0,0 @@
1
- /**
2
- * Make an assertion, error will be thrown if `expr` does not have truthy value.
3
- *
4
- * @example Usage
5
- * ```ts ignore
6
- * import { assert } from "@std/assert";
7
- *
8
- * assert("hello".includes("ello")); // Doesn't throw
9
- * assert("hello".includes("world")); // Throws
10
- * ```
11
- *
12
- * @param expr The expression to test.
13
- * @param msg The optional message to display if the assertion fails.
14
- */
15
- export declare function assert(expr: unknown, msg?: string): asserts expr;
16
- //# sourceMappingURL=assert.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/assert.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,SAAK,GAAG,OAAO,CAAC,IAAI,CAI5D"}
@@ -1,22 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import { AssertionError } from "./assertion_error.js";
4
- /**
5
- * Make an assertion, error will be thrown if `expr` does not have truthy value.
6
- *
7
- * @example Usage
8
- * ```ts ignore
9
- * import { assert } from "@std/assert";
10
- *
11
- * assert("hello".includes("ello")); // Doesn't throw
12
- * assert("hello".includes("world")); // Throws
13
- * ```
14
- *
15
- * @param expr The expression to test.
16
- * @param msg The optional message to display if the assertion fails.
17
- */
18
- export function assert(expr, msg = "") {
19
- if (!expr) {
20
- throw new AssertionError(msg);
21
- }
22
- }
@@ -1,26 +0,0 @@
1
- /**
2
- * Error thrown when an assertion fails.
3
- *
4
- * @example Usage
5
- * ```ts ignore
6
- * import { AssertionError } from "@std/assert";
7
- *
8
- * try {
9
- * throw new AssertionError("foo", { cause: "bar" });
10
- * } catch (error) {
11
- * if (error instanceof AssertionError) {
12
- * error.message === "foo"; // true
13
- * error.cause === "bar"; // true
14
- * }
15
- * }
16
- * ```
17
- */
18
- export declare class AssertionError extends Error {
19
- /** Constructs a new instance.
20
- *
21
- * @param message The error message.
22
- * @param options Additional options. This argument is still unstable. It may change in the future release.
23
- */
24
- constructor(message: string, options?: ErrorOptions);
25
- }
26
- //# sourceMappingURL=assertion_error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertion_error.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/assertion_error.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY;CAIpD"}
@@ -1,30 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- /**
4
- * Error thrown when an assertion fails.
5
- *
6
- * @example Usage
7
- * ```ts ignore
8
- * import { AssertionError } from "@std/assert";
9
- *
10
- * try {
11
- * throw new AssertionError("foo", { cause: "bar" });
12
- * } catch (error) {
13
- * if (error instanceof AssertionError) {
14
- * error.message === "foo"; // true
15
- * error.cause === "bar"; // true
16
- * }
17
- * }
18
- * ```
19
- */
20
- export class AssertionError extends Error {
21
- /** Constructs a new instance.
22
- *
23
- * @param message The error message.
24
- * @param options Additional options. This argument is still unstable. It may change in the future release.
25
- */
26
- constructor(message, options) {
27
- super(message, options);
28
- this.name = "AssertionError";
29
- }
30
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Deep equality comparison used in assertions.
3
- *
4
- * @param a The actual value
5
- * @param b The expected value
6
- * @returns `true` if the values are deeply equal, `false` otherwise
7
- *
8
- * @example Usage
9
- * ```ts
10
- * import { equal } from "@std/assert/equal";
11
- *
12
- * equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
13
- * equal({ foo: "bar" }, { foo: "baz" }); // Returns `false`
14
- * ```
15
- */
16
- export declare function equal(a: unknown, b: unknown): boolean;
17
- //# sourceMappingURL=equal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/equal.ts"],"names":[],"mappings":"AA2FA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAuGrD"}
@@ -1,183 +0,0 @@
1
- // Copyright 2018-2025 the Deno authors. MIT license.
2
- // This module is browser compatible.
3
- import * as dntShim from "../../../../../_dnt.shims.js";
4
- function isKeyedCollection(x) {
5
- return x instanceof Set || x instanceof Map;
6
- }
7
- function prototypesEqual(a, b) {
8
- const pa = Object.getPrototypeOf(a);
9
- const pb = Object.getPrototypeOf(b);
10
- return pa === pb ||
11
- pa === Object.prototype && pb === null ||
12
- pa === null && pb === Object.prototype;
13
- }
14
- function isBasicObjectOrArray(obj) {
15
- const proto = Object.getPrototypeOf(obj);
16
- return proto === null || proto === Object.prototype ||
17
- proto === Array.prototype;
18
- }
19
- // Slightly faster than Reflect.ownKeys in V8 as of 12.9.202.13-rusty (2024-10-28)
20
- function ownKeys(obj) {
21
- return [
22
- ...Object.getOwnPropertyNames(obj),
23
- ...Object.getOwnPropertySymbols(obj),
24
- ];
25
- }
26
- function getKeysDeep(obj) {
27
- const keys = new Set();
28
- while (obj !== Object.prototype && obj !== Array.prototype && obj != null) {
29
- for (const key of ownKeys(obj)) {
30
- keys.add(key);
31
- }
32
- obj = Object.getPrototypeOf(obj);
33
- }
34
- return keys;
35
- }
36
- // deno-lint-ignore no-explicit-any
37
- const Temporal = dntShim.dntGlobalThis.Temporal ??
38
- new Proxy({}, { get: () => { } });
39
- /** A non-exhaustive list of prototypes that can be accurately fast-path compared with `String(instance)` */
40
- const stringComparablePrototypes = new Set([
41
- Intl.Locale,
42
- RegExp,
43
- Temporal.Duration,
44
- Temporal.Instant,
45
- Temporal.PlainDate,
46
- Temporal.PlainDateTime,
47
- Temporal.PlainTime,
48
- Temporal.PlainYearMonth,
49
- Temporal.PlainMonthDay,
50
- Temporal.ZonedDateTime,
51
- URL,
52
- URLSearchParams,
53
- ].filter((x) => x != null).map((x) => x.prototype));
54
- function isPrimitive(x) {
55
- return typeof x === "string" ||
56
- typeof x === "number" ||
57
- typeof x === "boolean" ||
58
- typeof x === "bigint" ||
59
- typeof x === "symbol" ||
60
- x == null;
61
- }
62
- const TypedArray = Object.getPrototypeOf(Uint8Array);
63
- function compareTypedArrays(a, b) {
64
- if (a.length !== b.length)
65
- return false;
66
- for (let i = 0; i < b.length; i++) {
67
- if (!sameValueZero(a[i], b[i]))
68
- return false;
69
- }
70
- return true;
71
- }
72
- /** Check both strict equality (`0 == -0`) and `Object.is` (`NaN == NaN`) */
73
- function sameValueZero(a, b) {
74
- return a === b || Object.is(a, b);
75
- }
76
- /**
77
- * Deep equality comparison used in assertions.
78
- *
79
- * @param a The actual value
80
- * @param b The expected value
81
- * @returns `true` if the values are deeply equal, `false` otherwise
82
- *
83
- * @example Usage
84
- * ```ts
85
- * import { equal } from "@std/assert/equal";
86
- *
87
- * equal({ foo: "bar" }, { foo: "bar" }); // Returns `true`
88
- * equal({ foo: "bar" }, { foo: "baz" }); // Returns `false`
89
- * ```
90
- */
91
- export function equal(a, b) {
92
- const seen = new Map();
93
- return (function compare(a, b) {
94
- if (sameValueZero(a, b))
95
- return true;
96
- if (isPrimitive(a) || isPrimitive(b))
97
- return false;
98
- if (a instanceof Date && b instanceof Date) {
99
- return Object.is(a.getTime(), b.getTime());
100
- }
101
- if (a && typeof a === "object" && b && typeof b === "object") {
102
- if (!prototypesEqual(a, b)) {
103
- return false;
104
- }
105
- if (a instanceof TypedArray) {
106
- return compareTypedArrays(a, b);
107
- }
108
- if (a instanceof WeakMap) {
109
- throw new TypeError("cannot compare WeakMap instances");
110
- }
111
- if (a instanceof WeakSet) {
112
- throw new TypeError("cannot compare WeakSet instances");
113
- }
114
- if (a instanceof WeakRef) {
115
- return compare(a.deref(), b.deref());
116
- }
117
- if (seen.get(a) === b) {
118
- return true;
119
- }
120
- if (Object.keys(a).length !== Object.keys(b).length) {
121
- return false;
122
- }
123
- seen.set(a, b);
124
- if (isKeyedCollection(a) && isKeyedCollection(b)) {
125
- if (a.size !== b.size) {
126
- return false;
127
- }
128
- const aKeys = [...a.keys()];
129
- const primitiveKeysFastPath = aKeys.every(isPrimitive);
130
- if (primitiveKeysFastPath) {
131
- if (a instanceof Set) {
132
- return a.symmetricDifference(b).size === 0;
133
- }
134
- for (const key of aKeys) {
135
- if (!b.has(key) ||
136
- !compare(a.get(key), b.get(key))) {
137
- return false;
138
- }
139
- }
140
- return true;
141
- }
142
- let unmatchedEntries = a.size;
143
- for (const [aKey, aValue] of a.entries()) {
144
- for (const [bKey, bValue] of b.entries()) {
145
- /* Given that Map keys can be references, we need
146
- * to ensure that they are also deeply equal */
147
- if (!compare(aKey, bKey))
148
- continue;
149
- if ((aKey === aValue && bKey === bValue) ||
150
- (compare(aValue, bValue))) {
151
- unmatchedEntries--;
152
- break;
153
- }
154
- }
155
- }
156
- return unmatchedEntries === 0;
157
- }
158
- let keys;
159
- if (isBasicObjectOrArray(a)) {
160
- // fast path
161
- keys = ownKeys({ ...a, ...b });
162
- }
163
- else if (stringComparablePrototypes.has(Object.getPrototypeOf(a))) {
164
- // medium path
165
- return String(a) === String(b);
166
- }
167
- else {
168
- // slow path
169
- keys = getKeysDeep(a).union(getKeysDeep(b));
170
- }
171
- for (const key of keys) {
172
- if (!compare(a[key], b[key])) {
173
- return false;
174
- }
175
- if (((key in a) && (!(key in b))) || ((key in b) && (!(key in a)))) {
176
- return false;
177
- }
178
- }
179
- return true;
180
- }
181
- return false;
182
- })(a, b);
183
- }
@@ -1,35 +0,0 @@
1
- /**
2
- * Make an assertion that `actual` and `expected` are equal, deeply. If not
3
- * deeply equal, then throw.
4
- *
5
- * Type parameter can be specified to ensure values under comparison have the
6
- * same type.
7
- *
8
- * Note: When comparing `Blob` objects, you should first convert them to
9
- * `Uint8Array` using the `Blob.bytes()` method and then compare their
10
- * contents.
11
- *
12
- * @example Usage
13
- * ```ts ignore
14
- * import { assertEquals } from "@std/assert";
15
- *
16
- * assertEquals("world", "world"); // Doesn't throw
17
- * assertEquals("hello", "world"); // Throws
18
- * ```
19
- * @example Compare `Blob` objects
20
- * ```ts ignore
21
- * import { assertEquals } from "@std/assert";
22
- *
23
- * const bytes1 = await new Blob(["foo"]).bytes();
24
- * const bytes2 = await new Blob(["foo"]).bytes();
25
- *
26
- * assertEquals(bytes1, bytes2);
27
- * ```
28
- *
29
- * @typeParam T The type of the values to compare. This is usually inferred.
30
- * @param actual The actual value to compare.
31
- * @param expected The expected value to compare.
32
- * @param msg The optional message to display if the assertion fails.
33
- */
34
- export declare function assertEquals<T>(actual: T, expected: T, msg?: string): void;
35
- //# sourceMappingURL=equals.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/assert/1.0.12/equals.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,EACX,GAAG,CAAC,EAAE,MAAM,QAkBb"}