Skip to content

Commit

Permalink
chore: add missing licesnse headers to some files (#838)
Browse files Browse the repository at this point in the history
* chore: add missing licesnse headers to some files

* fix: open `//`
  • Loading branch information
anmonteiro authored Oct 27, 2023
1 parent 6e91300 commit 17dcb23
Show file tree
Hide file tree
Showing 7 changed files with 131 additions and 10 deletions.
24 changes: 24 additions & 0 deletions bin/melppx.ml
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
(* Copyright (C) 2022- Authors of Melange
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a later version).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* 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 () = Ppxlib.Driver.run_as_ppx_rewriter ()
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions jscomp/ext/ext_js_suffix.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
(* Copyright (C) 2022- Authors of Melange
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a later version).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* 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. *)

type t = string

let to_string = Fun.id
Expand Down
24 changes: 24 additions & 0 deletions jscomp/ext/ext_js_suffix.mli
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
(* Copyright (C) 2022- Authors of Melange
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a later version).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* 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. *)

type t

val to_string : t -> string
Expand Down
29 changes: 27 additions & 2 deletions jscomp/ext/ext_module_system.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
let ( // ) = Ext_path.( // )
(* Copyright (C) 2022- Authors of Melange
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a later version).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* 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. *)

type t = NodeJS | Es6 | Es6_global

Expand All @@ -14,7 +36,10 @@ let compatible ~dep t =

(* in runtime lib, [es6] and [es6] are treated the same way *)
let runtime_dir = function NodeJS -> "js" | Es6 | Es6_global -> "es6"
let runtime_package_path js_file = (Literals.package_name ^ ".js") // js_file

let runtime_package_path =
let ( // ) = Ext_path.( // ) in
fun js_file -> (Literals.package_name ^ ".js") // js_file

let to_string = function
| NodeJS -> "commonjs"
Expand Down
24 changes: 24 additions & 0 deletions jscomp/ext/ext_module_system.mli
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
(* Copyright (C) 2022- Authors of Melange
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a later version).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* 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. *)

type t = NodeJS | Es6 | Es6_global

val default : t
Expand Down
2 changes: 1 addition & 1 deletion jscomp/ext/ext_modulename.ml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ and collect_next buf s off len =
| '.' | '-' -> collect_start buf s next len
| _ -> collect_next buf s next len

(** This is for a js exeternal module, we can change it when printing
(** This is for a JS external module, we can change it when printing
for example
{[
var React$1 = require('react');
Expand Down

0 comments on commit 17dcb23

Please sign in to comment.