From 5fae861c8649506405e88c5b79214979a20c8b85 Mon Sep 17 00:00:00 2001 From: Mikko Ahlroth Date: Sat, 22 Jul 2023 11:15:03 +0300 Subject: [PATCH] Update for Gleam 0.30 --- .tool-versions | 2 +- CHANGELOG.txt | 5 +++++ gleam.toml | 7 ++++--- manifest.toml | 8 ++++---- src/glemplate/parser.gleam | 4 ++-- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.tool-versions b/.tool-versions index 141e4f5..395b61f 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,3 +1,3 @@ erlang 25.2.2 -gleam 0.29.0 +gleam 0.30.2 nodejs 18.16.0 diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f6b493b..ca55d15 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,8 @@ +5.0.0 +----- + +* Update for Gleam 0.30. + 4.0.0 ----- diff --git a/gleam.toml b/gleam.toml index 4d446c4..381474a 100644 --- a/gleam.toml +++ b/gleam.toml @@ -1,6 +1,7 @@ name = "glemplate" -version = "4.0.0" +version = "5.0.0" description = "A simple template engine for Gleam" +gleam = ">= 0.30.0" # Fill out these fields if you intend to generate HTML documentation or publish # your project to the Hex package manager. @@ -10,9 +11,9 @@ repository = { type = "gitlab", user = "Nicd", repo = "glemplate" } links = [] [dependencies] -gleam_stdlib = "~> 0.29.0" +gleam_stdlib = "~> 0.29" nibble = "~> 0.2" -glentities = "~> 4.0" +glentities = "~> 5.0" [dev-dependencies] gleeunit = "~> 0.10" diff --git a/manifest.toml b/manifest.toml index a7534a2..c8e628e 100644 --- a/manifest.toml +++ b/manifest.toml @@ -2,14 +2,14 @@ # You typically do not need to edit this file packages = [ - { name = "gleam_stdlib", version = "0.29.1", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "24581B17879AA903B3E7531869D9460730C2F772A1C02C774ABF75710CCC4CFE" }, + { name = "gleam_stdlib", version = "0.30.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "03710B3DA047A3683117591707FCA19D32B980229DD8CE8B0603EB5B5144F6C3" }, { name = "gleeunit", version = "0.10.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "ECEA2DE4BE6528D36AFE74F42A21CDF99966EC36D7F25DEB34D47DD0F7977BAF" }, - { name = "glentities", version = "4.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glentities", source = "hex", outer_checksum = "8A3A24CA243CDD212AC67B645E31467458DB0D5DD846F00C95BC1328F323BDD0" }, + { name = "glentities", version = "5.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glentities", source = "hex", outer_checksum = "4D3AE91ECB088C853302643C4F256BEF7B8F8EC7650A7DA6B2ACAF4550113BE2" }, { name = "nibble", version = "0.2.3", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "nibble", source = "hex", outer_checksum = "C9EB428EAC11007414C2FBA5B39F0E8DB27FDAB26534F2AD607D5AA6FCF32559" }, ] [requirements] -gleam_stdlib = "~> 0.29.0" +gleam_stdlib = "~> 0.29" gleeunit = "~> 0.10" -glentities = "~> 4.0" +glentities = "~> 5.0" nibble = "~> 0.2" diff --git a/src/glemplate/parser.gleam b/src/glemplate/parser.gleam index 9411a9c..5a96596 100644 --- a/src/glemplate/parser.gleam +++ b/src/glemplate/parser.gleam @@ -231,8 +231,8 @@ fn output_tag(state: State) { use _ <- nibble.then(nibble.string(tag_output)) nibble.one_of([ + // Raw output { - // Raw output use _ <- nibble.then(nibble.whitespace()) use _ <- nibble.then(nibble.string(output_raw_token)) use _ <- nibble.then(nibble.whitespace()) @@ -248,8 +248,8 @@ fn output_tag(state: State) { ), ) }, + // Normal output { - // Normal output use _ <- nibble.then(nibble.whitespace()) use var <- nibble.then(variable())