@tellahq/rescript 10.1.0-alpha.2 → 10.1.4-republish-1

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 (410) hide show
  1. package/CHANGELOG.md +204 -2
  2. package/README.md +1 -1
  3. package/darwinarm64/bsb_helper.exe +0 -0
  4. package/darwinarm64/bsc.exe +0 -0
  5. package/darwinarm64/rescript.exe +0 -0
  6. package/docs/docson/build-schema.json +497 -516
  7. package/lib/4.06.1/bsb_helper.ml +6 -1
  8. package/lib/4.06.1/rescript.ml +1414 -1191
  9. package/lib/4.06.1/whole_compiler.ml +69844 -69069
  10. package/lib/es6/belt_internalBuckets.js +13 -13
  11. package/lib/es6/caml_float.js +5 -5
  12. package/lib/es6/caml_format.js +1 -1
  13. package/lib/es6/caml_int64.js +1 -1
  14. package/lib/es6/caml_obj.js +26 -6
  15. package/lib/es6/complex.js +4 -4
  16. package/lib/es6/js.js +3 -0
  17. package/lib/es6/js_promise2.js +16 -0
  18. package/lib/es6/jsxPPXReactSupport.js +26 -0
  19. package/lib/js/belt_internalBuckets.js +13 -13
  20. package/lib/js/caml_float.js +5 -5
  21. package/lib/js/caml_format.js +1 -1
  22. package/lib/js/caml_int64.js +1 -1
  23. package/lib/js/caml_obj.js +26 -6
  24. package/lib/js/complex.js +4 -4
  25. package/lib/js/js.js +3 -0
  26. package/lib/js/js_promise2.js +14 -0
  27. package/lib/js/jsxPPXReactSupport.js +24 -0
  28. package/lib/ocaml/arg.cmi +0 -0
  29. package/lib/ocaml/arg.cmt +0 -0
  30. package/lib/ocaml/arg.cmti +0 -0
  31. package/lib/ocaml/arg.ml +2 -2
  32. package/lib/ocaml/array.cmi +0 -0
  33. package/lib/ocaml/array.cmt +0 -0
  34. package/lib/ocaml/array.cmti +0 -0
  35. package/lib/ocaml/arrayLabels.cmi +0 -0
  36. package/lib/ocaml/arrayLabels.cmt +0 -0
  37. package/lib/ocaml/arrayLabels.cmti +0 -0
  38. package/lib/ocaml/belt.cmt +0 -0
  39. package/lib/ocaml/belt_Array.cmi +0 -0
  40. package/lib/ocaml/belt_Array.cmt +0 -0
  41. package/lib/ocaml/belt_Array.cmti +0 -0
  42. package/lib/ocaml/belt_Float.cmt +0 -0
  43. package/lib/ocaml/belt_Float.cmti +0 -0
  44. package/lib/ocaml/belt_HashMap.cmi +0 -0
  45. package/lib/ocaml/belt_HashMap.cmt +0 -0
  46. package/lib/ocaml/belt_HashMap.cmti +0 -0
  47. package/lib/ocaml/belt_HashMapInt.cmi +0 -0
  48. package/lib/ocaml/belt_HashMapInt.cmt +0 -0
  49. package/lib/ocaml/belt_HashMapInt.cmti +0 -0
  50. package/lib/ocaml/belt_HashMapString.cmi +0 -0
  51. package/lib/ocaml/belt_HashMapString.cmt +0 -0
  52. package/lib/ocaml/belt_HashMapString.cmti +0 -0
  53. package/lib/ocaml/belt_HashSet.cmi +0 -0
  54. package/lib/ocaml/belt_HashSet.cmt +0 -0
  55. package/lib/ocaml/belt_HashSet.cmti +0 -0
  56. package/lib/ocaml/belt_HashSetInt.cmi +0 -0
  57. package/lib/ocaml/belt_HashSetInt.cmt +0 -0
  58. package/lib/ocaml/belt_HashSetInt.cmti +0 -0
  59. package/lib/ocaml/belt_HashSetString.cmi +0 -0
  60. package/lib/ocaml/belt_HashSetString.cmt +0 -0
  61. package/lib/ocaml/belt_HashSetString.cmti +0 -0
  62. package/lib/ocaml/belt_Id.cmi +0 -0
  63. package/lib/ocaml/belt_Id.cmt +0 -0
  64. package/lib/ocaml/belt_Id.cmti +0 -0
  65. package/lib/ocaml/belt_Int.cmt +0 -0
  66. package/lib/ocaml/belt_Int.cmti +0 -0
  67. package/lib/ocaml/belt_List.cmi +0 -0
  68. package/lib/ocaml/belt_List.cmt +0 -0
  69. package/lib/ocaml/belt_List.cmti +0 -0
  70. package/lib/ocaml/belt_Map.cmi +0 -0
  71. package/lib/ocaml/belt_Map.cmt +0 -0
  72. package/lib/ocaml/belt_Map.cmti +0 -0
  73. package/lib/ocaml/belt_MapDict.cmi +0 -0
  74. package/lib/ocaml/belt_MapDict.cmt +0 -0
  75. package/lib/ocaml/belt_MapDict.cmti +0 -0
  76. package/lib/ocaml/belt_MapInt.cmi +0 -0
  77. package/lib/ocaml/belt_MapInt.cmt +0 -0
  78. package/lib/ocaml/belt_MapInt.cmti +0 -0
  79. package/lib/ocaml/belt_MapString.cmi +0 -0
  80. package/lib/ocaml/belt_MapString.cmt +0 -0
  81. package/lib/ocaml/belt_MapString.cmti +0 -0
  82. package/lib/ocaml/belt_MutableMap.cmi +0 -0
  83. package/lib/ocaml/belt_MutableMap.cmt +0 -0
  84. package/lib/ocaml/belt_MutableMap.cmti +0 -0
  85. package/lib/ocaml/belt_MutableMapInt.cmi +0 -0
  86. package/lib/ocaml/belt_MutableMapInt.cmt +0 -0
  87. package/lib/ocaml/belt_MutableMapInt.cmti +0 -0
  88. package/lib/ocaml/belt_MutableMapString.cmi +0 -0
  89. package/lib/ocaml/belt_MutableMapString.cmt +0 -0
  90. package/lib/ocaml/belt_MutableMapString.cmti +0 -0
  91. package/lib/ocaml/belt_MutableQueue.cmi +0 -0
  92. package/lib/ocaml/belt_MutableQueue.cmt +0 -0
  93. package/lib/ocaml/belt_MutableQueue.cmti +0 -0
  94. package/lib/ocaml/belt_MutableSet.cmi +0 -0
  95. package/lib/ocaml/belt_MutableSet.cmt +0 -0
  96. package/lib/ocaml/belt_MutableSet.cmti +0 -0
  97. package/lib/ocaml/belt_MutableSetInt.cmi +0 -0
  98. package/lib/ocaml/belt_MutableSetInt.cmt +0 -0
  99. package/lib/ocaml/belt_MutableSetInt.cmti +0 -0
  100. package/lib/ocaml/belt_MutableSetString.cmi +0 -0
  101. package/lib/ocaml/belt_MutableSetString.cmt +0 -0
  102. package/lib/ocaml/belt_MutableSetString.cmti +0 -0
  103. package/lib/ocaml/belt_MutableStack.cmi +0 -0
  104. package/lib/ocaml/belt_MutableStack.cmt +0 -0
  105. package/lib/ocaml/belt_MutableStack.cmti +0 -0
  106. package/lib/ocaml/belt_Option.cmi +0 -0
  107. package/lib/ocaml/belt_Option.cmt +0 -0
  108. package/lib/ocaml/belt_Option.cmti +0 -0
  109. package/lib/ocaml/belt_Range.cmi +0 -0
  110. package/lib/ocaml/belt_Range.cmt +0 -0
  111. package/lib/ocaml/belt_Range.cmti +0 -0
  112. package/lib/ocaml/belt_Result.cmi +0 -0
  113. package/lib/ocaml/belt_Result.cmt +0 -0
  114. package/lib/ocaml/belt_Result.cmti +0 -0
  115. package/lib/ocaml/belt_Set.cmi +0 -0
  116. package/lib/ocaml/belt_Set.cmt +0 -0
  117. package/lib/ocaml/belt_Set.cmti +0 -0
  118. package/lib/ocaml/belt_SetDict.cmi +0 -0
  119. package/lib/ocaml/belt_SetDict.cmt +0 -0
  120. package/lib/ocaml/belt_SetDict.cmti +0 -0
  121. package/lib/ocaml/belt_SetInt.cmi +0 -0
  122. package/lib/ocaml/belt_SetInt.cmt +0 -0
  123. package/lib/ocaml/belt_SetInt.cmti +0 -0
  124. package/lib/ocaml/belt_SetString.cmi +0 -0
  125. package/lib/ocaml/belt_SetString.cmt +0 -0
  126. package/lib/ocaml/belt_SetString.cmti +0 -0
  127. package/lib/ocaml/belt_SortArray.cmi +0 -0
  128. package/lib/ocaml/belt_SortArray.cmt +0 -0
  129. package/lib/ocaml/belt_SortArray.cmti +0 -0
  130. package/lib/ocaml/belt_SortArrayInt.cmt +0 -0
  131. package/lib/ocaml/belt_SortArrayInt.cmti +0 -0
  132. package/lib/ocaml/belt_SortArrayString.cmt +0 -0
  133. package/lib/ocaml/belt_SortArrayString.cmti +0 -0
  134. package/lib/ocaml/belt_internalAVLset.cmt +0 -0
  135. package/lib/ocaml/belt_internalAVLset.cmti +0 -0
  136. package/lib/ocaml/belt_internalAVLtree.cmt +0 -0
  137. package/lib/ocaml/belt_internalAVLtree.cmti +0 -0
  138. package/lib/ocaml/belt_internalBuckets.cmt +0 -0
  139. package/lib/ocaml/belt_internalBuckets.cmti +0 -0
  140. package/lib/ocaml/belt_internalBucketsType.cmt +0 -0
  141. package/lib/ocaml/belt_internalBucketsType.cmti +0 -0
  142. package/lib/ocaml/belt_internalMapInt.cmt +0 -0
  143. package/lib/ocaml/belt_internalMapString.cmt +0 -0
  144. package/lib/ocaml/belt_internalSetBuckets.cmt +0 -0
  145. package/lib/ocaml/belt_internalSetBuckets.cmti +0 -0
  146. package/lib/ocaml/belt_internalSetInt.cmt +0 -0
  147. package/lib/ocaml/belt_internalSetString.cmt +0 -0
  148. package/lib/ocaml/belt_internals.cmti +0 -0
  149. package/lib/ocaml/buffer.cmi +0 -0
  150. package/lib/ocaml/buffer.cmt +0 -0
  151. package/lib/ocaml/buffer.cmti +0 -0
  152. package/lib/ocaml/bytes.cmi +0 -0
  153. package/lib/ocaml/bytes.cmt +0 -0
  154. package/lib/ocaml/bytes.cmti +0 -0
  155. package/lib/ocaml/bytesLabels.cmi +0 -0
  156. package/lib/ocaml/bytesLabels.cmt +0 -0
  157. package/lib/ocaml/bytesLabels.cmti +0 -0
  158. package/lib/ocaml/callback.cmi +0 -0
  159. package/lib/ocaml/callback.cmt +0 -0
  160. package/lib/ocaml/callback.cmti +0 -0
  161. package/lib/ocaml/camlinternalLazy.cmi +0 -0
  162. package/lib/ocaml/camlinternalLazy.cmt +0 -0
  163. package/lib/ocaml/camlinternalLazy.cmti +0 -0
  164. package/lib/ocaml/camlinternalMod.cmi +0 -0
  165. package/lib/ocaml/camlinternalMod.cmt +0 -0
  166. package/lib/ocaml/camlinternalMod.cmti +0 -0
  167. package/lib/ocaml/char.cmi +0 -0
  168. package/lib/ocaml/char.cmt +0 -0
  169. package/lib/ocaml/char.cmti +0 -0
  170. package/lib/ocaml/complex.cmi +0 -0
  171. package/lib/ocaml/complex.cmt +0 -0
  172. package/lib/ocaml/complex.cmti +0 -0
  173. package/lib/ocaml/digest.cmi +0 -0
  174. package/lib/ocaml/digest.cmt +0 -0
  175. package/lib/ocaml/digest.cmti +0 -0
  176. package/lib/ocaml/dom.cmt +0 -0
  177. package/lib/ocaml/dom_storage.cmt +0 -0
  178. package/lib/ocaml/dom_storage2.cmt +0 -0
  179. package/lib/ocaml/filename.cmi +0 -0
  180. package/lib/ocaml/filename.cmt +0 -0
  181. package/lib/ocaml/filename.cmti +0 -0
  182. package/lib/ocaml/genlex.cmi +0 -0
  183. package/lib/ocaml/genlex.cmt +0 -0
  184. package/lib/ocaml/genlex.cmti +0 -0
  185. package/lib/ocaml/hashtbl.cmi +0 -0
  186. package/lib/ocaml/hashtbl.cmt +0 -0
  187. package/lib/ocaml/hashtbl.cmti +0 -0
  188. package/lib/ocaml/hashtblLabels.cmi +0 -0
  189. package/lib/ocaml/hashtblLabels.cmt +0 -0
  190. package/lib/ocaml/int32.cmi +0 -0
  191. package/lib/ocaml/int32.cmt +0 -0
  192. package/lib/ocaml/int32.cmti +0 -0
  193. package/lib/ocaml/int64.cmi +0 -0
  194. package/lib/ocaml/int64.cmt +0 -0
  195. package/lib/ocaml/int64.cmti +0 -0
  196. package/lib/ocaml/js.cmi +0 -0
  197. package/lib/ocaml/js.cmt +0 -0
  198. package/lib/ocaml/js.ml +3 -0
  199. package/lib/ocaml/js_OO.cmt +0 -0
  200. package/lib/ocaml/js_array.cmt +0 -0
  201. package/lib/ocaml/js_array2.cmt +0 -0
  202. package/lib/ocaml/js_bigint.cmt +0 -0
  203. package/lib/ocaml/js_cast.cmt +0 -0
  204. package/lib/ocaml/js_cast.cmti +0 -0
  205. package/lib/ocaml/js_console.cmt +0 -0
  206. package/lib/ocaml/js_date.cmt +0 -0
  207. package/lib/ocaml/js_dict.cmi +0 -0
  208. package/lib/ocaml/js_dict.cmt +0 -0
  209. package/lib/ocaml/js_dict.cmti +0 -0
  210. package/lib/ocaml/js_exn.cmt +0 -0
  211. package/lib/ocaml/js_exn.cmti +0 -0
  212. package/lib/ocaml/js_float.cmt +0 -0
  213. package/lib/ocaml/js_global.cmt +0 -0
  214. package/lib/ocaml/js_int.cmt +0 -0
  215. package/lib/ocaml/js_json.cmi +0 -0
  216. package/lib/ocaml/js_json.cmt +0 -0
  217. package/lib/ocaml/js_json.cmti +0 -0
  218. package/lib/ocaml/js_list.cmi +0 -0
  219. package/lib/ocaml/js_list.cmt +0 -0
  220. package/lib/ocaml/js_list.cmti +0 -0
  221. package/lib/ocaml/js_map.cmt +0 -0
  222. package/lib/ocaml/js_mapperRt.cmt +0 -0
  223. package/lib/ocaml/js_mapperRt.cmti +0 -0
  224. package/lib/ocaml/js_math.cmi +0 -0
  225. package/lib/ocaml/js_math.cmt +0 -0
  226. package/lib/ocaml/js_math.ml +1 -1
  227. package/lib/ocaml/js_null.cmi +0 -0
  228. package/lib/ocaml/js_null.cmt +0 -0
  229. package/lib/ocaml/js_null.cmti +0 -0
  230. package/lib/ocaml/js_null_undefined.cmi +0 -0
  231. package/lib/ocaml/js_null_undefined.cmt +0 -0
  232. package/lib/ocaml/js_null_undefined.cmti +0 -0
  233. package/lib/ocaml/js_obj.cmt +0 -0
  234. package/lib/ocaml/js_option.cmi +0 -0
  235. package/lib/ocaml/js_option.cmt +0 -0
  236. package/lib/ocaml/js_option.cmti +0 -0
  237. package/lib/ocaml/js_promise.cmi +0 -0
  238. package/lib/ocaml/js_promise.cmt +0 -0
  239. package/lib/ocaml/js_promise.ml +19 -19
  240. package/lib/ocaml/js_promise2.cmi +0 -0
  241. package/lib/ocaml/js_promise2.cmt +0 -0
  242. package/lib/ocaml/js_promise2.res +58 -0
  243. package/lib/ocaml/js_re.cmi +0 -0
  244. package/lib/ocaml/js_re.cmt +0 -0
  245. package/lib/ocaml/js_result.cmt +0 -0
  246. package/lib/ocaml/js_result.cmti +0 -0
  247. package/lib/ocaml/js_set.cmt +0 -0
  248. package/lib/ocaml/js_string.cmi +0 -0
  249. package/lib/ocaml/js_string.cmt +0 -0
  250. package/lib/ocaml/js_string2.cmi +0 -0
  251. package/lib/ocaml/js_string2.cmt +0 -0
  252. package/lib/ocaml/js_typed_array.cmi +0 -0
  253. package/lib/ocaml/js_typed_array.cmt +0 -0
  254. package/lib/ocaml/js_typed_array2.cmi +0 -0
  255. package/lib/ocaml/js_typed_array2.cmt +0 -0
  256. package/lib/ocaml/js_types.cmt +0 -0
  257. package/lib/ocaml/js_types.cmti +0 -0
  258. package/lib/ocaml/js_undefined.cmi +0 -0
  259. package/lib/ocaml/js_undefined.cmt +0 -0
  260. package/lib/ocaml/js_undefined.cmti +0 -0
  261. package/lib/ocaml/js_vector.cmi +0 -0
  262. package/lib/ocaml/js_vector.cmt +0 -0
  263. package/lib/ocaml/js_vector.cmti +0 -0
  264. package/lib/ocaml/js_weakmap.cmt +0 -0
  265. package/lib/ocaml/js_weakset.cmt +0 -0
  266. package/lib/ocaml/jsx.cmi +0 -0
  267. package/lib/ocaml/jsx.cmt +0 -0
  268. package/lib/ocaml/{jsx.ml → jsx.res} +13 -12
  269. package/lib/ocaml/jsxDOM.cmi +0 -0
  270. package/lib/ocaml/jsxDOM.cmt +0 -0
  271. package/lib/ocaml/jsxDOM.res +620 -0
  272. package/lib/ocaml/jsxDOMStyle.cmi +0 -0
  273. package/lib/ocaml/jsxDOMStyle.cmt +0 -0
  274. package/lib/ocaml/jsxDOMStyle.ml +4 -0
  275. package/lib/ocaml/jsxEvent.cmt +0 -0
  276. package/lib/ocaml/jsxPPXReactSupport.cmi +0 -0
  277. package/lib/ocaml/jsxPPXReactSupport.cmt +0 -0
  278. package/{scripts/LICENSE.ml → lib/ocaml/jsxPPXReactSupport.res} +25 -4
  279. package/lib/ocaml/lazy.cmi +0 -0
  280. package/lib/ocaml/lazy.cmt +0 -0
  281. package/lib/ocaml/lazy.cmti +0 -0
  282. package/lib/ocaml/lexing.cmi +0 -0
  283. package/lib/ocaml/lexing.cmt +0 -0
  284. package/lib/ocaml/lexing.cmti +0 -0
  285. package/lib/ocaml/list.cmi +0 -0
  286. package/lib/ocaml/list.cmt +0 -0
  287. package/lib/ocaml/list.cmti +0 -0
  288. package/lib/ocaml/listLabels.cmi +0 -0
  289. package/lib/ocaml/listLabels.cmt +0 -0
  290. package/lib/ocaml/listLabels.cmti +0 -0
  291. package/lib/ocaml/map.cmi +0 -0
  292. package/lib/ocaml/map.cmt +0 -0
  293. package/lib/ocaml/map.cmti +0 -0
  294. package/lib/ocaml/mapLabels.cmi +0 -0
  295. package/lib/ocaml/mapLabels.cmt +0 -0
  296. package/lib/ocaml/moreLabels.cmi +0 -0
  297. package/lib/ocaml/moreLabels.cmt +0 -0
  298. package/lib/ocaml/moreLabels.cmti +0 -0
  299. package/lib/ocaml/node.cmi +0 -0
  300. package/lib/ocaml/node.cmt +0 -0
  301. package/lib/ocaml/node_buffer.cmi +0 -0
  302. package/lib/ocaml/node_buffer.cmt +0 -0
  303. package/lib/ocaml/node_child_process.cmi +0 -0
  304. package/lib/ocaml/node_child_process.cmt +0 -0
  305. package/lib/ocaml/node_fs.cmi +0 -0
  306. package/lib/ocaml/node_fs.cmt +0 -0
  307. package/lib/ocaml/node_module.cmi +0 -0
  308. package/lib/ocaml/node_module.cmt +0 -0
  309. package/lib/ocaml/node_path.cmt +0 -0
  310. package/lib/ocaml/node_process.cmi +0 -0
  311. package/lib/ocaml/node_process.cmt +0 -0
  312. package/lib/ocaml/node_process.cmti +0 -0
  313. package/lib/ocaml/obj.cmi +0 -0
  314. package/lib/ocaml/obj.cmt +0 -0
  315. package/lib/ocaml/obj.cmti +0 -0
  316. package/lib/ocaml/parsing.cmi +0 -0
  317. package/lib/ocaml/parsing.cmt +0 -0
  318. package/lib/ocaml/parsing.cmti +0 -0
  319. package/lib/ocaml/pervasives.cmi +0 -0
  320. package/lib/ocaml/pervasives.cmt +0 -0
  321. package/lib/ocaml/pervasives.cmti +0 -0
  322. package/lib/ocaml/printexc.cmi +0 -0
  323. package/lib/ocaml/printexc.cmt +0 -0
  324. package/lib/ocaml/printexc.cmti +0 -0
  325. package/lib/ocaml/printexc.ml +28 -32
  326. package/lib/ocaml/queue.cmi +0 -0
  327. package/lib/ocaml/queue.cmt +0 -0
  328. package/lib/ocaml/queue.cmti +0 -0
  329. package/lib/ocaml/random.cmi +0 -0
  330. package/lib/ocaml/random.cmt +0 -0
  331. package/lib/ocaml/random.cmti +0 -0
  332. package/lib/ocaml/set.cmi +0 -0
  333. package/lib/ocaml/set.cmt +0 -0
  334. package/lib/ocaml/set.cmti +0 -0
  335. package/lib/ocaml/setLabels.cmi +0 -0
  336. package/lib/ocaml/setLabels.cmt +0 -0
  337. package/lib/ocaml/sort.cmi +0 -0
  338. package/lib/ocaml/sort.cmt +0 -0
  339. package/lib/ocaml/sort.cmti +0 -0
  340. package/lib/ocaml/stack.cmi +0 -0
  341. package/lib/ocaml/stack.cmt +0 -0
  342. package/lib/ocaml/stack.cmti +0 -0
  343. package/lib/ocaml/stdLabels.cmi +0 -0
  344. package/lib/ocaml/stdLabels.cmt +0 -0
  345. package/lib/ocaml/stdLabels.cmti +0 -0
  346. package/lib/ocaml/stream.cmi +0 -0
  347. package/lib/ocaml/stream.cmt +0 -0
  348. package/lib/ocaml/stream.cmti +0 -0
  349. package/lib/ocaml/string.cmi +0 -0
  350. package/lib/ocaml/string.cmt +0 -0
  351. package/lib/ocaml/string.cmti +0 -0
  352. package/lib/ocaml/stringLabels.cmi +0 -0
  353. package/lib/ocaml/stringLabels.cmt +0 -0
  354. package/lib/ocaml/stringLabels.cmti +0 -0
  355. package/lib/ocaml/sys.cmi +0 -0
  356. package/lib/ocaml/sys.cmt +0 -0
  357. package/lib/ocaml/sys.cmti +0 -0
  358. package/lib/ocaml/uchar.cmi +0 -0
  359. package/lib/ocaml/uchar.cmt +0 -0
  360. package/lib/ocaml/uchar.cmti +0 -0
  361. package/package.json +2 -1
  362. package/scripts/buildNinjaBinary.js +29 -0
  363. package/scripts/install.js +7 -3
  364. package/scripts/installUtils.js +9 -1
  365. package/scripts/rescript_arg.js +2 -4
  366. package/scripts/rescript_format.js +73 -39
  367. package/win32/refmt.exe +0 -0
  368. package/darwin/bsb_helper.exe +0 -0
  369. package/darwin/bsc.exe +0 -0
  370. package/darwin/ninja.COPYING +0 -202
  371. package/darwin/ninja.exe +0 -0
  372. package/darwin/rescript.exe +0 -0
  373. package/darwinarm64/ninja.COPYING +0 -202
  374. package/freebsd/ninja.COPYING +0 -202
  375. package/lib/ocaml/jsxDOM.ml +0 -2087
  376. package/linux/bsb_helper.exe +0 -0
  377. package/linux/bsc.exe +0 -0
  378. package/linux/ninja.COPYING +0 -202
  379. package/linux/ninja.exe +0 -0
  380. package/linux/rescript.exe +0 -0
  381. package/openbsd/.keep +0 -0
  382. package/scripts/buckle_lto.js +0 -55
  383. package/scripts/build_sorted.ml +0 -233
  384. package/scripts/caml_oo_curry_gen.ml +0 -71
  385. package/scripts/checkUnused.js +0 -63
  386. package/scripts/ciTest.js +0 -172
  387. package/scripts/cover.sh +0 -3
  388. package/scripts/curry_gen.ml +0 -167
  389. package/scripts/dbg +0 -13
  390. package/scripts/dedupe.js +0 -44
  391. package/scripts/doc_gen.js +0 -117
  392. package/scripts/js_internal_gen.js +0 -135
  393. package/scripts/jsconfig.json +0 -12
  394. package/scripts/littlecase.js +0 -21
  395. package/scripts/ninja.js +0 -1980
  396. package/scripts/pack.js +0 -107
  397. package/scripts/prebuilt.js +0 -99
  398. package/scripts/release.js +0 -41
  399. package/scripts/repl.js +0 -151
  400. package/scripts/shake.js +0 -138
  401. package/scripts/tasks.js +0 -149
  402. package/scripts/test.sh +0 -3
  403. package/scripts/tmp.js +0 -98
  404. package/scripts/validate.js +0 -41
  405. package/vendor/ninja.tar.gz +0 -0
  406. package/win32/bsb_helper.exe +0 -0
  407. package/win32/bsc.exe +0 -0
  408. package/win32/ninja.COPYING +0 -202
  409. package/win32/ninja.exe +0 -0
  410. package/win32/rescript.exe +0 -0
