Skip to content

Commit e201994

Browse files
committed
Update Gleam version
1 parent e3db889 commit e201994

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

GLEAM_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.6.1
1+
v1.8.0

gleam.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ licences = ["Apache-2.0"]
1616
[dependencies]
1717
gleam_stdlib = ">= 0.34.0 and < 2.0.0"
1818
simplifile = ">= 2.2.0 and < 3.0.0"
19-
snag = "~> 0.2"
20-
htmb = "~> 1.1"
19+
snag = "~> 1.0"
20+
htmb = "~> 2.0"
2121
filepath = ">= 1.0.0 and < 2.0.0"
2222

2323
[dev-dependencies]

manifest.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
# You typically do not need to edit this file
33

44
packages = [
5-
{ name = "filepath", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "EFB6FF65C98B2A16378ABC3EE2B14124168C0CE5201553DE652E2644DCFDB594" },
6-
{ name = "gleam_stdlib", version = "0.40.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "86606B75A600BBD05E539EB59FABC6E307EEEA7B1E5865AFB6D980A93BCB2181" },
7-
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
8-
{ name = "htmb", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "htmb", source = "hex", outer_checksum = "30D448F0E15DFCF7283AAAC2F351D77B9D54E318219C9FDDB1877572B67C27B7" },
5+
{ name = "filepath", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "67A6D15FB39EEB69DD31F8C145BB5A421790581BD6AA14B33D64D5A55DBD6587" },
6+
{ name = "gleam_stdlib", version = "0.54.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "723BA61A2BAE8D67406E59DD88CEA1B3C3F266FC8D70F64BE9FEC81B4505B927" },
7+
{ name = "gleeunit", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "0E6C83834BA65EDCAAF4FE4FB94AC697D9262D83E6F58A750D63C9F6C8A9D9FF" },
8+
{ name = "htmb", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "htmb", source = "hex", outer_checksum = "023218E5A4DE7A1BA5E2BB449F063382F8F747A11F13423433D60AEA14CC2655" },
99
{ name = "simplifile", version = "2.2.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0DFABEF7DC7A9E2FF4BB27B108034E60C81BEBFCB7AB816B9E7E18ED4503ACD8" },
10-
{ name = "snag", version = "0.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "snag", source = "hex", outer_checksum = "54D32E16E33655346AA3E66CBA7E191DE0A8793D2C05284E3EFB90AD2CE92BCC" },
10+
{ name = "snag", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "snag", source = "hex", outer_checksum = "7E9F06390040EB5FAB392CE642771484136F2EC103A92AE11BA898C8167E6E17" },
1111
]
1212

1313
[requirements]
1414
filepath = { version = ">= 1.0.0 and < 2.0.0" }
1515
gleam_stdlib = { version = ">= 0.34.0 and < 2.0.0" }
1616
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }
17-
htmb = { version = "~> 1.1" }
17+
htmb = { version = "~> 2.0" }
1818
simplifile = { version = ">= 2.2.0 and < 3.0.0" }
19-
snag = { version = "~> 0.2" }
19+
snag = { version = "~> 1.0" }

src/playground.gleam

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import gleam/io
33
import gleam/list
44
import gleam/result
55
import gleam/string
6-
import gleam/string_builder
6+
import gleam/string_tree
77
import htmb.{type Html, h}
88
import playground/html.{
99
ScriptOptions, html_dangerous_inline_script, html_link, html_meta,
@@ -62,8 +62,8 @@ pub fn main() {
6262

6363
let page_html =
6464
home_page(version)
65-
|> htmb.render_page("html")
66-
|> string_builder.to_string
65+
|> htmb.render_page
66+
|> string_tree.to_string
6767

6868
use _ <- result.try(ensure_directory(public))
6969
let path = filepath.join(public, "index.html")
@@ -370,7 +370,7 @@ fn home_page(gleam_version: String) -> Html {
370370
let body_scripts = [
371371
theme_picker_script(),
372372
h("script", [#("type", "gleam"), #("id", "code")], [
373-
htmb.dangerous_unescaped_fragment(string_builder.from_string(hello_joe)),
373+
htmb.dangerous_unescaped_fragment(string_tree.from_string(hello_joe)),
374374
]),
375375
html_script("index.js", ScriptOptions(module: True, defer: False), []),
376376
]

src/playground/html.gleam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//// Generic HTML rendering utils
22

33
import gleam/list
4-
import gleam/string_builder
4+
import gleam/string_tree
55
import htmb.{type Html, h, text}
66

77
pub type HtmlAttribute =
@@ -54,7 +54,7 @@ pub fn html_dangerous_inline_script(
5454
])
5555
}
5656
h("script", attrs, [
57-
htmb.dangerous_unescaped_fragment(string_builder.from_string(content)),
57+
htmb.dangerous_unescaped_fragment(string_tree.from_string(content)),
5858
])
5959
}
6060

0 commit comments

Comments
 (0)