From 77c2b6484fe6c91b5749412e9a1401e9f2f43b39 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Sun, 8 Sep 2024 16:09:02 +0200 Subject: [PATCH 01/20] Set version to 11.1.4 --- CHANGELOG.md | 2 ++ jscomp/common/bs_version.ml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- packages/std/package.json | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b79f0e2d78..3c5e54e0ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ > - :house: [Internal] > - :nail_care: [Polish] +# 11.1.4 + # 11.1.3 #### :bug: Bug Fix diff --git a/jscomp/common/bs_version.ml b/jscomp/common/bs_version.ml index f92abfba39..b60de7a330 100644 --- a/jscomp/common/bs_version.ml +++ b/jscomp/common/bs_version.ml @@ -21,6 +21,6 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let version = "11.1.3" +let version = "11.1.4" let header = "// Generated by ReScript, PLEASE EDIT WITH CARE" let package_name = ref "rescript" diff --git a/package-lock.json b/package-lock.json index 741b0ea639..c07933ec3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript", - "version": "11.1.3", + "version": "11.1.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rescript", - "version": "11.1.3", + "version": "11.1.4", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { diff --git a/package.json b/package.json index 8a9c3c818e..91025ff35c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rescript", - "version": "11.1.3", + "version": "11.1.4", "devDependencies": { "mocha": "10.1.0", "nyc": "15.0.0", diff --git a/packages/std/package.json b/packages/std/package.json index 83a1e10ddd..8e38b1b4fe 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/std", - "version": "11.1.3", + "version": "11.1.4", "keywords": [ "rescript", "stdlib", From eb00295eaa9944dda11d0e89789e95a56e00c69c Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Thu, 15 Aug 2024 15:25:08 +0800 Subject: [PATCH 02/20] Skip trailing comma in explicit partial application (#6949) * Check for dotdotdot in args * Check on attribute rather than label * Add tests * Fix naming convention * Update CHANGELOG --- CHANGELOG.md | 2 + jscomp/syntax/src/res_parsetree_viewer.ml | 7 +++ jscomp/syntax/src/res_parsetree_viewer.mli | 2 + jscomp/syntax/src/res_printer.ml | 26 ++++++++-- jscomp/syntax/tests/printer/expr/apply.res | 34 +++++++++++++ .../tests/printer/expr/expected/apply.res.txt | 51 +++++++++++++++++++ 6 files changed, 117 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c5e54e0ee..3d184c5399 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ # 11.1.4 +- Fix issue where long layout break added a trailing comma in partial application `...`. https://github.com/rescript-lang/rescript-compiler/pull/6949 + # 11.1.3 #### :bug: Bug Fix diff --git a/jscomp/syntax/src/res_parsetree_viewer.ml b/jscomp/syntax/src/res_parsetree_viewer.ml index a376b5b633..9d8d5948a2 100644 --- a/jscomp/syntax/src/res_parsetree_viewer.ml +++ b/jscomp/syntax/src/res_parsetree_viewer.ml @@ -72,6 +72,13 @@ let processUncurriedAppAttribute attrs = in process false [] attrs +let hasPartialAttribute attrs = + List.exists + (function + | {Location.txt = "res.partial"}, _ -> true + | _ -> false) + attrs + let processPartialAppAttribute attrs = let rec process partialApp acc attrs = match attrs with diff --git a/jscomp/syntax/src/res_parsetree_viewer.mli b/jscomp/syntax/src/res_parsetree_viewer.mli index 954638c06a..d1bb8df451 100644 --- a/jscomp/syntax/src/res_parsetree_viewer.mli +++ b/jscomp/syntax/src/res_parsetree_viewer.mli @@ -29,6 +29,8 @@ type functionAttributesInfo = { attributes: Parsetree.attributes; } +val hasPartialAttribute : Parsetree.attributes -> bool + (* determines whether a function is async and/or uncurried based on the given attributes *) val processFunctionAttributes : Parsetree.attributes -> functionAttributesInfo diff --git a/jscomp/syntax/src/res_printer.ml b/jscomp/syntax/src/res_printer.ml index c7a715f8ce..72a3f1e9fb 100644 --- a/jscomp/syntax/src/res_printer.ml +++ b/jscomp/syntax/src/res_printer.ml @@ -4120,7 +4120,13 @@ and printPexpApply ~state expr cmtTbl = let partial, attrs = ParsetreeViewer.processPartialAppAttribute attrs in let args = if partial then - let dummy = Ast_helper.Exp.constant (Ast_helper.Const.int 0) in + let loc = + {Asttypes.txt = "res.partial"; Asttypes.loc = expr.pexp_loc} + in + let attr = (loc, Parsetree.PTyp (Ast_helper.Typ.any ())) in + let dummy = + Ast_helper.Exp.constant ~attrs:[attr] (Ast_helper.Const.int 0) + in args @ [(Asttypes.Labelled "...", dummy)] else args in @@ -4700,6 +4706,18 @@ and printArguments ~state ~dotted ?(partial = false) Doc.concat [(if dotted then Doc.text "(. " else Doc.lparen); argDoc; Doc.rparen] | args -> + (* Avoid printing trailing comma when there is ... in function application *) + let hasPartialAttr, printedArgs = + List.fold_right + (fun arg (flag, acc) -> + let _, expr = arg in + let hasPartialAttr = + ParsetreeViewer.hasPartialAttribute expr.Parsetree.pexp_attributes + in + let doc = printArgument ~state arg cmtTbl in + (flag || hasPartialAttr, doc :: acc)) + args (false, []) + in Doc.group (Doc.concat [ @@ -4708,11 +4726,9 @@ and printArguments ~state ~dotted ?(partial = false) (Doc.concat [ (if dotted then Doc.line else Doc.softLine); - Doc.join - ~sep:(Doc.concat [Doc.comma; Doc.line]) - (List.map (fun arg -> printArgument ~state arg cmtTbl) args); + Doc.join ~sep:(Doc.concat [Doc.comma; Doc.line]) printedArgs; ]); - (if partial then Doc.nil else Doc.trailingComma); + (if partial || hasPartialAttr then Doc.nil else Doc.trailingComma); Doc.softLine; Doc.rparen; ]) diff --git a/jscomp/syntax/tests/printer/expr/apply.res b/jscomp/syntax/tests/printer/expr/apply.res index 9d44d720d3..3c9d1aed48 100644 --- a/jscomp/syntax/tests/printer/expr/apply.res +++ b/jscomp/syntax/tests/printer/expr/apply.res @@ -73,3 +73,37 @@ f(. { resolve(.) resolve(. ()) + +let g = f( + a => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a), + b, + c +) + +let g = f( + a => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a), + b, + c, + ... +) + +let g = f( + a => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a), + b, + c => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(d, ...), + ... +) + +let g = f( + a => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a, ...), + b, + c => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(d), + ... +) + + +let g = f( + a => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a), + b, + c => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(d, ...) +) diff --git a/jscomp/syntax/tests/printer/expr/expected/apply.res.txt b/jscomp/syntax/tests/printer/expr/expected/apply.res.txt index 1cccb8a20b..2472c24ace 100644 --- a/jscomp/syntax/tests/printer/expr/expected/apply.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/apply.res.txt @@ -93,3 +93,54 @@ f(. { resolve(.) resolve(. ()) + +let g = f( + a => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a), + b, + c, +) + +let g = + f( + a => + LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a), + b, + c, + ... + ) + +let g = + f( + a => + LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a), + b, + c => + LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx( + d, + ... + ), + ... + ) + +let g = + f( + a => + LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx( + a, + ... + ), + b, + c => + LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(d), + ... + ) + +let g = f( + a => LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx(a), + b, + c => + LongModuleName.functionWithAlongNameThatWrapsTheEditorToTheNextLinexxxxxxxxxxxxxxxxxxxxxx( + d, + ... + ), +) From 680d0addb9fd9abd963194475bfd2282d03bd35d Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Fri, 16 Aug 2024 13:38:03 +0800 Subject: [PATCH 03/20] Fix incorrect format of function under unary operator (#6953) * Fix parens in unary operator * Fix parens in binary expr * Handle underscore sugar application * Add tests * Update CHANGELOG --- CHANGELOG.md | 1 + jscomp/syntax/src/res_parens.ml | 10 ++++++++++ .../syntax/tests/printer/expr/expected/unary.res.txt | 2 ++ jscomp/syntax/tests/printer/expr/unary.res | 2 ++ 4 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d184c5399..b47da10a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ # 11.1.4 - Fix issue where long layout break added a trailing comma in partial application `...`. https://github.com/rescript-lang/rescript-compiler/pull/6949 +- Fix incorrect format of function under unary operator. https://github.com/rescript-lang/rescript-compiler/pull/6953 # 11.1.3 diff --git a/jscomp/syntax/src/res_parens.ml b/jscomp/syntax/src/res_parens.ml index 4c699c9a31..f7a7623c12 100644 --- a/jscomp/syntax/src/res_parens.ml +++ b/jscomp/syntax/src/res_parens.ml @@ -111,6 +111,11 @@ let unaryExprOperand expr = Parenthesized | _ when ParsetreeViewer.hasAwaitAttribute expr.pexp_attributes -> Parenthesized + | {pexp_desc = Pexp_construct ({txt = Lident "Function$"}, Some expr)} + when ParsetreeViewer.isUnderscoreApplySugar expr -> + Nothing + | {pexp_desc = Pexp_construct ({txt = Lident "Function$"}, Some _)} -> + Parenthesized | _ -> Nothing) let binaryExprOperand ~isLhs expr = @@ -276,6 +281,11 @@ let fieldExpr expr = Parenthesized | _ when ParsetreeViewer.hasAwaitAttribute expr.pexp_attributes -> Parenthesized + | {pexp_desc = Pexp_construct ({txt = Lident "Function$"}, Some expr)} + when ParsetreeViewer.isUnderscoreApplySugar expr -> + Nothing + | {pexp_desc = Pexp_construct ({txt = Lident "Function$"}, Some _)} -> + Parenthesized | _ -> Nothing) let setFieldExprRhs expr = diff --git a/jscomp/syntax/tests/printer/expr/expected/unary.res.txt b/jscomp/syntax/tests/printer/expr/expected/unary.res.txt index cfe9b42193..714deac77d 100644 --- a/jscomp/syntax/tests/printer/expr/expected/unary.res.txt +++ b/jscomp/syntax/tests/printer/expr/expected/unary.res.txt @@ -85,3 +85,5 @@ let () = { let x = (!truths)[0] (!streets)[0] = "foo-street" + +!(arg => doStuffWith(arg)) diff --git a/jscomp/syntax/tests/printer/expr/unary.res b/jscomp/syntax/tests/printer/expr/unary.res index 0aba0aea7e..684ce64916 100644 --- a/jscomp/syntax/tests/printer/expr/unary.res +++ b/jscomp/syntax/tests/printer/expr/unary.res @@ -68,3 +68,5 @@ let () = { let x = (!truths)[0] (!streets)[0] = "foo-street" + +!(arg => doStuffWith(arg)) From 3ed3deccca4ba6ea5cddafc55b77c52153946427 Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Tue, 20 Aug 2024 13:43:06 +0800 Subject: [PATCH 04/20] Fix module printing (#6963) * Handle parens when mod type is a module signature * Refactor * Update CHANGELOG * Add tests * Handle more edge cases * Add more test cases from jscomp/test/coercion_module_alias_test.res --- CHANGELOG.md | 1 + jscomp/syntax/src/res_parens.ml | 17 +++++++ jscomp/syntax/src/res_parens.mli | 2 + jscomp/syntax/src/res_printer.ml | 7 ++- .../modExpr/expected/structure.res.txt | 46 +++++++++++++++++ .../tests/printer/modExpr/structure.res | 49 ++++++++++++++++++- 6 files changed, 120 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b47da10a10..342b1d60f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Fix issue where long layout break added a trailing comma in partial application `...`. https://github.com/rescript-lang/rescript-compiler/pull/6949 - Fix incorrect format of function under unary operator. https://github.com/rescript-lang/rescript-compiler/pull/6953 +- Fix incorrect incorrect printing of module binding with signature. https://github.com/rescript-lang/rescript-compiler/pull/6963 # 11.1.3 diff --git a/jscomp/syntax/src/res_parens.ml b/jscomp/syntax/src/res_parens.ml index f7a7623c12..83ae636bde 100644 --- a/jscomp/syntax/src/res_parens.ml +++ b/jscomp/syntax/src/res_parens.ml @@ -450,6 +450,23 @@ let includeModExpr modExpr = | Parsetree.Pmod_constraint _ -> true | _ -> false +let modExprParens modExpr = + match modExpr with + | { + Parsetree.pmod_desc = + Pmod_constraint + ( {Parsetree.pmod_desc = Pmod_structure _}, + {Parsetree.pmty_desc = Pmty_signature [{psig_desc = Psig_module _}]} ); + } -> + false + | { + Parsetree.pmod_desc = + Pmod_constraint + (_, {Parsetree.pmty_desc = Pmty_signature [{psig_desc = Psig_module _}]}); + } -> + true + | _ -> false + let arrowReturnTypExpr typExpr = match typExpr.Parsetree.ptyp_desc with | Parsetree.Ptyp_arrow _ -> true diff --git a/jscomp/syntax/src/res_parens.mli b/jscomp/syntax/src/res_parens.mli index 9b60b815f1..5d1abf9e1c 100644 --- a/jscomp/syntax/src/res_parens.mli +++ b/jscomp/syntax/src/res_parens.mli @@ -32,6 +32,8 @@ val callExpr : Parsetree.expression -> kind val includeModExpr : Parsetree.module_expr -> bool +val modExprParens : Parsetree.module_expr -> bool + val arrowReturnTypExpr : Parsetree.core_type -> bool val patternRecordRowRhs : Parsetree.pattern -> bool diff --git a/jscomp/syntax/src/res_printer.ml b/jscomp/syntax/src/res_printer.ml index 72a3f1e9fb..376e9cacf8 100644 --- a/jscomp/syntax/src/res_printer.ml +++ b/jscomp/syntax/src/res_printer.ml @@ -719,6 +719,11 @@ and printModuleBinding ~state ~isRec moduleBinding cmtTbl i = Doc.concat [Doc.text ": "; printModType ~state modType cmtTbl] ) | modExpr -> (printModExpr ~state modExpr cmtTbl, Doc.nil) in + let modExprDocParens = + if Parens.modExprParens moduleBinding.pmb_expr then + Doc.concat [Doc.lparen; modExprDoc; Doc.rparen] + else modExprDoc + in let modName = let doc = Doc.text moduleBinding.pmb_name.Location.txt in printComments doc cmtTbl moduleBinding.pmb_name.loc @@ -732,7 +737,7 @@ and printModuleBinding ~state ~isRec moduleBinding cmtTbl i = modName; modConstraintDoc; Doc.text " = "; - modExprDoc; + modExprDocParens; ] in printComments doc cmtTbl moduleBinding.pmb_loc diff --git a/jscomp/syntax/tests/printer/modExpr/expected/structure.res.txt b/jscomp/syntax/tests/printer/modExpr/expected/structure.res.txt index b5016cf426..a958790e76 100644 --- a/jscomp/syntax/tests/printer/modExpr/expected/structure.res.txt +++ b/jscomp/syntax/tests/printer/modExpr/expected/structure.res.txt @@ -22,3 +22,49 @@ let g = { module M: T = {} 0 } + +module M7: { + module N': { + let x: int + } +} = (M6: { + module N: { + let x: int + } + module N' = N +}) + +module M8 = M7 + +module M5 = G0() + +module M7: { + let x: int +} = { + let x = 8 +} + +module M3: { + module N': { + let x: int + } +} = { + include M' +} + +module G0: (X: {}) => +{ + module N': { + let x: int + } +} = F0 + +module M6 = { + module D = { + let y = 3 + } + module N = { + let x = 1 + } + module N' = N +} diff --git a/jscomp/syntax/tests/printer/modExpr/structure.res b/jscomp/syntax/tests/printer/modExpr/structure.res index a0bd2ff7c4..86a882d62d 100644 --- a/jscomp/syntax/tests/printer/modExpr/structure.res +++ b/jscomp/syntax/tests/printer/modExpr/structure.res @@ -21,4 +21,51 @@ module type T = {} let g = { module M: T = {} 0 -} \ No newline at end of file +} + +module M7: { + module N': { + let x: int + } +} = (M6: { + module N: { + let x: int + } + module N' = N +}) + + +module M8 = M7 + +module M5 = G0() + +module M7: { + let x: int +} = { + let x = 8 +} + +module M3: { + module N': { + let x: int + } +} = { + include M' +} + +module G0: (X: {}) => +{ + module N': { + let x: int + } +} = F0 + +module M6 = { + module D = { + let y = 3 + } + module N = { + let x = 1 + } + module N' = N +} From ae131a29b3c3132b6ab38b6f38cdbd99c061b2aa Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Tue, 27 Aug 2024 10:26:37 +0200 Subject: [PATCH 05/20] Disallow non-variant spreads in variants (#6980) * disallow non-variant spreads in variants * changelog * undo formatting in changelog * run make lib * changelog * fix * changelog # Conflicts: # CHANGELOG.md --- CHANGELOG.md | 3 ++- .../expected/variant_spread_abstract_type.res.expected | 9 +++++++++ .../variant_spread_extensible_variant.res.expected | 9 +++++++++ .../fixtures/variant_spread_abstract_type.res | 2 ++ .../fixtures/variant_spread_extensible_variant.res | 2 ++ jscomp/ml/typedecl.ml | 2 ++ jscomp/ml/variant_type_spread.ml | 4 +++- 7 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 jscomp/build_tests/super_errors/expected/variant_spread_abstract_type.res.expected create mode 100644 jscomp/build_tests/super_errors/expected/variant_spread_extensible_variant.res.expected create mode 100644 jscomp/build_tests/super_errors/fixtures/variant_spread_abstract_type.res create mode 100644 jscomp/build_tests/super_errors/fixtures/variant_spread_extensible_variant.res diff --git a/CHANGELOG.md b/CHANGELOG.md index 342b1d60f5..871c9232d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - Fix issue where long layout break added a trailing comma in partial application `...`. https://github.com/rescript-lang/rescript-compiler/pull/6949 - Fix incorrect format of function under unary operator. https://github.com/rescript-lang/rescript-compiler/pull/6953 - Fix incorrect incorrect printing of module binding with signature. https://github.com/rescript-lang/rescript-compiler/pull/6963 +- Disallow spreading anything but regular variants inside of other variants. https://github.com/rescript-lang/rescript-compiler/pull/6980 # 11.1.3 @@ -2507,4 +2508,4 @@ Features: # 1.0.0 -Initial release +Initial release \ No newline at end of file diff --git a/jscomp/build_tests/super_errors/expected/variant_spread_abstract_type.res.expected b/jscomp/build_tests/super_errors/expected/variant_spread_abstract_type.res.expected new file mode 100644 index 0000000000..016fd1e23c --- /dev/null +++ b/jscomp/build_tests/super_errors/expected/variant_spread_abstract_type.res.expected @@ -0,0 +1,9 @@ + + We've found a bug for you! + /.../fixtures/variant_spread_abstract_type.res:2:15 + + 1 │ type a + 2 │ type b = | ...a | Other + 3 │ + + This type is not a valid type to spread. It's only possible to spread other variants. \ No newline at end of file diff --git a/jscomp/build_tests/super_errors/expected/variant_spread_extensible_variant.res.expected b/jscomp/build_tests/super_errors/expected/variant_spread_extensible_variant.res.expected new file mode 100644 index 0000000000..100f881686 --- /dev/null +++ b/jscomp/build_tests/super_errors/expected/variant_spread_extensible_variant.res.expected @@ -0,0 +1,9 @@ + + We've found a bug for you! + /.../fixtures/variant_spread_extensible_variant.res:2:15 + + 1 │ type a = .. + 2 │ type b = | ...a | Other + 3 │ + + This type is not a valid type to spread. It's only possible to spread other variants. \ No newline at end of file diff --git a/jscomp/build_tests/super_errors/fixtures/variant_spread_abstract_type.res b/jscomp/build_tests/super_errors/fixtures/variant_spread_abstract_type.res new file mode 100644 index 0000000000..ae52ca53af --- /dev/null +++ b/jscomp/build_tests/super_errors/fixtures/variant_spread_abstract_type.res @@ -0,0 +1,2 @@ +type a +type b = | ...a | Other diff --git a/jscomp/build_tests/super_errors/fixtures/variant_spread_extensible_variant.res b/jscomp/build_tests/super_errors/fixtures/variant_spread_extensible_variant.res new file mode 100644 index 0000000000..344b0f66d5 --- /dev/null +++ b/jscomp/build_tests/super_errors/fixtures/variant_spread_extensible_variant.res @@ -0,0 +1,2 @@ +type a = .. +type b = | ...a | Other diff --git a/jscomp/ml/typedecl.ml b/jscomp/ml/typedecl.ml index 43a8b3f05f..532c093b87 100644 --- a/jscomp/ml/typedecl.ml +++ b/jscomp/ml/typedecl.ml @@ -2184,6 +2184,8 @@ let report_error ppf = function ^ other_variant_text ^ ". Both variants must have the same @tag attribute configuration, or no \ @tag attribute at all") + | Variant_spread_fail Variant_type_spread.InvalidType -> + fprintf ppf "@[This type is not a valid type to spread. It's only possible to spread other variants.@]" | Variant_spread_fail Variant_type_spread.CouldNotFindType -> fprintf ppf "@[This type could not be found. It's only possible to spread variants that are known as the spread happens. This means for example that you can't spread variants in recursive definitions.@]" | Variant_spread_fail Variant_type_spread.HasTypeParams -> diff --git a/jscomp/ml/variant_type_spread.ml b/jscomp/ml/variant_type_spread.ml index 94caebe581..bb1c380906 100644 --- a/jscomp/ml/variant_type_spread.ml +++ b/jscomp/ml/variant_type_spread.ml @@ -4,6 +4,7 @@ let mk_constructor_comes_from_spread_attr () : Parsetree.attribute = type variant_type_spread_error = | CouldNotFindType | HasTypeParams + | InvalidType | DuplicateConstructor of { variant_with_overlapping_constructor: string; overlapping_constructor_name: string; @@ -31,6 +32,7 @@ let map_constructors ~(sdecl : Parsetree.type_declaration) ~all_constructors env in match type_decl with + | {type_kind = Type_variant [] } -> raise (VariantTypeSpreadError (loc.loc, InvalidType)) | {type_kind = Type_variant cstrs; type_attributes; type_params} -> if List.length type_params > 0 then raise (VariantTypeSpreadError (loc.loc, HasTypeParams)); @@ -83,7 +85,7 @@ let map_constructors ~(sdecl : Parsetree.type_declaration) ~all_constructors env pcd_args = Pcstr_tuple []; pcd_name = Location.mkloc cstr.cd_id.name cstr.cd_loc; })) - | _ -> [c]) + | _ -> raise (VariantTypeSpreadError (loc.loc, InvalidType))) | _ -> Hashtbl.add all_constructors c.pcd_name.txt (); [c] From 014845659e591f4ceb3883c75e67d6e3e26b0605 Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Sun, 1 Sep 2024 14:40:17 +0800 Subject: [PATCH 06/20] Fix comment removed when function signature has type keyword (#6997) * Fix comment removed when function signature has type keyword * Update CHANGELOG --- CHANGELOG.md | 3 ++- jscomp/syntax/src/res_comments_table.ml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 871c9232d1..57ab7022c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ - Fix incorrect format of function under unary operator. https://github.com/rescript-lang/rescript-compiler/pull/6953 - Fix incorrect incorrect printing of module binding with signature. https://github.com/rescript-lang/rescript-compiler/pull/6963 - Disallow spreading anything but regular variants inside of other variants. https://github.com/rescript-lang/rescript-compiler/pull/6980 +- Fix comment removed when function signature has `type` keyword. https://github.com/rescript-lang/rescript-compiler/pull/6997 # 11.1.3 @@ -2508,4 +2509,4 @@ Features: # 1.0.0 -Initial release \ No newline at end of file +Initial release diff --git a/jscomp/syntax/src/res_comments_table.ml b/jscomp/syntax/src/res_comments_table.ml index 3fd0d5e989..b23e65c5f7 100644 --- a/jscomp/syntax/src/res_comments_table.ml +++ b/jscomp/syntax/src/res_comments_table.ml @@ -1404,6 +1404,8 @@ and walkExpression expr t comments = attach t.leading expr.pexp_loc leading; walkExpression expr t inside; attach t.trailing expr.pexp_loc trailing + | Pexp_construct ({txt = Longident.Lident "Function$"}, Some returnExpr) -> + walkExpression returnExpr t comments | _ -> if isBlockExpr returnExpr then walkExpression returnExpr t comments else From 49e702f49a1faa1851e291921a000cd9344b2081 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Mon, 2 Sep 2024 10:51:50 +0200 Subject: [PATCH 07/20] Fix parse error on doc comment before "and" in type def (#7001) * Fix parse error on doc comment before "and" in type def * CHANGELOG # Conflicts: # jscomp/syntax/src/res_core.ml --- CHANGELOG.md | 1 + jscomp/syntax/src/res_core.ml | 2 +- jscomp/syntax/tests/parsing/other/docComments.res | 6 +++++- .../syntax/tests/parsing/other/expected/docComments.res.txt | 6 +++++- jscomp/syntax/tests/printer/comments/docComments.res | 6 +++++- .../tests/printer/comments/expected/docComments.res.txt | 3 +++ 6 files changed, 20 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57ab7022c0..fd67e60ee4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Fix incorrect incorrect printing of module binding with signature. https://github.com/rescript-lang/rescript-compiler/pull/6963 - Disallow spreading anything but regular variants inside of other variants. https://github.com/rescript-lang/rescript-compiler/pull/6980 - Fix comment removed when function signature has `type` keyword. https://github.com/rescript-lang/rescript-compiler/pull/6997 +- Fix parse error on doc comment before "and" in type def. https://github.com/rescript-lang/rescript-compiler/pull/7001 # 11.1.3 diff --git a/jscomp/syntax/src/res_core.ml b/jscomp/syntax/src/res_core.ml index cd1d576267..37e01e56e3 100644 --- a/jscomp/syntax/src/res_core.ml +++ b/jscomp/syntax/src/res_core.ml @@ -2525,7 +2525,7 @@ and parseAttributesAndBinding (p : Parser.t) = let comments = p.comments in match p.Parser.token with - | At -> ( + | At | DocComment (_, _) -> ( let attrs = parseAttributes p in match p.Parser.token with | And -> attrs diff --git a/jscomp/syntax/tests/parsing/other/docComments.res b/jscomp/syntax/tests/parsing/other/docComments.res index 2aec79b66c..793f5980d8 100644 --- a/jscomp/syntax/tests/parsing/other/docComments.res +++ b/jscomp/syntax/tests/parsing/other/docComments.res @@ -14,4 +14,8 @@ let q = 11 * is a multi-line multiline doc comment */ -type h = int \ No newline at end of file +type h = int + +type pathItem = {} +/** Issue 6844: doc comment before "and" */ +and operation = {} diff --git a/jscomp/syntax/tests/parsing/other/expected/docComments.res.txt b/jscomp/syntax/tests/parsing/other/expected/docComments.res.txt index f8427fb3ff..004126c18d 100644 --- a/jscomp/syntax/tests/parsing/other/expected/docComments.res.txt +++ b/jscomp/syntax/tests/parsing/other/expected/docComments.res.txt @@ -4,4 +4,8 @@ let z = 34[@@res.doc " This is a doc \226\156\133 comment "] [@@@res.doc {js|And this is a res.doc module annotation|js}] let q = 11[@@res.doc {js|And this is a res.doc ✅ annotation|js}] type nonrec h = int[@@res.doc - " This\n * is a multi-line\n multiline doc comment\n "] \ No newline at end of file + " This\n * is a multi-line\n multiline doc comment\n "] +type nonrec pathItem = { + } +and operation = { + }[@@res.doc " Issue 6844: doc comment before \"and\" "] \ No newline at end of file diff --git a/jscomp/syntax/tests/printer/comments/docComments.res b/jscomp/syntax/tests/printer/comments/docComments.res index e3e667adb3..731ca5d5cd 100644 --- a/jscomp/syntax/tests/printer/comments/docComments.res +++ b/jscomp/syntax/tests/printer/comments/docComments.res @@ -26,4 +26,8 @@ type h = int @foo @bar @baz let x = 10 /** doc comment and 0 attributes */ -let x = 10 \ No newline at end of file +let x = 10 + +type pathItem = {} +/** Issue 6844: doc comment before "and" */ +and operation = {} diff --git a/jscomp/syntax/tests/printer/comments/expected/docComments.res.txt b/jscomp/syntax/tests/printer/comments/expected/docComments.res.txt index 6a6a951e97..bae9ae907e 100644 --- a/jscomp/syntax/tests/printer/comments/expected/docComments.res.txt +++ b/jscomp/syntax/tests/printer/comments/expected/docComments.res.txt @@ -31,3 +31,6 @@ let x = 10 /** doc comment and 0 attributes */ let x = 10 + +type pathItem = {} +/** Issue 6844: doc comment before "and" */ and operation = {} From 3d8ca494957b51cac5568b3cc0d6fc56053fb90a Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Sun, 8 Sep 2024 15:18:54 +0800 Subject: [PATCH 08/20] Fix tuple coercion (#7024) * Fix tuple coercion It was only handled for the first arg in the tuple * Update CHANGELOG --- CHANGELOG.md | 1 + jscomp/syntax/src/res_core.ml | 1 + .../tests/parsing/grammar/expressions/coerce.res | 10 +++++++++- .../grammar/expressions/expected/coerce.res.txt | 6 +++++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd67e60ee4..bf653d33ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - Disallow spreading anything but regular variants inside of other variants. https://github.com/rescript-lang/rescript-compiler/pull/6980 - Fix comment removed when function signature has `type` keyword. https://github.com/rescript-lang/rescript-compiler/pull/6997 - Fix parse error on doc comment before "and" in type def. https://github.com/rescript-lang/rescript-compiler/pull/7001 +- Fix tuple coercion. https://github.com/rescript-lang/rescript-compiler/pull/7024 # 11.1.3 diff --git a/jscomp/syntax/src/res_core.ml b/jscomp/syntax/src/res_core.ml index 37e01e56e3..2a0807416c 100644 --- a/jscomp/syntax/src/res_core.ml +++ b/jscomp/syntax/src/res_core.ml @@ -1865,6 +1865,7 @@ and parseConstrainedExprRegion p = | token when Grammar.isExprStart token -> ( let expr = parseExpr p in match p.Parser.token with + | ColonGreaterThan -> Some (parseCoercedExpr ~expr p) | Colon -> Parser.next p; let typ = parseTypExpr p in diff --git a/jscomp/syntax/tests/parsing/grammar/expressions/coerce.res b/jscomp/syntax/tests/parsing/grammar/expressions/coerce.res index e9f73bbf27..f2bd210eff 100644 --- a/jscomp/syntax/tests/parsing/grammar/expressions/coerce.res +++ b/jscomp/syntax/tests/parsing/grammar/expressions/coerce.res @@ -1,3 +1,11 @@ let foo = (x:int) => (x :> int) -let foo = x => (x : t :> int) \ No newline at end of file +let foo = x => (x : t :> int) + +let _ = (x : int) + +let foo = (x : int, y :> float) + +let foo = (x : int, y :> float, z :> int) + +let foo = (x : int, y, z :> int) diff --git a/jscomp/syntax/tests/parsing/grammar/expressions/expected/coerce.res.txt b/jscomp/syntax/tests/parsing/grammar/expressions/expected/coerce.res.txt index fd68e3581a..f87fc15a75 100644 --- a/jscomp/syntax/tests/parsing/grammar/expressions/expected/coerce.res.txt +++ b/jscomp/syntax/tests/parsing/grammar/expressions/expected/coerce.res.txt @@ -1,2 +1,6 @@ let foo (x : int) = (x :> int) -let foo x = ((x : t) :> int) \ No newline at end of file +let foo x = ((x : t) :> int) +let _ = (x : int) +let foo = ((x : int), (y :> float)) +let foo = ((x : int), (y :> float), (z :> int)) +let foo = ((x : int), y, (z :> int)) \ No newline at end of file From 5b9d693d57454d7f93bf8b3f7e1c331c7a901d1e Mon Sep 17 00:00:00 2001 From: woonki Date: Fri, 20 Sep 2024 22:08:31 +0900 Subject: [PATCH 09/20] Deprecate JSX 3 (#7042) * deprecate jsx 3 from bsb * clean up * changelog * fix changelog --- CHANGELOG.md | 4 ++++ jscomp/bsb/bsb_jsx.ml | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf653d33ed..3d8d088f1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ > - :house: [Internal] > - :nail_care: [Polish] +# 11.1.5 (Unreleased) + +- Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042 + # 11.1.4 - Fix issue where long layout break added a trailing comma in partial application `...`. https://github.com/rescript-lang/rescript-compiler/pull/6949 diff --git a/jscomp/bsb/bsb_jsx.ml b/jscomp/bsb/bsb_jsx.ml index b9fbd08661..f6ea2a894e 100644 --- a/jscomp/bsb/bsb_jsx.ml +++ b/jscomp/bsb/bsb_jsx.ml @@ -43,7 +43,13 @@ let from_map map = match m.?(Bsb_build_schemas.jsx_version) with | Some (Flo { loc; flo }) -> ( match flo with - | "3" -> version := Some Jsx_v3 + | "3" -> + let loc_end = + {loc with Lexing.pos_cnum = loc.Lexing.pos_cnum + 1} + in + let loc = {Warnings.loc_start = loc; loc_end; loc_ghost = false} in + Location.deprecated loc "jsx 3 is deprecated, use jsx 4 instead"; + version := Some Jsx_v3 | "4" -> version := Some Jsx_v4 | _ -> Bsb_exception.errorf ~loc "Unsupported jsx version %s" flo ) From 0bac05bdddef37c02e6535d35753bca5799d582f Mon Sep 17 00:00:00 2001 From: Florian Hammerschmidt Date: Fri, 4 Oct 2024 11:34:50 +0200 Subject: [PATCH 10/20] Deprecate js_cast.resi (#7074) --- CHANGELOG.md | 1 + jscomp/others/js_cast.res | 2 ++ jscomp/others/js_cast.resi | 2 ++ 3 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d8d088f1f..95de0280cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ # 11.1.5 (Unreleased) - Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042 +- Deprecate js_cast.res https://github.com/rescript-lang/rescript-compiler/pull/7074 # 11.1.4 diff --git a/jscomp/others/js_cast.res b/jscomp/others/js_cast.res index 07135415d9..01916604b8 100644 --- a/jscomp/others/js_cast.res +++ b/jscomp/others/js_cast.res @@ -22,6 +22,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +@@deprecated("This module is not supported anymore and will be removed in the next major version.") + external intOfBool: bool => int = "%identity" external floatOfInt: int => float = "%identity" diff --git a/jscomp/others/js_cast.resi b/jscomp/others/js_cast.resi index 8ef323b732..95afe01f09 100644 --- a/jscomp/others/js_cast.resi +++ b/jscomp/others/js_cast.resi @@ -37,6 +37,8 @@ If for any reason, the runtime representation changes, those function will be modified accordingly. */ +@@deprecated("This module is not supported anymore and will be removed in the next major version.") + /** `intOfBool(b)` returns `1` for when `b` is `true` and `0` when `b` is `false` */ From 6de936a67af2c91375a0370d9909697ddc694e2f Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Sat, 12 Oct 2024 03:45:15 +0900 Subject: [PATCH 11/20] Deprecated top-level suffix in the rescript.json (#7056) * Deprecated top-level suffix in the rescript.json * fix message * changelog --- CHANGELOG.md | 1 + docs/docson/build-schema.json | 10 ++-------- jscomp/bsb/bsb_package_specs.ml | 21 ++++++++++++++------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95de0280cf..a4debfd5cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042 - Deprecate js_cast.res https://github.com/rescript-lang/rescript-compiler/pull/7074 +- Deprecate top-level `"suffix"` option in `rescript.json`. https://github.com/rescript-lang/rescript-compiler/pull/7056 # 11.1.4 diff --git a/docs/docson/build-schema.json b/docs/docson/build-schema.json index c0139a7e9f..f8b6328497 100644 --- a/docs/docson/build-schema.json +++ b/docs/docson/build-schema.json @@ -5,10 +5,6 @@ "enum": ["esmodule", "commonjs", "es6", "es6-global"], "description": "es6 and es6-global are deprecated. Default: commonjs." }, - "suffix-spec": { - "type": "string", - "description": "Suffix of generated js files. Default: .js. May contain letters, digits, \"-\", \"_\" and \".\" and must end with .js, .mjs or .cjs." - }, "module-format-object": { "type": "object", "properties": { @@ -20,7 +16,8 @@ "description": "Default: false." }, "suffix": { - "$ref": "#/definitions/suffix-spec" + "type": "string", + "description": "Suffix of generated js files. Default: .js. May contain letters, digits, \"-\", \"_\" and \".\" and must end with .js, .mjs or .cjs." } }, "required": ["module"] @@ -487,9 +484,6 @@ }, "description": "(Not needed usually) external include directories, which will be applied `-I` to all compilation units" }, - "suffix": { - "$ref": "#/definitions/suffix-spec" - }, "reanalyze": { "$ref": "#/definitions/reanalyze", "description": "Configure reanalyze, a static code analysis tool for ReScript." diff --git a/jscomp/bsb/bsb_package_specs.ml b/jscomp/bsb/bsb_package_specs.ml index bcb88c90ac..8bbecfa2b1 100644 --- a/jscomp/bsb/bsb_package_specs.ml +++ b/jscomp/bsb/bsb_package_specs.ml @@ -43,14 +43,17 @@ let bad_module_format_message_exn ~loc format = of: %s or %s" format Literals.esmodule Literals.commonjs +let deprecated_option ~loc x message = + let loc_end = + {loc with Lexing.pos_cnum = loc.Lexing.pos_cnum + String.length x} + in + let loc = {Warnings.loc_start = loc; loc_end; loc_ghost = false} in + Location.deprecated loc message + let supported_format (x : string) loc : Ext_module_system.t = let _ = if x = Literals.es6 || x = Literals.es6_global then - let loc_end = - {loc with Lexing.pos_cnum = loc.Lexing.pos_cnum + String.length x} - in - let loc = {Warnings.loc_start = loc; loc_end; loc_ghost = false} in - Location.deprecated loc + deprecated_option ~loc x (Printf.sprintf "Option \"%s\" is deprecated. Use \"%s\" instead." x Literals.esmodule) in @@ -196,10 +199,14 @@ let list_dirs_by (package_specs : t) (f : string -> unit) = type json_map = Ext_json_types.t Map_string.t let extract_js_suffix_exn (map : json_map) : string = + let deprecation = "The \"suffix\" option at the top level is deprecated. Move the \"suffix\" setting into each \"package-specs\" entry." in match map.?(Bsb_build_schemas.suffix) with | None -> Literals.suffix_js - | Some (Str { str = suffix; _ }) when validate_js_suffix suffix -> suffix - | Some ((Str {str; _}) as config) -> + | Some (Str { str = suffix; loc }) when validate_js_suffix suffix -> + deprecated_option ~loc Literals.suffix_js deprecation; + suffix + | Some ((Str {str; loc}) as config) -> + deprecated_option ~loc Literals.suffix_js deprecation; Bsb_exception.config_error config ("invalid suffix \"" ^ str ^ "\". The suffix and may contain letters, digits, \"-\", \"_\" and \".\" and must end with .js, .mjs or .cjs.") | Some config -> From 176f02d3500d25f35dd1fa55723809619bf2abfd Mon Sep 17 00:00:00 2001 From: Paul Buschmann Date: Mon, 21 Oct 2024 21:47:50 +0200 Subject: [PATCH 12/20] v11 backport of #7104 (#7111) * refactor: extract fun from process_cmt_file * refactor: read the .cmt earlier * feat: handle paths via source_file instead of cmt_file * add project root to default config * refactor: extract funs to remove duplication * fix: consider file seperators * fix: please static checker * make find source file return only absolute paths * refactor: cleanup getOutputFile and getOutputFileRelative * chore: update changelog --- CHANGELOG.md | 1 + jscomp/gentype/FindSourceFile.ml | 13 +++- jscomp/gentype/FindSourceFile.mli | 8 +++ jscomp/gentype/GenTypeConfig.ml | 9 +-- jscomp/gentype/GenTypeMain.ml | 111 +++++++++++++++--------------- jscomp/gentype/Paths.ml | 30 ++++++-- 6 files changed, 106 insertions(+), 66 deletions(-) create mode 100644 jscomp/gentype/FindSourceFile.mli diff --git a/CHANGELOG.md b/CHANGELOG.md index a4debfd5cb..37a91b0811 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ # 11.1.5 (Unreleased) +- Handle absolute file paths in gentype https://github.com/rescript-lang/rescript-compiler/pull/7111 - Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042 - Deprecate js_cast.res https://github.com/rescript-lang/rescript-compiler/pull/7074 - Deprecate top-level `"suffix"` option in `rescript.json`. https://github.com/rescript-lang/rescript-compiler/pull/7056 diff --git a/jscomp/gentype/FindSourceFile.ml b/jscomp/gentype/FindSourceFile.ml index b935a5e2bb..b646f077cb 100644 --- a/jscomp/gentype/FindSourceFile.ml +++ b/jscomp/gentype/FindSourceFile.ml @@ -14,8 +14,17 @@ let rec implementation items = | false -> Some str_loc.loc_start.pos_fname) | [] -> None +let transform_to_absolute_path (path : string option) = + let transform path = + if Filename.is_relative path then Filename.concat (Sys.getcwd ()) path + else path + in + Option.map transform path + let cmt cmt_annots = match cmt_annots with - | Cmt_format.Interface signature -> interface signature.sig_items - | Implementation structure -> implementation structure.str_items + | Cmt_format.Interface signature -> + transform_to_absolute_path (interface signature.sig_items) + | Implementation structure -> + transform_to_absolute_path (implementation structure.str_items) | _ -> None diff --git a/jscomp/gentype/FindSourceFile.mli b/jscomp/gentype/FindSourceFile.mli new file mode 100644 index 0000000000..6c7bab7a7d --- /dev/null +++ b/jscomp/gentype/FindSourceFile.mli @@ -0,0 +1,8 @@ +val cmt : Cmt_format.binary_annots -> string option +(** + [cmt annots] given [Cmt_format.binary_annots] it returns an absolute source file path + if the file exists, otherwise it returns None. + + @param annots The binary annotations to be processed. + @return An optional absolute path to the source file. +*) diff --git a/jscomp/gentype/GenTypeConfig.ml b/jscomp/gentype/GenTypeConfig.ml index 9e5ec193c8..73847c8365 100644 --- a/jscomp/gentype/GenTypeConfig.ml +++ b/jscomp/gentype/GenTypeConfig.ml @@ -234,6 +234,7 @@ let readConfig ~getConfigFile ~namespace = sources; } in + let defaultConfig = {default with projectRoot; bsbProjectRoot} in match getConfigFile ~projectRoot with | Some bsConfigFile -> ( try @@ -242,7 +243,7 @@ let readConfig ~getConfigFile ~namespace = | Obj {map = bsconf} -> ( match bsconf |> getOpt "gentypeconfig" with | Some (Obj {map = gtconf}) -> parseConfig ~bsconf ~gtconf - | _ -> default) - | _ -> default - with _ -> default) - | None -> default + | _ -> defaultConfig) + | _ -> defaultConfig + with _ -> defaultConfig) + | None -> defaultConfig diff --git a/jscomp/gentype/GenTypeMain.ml b/jscomp/gentype/GenTypeMain.ml index 5b733f1e57..ff75f56fd1 100644 --- a/jscomp/gentype/GenTypeMain.ml +++ b/jscomp/gentype/GenTypeMain.ml @@ -90,74 +90,75 @@ let readCmt cmtFile = Log_.item "Try to clean and rebuild.\n\n"; assert false +let readInputCmt isInterface cmtFile = + let inputCMT = readCmt cmtFile in + let ignoreInterface = ref false in + let checkAnnotation ~loc:_ attributes = + if + attributes + |> Annotation.getAttributePayload Annotation.tagIsGenTypeIgnoreInterface + <> None + then ignoreInterface := true; + attributes + |> Annotation.getAttributePayload Annotation.tagIsOneOfTheGenTypeAnnotations + <> None + in + let hasGenTypeAnnotations = + inputCMT |> cmtCheckAnnotations ~checkAnnotation + in + if isInterface then + let cmtFileImpl = + (cmtFile |> (Filename.chop_extension [@doesNotRaise])) ^ ".cmt" + in + let inputCMTImpl = readCmt cmtFileImpl in + let hasGenTypeAnnotationsImpl = + inputCMTImpl + |> cmtCheckAnnotations ~checkAnnotation:(fun ~loc attributes -> + if attributes |> checkAnnotation ~loc then ( + if not !ignoreInterface then ( + Log_.Color.setup (); + Log_.info ~loc ~name:"Warning genType" (fun ppf () -> + Format.fprintf ppf + "Annotation is ignored as there's a .rei file")); + true) + else false) + in + ( (match !ignoreInterface with + | true -> inputCMTImpl + | false -> inputCMT), + match !ignoreInterface with + | true -> hasGenTypeAnnotationsImpl + | false -> hasGenTypeAnnotations ) + else (inputCMT, hasGenTypeAnnotations) + let processCmtFile cmt = let config = Paths.readConfig ~namespace:(cmt |> Paths.findNameSpace) in if !Debug.basic then Log_.item "Cmt %s\n" cmt; let cmtFile = cmt |> Paths.getCmtFile in if cmtFile <> "" then - let outputFile = cmt |> Paths.getOutputFile ~config in - let outputFileRelative = cmt |> Paths.getOutputFileRelative ~config in let fileName = cmt |> Paths.getModuleName in let isInterface = Filename.check_suffix cmtFile ".cmti" in + let inputCMT, hasGenTypeAnnotations = readInputCmt isInterface cmtFile in + let sourceFile = + match inputCMT.cmt_annots |> FindSourceFile.cmt with + | Some sourceFile -> sourceFile + | None -> ( + (fileName |> ModuleName.toString) + ^ + match isInterface with + | true -> ".resi" + | false -> ".res") + in + let outputFile = sourceFile |> Paths.getOutputFile ~config in + let outputFileRelative = + sourceFile |> Paths.getOutputFileRelative ~config + in let resolver = ModuleResolver.createLazyResolver ~config ~extensions:[".res"; ".shim.ts"] ~excludeFile:(fun fname -> fname = "React.res" || fname = "ReasonReact.res") in - let inputCMT, hasGenTypeAnnotations = - let inputCMT = readCmt cmtFile in - let ignoreInterface = ref false in - let checkAnnotation ~loc:_ attributes = - if - attributes - |> Annotation.getAttributePayload - Annotation.tagIsGenTypeIgnoreInterface - <> None - then ignoreInterface := true; - attributes - |> Annotation.getAttributePayload - Annotation.tagIsOneOfTheGenTypeAnnotations - <> None - in - let hasGenTypeAnnotations = - inputCMT |> cmtCheckAnnotations ~checkAnnotation - in - if isInterface then - let cmtFileImpl = - (cmtFile |> (Filename.chop_extension [@doesNotRaise])) ^ ".cmt" - in - let inputCMTImpl = readCmt cmtFileImpl in - let hasGenTypeAnnotationsImpl = - inputCMTImpl - |> cmtCheckAnnotations ~checkAnnotation:(fun ~loc attributes -> - if attributes |> checkAnnotation ~loc then ( - if not !ignoreInterface then ( - Log_.Color.setup (); - Log_.info ~loc ~name:"Warning genType" (fun ppf () -> - Format.fprintf ppf - "Annotation is ignored as there's a .rei file")); - true) - else false) - in - ( (match !ignoreInterface with - | true -> inputCMTImpl - | false -> inputCMT), - match !ignoreInterface with - | true -> hasGenTypeAnnotationsImpl - | false -> hasGenTypeAnnotations ) - else (inputCMT, hasGenTypeAnnotations) - in if hasGenTypeAnnotations then - let sourceFile = - match inputCMT.cmt_annots |> FindSourceFile.cmt with - | Some sourceFile -> sourceFile - | None -> ( - (fileName |> ModuleName.toString) - ^ - match isInterface with - | true -> ".resi" - | false -> ".res") - in inputCMT |> translateCMT ~config ~outputFileRelative ~resolver |> emitTranslation ~config ~fileName ~outputFile ~outputFileRelative diff --git a/jscomp/gentype/Paths.ml b/jscomp/gentype/Paths.ml index ed95905268..a79c721d84 100644 --- a/jscomp/gentype/Paths.ml +++ b/jscomp/gentype/Paths.ml @@ -28,17 +28,37 @@ let findNameSpace cmt = cmt |> Filename.basename |> (Filename.chop_extension [@doesNotRaise]) |> keepAfterDash -let getOutputFileRelative ~config cmt = - (cmt |> handleNamespace) ^ ModuleExtension.tsInputFileSuffix ~config +let removePathPrefix ~prefix path = + let normalizedPrefix = Filename.concat prefix "" in + let prefixLen = String.length normalizedPrefix in + let pathLen = String.length path in + let isPrefix = + prefixLen <= pathLen + && (String.sub path 0 prefixLen [@doesNotRaise]) = normalizedPrefix + in + if isPrefix then + String.sub path prefixLen (pathLen - prefixLen) [@doesNotRaise] + else path + +let appendSuffix ~config sourcePath = + (sourcePath |> handleNamespace) ^ ModuleExtension.tsInputFileSuffix ~config -let getOutputFile ~(config : Config.t) cmt = - Filename.concat config.projectRoot (getOutputFileRelative ~config cmt) +let getOutputFileRelative ~(config : Config.t) path = + let relativePath = removePathPrefix ~prefix:config.projectRoot path in + appendSuffix ~config relativePath + +let getOutputFile ~(config : Config.t) absoluteSourcePath = + let relativeOutputPath = getOutputFileRelative ~config absoluteSourcePath in + Filename.concat config.projectRoot relativeOutputPath let getModuleName cmt = cmt |> handleNamespace |> Filename.basename |> ModuleName.fromStringUnsafe let getCmtFile cmt = - let pathCmt = Filename.concat (Sys.getcwd ()) cmt in + let pathCmt = + if Filename.is_relative cmt then Filename.concat (Sys.getcwd ()) cmt + else cmt + in let cmtFile = if Filename.check_suffix pathCmt ".cmt" then let pathCmtLowerCase = From 2ed005ba4e3782cfc5b66c7363fdfb37333e590d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Sat, 1 Feb 2025 13:32:13 +0100 Subject: [PATCH 13/20] Backport to v11 bundle and upload stdlib js runtime (#7255) (#7268) * backport bundle stdlib JS files for playground (#7255) * replace deprecated pipes with shlex * update setup-ocaml * use node 18 * add rollup linux as an optional dependency * use ubuntu-24.04 and ubuntu-24.04-arm * backport fix for hanging tests (#6667) * update artifacts.txt * backport: CI: don't run npm pack twice (#6923) * CI: don't run npm pack twice * Add typedefs for PackOutput * Update comments * update artifacts * Fix CHANGELOG.md --------- Co-authored-by: Christoph Knittel --- .github/workflows/ci.yml | 47 +- CHANGELOG.md | 3 + Makefile | 2 +- ninja/configure.py | 4 +- .../playground-bundling/package-lock.json | 3028 ++++++++++++++++- packages/playground-bundling/package.json | 9 + .../playground-bundling/rollup.config.cjs | 32 + .../scripts/generate_cmijs.js | 5 + playground/upload_bundle.sh | 10 + scripts/ciTest.js | 39 +- scripts/makeArtifactList.js | 61 - scripts/npmPack.js | 83 + scripts/utils.js | 52 + 13 files changed, 3179 insertions(+), 196 deletions(-) create mode 100644 packages/playground-bundling/rollup.config.cjs delete mode 100755 scripts/makeArtifactList.js create mode 100755 scripts/npmPack.js create mode 100644 scripts/utils.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5ecf965e5..f9f450832d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, buildjet-2vcpu-ubuntu-2204-arm] + os: [ubuntu-24.04, ubuntu-24.04-arm] runs-on: ${{matrix.os}} @@ -61,7 +61,7 @@ jobs: needs: - static-binaries-linux - runs-on: buildjet-2vcpu-ubuntu-2204-arm + runs-on: ubuntu-24.04-arm steps: - name: Checkout @@ -82,7 +82,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: Copy exes to platform bin dirs run: node ./scripts/copyExes.js @@ -105,7 +105,7 @@ jobs: os: [ macos-13, # x64 macos-14, # ARM - ubuntu-latest, + ubuntu-24.04, windows-latest, ] ocaml_compiler: [4.14.1] @@ -140,20 +140,18 @@ jobs: chmod +x _build/install/default/bin/* - name: Use OCaml ${{matrix.ocaml_compiler}} - uses: ocaml/setup-ocaml@v2 + uses: ocaml/setup-ocaml@v3.2.5 if: matrix.os != 'windows-latest' with: ocaml-compiler: ${{matrix.ocaml_compiler}} opam-pin: false - opam-depext: false - name: Use OCaml ${{matrix.ocaml_compiler}} (Win) - uses: ocaml/setup-ocaml@v2 + uses: ocaml/setup-ocaml@v3.2.5 if: matrix.os == 'windows-latest' with: ocaml-compiler: ${{matrix.ocaml_compiler}} opam-pin: false - opam-depext: false opam-repositories: | opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset default: https://github.com/ocaml/opam-repository.git @@ -168,7 +166,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: Install npm packages run: npm ci --ignore-scripts @@ -228,24 +226,24 @@ jobs: if: runner.os == 'Windows' run: node scripts/ciTest.js -mocha -theme -format - # Build the playground compiler on the fastest runner (ubuntu-latest) + # Build the playground compiler on the fastest runner (ubuntu-24.04) - name: Install JSOO - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-24.04' run: opam install js_of_ocaml.4.0.0 - name: Build playground compiler - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-24.04' run: | opam exec -- node packages/playground-bundling/scripts/generate_cmijs.js opam exec -- dune build --profile browser cp ./_build/default/jscomp/jsoo/jsoo_playground_main.bc.js playground/compiler.js - name: Test playground compiler - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-24.04' run: node playground/playground_test.js - name: Upload playground compiler to CDN - if: ${{ matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/v') }} + if: ${{ matrix.os == 'ubuntu-24.04' && startsWith(github.ref, 'refs/tags/v') }} env: KEYCDN_USER: ${{ secrets.KEYCDN_USER }} KEYCDN_PASSWORD: ${{ secrets.KEYCDN_PASSWORD }} @@ -269,7 +267,7 @@ jobs: package: needs: build - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -278,7 +276,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: NPM install run: npm ci --ignore-scripts @@ -289,11 +287,8 @@ jobs: - name: Move artifacts run: ./scripts/moveArtifacts.sh - - name: Check artifact list - run: node ./scripts/makeArtifactList.js -check - - - name: npm pack (rescript) - run: npm pack + - name: npm pack (rescript) + check artifact list + run: node ./scripts/npmPack.js - name: Copy JS files to stdlib package run: mkdir -p packages/std/lib && cp -R lib/es6 lib/js packages/std/lib @@ -325,8 +320,8 @@ jobs: os: [ macos-13, # x64 macos-14, # ARM - ubuntu-latest, - buildjet-2vcpu-ubuntu-2204-arm, + ubuntu-24.04, + ubuntu-24.04-arm, windows-latest, ] @@ -339,7 +334,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: Download artifacts uses: actions/download-artifact@v4 @@ -362,7 +357,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Checkout @@ -371,7 +366,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 registry-url: https://registry.npmjs.org # Needed to make auth work for publishing - name: Download artifacts diff --git a/CHANGELOG.md b/CHANGELOG.md index 37a91b0811..56a3502860 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ - Deprecate js_cast.res https://github.com/rescript-lang/rescript-compiler/pull/7074 - Deprecate top-level `"suffix"` option in `rescript.json`. https://github.com/rescript-lang/rescript-compiler/pull/7056 +#### :house: Internal +- Playground: Bundle and upload stdlib runtime so that the playground can execute functions from Core/Belt/Js. https://github.com/rescript-lang/rescript/pull/7268 + # 11.1.4 - Fix issue where long layout break added a trailing comma in partial application `...`. https://github.com/rescript-lang/rescript-compiler/pull/6949 diff --git a/Makefile b/Makefile index 7fb14bda69..06485c838b 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ lib: build node_modules/.bin/semver ./scripts/prebuilt.js artifacts: lib - ./scripts/makeArtifactList.js + ./scripts/npmPack.js -updateArtifactList # Builds the core playground bundle (without the relevant cmijs files for the runtime) playground: diff --git a/ninja/configure.py b/ninja/configure.py index 808408dc61..b0fb998988 100755 --- a/ninja/configure.py +++ b/ninja/configure.py @@ -23,7 +23,7 @@ from optparse import OptionParser import os -import pipes +import shlex import string import subprocess import sys @@ -257,7 +257,7 @@ def _run_command(self, cmdline): env_keys = set(['CXX', 'AR', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS']) configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys) if configure_env: - config_str = ' '.join([k + '=' + pipes.quote(configure_env[k]) + config_str = ' '.join([k + '=' + shlex.quote(configure_env[k]) for k in configure_env]) n.variable('configure_env', config_str + '$ ') n.newline() diff --git a/packages/playground-bundling/package-lock.json b/packages/playground-bundling/package-lock.json index 88ba9ec882..dad8b0a35a 100644 --- a/packages/playground-bundling/package-lock.json +++ b/packages/playground-bundling/package-lock.json @@ -1,7 +1,7 @@ { "name": "proj", "version": "1.0.0", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -11,35 +11,2621 @@ "dependencies": { "@rescript/core": "^1.5.2", "@rescript/react": "^0.12.1" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^16.0.0", + "glob": "^11.0.1", + "rollup": "^4.32.0" + } + }, + "../..": { + "name": "rescript", + "version": "11.1.4", + "hasInstallScript": true, + "license": "SEE LICENSE IN LICENSE", + "peer": true, + "bin": { + "bsc": "bsc", + "bstracing": "lib/bstracing", + "rescript": "rescript" + }, + "devDependencies": { + "mocha": "10.1.0", + "nyc": "15.0.0", + "prettier": "2.7.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/@babel/code-frame": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/highlight": "^7.8.3" + } + }, + "../../node_modules/@babel/core": { + "version": "7.8.7", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.7", + "@babel/helpers": "^7.8.4", + "@babel/parser": "^7.8.7", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.0", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "../../node_modules/@babel/generator": { + "version": "7.8.7", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/types": "^7.8.7", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "../../node_modules/@babel/helper-function-name": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "../../node_modules/@babel/helper-get-function-arity": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/types": "^7.8.3" + } + }, + "../../node_modules/@babel/helper-split-export-declaration": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/types": "^7.8.3" + } + }, + "../../node_modules/@babel/helpers": { + "version": "7.8.4", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.4", + "@babel/types": "^7.8.3" + } + }, + "../../node_modules/@babel/highlight": { + "version": "7.8.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "../../node_modules/@babel/parser": { + "version": "7.8.7", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "../../node_modules/@babel/template": { + "version": "7.8.6", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "../../node_modules/@babel/traverse": { + "version": "7.8.6", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.6", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "../../node_modules/@babel/types": { + "version": "7.8.7", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config": { + "version": "1.0.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@istanbuljs/schema": { + "version": "0.1.2", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/@types/color-name": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/aggregate-error": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/ansi-colors": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/anymatch": { + "version": "3.1.3", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/append-transform": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/archy": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/argparse": { + "version": "1.0.10", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "../../node_modules/balanced-match": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/binary-extensions": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "../../node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/browser-stdout": { + "version": "1.3.1", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/caching-transform": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/camelcase": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/chokidar": { + "version": "3.5.3", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "../../node_modules/clean-stack": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/cliui": { + "version": "7.0.4", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "../../node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "../../node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/commondir": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/convert-source-map": { + "version": "1.7.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "../../node_modules/cross-spawn": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/cross-spawn/node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/debug": { + "version": "4.3.4", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "../../node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/decamelize": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/default-require-extensions": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/diff": { + "version": "5.0.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.3.1" + } + }, + "../../node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/es6-error": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/escalade": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/esutils": { + "version": "2.0.3", + "dev": true, + "license": "BSD-2-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/fill-range": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/find-cache-dir": { + "version": "3.3.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "../../node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/flat": { + "version": "5.0.2", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "bin": { + "flat": "cli.js" + } + }, + "../../node_modules/foreground-child": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "../../node_modules/fromentries": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/fsevents": { + "version": "2.3.2", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "../../node_modules/gensync": { + "version": "1.0.0-beta.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/get-caller-file": { + "version": "2.0.5", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "../../node_modules/glob": { + "version": "7.2.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/globals": { + "version": "11.12.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/graceful-fs": { + "version": "4.2.3", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/hasha": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/he": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "he": "bin/he" + } + }, + "../../node_modules/html-escaper": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/imurmurhash": { + "version": "0.1.4", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.8.19" + } + }, + "../../node_modules/indent-string": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "../../node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.12.0" + } + }, + "../../node_modules/is-plain-obj": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-stream": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-typedarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/is-unicode-supported": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-windows": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/istanbul-lib-coverage": { + "version": "3.0.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-instrument": { + "version": "4.0.1", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@babel/parser": "^7.7.5", + "@babel/template": "^7.7.4", + "@babel/traverse": "^7.7.4", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "../../node_modules/istanbul-lib-processinfo": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.0", + "istanbul-lib-coverage": "^3.0.0-alpha.1", + "make-dir": "^3.0.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^3.3.3" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-report": { + "version": "3.0.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-source-maps": { + "version": "4.0.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/istanbul-reports": { + "version": "3.0.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/js-yaml": { + "version": "3.13.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/jsesc": { + "version": "2.5.2", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/json5": { + "version": "2.2.2", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/lodash": { + "version": "4.17.21", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/lodash.flattendeep": { + "version": "4.4.0", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/log-symbols": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../../node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/make-dir": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "../../node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "../../node_modules/mocha": { + "version": "10.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "../../node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0", + "peer": true + }, + "../../node_modules/mocha/node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "../../node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/ms": { + "version": "2.1.3", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/nanoid": { + "version": "3.3.3", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "../../node_modules/node-preload": { + "version": "0.2.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/nyc": { + "version": "15.0.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.0", + "js-yaml": "^3.13.1", + "make-dir": "^3.0.0", + "node-preload": "^0.2.0", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "uuid": "^3.3.3", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "../../node_modules/nyc/node_modules/ansi-styles": { + "version": "4.2.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "../../node_modules/nyc/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../../node_modules/nyc/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/nyc/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/yargs": { + "version": "15.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "wrappy": "1" + } + }, + "../../node_modules/p-limit": { + "version": "2.2.2", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-locate/node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-map": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/package-hash": { + "version": "4.0.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "../../node_modules/pkg-dir": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/prettier": { + "version": "2.7.1", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "../../node_modules/process-on-spawn": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/randombytes": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "../../node_modules/readdirp": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "../../node_modules/release-zalgo": { + "version": "1.0.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/require-directory": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/require-main-filename": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/resolve": { + "version": "1.15.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/resolve-from": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/safe-buffer": { + "version": "5.1.2", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/semver": { + "version": "5.7.1", + "dev": true, + "license": "ISC", + "peer": true, + "bin": { + "semver": "bin/semver" + } + }, + "../../node_modules/serialize-javascript": { + "version": "6.0.0", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "../../node_modules/set-blocking": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/signal-exit": { + "version": "3.0.2", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/source-map": { + "version": "0.5.7", + "dev": true, + "license": "BSD-3-Clause", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/spawn-wrap": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/spawn-wrap/node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/sprintf-js": { + "version": "1.0.3", + "dev": true, + "license": "BSD-3-Clause", + "peer": true + }, + "../../node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-bom": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "../../node_modules/supports-color/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/test-exclude": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/to-fast-properties": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "../../node_modules/type-fest": { + "version": "0.8.1", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "peer": true, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "../../node_modules/uuid": { + "version": "3.4.0", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "uuid": "bin/uuid" + } + }, + "../../node_modules/which-module": { + "version": "2.0.0", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/workerpool": { + "version": "6.2.1", + "dev": true, + "license": "Apache-2.0", + "peer": true + }, + "../../node_modules/wrap-ansi": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "../../node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../../node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT", + "peer": true + }, + "../../node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/write-file-atomic": { + "version": "3.0.3", + "dev": true, + "license": "ISC", + "peer": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "../../node_modules/y18n": { + "version": "4.0.1", + "dev": true, + "license": "ISC", + "peer": true + }, + "../../node_modules/yargs": { + "version": "16.2.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yargs-parser": { + "version": "20.2.4", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yargs-unparser": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/yargs/node_modules/y18n": { + "version": "5.0.8", + "dev": true, + "license": "ISC", + "peer": true, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/@rescript/core": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@rescript/core/-/core-1.5.2.tgz", - "integrity": "sha512-VWRFHrQu8hWnd9Y9LYZ8kig2urybhZlDVGy5u50bqf2WCRAeysBIfxK8eN4VlpQT38igMo0/uLX1KSpwCVMYGw==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@rescript/core/-/core-1.6.1.tgz", + "integrity": "sha512-vyb5k90ck+65Fgui+5vCja/mUfzKaK3kOPT4Z6aAJdHLH1eljEi1zKhXroCiCtpNLSWp8k4ulh1bdB5WS0hvqA==", "peerDependencies": { - "rescript": "^11.1.0-rc.7" + "rescript": ">=11.1.0" } }, "node_modules/@rescript/react": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.12.1.tgz", - "integrity": "sha512-ZD7nhDr5FZgLYqRH9s4CNM+LRz/3IMuTb+LH12fd2Akk0xYkYUP+DZveB2VQUC2UohJnTf/c8yPSNsiFihVCCg==", + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.12.2.tgz", + "integrity": "sha512-EOF19dLTG4Y9K59JqMjG5yfvIsrMZqfxGC2J/oe9gGgrMiUrzZh3KH9khTcR1Z3Ih0lRViSh0/iYnJz20gGoag==", "peerDependencies": { "react": ">=18.0.0", "react-dom": ">=18.0.0" } }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.1.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.32.0", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "dev": true, + "license": "MIT" + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "dev": true, + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "dev": true, + "license": "MIT" + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "dev": true, + "license": "MIT" + }, + "node_modules/foreground-child": { + "version": "3.3.0", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "11.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-core-module": { + "version": "2.16.1", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "4.0.2", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT", "peer": true }, "node_modules/loose-envify": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", "peer": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" @@ -48,10 +2634,83 @@ "loose-envify": "cli.js" } }, + "node_modules/lru-cache": { + "version": "11.0.2", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/minimatch": { + "version": "10.0.1", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.2", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/path-key": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/picomatch": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/react": { "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", + "license": "MIT", "peer": true, "dependencies": { "loose-envify": "^1.1.0" @@ -62,8 +2721,7 @@ }, "node_modules/react-dom": { "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "license": "MIT", "peer": true, "dependencies": { "loose-envify": "^1.1.0", @@ -74,90 +2732,298 @@ } }, "node_modules/rescript": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.1.1.tgz", - "integrity": "sha512-FMELeoiR1n3LzBdBt+k7U4l0vsz5Xh0HBSHf+0NhyhzZkMRLkEKEDNrcqZc6RIux9bxmxoO+zEa9qFM01VOXAw==", - "hasInstallScript": true, - "peer": true, + "resolved": "../..", + "link": true + }, + "node_modules/resolve": { + "version": "1.22.10", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, "bin": { - "bsc": "bsc", - "bstracing": "lib/bstracing", - "rescript": "rescript" + "resolve": "bin/resolve" }, "engines": { - "node": ">=10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "4.32.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.32.0", + "@rollup/rollup-android-arm64": "4.32.0", + "@rollup/rollup-darwin-arm64": "4.32.0", + "@rollup/rollup-darwin-x64": "4.32.0", + "@rollup/rollup-freebsd-arm64": "4.32.0", + "@rollup/rollup-freebsd-x64": "4.32.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.32.0", + "@rollup/rollup-linux-arm-musleabihf": "4.32.0", + "@rollup/rollup-linux-arm64-gnu": "4.32.0", + "@rollup/rollup-linux-arm64-musl": "4.32.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.32.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.32.0", + "@rollup/rollup-linux-riscv64-gnu": "4.32.0", + "@rollup/rollup-linux-s390x-gnu": "4.32.0", + "@rollup/rollup-linux-x64-gnu": "4.32.0", + "@rollup/rollup-linux-x64-musl": "4.32.0", + "@rollup/rollup-win32-arm64-msvc": "4.32.0", + "@rollup/rollup-win32-ia32-msvc": "4.32.0", + "@rollup/rollup-win32-x64-msvc": "4.32.0", + "fsevents": "~2.3.2" } }, "node_modules/scheduler": { "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "license": "MIT", "peer": true, "dependencies": { "loose-envify": "^1.1.0" } - } - }, - "dependencies": { - "@rescript/core": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@rescript/core/-/core-1.5.2.tgz", - "integrity": "sha512-VWRFHrQu8hWnd9Y9LYZ8kig2urybhZlDVGy5u50bqf2WCRAeysBIfxK8eN4VlpQT38igMo0/uLX1KSpwCVMYGw==", - "requires": {} - }, - "@rescript/react": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@rescript/react/-/react-0.12.1.tgz", - "integrity": "sha512-ZD7nhDr5FZgLYqRH9s4CNM+LRz/3IMuTb+LH12fd2Akk0xYkYUP+DZveB2VQUC2UohJnTf/c8yPSNsiFihVCCg==", - "requires": {} - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "peer": true }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "peer": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" + "node_modules/shebang-command": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "react": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", - "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", - "peer": true, - "requires": { - "loose-envify": "^1.1.0" + "node_modules/shebang-regex": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" } }, - "react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", - "peer": true, - "requires": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "node_modules/signal-exit": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "rescript": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/rescript/-/rescript-11.1.1.tgz", - "integrity": "sha512-FMELeoiR1n3LzBdBt+k7U4l0vsz5Xh0HBSHf+0NhyhzZkMRLkEKEDNrcqZc6RIux9bxmxoO+zEa9qFM01VOXAw==", - "peer": true + "node_modules/string-width": { + "version": "5.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", - "peer": true, - "requires": { - "loose-envify": "^1.1.0" + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which": { + "version": "2.0.2", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } } } diff --git a/packages/playground-bundling/package.json b/packages/playground-bundling/package.json index 9ba9e6ad08..59deef14ac 100644 --- a/packages/playground-bundling/package.json +++ b/packages/playground-bundling/package.json @@ -5,6 +5,7 @@ "main": "index.js", "scripts": { "build": "rescript clean && rescript build && node ./scripts/generate_cmijs.js", + "bundle": "rollup -c", "clean": "rescript clean" }, "keywords": [], @@ -13,5 +14,13 @@ "dependencies": { "@rescript/core": "^1.5.2", "@rescript/react": "^0.12.1" + }, + "devDependencies": { + "@rollup/plugin-node-resolve": "^16.0.0", + "glob": "^11.0.1", + "rollup": "^4.32.0" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "4.32.1" } } diff --git a/packages/playground-bundling/rollup.config.cjs b/packages/playground-bundling/rollup.config.cjs new file mode 100644 index 0000000000..450c460575 --- /dev/null +++ b/packages/playground-bundling/rollup.config.cjs @@ -0,0 +1,32 @@ +const resolve = require("@rollup/plugin-node-resolve"); + +const { globSync } = require("glob"); +const path = require("path"); + +const RESCRIPT_COMPILER_ROOT_DIR = path.join(__dirname, "..", ".."); +const LIB_DIR = path.join(RESCRIPT_COMPILER_ROOT_DIR, "lib"); +const CORE_LIB_DIR = path.join( + __dirname, + "node_modules", + "@rescript", + "core", + "lib" +); +const PLAYGROUND_DIR = path.join(RESCRIPT_COMPILER_ROOT_DIR, "playground"); +// Final target output directory where all the cmijs will be stored +const PACKAGES_DIR = path.join(PLAYGROUND_DIR, "packages"); +const outputFolder = path.join(PACKAGES_DIR, "compiler-builtins", "stdlib"); + +module.exports = [ + ...globSync(`${LIB_DIR}/es6/*.js`), + ...globSync(`${CORE_LIB_DIR}/es6/**/*.js`), +].map(entryPoint => { + return { + input: entryPoint, + output: { + dir: outputFolder, + format: "esm", + }, + plugins: [resolve({ browser: true })], + }; +}); diff --git a/packages/playground-bundling/scripts/generate_cmijs.js b/packages/playground-bundling/scripts/generate_cmijs.js index 2dd3dd1799..153c821d37 100644 --- a/packages/playground-bundling/scripts/generate_cmijs.js +++ b/packages/playground-bundling/scripts/generate_cmijs.js @@ -108,5 +108,10 @@ function buildThirdPartyCmijs() { }); } +function bundleStdlibJs() { + e("npm run bundle"); +} + buildCompilerCmij(); buildThirdPartyCmijs(); +bundleStdlibJs(); diff --git a/playground/upload_bundle.sh b/playground/upload_bundle.sh index 99a9c64593..78ef8652c7 100755 --- a/playground/upload_bundle.sh +++ b/playground/upload_bundle.sh @@ -45,3 +45,13 @@ do curl --ftp-create-dirs -T "${SOURCE}/cmij.js" --ssl --netrc-file $NETRC_FILE "${TARGET}/cmij.js" done + +# we now upload the bundled stdlib runtime files + +DIR="compiler-builtins/stdlib" +SOURCE="${SCRIPT_DIR}/packages/${DIR}" +TARGET="ftp://${KEYCDN_SRV}/v${VERSION}/${DIR}" + +echo "Uploading '$SOURCE/*.js' to '$TARGET/*.js'..." + +find "${SOURCE}" -type f -name "*.js" -exec sh -c 'curl --ftp-create-dirs --ssl --netrc-file "$0" -T "$1" "${2}/$(basename "$1")"' "$NETRC_FILE" {} "$TARGET" \; diff --git a/scripts/ciTest.js b/scripts/ciTest.js index 9716c139b6..53b6ee0487 100644 --- a/scripts/ciTest.js +++ b/scripts/ciTest.js @@ -5,6 +5,8 @@ var fs = require("fs"); var duneBinDir = require("./dune").duneBinDir; +const { exec } = require("./utils.js"); + var ounitTest = false; var mochaTest = false; var bsbTest = false; @@ -37,7 +39,7 @@ if (all) { formatTest = true; } -function runTests() { +async function runTests() { if (ounitTest) { cp.execSync(path.join(duneBinDir, "ounit_tests"), { stdio: [0, 1, 2], @@ -56,7 +58,7 @@ function runTests() { console.log("Doing build_tests"); var buildTestDir = path.join(__dirname, "..", "jscomp", "build_tests"); var files = fs.readdirSync(buildTestDir); - files.forEach(function (file) { + for (const file of files) { var testDir = path.join(buildTestDir, file); if (file === "node_modules" || !fs.lstatSync(testDir).isDirectory()) { return; @@ -65,23 +67,18 @@ function runTests() { console.warn(`input.js does not exist in ${testDir}`); } else { console.log(`testing ${file}`); + // note existsSync test already ensure that it is a directory - cp.exec( - `node input.js`, - { cwd: testDir, encoding: "utf8" }, - function (error, stdout, stderr) { - console.log(stdout); + const out = await exec(`node`, ["input.js"], { cwd: testDir }); + console.log(out.stdout); - if (error !== null) { - console.log(`❌ error in ${file} with stderr:\n`, stderr); - throw error; - } else { - console.log("✅ success in", file); - } - } - ); + if (out.code === 0) { + console.log("✅ success in", file); + } else { + console.log(`❌ error in ${file} with stderr:\n`, out.stderr); + } } - }); + } } if (formatTest) { @@ -92,12 +89,4 @@ function runTests() { } } -function main() { - try { - runTests(); - } catch (err) { - console.error(err); - process.exit(2); - } -} -main(); +runTests(); diff --git a/scripts/makeArtifactList.js b/scripts/makeArtifactList.js deleted file mode 100755 index 41bfec0ef6..0000000000 --- a/scripts/makeArtifactList.js +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env node - -// This script creates the list of the files that go into the rescript npm package. -// -// In local dev, invoke it without any args after adding or removing files. -// It will then recreate the list and make sure that the exes for all platforms -// are in the list, even if not present locally. -// -// In CI, it is invoked with -check. It then recreates the list and verifies -// that it has no changes compared to the committed state. - -const { spawnSync, execSync } = require("child_process"); -const path = require("path"); -const fs = require("fs"); - -const isCheckMode = process.argv.includes("-check"); - -const rootPath = path.join(__dirname, ".."); -const fileListPath = path.join(rootPath, "packages", "artifacts.txt"); - -const output = spawnSync(`npm pack --dry-run`, { - cwd: rootPath, - encoding: "utf8", - shell: true, -}).stderr; - -let files = output - .slice( - output.indexOf("Tarball Contents"), - output.lastIndexOf("npm notice === Tarball Details ===") - ) - .split("\n") - .map(x => x.split(" ").filter(Boolean)) - .filter(x => x[0] === "npm" && x[1] === "notice") - .map(x => x[x.length - 1]); - -if (!isCheckMode) { - files = Array.from(new Set(files.concat(getFilesAddedByCI()))); -} - -files.sort(); -fs.writeFileSync(fileListPath, files.join("\n")); - -if (isCheckMode) { - execSync(`git diff --exit-code ${fileListPath}`, { stdio: "inherit" }); -} - -function getFilesAddedByCI() { - const platforms = ["darwin", "darwinarm64", "linux", "linuxarm64", "win32"]; - const exes = ["bsb_helper.exe", "bsc.exe", "ninja.exe", "rescript.exe"]; - - const files = ["ninja.COPYING"]; - - for (let platform of platforms) { - for (let exe of exes) { - files.push(`${platform}/${exe}`); - } - } - - return files; -} diff --git a/scripts/npmPack.js b/scripts/npmPack.js new file mode 100755 index 0000000000..c3e0fe5a4d --- /dev/null +++ b/scripts/npmPack.js @@ -0,0 +1,83 @@ +#!/usr/bin/env node +// @ts-check + +// This performs `npm pack` and retrieves the list of artifact files from the output. +// +// In local dev, invoke it with `-updateArtifactList` to perform a dry run of `npm pack` +// and recreate `packages/artifacts.txt`. +// The exes for all platforms will then be included in the list, even if not present locally. +// +// In CI, the scripts is invoked without options. It then performs `npm pack` for real, +// recreates the artifact list and verifies that it has no changes compared to the committed state. + +/** + * @typedef {{ + * path: string, + * size: number, + * mode: number, + * }} PackOutputFile + * + * @typedef {{ + * files: PackOutputFile[], + * entryCount: number, + * bundled: unknown[], + * }} PackOutputEntry + * + * @typedef {[PackOutputEntry]} PackOutput + */ + +const { spawnSync, execSync } = require("child_process"); +const path = require("path"); +const fs = require("fs"); + +const mode = process.argv.includes("-updateArtifactList") + ? "updateArtifactList" + : "package"; + +const rootPath = path.join(__dirname, ".."); +const fileListPath = path.join(rootPath, "packages", "artifacts.txt"); + +const output = spawnSync( + "npm pack --json" + (mode === "updateArtifactList" ? " --dry-run" : ""), + { + cwd: rootPath, + encoding: "utf8", + shell: true, + } +).stdout; + +/** @type {PackOutput} */ +const parsedOutput = JSON.parse(output); +let filePaths = parsedOutput[0].files.map(file => file.path); + +if (mode === "updateArtifactList") { + filePaths = Array.from(new Set(filePaths.concat(getFilesAddedByCI()))); +} + +filePaths.sort(); +fs.writeFileSync(fileListPath, filePaths.join("\n")); + +if (mode === "package") { + execSync(`git diff --exit-code ${fileListPath}`, { stdio: "inherit" }); +} + +function getFilesAddedByCI() { + const platforms = ["darwin", "darwinarm64", "linux", "linuxarm64", "win32"]; + const exes = [ + "bsb_helper.exe", + "bsc.exe", + "ninja.exe", + "rescript.exe", + "rewatch.exe", + ]; + + const files = ["ninja.COPYING"]; + + for (let platform of platforms) { + for (let exe of exes) { + files.push(`${platform}/${exe}`); + } + } + + return files; +} diff --git a/scripts/utils.js b/scripts/utils.js new file mode 100644 index 0000000000..0b18871321 --- /dev/null +++ b/scripts/utils.js @@ -0,0 +1,52 @@ +const child_process = require("child_process"); + +const signals = { + SIGINT: 2, + SIGQUIT: 3, + SIGKILL: 9, + SIGTERM: 15, +}; + +/** + * @param {string} command + * @param {Array} args + * @param {child_process.SpawnOptions} [options] + */ +async function exec(command, args, options) { + const stdoutChunks = []; + const stderrChunks = []; + + const subprocess = child_process.spawn(command, args, { + stdio: ["ignore", "pipe", "pipe"], + ...options, + }); + + subprocess.stdout.on("data", chunk => { + stdoutChunks.push(chunk); + }); + + subprocess.stderr.on("data", chunk => { + stderrChunks.push(chunk); + }); + + return await new Promise((resolve, reject) => { + subprocess.once("error", err => { + reject(err); + }); + + subprocess.once("close", (exitCode, signal) => { + const stdout = Buffer.concat(stdoutChunks).toString("utf8"); + const stderr = Buffer.concat(stderrChunks).toString("utf8"); + + let code = exitCode ?? 1; + if (signals[signal]) { + // + 128 is standard POSIX practice, see also https://nodejs.org/api/process.html#exit-codes + code = signals[signal] + 128; + } + + resolve({ code, stdout, stderr }); + }); + }); +} + +exports.exec = exec; From 9199a04a5ac5c87e569661e0071b211799f9132b Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Sat, 5 Oct 2024 20:56:38 +0200 Subject: [PATCH 14/20] rescript format: process files in batches (#7081) --- CHANGELOG.md | 13 +++++++++--- scripts/rescript_format.js | 42 ++++++++++++++++++++++++++++++-------- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56a3502860..9b26a910f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,19 @@ # 11.1.5 (Unreleased) -- Handle absolute file paths in gentype https://github.com/rescript-lang/rescript-compiler/pull/7111 -- Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042 -- Deprecate js_cast.res https://github.com/rescript-lang/rescript-compiler/pull/7074 +#### :boom: Breaking Change + +- Deprecate JSX 3. https://github.com/rescript-lang/rescript-compiler/pull/7042 +- Deprecate js_cast.res. https://github.com/rescript-lang/rescript-compiler/pull/7074 - Deprecate top-level `"suffix"` option in `rescript.json`. https://github.com/rescript-lang/rescript-compiler/pull/7056 +#### :bug: Bug Fix + +- Handle absolute file paths in gentype. https://github.com/rescript-lang/rescript-compiler/pull/7111 +- Fix "rescript format" with many files. https://github.com/rescript-lang/rescript-compiler/pull/7081 + #### :house: Internal + - Playground: Bundle and upload stdlib runtime so that the playground can execute functions from Core/Belt/Js. https://github.com/rescript-lang/rescript/pull/7268 # 11.1.4 diff --git a/scripts/rescript_format.js b/scripts/rescript_format.js index 939f8d4274..4679dd2714 100644 --- a/scripts/rescript_format.js +++ b/scripts/rescript_format.js @@ -1,5 +1,7 @@ //@ts-check +var os = require("os"); var arg = require("./rescript_arg.js"); + var format_usage = `Usage: rescript format [files] \`rescript format\` formats the current directory @@ -67,6 +69,27 @@ async function readStdin() { return Buffer.concat(chunks).toString("utf8"); } +const numThreads = os.cpus().length; + +/** + * Splits an array into smaller chunks of a specified size. + * + * @template T + * @param {T[]} array - The array to split into chunks. + * @param {number} chunkSize - The size of each chunk. + * @returns {T[][]} - An array of chunks, where each chunk is an array of type T. + */ +function chunkArray(array, chunkSize) { + /** @type {T[][]} */ + const result = []; + + for (let i = 0; i < array.length; i += chunkSize) { + result.push(array.slice(i, i + chunkSize)); + } + + return result; +} + /** * @param {string[]} files * @param {string} bsc_exe @@ -74,11 +97,15 @@ async function readStdin() { * @param {boolean} checkFormatting */ async function formatFiles(files, bsc_exe, isSupportedFile, checkFormatting) { - var incorrectlyFormattedFiles = 0; + const supportedFiles = files.filter(isSupportedFile); + const batchSize = 4 * os.cpus().length; + const batches = chunkArray(supportedFiles, batchSize); + + let incorrectlyFormattedFiles = 0; try { - const _promises = await Promise.all( - files.map(async file => { - if (isSupportedFile(file)) { + for (const batch of batches) { + await Promise.all( + batch.map(async file => { const flags = checkFormatting ? ["-format", file] : ["-o", file, "-format", file]; @@ -90,10 +117,9 @@ async function formatFiles(files, bsc_exe, isSupportedFile, checkFormatting) { incorrectlyFormattedFiles++; } } - } - return null; - }) - ); + }) + ); + } } catch (err) { console.error(err); process.exit(2); From 983c132b530d9e331c83dc72c32f42674a446359 Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Mon, 25 Nov 2024 20:38:57 +0800 Subject: [PATCH 15/20] Fix exponential syntax (#7174) --- CHANGELOG.md | 1 + jscomp/syntax/src/res_scanner.ml | 37 ++++++++++++------- .../expected/exponent_notation.res.txt | 30 +++++++++++++++ .../errors/scanner/exponent_notation.res | 11 ++++++ 4 files changed, 66 insertions(+), 13 deletions(-) create mode 100644 jscomp/syntax/tests/parsing/errors/scanner/expected/exponent_notation.res.txt create mode 100644 jscomp/syntax/tests/parsing/errors/scanner/exponent_notation.res diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b26a910f3..e60effadf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - Handle absolute file paths in gentype. https://github.com/rescript-lang/rescript-compiler/pull/7111 - Fix "rescript format" with many files. https://github.com/rescript-lang/rescript-compiler/pull/7081 +- Fix exponential notation syntax. https://github.com/rescript-lang/rescript/pull/7174 #### :house: Internal diff --git a/jscomp/syntax/src/res_scanner.ml b/jscomp/syntax/src/res_scanner.ml index 40d759004a..7eaeea2a68 100644 --- a/jscomp/syntax/src/res_scanner.ml +++ b/jscomp/syntax/src/res_scanner.ml @@ -203,24 +203,30 @@ let scanIdentifier scanner = let scanDigits scanner ~base = if base <= 10 then - let rec loop scanner = + let rec loop scanner foundDigits = match scanner.ch with - | '0' .. '9' | '_' -> + | '0' .. '9' -> next scanner; - loop scanner - | _ -> () + loop scanner true + | '_' -> + next scanner; + loop scanner false + | _ -> foundDigits in - loop scanner + loop scanner false else - let rec loop scanner = + let rec loop scanner foundDigits = match scanner.ch with (* hex *) - | '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' | '_' -> + | '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' -> + next scanner; + loop scanner true + | '_' -> next scanner; - loop scanner - | _ -> () + loop scanner false + | _ -> foundDigits in - loop scanner + loop scanner false (* float: (0…9) { 0…9∣ _ } [. { 0…9∣ _ }] [(e∣ E) [+∣ -] (0…9) { 0…9∣ _ }] *) let scanNumber scanner = @@ -245,25 +251,30 @@ let scanNumber scanner = 8) | _ -> 10 in - scanDigits scanner ~base; + ignore (scanDigits scanner ~base); (* *) let isFloat = if '.' == scanner.ch then ( next scanner; - scanDigits scanner ~base; + ignore (scanDigits scanner ~base); true) else false in (* exponent part *) let isFloat = + let startPos = position scanner in match scanner.ch with | 'e' | 'E' | 'p' | 'P' -> (match peek scanner with | '+' | '-' -> next2 scanner | _ -> next scanner); - scanDigits scanner ~base; + let endPos = position scanner in + let foundDigits = scanDigits scanner ~base in + if not foundDigits then + scanner.err ~startPos ~endPos + (Diagnostics.message "Expected digits after exponential notation."); true | _ -> isFloat in diff --git a/jscomp/syntax/tests/parsing/errors/scanner/expected/exponent_notation.res.txt b/jscomp/syntax/tests/parsing/errors/scanner/expected/exponent_notation.res.txt new file mode 100644 index 0000000000..9dc53709b0 --- /dev/null +++ b/jscomp/syntax/tests/parsing/errors/scanner/expected/exponent_notation.res.txt @@ -0,0 +1,30 @@ + + Syntax error! + tests/parsing/errors/scanner/exponent_notation.res:7:10 + + 5 │ let x = 1_e_1 + 6 │ + 7 │ let x = 1e + 8 │ + 9 │ let x = 1_e_ + + Expected digits after exponential notation. + + + Syntax error! + tests/parsing/errors/scanner/exponent_notation.res:9:11 + + 7 │ let x = 1e + 8 │ + 9 │ let x = 1_e_ + 10 │ + 11 │ let x = 1. + + Expected digits after exponential notation. + +let x = 1e1 +let x = 1e_1 +let x = 1_e_1 +let x = 1e +let x = 1_e_ +let x = 1. \ No newline at end of file diff --git a/jscomp/syntax/tests/parsing/errors/scanner/exponent_notation.res b/jscomp/syntax/tests/parsing/errors/scanner/exponent_notation.res new file mode 100644 index 0000000000..623c94ccfd --- /dev/null +++ b/jscomp/syntax/tests/parsing/errors/scanner/exponent_notation.res @@ -0,0 +1,11 @@ +let x = 1e1 + +let x = 1e_1 + +let x = 1_e_1 + +let x = 1e + +let x = 1_e_ + +let x = 1. From 8db9d1dd21a8a94ec5820ba0f3f274d4f81cbcec Mon Sep 17 00:00:00 2001 From: Shulhi Sapli Date: Sun, 5 Jan 2025 13:26:11 +0800 Subject: [PATCH 16/20] Fix formatter handling of wildcard pattern matching in record (#7224) --- CHANGELOG.md | 1 + jscomp/syntax/src/res_printer.ml | 2 ++ .../tests/printer/pattern/expected/record.res.txt | 11 +++++++++++ jscomp/syntax/tests/printer/pattern/record.res | 11 +++++++++++ 4 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e60effadf3..8a925ac219 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Handle absolute file paths in gentype. https://github.com/rescript-lang/rescript-compiler/pull/7111 - Fix "rescript format" with many files. https://github.com/rescript-lang/rescript-compiler/pull/7081 - Fix exponential notation syntax. https://github.com/rescript-lang/rescript/pull/7174 +- Fix formatter handling of wildcard in pattern matching records with no fields specified. https://github.com/rescript-lang/rescript/pull/7224 #### :house: Internal diff --git a/jscomp/syntax/src/res_printer.ml b/jscomp/syntax/src/res_printer.ml index 376e9cacf8..f8fd5adf4c 100644 --- a/jscomp/syntax/src/res_printer.ml +++ b/jscomp/syntax/src/res_printer.ml @@ -2377,6 +2377,8 @@ and printPattern ~state (p : Parsetree.pattern) cmtTbl = Doc.group (Doc.concat [variantName; argsDoc]) | Ppat_type ident -> Doc.concat [Doc.text "#..."; printIdentPath ident cmtTbl] + | Ppat_record ([], Open) -> + Doc.concat [Doc.lbrace; Doc.text "_"; Doc.rbrace] | Ppat_record (rows, openFlag) -> Doc.group (Doc.concat diff --git a/jscomp/syntax/tests/printer/pattern/expected/record.res.txt b/jscomp/syntax/tests/printer/pattern/expected/record.res.txt index 58fae7db62..bf469d0a31 100644 --- a/jscomp/syntax/tests/printer/pattern/expected/record.res.txt +++ b/jscomp/syntax/tests/printer/pattern/expected/record.res.txt @@ -116,3 +116,14 @@ let get_age3 = ({age: module(P: S), name: _}) => age2 let get_age3 = ({age: exception Exit, name: _}) => age2 let get_age3 = ({age: %raw("__GC"), name: _}) => age2 + +let get_age3 = ({age, _}) => age +let get_age3 = ({_}) => "" +let get_age3 = () => + switch x { + | {age, _} => age + } +let get_age3 = () => + switch x { + | {_} => "" + } diff --git a/jscomp/syntax/tests/printer/pattern/record.res b/jscomp/syntax/tests/printer/pattern/record.res index e627e6c74a..3a0c0da348 100644 --- a/jscomp/syntax/tests/printer/pattern/record.res +++ b/jscomp/syntax/tests/printer/pattern/record.res @@ -60,3 +60,14 @@ let get_age3 = ({age: module(P: S), name: _}) => age2 let get_age3 = ({age: exception Exit, name: _}) => age2 let get_age3 = ({age: %raw("__GC"), name: _}) => age2 + +let get_age3 = ({age, _}) => age +let get_age3 = ({_}) => "" +let get_age3 = () => + switch x { + | {age, _} => age + } +let get_age3 = () => + switch x { + | {_} => "" + } From 7768ad72276247a64b0a1a8690cd1995f977eeac Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Wed, 5 Feb 2025 16:44:08 +0100 Subject: [PATCH 17/20] Set version to 11.2.0-beta.1 --- CHANGELOG.md | 2 +- jscomp/common/bs_version.ml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- packages/std/package.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a925ac219..c0cf85961f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ > - :house: [Internal] > - :nail_care: [Polish] -# 11.1.5 (Unreleased) +# 11.2.0-beta.1 #### :boom: Breaking Change diff --git a/jscomp/common/bs_version.ml b/jscomp/common/bs_version.ml index b60de7a330..b0ef4ef670 100644 --- a/jscomp/common/bs_version.ml +++ b/jscomp/common/bs_version.ml @@ -21,6 +21,6 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let version = "11.1.4" +let version = "11.2.0-beta.1" let header = "// Generated by ReScript, PLEASE EDIT WITH CARE" let package_name = ref "rescript" diff --git a/package-lock.json b/package-lock.json index c07933ec3b..67b863de9c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript", - "version": "11.1.4", + "version": "11.2.0-beta.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rescript", - "version": "11.1.4", + "version": "11.2.0-beta.1", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { diff --git a/package.json b/package.json index 91025ff35c..f80345c712 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rescript", - "version": "11.1.4", + "version": "11.2.0-beta.1", "devDependencies": { "mocha": "10.1.0", "nyc": "15.0.0", diff --git a/packages/std/package.json b/packages/std/package.json index 8e38b1b4fe..1c983dcf56 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/std", - "version": "11.1.4", + "version": "11.2.0-beta.1", "keywords": [ "rescript", "stdlib", From f0ff3198b72ba5a0e294b323732c669e652aa4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Wed, 19 Feb 2025 10:40:27 +0100 Subject: [PATCH 18/20] Backport use TLS 1.2 to upload files to CDN using FTP (#7307) --- CHANGELOG.md | 1 + playground/upload_bundle.sh | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0cf85961f..6d695beeef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - Fix "rescript format" with many files. https://github.com/rescript-lang/rescript-compiler/pull/7081 - Fix exponential notation syntax. https://github.com/rescript-lang/rescript/pull/7174 - Fix formatter handling of wildcard in pattern matching records with no fields specified. https://github.com/rescript-lang/rescript/pull/7224 +- Fix files that were being truncated when sent to the CDN over FTP. https://github.com/rescript-lang/rescript/pull/7307 #### :house: Internal diff --git a/playground/upload_bundle.sh b/playground/upload_bundle.sh index 78ef8652c7..a468ff6781 100755 --- a/playground/upload_bundle.sh +++ b/playground/upload_bundle.sh @@ -32,7 +32,7 @@ fi PACKAGES=("compiler-builtins" "@rescript/react" "@rescript/core") echo "Uploading compiler.js file..." -curl --ftp-create-dirs -T "${SCRIPT_DIR}/compiler.js" --ssl --netrc-file $NETRC_FILE ftp://${KEYCDN_SRV}/v${VERSION}/compiler.js +curl --ftp-create-dirs -T "${SCRIPT_DIR}/compiler.js" --ssl --tls-max 1.2 --netrc-file $NETRC_FILE ftp://${KEYCDN_SRV}/v${VERSION}/compiler.js echo "---" echo "Uploading packages cmij files..." @@ -43,7 +43,7 @@ do echo "Uploading '$SOURCE/cmij.js' to '$TARGET/cmij.js'..." - curl --ftp-create-dirs -T "${SOURCE}/cmij.js" --ssl --netrc-file $NETRC_FILE "${TARGET}/cmij.js" + curl --ftp-create-dirs -T "${SOURCE}/cmij.js" --ssl --tls-max 1.2 --netrc-file $NETRC_FILE "${TARGET}/cmij.js" done # we now upload the bundled stdlib runtime files @@ -54,4 +54,6 @@ TARGET="ftp://${KEYCDN_SRV}/v${VERSION}/${DIR}" echo "Uploading '$SOURCE/*.js' to '$TARGET/*.js'..." -find "${SOURCE}" -type f -name "*.js" -exec sh -c 'curl --ftp-create-dirs --ssl --netrc-file "$0" -T "$1" "${2}/$(basename "$1")"' "$NETRC_FILE" {} "$TARGET" \; +# we use TLS 1.2 because 1.3 sometimes causes data losses (files capped at 16384B) +# https://github.com/curl/curl/issues/6149#issuecomment-1618591420 +find "${SOURCE}" -type f -name "*.js" -exec sh -c 'curl --ftp-create-dirs --ssl --tls-max 1.2 --netrc-file "$0" -T "$1" "${2}/$(basename "$1")"' "$NETRC_FILE" {} "$TARGET" \; From c370de083d1a18b8a5a6cfeae1c86c3a50e65e9f Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 7 Mar 2025 09:53:21 +0100 Subject: [PATCH 19/20] Version to 11.2.0-beta.2 --- CHANGELOG.md | 6 ++++++ jscomp/common/bs_version.ml | 2 +- package-lock.json | 4 ++-- package.json | 2 +- packages/std/package.json | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d695beeef..c4c1d9572f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ > - :house: [Internal] > - :nail_care: [Polish] +# 11.2.0-beta.2 + +#### :house: Internal + +- Playground: use TLS 1.2 to upload files to CDN using FTP. https://github.com/rescript-lang/rescript/pull/7307 + # 11.2.0-beta.1 #### :boom: Breaking Change diff --git a/jscomp/common/bs_version.ml b/jscomp/common/bs_version.ml index b0ef4ef670..d6a5a3442b 100644 --- a/jscomp/common/bs_version.ml +++ b/jscomp/common/bs_version.ml @@ -21,6 +21,6 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let version = "11.2.0-beta.1" +let version = "11.2.0-beta.2" let header = "// Generated by ReScript, PLEASE EDIT WITH CARE" let package_name = ref "rescript" diff --git a/package-lock.json b/package-lock.json index 67b863de9c..68b68eec0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rescript", - "version": "11.2.0-beta.1", + "version": "11.2.0-beta.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rescript", - "version": "11.2.0-beta.1", + "version": "11.2.0-beta.2", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "bin": { diff --git a/package.json b/package.json index f80345c712..4a9e588455 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rescript", - "version": "11.2.0-beta.1", + "version": "11.2.0-beta.2", "devDependencies": { "mocha": "10.1.0", "nyc": "15.0.0", diff --git a/packages/std/package.json b/packages/std/package.json index 1c983dcf56..7cfa4c8b94 100644 --- a/packages/std/package.json +++ b/packages/std/package.json @@ -1,6 +1,6 @@ { "name": "@rescript/std", - "version": "11.2.0-beta.1", + "version": "11.2.0-beta.2", "keywords": [ "rescript", "stdlib", From ca376c460538e71d1e55e1ed468fb1e8663a0ce8 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Fri, 7 Mar 2025 11:03:30 +0100 Subject: [PATCH 20/20] Do not install JSOO on all platforms (#7322) --- dune-project | 2 -- rescript.opam | 1 - 2 files changed, 3 deletions(-) diff --git a/dune-project b/dune-project index 702d814973..299c7fb638 100644 --- a/dune-project +++ b/dune-project @@ -24,8 +24,6 @@ (= 0.26.1)) (cppo (= 1.6.9)) - (js_of_ocaml-compiler - (= 4.0.0)) (ounit2 (= 2.2.6)) (reanalyze diff --git a/rescript.opam b/rescript.opam index 17634c3879..8451f84b3f 100644 --- a/rescript.opam +++ b/rescript.opam @@ -10,7 +10,6 @@ depends: [ "ocaml" {>= "4.10"} "ocamlformat" {= "0.26.1"} "cppo" {= "1.6.9"} - "js_of_ocaml-compiler" {= "4.0.0"} "ounit2" {= "2.2.6"} "reanalyze" {= "2.23.0"} "dune"