package/scripts/ciTest.js DELETED
@@ -1,172 +0,0 @@
1
- //@ts-check
2
- var cp = require("child_process");
3
- var path = require("path");
4
- var fs = require("fs");
5
-
6
- var ounitTest = false;
7
- var mochaTest = false;
8
- var themeTest = false;
9
- var bsbTest = false;
10
- var formatTest = false;
11
- var all = false;
12
-
13
- if (process.argv.includes("-ounit")) {
14
- ounitTest = true;
15
- }
16
-
17
- if (process.argv.includes("-mocha")) {
18
- mochaTest = true;
19
- }
20
-
21
- if (process.argv.includes("-theme")) {
22
- themeTest = true;
23
- }
24
-
25
- if (process.argv.includes("-bsb")) {
26
- bsbTest = true;
27
- }
28
-
29
- if (process.argv.includes("-format")) {
30
- formatTest = true;
31
- }
32
-
33
- if (process.argv.includes("-all")) {
34
- all = true;
35
- }
36
- if (all) {
37
- ounitTest = true;
38
- mochaTest = true;
39
- themeTest = true;
40
- bsbTest = true;
41
- formatTest = true;
42
- }
43
-
44
- function init() {
45
- if (!require("./buildocaml.js").checkEnvCompiler()) {
46
- // No compiler available on path.
47
- // Assume that we built the compiler from source beforehand and add it to the path.
48
- var vendorOCamlPath = path.join(
49
- __dirname,
50
- "..",
51
- "native",
52
- require("./buildocaml.js").getVersionPrefix(),
53
- "bin"
54
- );
55
-
56
- process.env["PATH"] =
57
- vendorOCamlPath + path.delimiter + process.env["PATH"];
58
- }
59
-
60
- var ninjaPath = path.join(__dirname, "..", process.platform, "ninja.exe");
61
-
62
- if (!fs.existsSync(ninjaPath)) {
63
- throw new Error("ninja could not be configured");
64
- }
65
- }
66
-
67
- function runTests() {
68
- // when binary was prebuilt, there can be no ocaml installation
69
- // var output =
70
- // cp.execSync('which ocaml', { encoding: 'ascii' })
71
- // console.log('OCaml:', output)
72
-
73
- var binDir = path.join(__dirname, "..", "jscomp", "bin");
74
- if (ounitTest) {
75
- cp.execSync(
76
- `ocamlc.opt -w "-d" -warn-error -a -I . -c js_compiler.mli js_compiler.ml`,
77
- {
78
- cwd: path.join(__dirname, "..", "lib", "4.06.1", "unstable"),
79
- stdio: [0, 1, 2],
80
- }
81
- );
82
- // running tests for native code
83
- fs.copyFileSync(
84
- path.join(
85
- __dirname,
86
- "..",
87
- "lib",
88
- "4.06.1",
89
- "unstable",
90
- "all_ounit_tests.ml"
91
- ),
92
- path.join(binDir, "all_ounit_tests.ml")
93
- );
94
- cp.execSync(
95
- `ocamlopt.opt -g -w -40-30 -w "-d" ../stubs/ext_basic_hash_stubs.c unix.cmxa str.cmxa all_ounit_tests.ml -o test.exe`,
96
- {
97
- cwd: binDir,
98
- stdio: [0, 1, 2],
99
- }
100
- );
101
-
102
- cp.execSync(path.join(binDir, "test.exe"), {
103
- cwd: binDir,
104
- stdio: [0, 1, 2],
105
- });
106
- }
107
-
108
- // running generated js tests
109
- if (mochaTest) {
110
- cp.execSync(`npx mocha -t 10000 jscomp/test/**/*test.js`, {
111
- cwd: path.join(__dirname, ".."),
112
- stdio: [0, 1, 2],
113
- });
114
- }
115
-
116
- if (bsbTest) {
117
- console.log("Doing build_tests");
118
- var buildTestDir = path.join(__dirname, "..", "jscomp", "build_tests");
119
- var linkCmd = `npm link ../..`;
120
- console.log(linkCmd);
121
- cp.execSync(linkCmd, {
122
- cwd: buildTestDir,
123
- stdio: [0, 1, 2],
124
- encoding: "utf8",
125
- });
126
- var files = fs.readdirSync(buildTestDir);
127
- files.forEach(function (file) {
128
- var testDir = path.join(buildTestDir, file);
129
- if (file === "node_modules" || !fs.lstatSync(testDir).isDirectory()) {
130
- return;
131
- }
132
- if (!fs.existsSync(path.join(testDir, "input.js"))) {
133
- console.warn(`input.js does not exist in ${testDir}`);
134
- } else {
135
- console.log(`testing ${file}`);
136
- // note existsSync test already ensure that it is a directory
137
- cp.exec(
138
- `node input.js`,
139
- { cwd: testDir, encoding: "utf8" },
140
- function (error, stdout, stderr) {
141
- console.log(stdout);
142
-
143
- if (error !== null) {
144
- console.log(stderr);
145
- throw new Error(`❌ error in ${file}: \n${error} `);
146
- } else {
147
- console.log("✅ success in ", file);
148
- }
149
- }
150
- );
151
- }
152
- });
153
- }
154
-
155
- if (formatTest) {
156
- cp.execSync("npm run checkFormat", {
157
- cwd: path.join(__dirname, ".."),
158
- stdio: [0, 1, 2],
159
- });
160
- }
161
- }
162
-
163
- function main() {
164
- try {
165
- init();
166
- runTests();
167
- } catch (err) {
168
- console.error(err);
169
- process.exit(2);
170
- }
171
- }
172
- main();
package/scripts/cover.sh DELETED
@@ -1,3 +0,0 @@
1
- #!/bin/sh
2
- set -e
3
- node ./node_modules/istanbul/lib/cli.js cover --report html ./node_modules/.bin/_mocha -- jscomp/test/*test.js "$@"
@@ -1,167 +0,0 @@
1
-
2
-
3
- (* no mli file emitted, since mli is not very meaningful
4
- except which identifiers are exposed
5
- exported functions:
6
-
7
- - [ app f args]
8
- called when apply a curried function with a list of arugments
9
- - [ _1 o arg ] .. [ _n]
10
- called when apply a curried function with [n] argument
11
- - [ __1 o] .. [ __n o]
12
- *)
13
- let prelude ={|
14
- (* Copyright (C) 2015 - Hongbo Zhang, Authors of ReScript
15
- *
16
- * This program is free software: you can redistribute it and/or modify
17
- * it under the terms of the GNU Lesser General Public License as published by
18
- * the Free Software Foundation, either version 3 of the License, or
19
- * (at your option) any later version.
20
- *
21
- * In addition to the permissions granted to you by the LGPL, you may combine
22
- * or link a "work that uses the Library" with a publicly distributed version
23
- * of this file to produce a combined library or application, then distribute
24
- * that combined work under the terms of your choosing, with no requirement
25
- * to comply with the obligations normally placed on you by section 4 of the
26
- * LGPL version 3 (or the corresponding section of a later version of the LGPL
27
- * should you choose to use a later version).
28
- *
29
- * This program is distributed in the hope that it will be useful,
30
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
31
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32
- * GNU Lesser General Public License for more details.
33
- *
34
- * You should have received a copy of the GNU Lesser General Public License
35
- * along with this program; if not, write to the Free Software
36
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
37
-
38
- (* Generated by scripts/curry_gen.ml *)
39
- external function_length : 'a -> int = "#function_length"
40
- external apply_args : ('a -> 'b) -> _ array -> 'b = "#apply"
41
- external sub : 'a array -> int -> int -> 'a array = "?array_sub"
42
-
43
- (* Public *)
44
- let rec app f args =
45
- let init_arity = function_length f in
46
- let arity = if init_arity = 0 then 1 else init_arity in (* arity fixing *)
47
- let len = Caml_array_extern.length args in
48
- let d = arity - len in
49
- if d = 0 then
50
- apply_args f args (* f.apply (null,args) *)
51
- else if d < 0 then
52
- (* TODO: could avoid copy by tracking the index *)
53
- app (Obj.magic (apply_args f (sub args 0 arity)))
54
- (sub args arity (-d))
55
- else
56
- Obj.magic (fun x -> app f (Caml_array_extern.append args [|x|] ))
57
-
58
- |}
59
-
60
- let list_init n fn = Array.to_list (Array.init n fn)
61
-
62
- let generate_case
63
- ?arity
64
- ~args_number args_array args =
65
- match arity with
66
- | None ->
67
- Printf.sprintf " _ -> Obj.magic (app o [|%s|])"
68
- (String.concat ";"args)
69
- | Some arity ->
70
- Printf.sprintf " %d -> %s" arity
71
- (if arity >= args_number then
72
- Printf.sprintf "apply%d (Obj.magic o) %s"
73
- arity (String.concat " " args)
74
- else
75
- Printf.sprintf
76
- "app (apply%d (Obj.magic o) %s) [|%s|]"
77
- arity
78
- (String.concat " "(Array.to_list (Array.sub args_array 0 arity)))
79
- (String.concat ";"
80
- (Array.to_list (Array.sub args_array arity (args_number - arity)))))
81
-
82
-
83
-
84
- let number = 8
85
-
86
- let generate_apply arity =
87
- let vars =
88
- list_init (arity + 1)
89
- (fun i -> Printf.sprintf "'a%d" i) in
90
- let ty =
91
- match vars with
92
- | [] -> assert false
93
- | x::xs
94
- ->
95
- List.fold_left
96
- (fun acc x -> acc ^ " -> " ^ x )
97
- x xs in
98
- Printf.sprintf
99
- "(* Internal use *)\n\
100
- external apply%d : (%s) -> %s = \"#apply%d\""
101
- arity ty ty arity
102
-
103
-
104
-
105
- let generate_fun args_number =
106
- let args_array =
107
- Array.init args_number (fun i -> Printf.sprintf "a%d" i) in
108
- let args = Array.to_list args_array in
109
- let args_string = (String.concat " " args) in
110
-
111
- Printf.sprintf {|
112
-
113
- let %%private curry_%d o %s arity =
114
- match arity with
115
- |%s
116
-
117
- (* Public *)
118
- let _%d o %s =
119
- let arity = function_length o in
120
- if arity = %d then apply%d o %s
121
- else curry_%d o %s arity
122
-
123
- (* Public *)
124
- let __%d o =
125
- let arity = function_length o in
126
- if arity = %d then o
127
- else fun %s -> _%d o %s
128
- |}
129
- args_number
130
- args_string
131
- (String.concat "\n |"
132
-
133
- (list_init (number - 1)
134
- (fun arity -> generate_case ~arity:(arity + 1) ~args_number args_array args)
135
- @ [ generate_case ~args_number args_array args]
136
- )
137
- )
138
-
139
- args_number
140
- args_string
141
- args_number
142
- args_number
143
- args_string
144
- args_number
145
- args_string
146
-
147
-
148
- args_number
149
- args_number
150
- args_string
151
- args_number
152
- args_string
153
-
154
- let () =
155
- print_endline
156
- @@ Printf.sprintf
157
- "%s\n%s\n%s"
158
- prelude
159
- (String.concat "\n"
160
- (list_init number (fun i -> generate_apply (i + 1)))
161
- )
162
- (String.concat "\n"
163
- (list_init 8 (fun i -> generate_fun (i + 1))))
164
-
165
- (* local variables: *)
166
- (* compile-command: "ocaml curry_gen.ml > ../jscomp/runtime/curry.ml" *)
167
- (* end: *)
package/scripts/dbg DELETED
@@ -1,13 +0,0 @@
1
- #!/usr/bin/env node
2
- var cp = require("child_process");
3
- var path = require("path");
4
-
5
- var file = process.argv[2];
6
- console.log(file);
7
- var fmt = path.parse(file);
8
-
9
- process.env.RES_DEBUG_FILE = 1;
10
- var ninja = path.join(__dirname, "..", process.platform, "ninja.exe");
11
- cp.execSync(`touch ${file} && ${ninja} ${fmt.dir}/${fmt.name}.cmj`, {
12
- stdio: [0, 1, 2]
13
- });
package/scripts/dedupe.js DELETED
@@ -1,44 +0,0 @@
1
- //@ts-check
2
- var fs = require("fs");
3
- var cp = require("child_process");
4
- var path = require("path");
5
-
6
- var jscompDir = path.join(__dirname, "..", "jscomp");
7
-
8
- var sourceDirs = [
9
- "stubs",
10
- "ext",
11
- "common",
12
- "syntax",
13
- "depends",
14
- "core",
15
- "super_errors",
16
- "outcome_printer",
17
- "bsb",
18
- "ounit",
19
- "ounit_tests",
20
- "main",
21
- ];
22
-
23
- var files = cp.execSync(`git ls-files ${sourceDirs.join(" ")}`, {
24
- cwd: jscompDir,
25
- encoding: "utf8",
26
- });
27
-
28
- var filesPath = files.split("\n");
29
-
30
- /**
31
- * @type {Map<string,string>}
32
- */
33
- var collection = new Map();
34
- for (let file of filesPath) {
35
- let base = path.basename(file);
36
- if (collection.has(base)) {
37
- if (base.endsWith(".ml") && !file.includes("templates")) {
38
- console.log(`duplicate ${base} : ${collection.get(base)} vs ${file}`);
39
- }
40
- } else {
41
- collection.set(base, file);
42
- }
43
- }
44
- debugger;
@@ -1,117 +0,0 @@
1
- //@ts-check
2
-
3
- // This assume you already have cmi at hand
4
- // Okay to use ES6 since it is generated before shipping
5
-
6
- var fs = require("fs");
7
-
8
- var path = require("path");
9
- var child_process = require("child_process");
10
-
11
- var versionPrefix = require("./buildocaml.js").getVersionPrefix();
12
- var stdlibVersion = versionPrefix.includes("4.02")
13
- ? "stdlib-402"
14
- : "stdlib-406";
15
- var runtime_dir = path.join(__dirname, "..", "jscomp", "runtime");
16
- var others_dir = path.join(__dirname, "..", "jscomp", "others");
17
- var stdlib_dir = path.join(__dirname, "..", "jscomp", stdlibVersion);
18
- var jscomp = path.join(__dirname, "..", "jscomp");
19
- var runtime_prefix = path.relative(jscomp, runtime_dir);
20
- var others_prefix = path.relative(jscomp, others_dir);
21
- var ocamldoc = path.join(
22
- __dirname,
23
- "..",
24
- "native",
25
- versionPrefix,
26
- "bin",
27
- "ocamldoc.opt"
28
- );
29
-
30
- /**
31
- *
32
- * @param {string} s
33
- */
34
- const capitalize = s => {
35
- if (typeof s !== "string") return "";
36
- return s.charAt(0).toUpperCase() + s.slice(1);
37
- };
38
- /**
39
- *
40
- * @param {string} filename
41
- */
42
- const strip = filename => filename.split(".").slice(0, -1).join(".");
43
- function main() {
44
- /**
45
- * @type {string[]}
46
- */
47
- var hidden_list = [];
48
- var runtime_files = fs
49
- .readdirSync(runtime_dir)
50
- .filter(
51
- file =>
52
- file.startsWith("js") &&
53
- (file.endsWith(".ml") || file.endsWith(".mli")) &&
54
- !file.endsWith(".cppo.ml") &&
55
- !file.endsWith(".cppo.mli")
56
- )
57
- .map(x => {
58
- if (x.includes("internal")) {
59
- hidden_list.push(capitalize(strip(x)));
60
- }
61
- return path.join(runtime_prefix, x);
62
- })
63
- .join(" ");
64
-
65
- var others_files = fs
66
- .readdirSync(others_dir)
67
- .filter(
68
- file =>
69
- (file.endsWith(".ml") || file.endsWith(".mli")) &&
70
- !file.endsWith(".cppo.ml") &&
71
- !file.endsWith(".cppo.mli")
72
- )
73
- .map(x => {
74
- if (x.includes("internal")) {
75
- hidden_list.push(capitalize(strip(x)));
76
- }
77
- return path.join(others_prefix, x);
78
- })
79
- .join(" ");
80
-
81
- var odoc_gendir = path.join(__dirname, "..", "odoc_gen");
82
-
83
- var api_doc_dir = path.join(__dirname, "..", "docs", "api");
84
- var intro = path.join(__dirname, "..", "jscomp", "others", "intro.txt");
85
- //
86
- var generator = `-g ${odoc_gendir}/generator.cmxs`;
87
- // var generator = `-html`
88
-
89
- var hidden_modules = ``;
90
- // hidden_modules = `-hide ${hidden_list.join(',')}`
91
-
92
- var prefix_flags = `${ocamldoc} ${generator} ${hidden_modules} -w -40 -nostdlib -nopervasives -I ${others_dir} -I ${runtime_dir} -open Bs_stdlib_mini -charset utf-8 -intro ${intro} -sort -ppx '${path.join(
93
- __dirname,
94
- "..",
95
- process.platform,
96
- "bsc"
97
- )} -as-ppx' -d ${api_doc_dir}`;
98
-
99
- // -html it is weird
100
- // It is weird, -html will unload the plugin
101
-
102
- // It seems ocamldoc does need require all files for indexing modules, WTF ocamldoc !!
103
- var cmd = `${prefix_flags} ${runtime_files} ${others_files}`;
104
-
105
- console.log(`Running ${cmd}`);
106
-
107
- child_process.execSync(cmd, { cwd: jscomp, encoding: "utf8" });
108
- }
109
- exports.main = main;
110
- if (require.main === module) {
111
- main();
112
- }
113
- // console.log(`runtime files : ${runtime_files}`)
114
- // child_process.execSync(`${prefix_flags} ${runtime_files} `, {cwd : runtime_dir})
115
-
116
- // console.log(`others files : ${others_files}`)
117
- // child_process.execSync(`${prefix_flags} ${others_files} `, {cwd : others_dir})
@@ -1,135 +0,0 @@
1
- var assert = require("assert");
2
-
3
- function initArray(n) {
4
- var res = new Array(n);
5
- for (var i = 0; i < n; ++i) {
6
- res[i] = i;
7
- }
8
- return res;
9
- }
10
-
11
- function gen_normal(arity) {
12
- if (arity === 0) {
13
- return "unit -> 'a0";
14
- } else {
15
- return initArray(arity + 1)
16
- .map(x => `'a${x}`)
17
- .join(" -> ");
18
- }
19
- }
20
-
21
- function gen_bs(arity) {
22
- if (arity === 0) {
23
- return "([`Arity_0], 'a0) fn";
24
- } else {
25
- return `([\`Arity_${arity} of ( ${initArray(arity)
26
- .map(x => `'a${x}`)
27
- .join(" * ")} )], 'a${arity}) fn`;
28
- }
29
- }
30
-
31
- function gen_bs_this(arity) {
32
- assert.notEqual(arity, 0);
33
- return `([\`Arity_${arity} of ( ${initArray(arity)
34
- .map(x => `'a${x}`)
35
- .join(" * ")} )], 'a${arity} ) meth_callback`;
36
- }
37
-
38
- function gen_bs_meth(arity) {
39
- if (arity === 0) {
40
- return `([\`Arity_0], 'a0) meth`;
41
- }
42
- return `([\`Arity_${arity} of ( ${initArray(arity)
43
- .map(x => `'a${x}`)
44
- .join(" * ")} )], 'a${arity}) meth`;
45
- }
46
-
47
- function generate_mk(arity) {
48
- return `external fn_mk${arity} : (${gen_normal(arity)}) -> (${gen_bs(
49
- arity
50
- )}) = "#fn_mk" "${arity}" `;
51
- }
52
-
53
- function generate_call_back_mk(arity) {
54
- var arity = arity + 1;
55
- return `external fn_method${arity} : (${gen_normal(arity)}) -> (${gen_bs_this(
56
- arity
57
- )}) = "#fn_method" "${arity}" `;
58
- }
59
-
60
- function generate_run(arity) {
61
- if (arity === 0) {
62
- return `external fn_run0 : (([\`Arity_0], 'a0) fn) -> 'a0 = "#fn_run" "0" `;
63
- }
64
-
65
- return `external fn_run${arity} : (${gen_bs(arity)}) -> (${gen_normal(
66
- arity
67
- )} ) = "#fn_run" "${arity}" `;
68
- }
69
-
70
- function generate_method_run(arity) {
71
- if (arity === 0) {
72
- return `external method_run0 : (([\`Arity_0], 'a0) meth) -> 'a0 = "#method_run" "0" `;
73
- }
74
- return `external method_run${arity} : (${gen_bs_meth(
75
- arity
76
- )}) -> (${gen_normal(arity)} ) = "#method_run" "${arity}" `;
77
- }
78
-
79
- var prelude = `
80
- (* Generated by scripts/js_unsafe_gen.ml *)
81
- type (-'obj, +'a) meth_callback
82
- type (-'arg, + 'result) meth
83
- type (-'arg, + 'result) fn
84
- (** Js uncurried function *)
85
- external (!) : 'a t -> 'a = "#unsafe_downgrade"
86
- external debugger : unit -> unit = "#debugger"
87
- external raw_expr : string -> 'a = "#raw_expr"
88
- external raw_stmt : string -> 'a = "#raw_stmt"
89
- external raw_function: string -> 'a = "#raw_function"
90
- external unsafe_downgrade : 'a t -> 'a = "#unsafe_downgrade"
91
- `.split("\n");
92
-
93
- function genAll(prefix) {
94
- var arities = initArray(10);
95
- var code = `${prefix} ${Array.prototype
96
- .concat(
97
- prelude,
98
- arities.map(generate_mk),
99
- arities.map(generate_call_back_mk),
100
- arities.map(generate_run),
101
- arities.map(generate_method_run)
102
- )
103
- .map(x => " " + x)
104
- .join("\n")}
105
- end`;
106
- // console.log(arities, arities.map(x=>generate_call_back_mk(x)))
107
- return code;
108
- }
109
-
110
- var fs = require("fs");
111
- var path = require("path");
112
-
113
- if (require.main === module) {
114
- // fs.writeFileSync(path.join(__dirname, '..', 'jscomp', 'runtime', 'js_unsafe.ml'), genAll(), 'utf8')
115
- var jsMlFile = path.join(__dirname, "..", "jscomp", "runtime", "js.ml");
116
- var jsMliFile = path.join(__dirname, "..", "jscomp", "runtime", "js.mli");
117
- var replacement = genAll("module Internal = struct");
118
-
119
- var jsCode = fs.readFileSync(jsMlFile, "utf8");
120
- fs.writeFileSync(
121
- jsMlFile,
122
- jsCode.replace(/module Internal = struct([^])*?end/m, replacement),
123
- "utf8"
124
- );
125
-
126
- jsCode = fs.readFileSync(jsMliFile, "utf8");
127
- fs.writeFileSync(
128
- jsMliFile,
129
- jsCode.replace(
130
- /module Internal : sig([^])*?end/m,
131
- genAll("module Internal : sig")
132
- ),
133
- "utf8"
134
- );
135
- }
@@ -1,12 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "alwaysStrict": true,
4
- "noImplicitAny": true,
5
- // , "strictNullChecks": true
6
- "target": "es2018",
7
- // target need be set up
8
- // otherwise some method is missing
9
- "module": "commonjs"
10
- // setup to understand commonjs module
11
- }
12
- }
@@ -1,21 +0,0 @@
1
- //@ts-check
2
-
3
- let fs = require("fs");
4
- let path = require("path");
5
-
6
- function copyReasonReact() {
7
- let dir = path.join(__dirname, "..", "..", "reason-react", "src");
8
- let files = fs.readdirSync(dir);
9
- files.forEach(x => {
10
- if (!(x.endsWith(".re") || x.endsWith(".rei"))) {
11
- return;
12
- }
13
- let little = x[0].toLowerCase() + x.slice(1);
14
- let src = path.join(dir, x);
15
- let dst = path.join(__dirname, "..", "jscomp", "test", little);
16
- console.log(`${src} -> ${dst}`);
17
- fs.copyFileSync(src, dst);
18
- });
19
- }
20
-
21
- copyReasonReact();