diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index e3827d7..789b65a 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -22,6 +22,7 @@ runs: with: otp-version: ${{ inputs.erlang-version }} gleam-version: ${{ inputs.gleam-version }} + rebar3-version: 3 - uses: actions/setup-node@v2 with: node-version: ${{ inputs.node-version }} diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..e5962a9 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,2 @@ +[tools] +gleam = "1.0.0" diff --git a/CHANGELOG.md b/CHANGELOG.md index cb43b94..9fd5923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [Unreleased](https://github.com/TanklesXL/glint/compare/v0.18.0...HEAD) +## [0.18.1](https://github.com/TanklesXL/glint/compare/v0.18.0...v0.18.1) + +- relax gleam stdlib version constraint + ## [0.18.0](https://github.com/TanklesXL/glint/compare/v0.17.1...v0.18.0) - support for group flags at a given path diff --git a/examples/hello/src/hello.gleam b/examples/hello/src/hello.gleam index 08e7c78..8460b70 100644 --- a/examples/hello/src/hello.gleam +++ b/examples/hello/src/hello.gleam @@ -1,14 +1,14 @@ // stdlib imports +import gleam/dict import gleam/io import gleam/list import gleam/string.{uppercase} -import gleam/dict // external dep imports import snag // glint imports +import argv import glint import glint/flag -import argv // ----- APPLICATION LOGIC ----- diff --git a/examples/hello/test/hello_test.gleam b/examples/hello/test/hello_test.gleam index fc54714..b2c2f2a 100644 --- a/examples/hello/test/hello_test.gleam +++ b/examples/hello/test/hello_test.gleam @@ -1,7 +1,7 @@ +import gleam/list import gleeunit import gleeunit/should import hello -import gleam/list pub fn main() { gleeunit.main() diff --git a/gleam.toml b/gleam.toml index b98b0f7..900ba4f 100644 --- a/gleam.toml +++ b/gleam.toml @@ -1,5 +1,5 @@ name = "glint" -version = "0.18.0" +version = "0.18.1" # Fill out these fields if you intend to generate HTML documentation or publishname = "glint" # your project to the Hex package manager. @@ -14,7 +14,7 @@ links = [ gleam = "~> 1.0" [dependencies] -gleam_stdlib = "~> 0.36.0 or ~> 1.0" +gleam_stdlib = "~> 0.36 or ~> 1.0" snag = "~> 0.2" gleam_community_ansi = "~> 1.0" gleam_community_colour = "~> 1.0" diff --git a/manifest.toml b/manifest.toml index f7a98ad..21074d3 100644 --- a/manifest.toml +++ b/manifest.toml @@ -3,15 +3,17 @@ packages = [ { name = "gleam_community_ansi", version = "1.4.0", build_tools = ["gleam"], requirements = ["gleam_community_colour", "gleam_stdlib"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "FE79E08BF97009729259B6357EC058315B6FBB916FAD1C2FF9355115FEB0D3A4" }, - { name = "gleam_community_colour", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "A49A5E3AE8B637A5ACBA80ECB9B1AFE89FD3D5351FF6410A42B84F666D40D7D5" }, - { name = "gleam_stdlib", version = "0.36.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "C0D14D807FEC6F8A08A7C9EF8DFDE6AE5C10E40E21325B2B29365965D82EB3D4" }, - { name = "gleeunit", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "D364C87AFEB26BDB4FB8A5ABDE67D635DC9FA52D6AB68416044C35B096C6882D" }, + { name = "gleam_community_colour", version = "1.4.0", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "795964217EBEDB3DA656F5EB8F67D7AD22872EB95182042D3E7AFEF32D3FD2FE" }, + { name = "gleam_json", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "thoas"], otp_app = "gleam_json", source = "hex", outer_checksum = "8B197DD5D578EA6AC2C0D4BDC634C71A5BCA8E7DB5F47091C263ECB411A60DF3" }, + { name = "gleam_stdlib", version = "0.37.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "5398BD6C2ABA17338F676F42F404B9B7BABE1C8DC7380031ACB05BBE1BCF3742" }, + { name = "gleeunit", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "72CDC3D3F719478F26C4E2C5FED3E657AC81EC14A47D2D2DEBB8693CA3220C3B" }, { name = "snag", version = "0.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "snag", source = "hex", outer_checksum = "54D32E16E33655346AA3E66CBA7E191DE0A8793D2C05284E3EFB90AD2CE92BCC" }, + { name = "thoas", version = "0.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "4918D50026C073C4AB1388437132C77A6F6F7C8AC43C60C13758CC0ADCE2134E" }, ] [requirements] gleam_community_ansi = { version = "~> 1.0" } gleam_community_colour = { version = "~> 1.0" } -gleam_stdlib = { version = "~> 0.36.0 or ~> 1.0" } +gleam_stdlib = { version = "~> 0.36 or ~> 1.0" } gleeunit = { version = "~> 1.0" } snag = { version = "~> 0.2" } diff --git a/src/glint.gleam b/src/glint.gleam index 572a02d..767015f 100644 --- a/src/glint.gleam +++ b/src/glint.gleam @@ -1,17 +1,17 @@ +import gleam import gleam/bool import gleam/dict -import gleam/option.{type Option, None, Some} -import gleam/list -import gleam/io import gleam/int +import gleam/io +import gleam/list +import gleam/option.{type Option, None, Some} +import gleam/result import gleam/string -import snag.{type Result} -import glint/flag.{type Flag, type Map as FlagMap} import gleam/string_builder as sb import gleam_community/ansi import gleam_community/colour.{type Colour} -import gleam/result -import gleam +import glint/flag.{type Flag, type Map as FlagMap} +import snag.{type Result} // --- CONFIGURATION --- diff --git a/src/glint/flag.gleam b/src/glint/flag.gleam index f68564a..b2dd400 100644 --- a/src/glint/flag.gleam +++ b/src/glint/flag.gleam @@ -1,13 +1,13 @@ +import gleam import gleam/dict -import gleam/string -import gleam/result +import gleam/float import gleam/int import gleam/list -import gleam/float -import snag.{type Result, type Snag} import gleam/option.{type Option, None, Some} +import gleam/result +import gleam/string import glint/flag/constraint.{type Constraint} -import gleam +import snag.{type Result, type Snag} /// Flag inputs must start with this prefix /// diff --git a/src/glint/flag/constraint.gleam b/src/glint/flag/constraint.gleam index 0130d7d..e727f1f 100644 --- a/src/glint/flag/constraint.gleam +++ b/src/glint/flag/constraint.gleam @@ -1,7 +1,7 @@ import gleam/list import gleam/result -import gleam/string import gleam/set +import gleam/string import snag.{type Result} /// Constraint type for verifying flag values diff --git a/test/glint/flag/contraint_test.gleam b/test/glint/flag/contraint_test.gleam index bc57f13..871f043 100644 --- a/test/glint/flag/contraint_test.gleam +++ b/test/glint/flag/contraint_test.gleam @@ -1,7 +1,7 @@ -import glint/flag/constraint.{each, none_of, one_of} +import gleam/list import gleeunit/should import glint/flag -import gleam/list +import glint/flag/constraint.{each, none_of, one_of} pub fn one_of_test() { 1 diff --git a/test/glint/flag_test.gleam b/test/glint/flag_test.gleam index 5808b2b..861213d 100644 --- a/test/glint/flag_test.gleam +++ b/test/glint/flag_test.gleam @@ -1,7 +1,7 @@ +import gleam/dict as map import gleeunit/should import glint.{type CommandInput} import glint/flag -import gleam/dict as map pub fn update_flag_test() { let flags =