Skip to content

Commit

Permalink
Update ts2ocaml to 1.4.6
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Nov 2, 2023
1 parent 729e62b commit dc3b4d6
Show file tree
Hide file tree
Showing 11 changed files with 155 additions and 127 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 2 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ jobs:
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: "4.14"
allow-prelease-opam: true

- run: yarn install --immutable

- run: opam install . --deps-only --with-test
- run: opam install . --deps-only

- run: yarn exec -- opam exec -- make

Expand Down
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.23.0
version=0.26.1
profile=conventional
break-infix=fit-or-vertical
parse-docstrings=true
3 changes: 1 addition & 2 deletions bin/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
(modes js)
(js_of_ocaml
(flags
(--target-env nodejs)
(--enable use-js-string))
(--target-env nodejs))
(javascript_files ../lib/stub.js)))
10 changes: 9 additions & 1 deletion bin/main.ml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
open Ts2ocaml
open Example

let () = print_endline @@ Pretty_bytes.prettyBytes ~number:128000000.0 ()
let () =
let options =
Pretty_bytes.PrettyBytes.Options.create ~signed:false ~bits:false
~binary:false
~locale:(Primitive.inject (`String "en"))
~minimumFractionDigits:1.0 ~maximumFractionDigits:2.0 ()
in
print_endline @@ Pretty_bytes.prettyBytes ~number:128000000.0 ~options ()
13 changes: 11 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 3.3)
(lang dune 3.11)

(name example)

Expand All @@ -17,4 +17,13 @@
(name example)
(synopsis "Example use of ts2ocaml")
(description "Example use of ts2ocaml")
(depends ts2ocaml-jsoo-stdlib ojs gen_js_api js_of_ocaml-compiler))
(depends
ts2ocaml-jsoo-stdlib
ojs
gen_js_api
js_of_ocaml-compiler
(ocamlformat
(and
(= 0.26.1)
:with-dev-setup))
(ocaml-lsp-server :with-dev-setup)))
6 changes: 4 additions & 2 deletions example.opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ license: "ISC"
homepage: "https://github.com/ocsigen/ts2ocaml"
bug-reports: "https://github.com/ocsigen/ts2ocaml/issues"
depends: [
"dune" {>= "3.3"}
"dune" {>= "3.11"}
"ts2ocaml-jsoo-stdlib"
"ojs"
"gen_js_api"
"js_of_ocaml-compiler"
"ocamlformat" {= "0.26.1" & with-dev-setup}
"ocaml-lsp-server" {with-dev-setup}
"odoc" {with-doc}
]
build: [
Expand All @@ -31,5 +33,5 @@ build: [
]
dev-repo: "git+https://github.com/ocsigen/ts2ocaml.git"
pin-depends: [
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v1.4.4" ]
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib" ]
]
2 changes: 1 addition & 1 deletion example.opam.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pin-depends: [
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v1.4.4" ]
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib" ]
]
2 changes: 1 addition & 1 deletion lib/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(library
(name example)
(public_name example)
(libraries ts2ocaml-jsoo-stdlib ojs))
(libraries ts2ocaml-jsoo-stdlib))

(rule
(targets pretty_bytes.ml)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"pretty-bytes": "5.6.0"
},
"devDependencies": {
"@ocsigen/ts2ocaml": "1.4.4",
"esbuild": "0.17.5"
"@ocsigen/ts2ocaml": "1.4.6",
"esbuild": "0.19.5"
},
"packageManager": "[email protected]+sha256.5a9d054e67fbbae8774cd3667736fd74407ffbbb336898523ca1fe87b3fc4ee3"
}
Loading

0 comments on commit dc3b4d6

Please sign in to comment.