You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -11690,6 +11692,11 @@ let chop_extension ?(loc="") name =
11690
11692
let chop_extension_if_any fname =
11691
11693
try Filename.chop_extension fname with Invalid_argument _ -> fname
11692
11694
11695
+
let rec chop_all_extensions_if_any fname =
11696
+
match Filename.chop_extension fname with
11697
+
| x -> chop_all_extensions_if_any x
11698
+
| exception _ -> fname
11699
+
11693
11700
let get_extension x =
11694
11701
let pos = Ext_string.rindex_neg x '.' in
11695
11702
if pos < 0 then ""
@@ -13768,25 +13775,32 @@ module Ext_namespace : sig
13768
13775
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
13769
13776
13770
13777
(** [make ~ns "a" ]
13771
-
A typical example would return "a-Ns"
13772
-
Note the namespace comes from the output of [namespace_of_package_name]
13778
+
A typical example would return "a-Ns"
13779
+
Note the namespace comes from the output of [namespace_of_package_name]
13773
13780
*)
13774
13781
val make : ns:string -> string -> string
13775
13782
13776
13783
13777
13784
13778
13785
(* Note we have to output uncapitalized file Name,
13779
-
or at least be consistent, since by reading cmi file on Case insensitive OS, we don't really know it is `list.cmi` or `List.cmi`, so that `require (./list.js)` or `require(./List.js)`
13780
-
relevant issues: #1609, #913
13781
-
13782
-
#1933 when removing ns suffix, don't pass the bound
13783
-
of basename
13784
-
*)
13785
-
val js_name_of_basename : string -> string
13786
+
or at least be consistent, since by reading cmi file on Case insensitive OS, we don't really know it is `list.cmi` or `List.cmi`, so that `require (./list.js)` or `require(./List.js)`
13787
+
relevant issues: #1609, #913
13786
13788
13787
-
(** [js_name_of_modulename ~little A-Ns]
13789
+
#1933 when removing ns suffix, don't pass the bound
13790
+
of basename
13788
13791
*)
13789
-
val js_name_of_modulename : little:bool -> string -> string
13792
+
val js_name_of_basename :
13793
+
bool ->
13794
+
string -> string
13795
+
13796
+
type file_kind =
13797
+
| Upper_js
13798
+
| Upper_bs
13799
+
| Little_js
13800
+
| Little_bs
13801
+
(** [js_name_of_modulename ~little A-Ns]
13802
+
*)
13803
+
val js_name_of_modulename : file_kind -> string -> string
13790
13804
13791
13805
(* TODO handle cases like
13792
13806
'@angular/core'
@@ -13852,15 +13866,29 @@ let remove_ns_suffix name =
0 commit comments