Skip to content

Commit e0119d9

Browse files
committedNov 2, 2023
Update ts2ocaml to 1.4.6
Signed-off-by: Sora Morimoto <[email protected]>
1 parent 729e62b commit e0119d9

12 files changed

+164
-138
lines changed
 

‎.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

‎.github/workflows/workflow.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@ on:
99

1010
jobs:
1111
build:
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os:
16-
- macos-latest
17-
- ubuntu-latest
18-
- windows-latest
19-
20-
runs-on: ${{ matrix.os }}
12+
runs-on: ubuntu-latest
2113

2214
steps:
2315
- name: Checkout code
@@ -34,10 +26,11 @@ jobs:
3426
uses: ocaml/setup-ocaml@v2
3527
with:
3628
ocaml-compiler: "4.14"
29+
allow-prelease-opam: true
3730

3831
- run: yarn install --immutable
3932

40-
- run: opam install . --deps-only --with-test
33+
- run: opam install . --deps-only
4134

4235
- run: yarn exec -- opam exec -- make
4336

‎.ocamlformat

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=0.23.0
1+
version=0.26.1
22
profile=conventional
33
break-infix=fit-or-vertical
44
parse-docstrings=true

‎Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ all: clean bindings build
44
.PHONY: pretty-bytes
55
pretty-bytes:
66
ts2ocaml jsoo node_modules/pretty-bytes/index.d.ts \
7-
--preset=full \
87
--output-dir=lib \
8+
--preset=full \
99
--simplify \
10+
--number-as-int \
1011
--verbose \
1112
--nowarn
1213

‎bin/dune

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
(modes js)
77
(js_of_ocaml
88
(flags
9-
(--target-env nodejs)
10-
(--enable use-js-string))
9+
(--target-env nodejs))
1110
(javascript_files ../lib/stub.js)))

‎bin/main.ml

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1-
open Example
1+
open Ts2ocaml_min
22

3-
let () = print_endline @@ Pretty_bytes.prettyBytes ~number:128000000.0 ()
3+
module PrettyBytes = struct
4+
open Example
5+
module Options = Pretty_bytes.Export.Options
6+
7+
let pretty_bytes = Pretty_bytes.prettyBytes
8+
end
9+
10+
let options =
11+
PrettyBytes.Options.create ~signed:false
12+
~locale:(Primitive.inject (`String "en"))
13+
~bits:false ~binary:false ~minimumFractionDigits:1 ~maximumFractionDigits:2
14+
()
15+
16+
let () = print_endline @@ PrettyBytes.pretty_bytes ~number:128000000 ~options ()

‎dune-project

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(lang dune 3.3)
1+
(lang dune 3.11)
22

33
(name example)
44

@@ -17,4 +17,13 @@
1717
(name example)
1818
(synopsis "Example use of ts2ocaml")
1919
(description "Example use of ts2ocaml")
20-
(depends ts2ocaml-jsoo-stdlib ojs gen_js_api js_of_ocaml-compiler))
20+
(depends
21+
ts2ocaml-jsoo-stdlib
22+
ojs
23+
gen_js_api
24+
js_of_ocaml-compiler
25+
(ocamlformat
26+
(and
27+
(= 0.26.1)
28+
:with-dev-setup))
29+
(ocaml-lsp-server :with-dev-setup)))

‎example.opam

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ license: "ISC"
88
homepage: "https://github.com/ocsigen/ts2ocaml"
99
bug-reports: "https://github.com/ocsigen/ts2ocaml/issues"
1010
depends: [
11-
"dune" {>= "3.3"}
11+
"dune" {>= "3.11"}
1212
"ts2ocaml-jsoo-stdlib"
1313
"ojs"
1414
"gen_js_api"
1515
"js_of_ocaml-compiler"
16+
"ocamlformat" {= "0.26.1" & with-dev-setup}
17+
"ocaml-lsp-server" {with-dev-setup}
1618
"odoc" {with-doc}
1719
]
1820
build: [
@@ -31,5 +33,5 @@ build: [
3133
]
3234
dev-repo: "git+https://github.com/ocsigen/ts2ocaml.git"
3335
pin-depends: [
34-
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v1.4.4" ]
36+
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v1.4.6" ]
3537
]

‎example.opam.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
pin-depends: [
2-
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v1.4.4" ]
2+
[ "ts2ocaml-jsoo-stdlib.dev" "git+https://github.com/ocsigen/ts2ocaml.git#jsoo-stdlib-v1.4.6" ]
33
]

‎lib/dune

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(library
22
(name example)
33
(public_name example)
4-
(libraries ts2ocaml-jsoo-stdlib ojs))
4+
(libraries ts2ocaml-jsoo-stdlib))
55

66
(rule
77
(targets pretty_bytes.ml)

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"pretty-bytes": "5.6.0"
88
},
99
"devDependencies": {
10-
"@ocsigen/ts2ocaml": "1.4.4",
11-
"esbuild": "0.17.5"
10+
"@ocsigen/ts2ocaml": "1.4.6",
11+
"esbuild": "0.19.5"
1212
},
1313
"packageManager": "yarn@4.0.1+sha256.5a9d054e67fbbae8774cd3667736fd74407ffbbb336898523ca1fe87b3fc4ee3"
1414
}

0 commit comments

Comments
 (0)