diff --git a/.github/actions/test/action.yaml b/.github/actions/test/action.yaml index 5fb462e..ca78960 100644 --- a/.github/actions/test/action.yaml +++ b/.github/actions/test/action.yaml @@ -6,11 +6,11 @@ inputs: gleam-version: description: gleam version required: false - default: 1.0.0-rc2 + default: "~> 1.0" erlang-version: description: erlang-otp version required: false - default: 26.2.2 + default: "~> 26.2" runs: using: composite diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0184db6..71ce8bd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - erlang: ["26.2.2"] + erlang: ["~> 26.2"] steps: - uses: actions/checkout@v2 - uses: ./.github/actions/test diff --git a/gleam.toml b/gleam.toml index 205f8a0..2746db9 100644 --- a/gleam.toml +++ b/gleam.toml @@ -4,20 +4,20 @@ repository = { type = "github", user = "TanklesXL", repo = "gladvent" } description = "An Advent Of Code runner for gleam" licences = ["Apache-2.0"] internal_modules = ["gladvent/internal/*"] -gleam = "~> 0.34 or ~> 1.0" +gleam = "~> 1.0" [dependencies] -gleam_stdlib = "~> 0.34 or ~> 1.0" -gleam_otp = "~> 0.4" -gleam_erlang = "~> 0.7" -snag = "~> 0.2" -glint = " ~> 0.16.0" +glint = "~> 0.17" simplifile = "~> 0.3" argv = "~> 1.0" shellout = "~> 1.6" gleam_package_interface = "~> 1.0" gleam_json = "~> 1.0" spinner = "~> 1.1" +gleam_stdlib = "~> 0.36 or ~> 1.0" +gleam_otp = "~> 0.4" +gleam_erlang = "~> 0.7" +snag = "~> 0.2" [dev-dependencies] gleeunit = "~> 1.0" diff --git a/manifest.toml b/manifest.toml index cd24025..8bdc035 100644 --- a/manifest.toml +++ b/manifest.toml @@ -12,7 +12,7 @@ packages = [ { name = "gleam_stdlib", version = "0.36.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "C0D14D807FEC6F8A08A7C9EF8DFDE6AE5C10E40E21325B2B29365965D82EB3D4" }, { name = "glearray", version = "0.2.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glearray", source = "hex", outer_checksum = "908154F695D330E06A37FAB2C04119E8F315D643206F8F32B6A6C14A8709FFF4" }, { name = "gleeunit", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "D364C87AFEB26BDB4FB8A5ABDE67D635DC9FA52D6AB68416044C35B096C6882D" }, - { name = "glint", version = "0.16.0", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_community_colour", "gleam_stdlib", "snag"], otp_app = "glint", source = "hex", outer_checksum = "61B7E85CBB0CCD2FD8A9C7AE06CA97A80BF6537716F34362A39DF9C74967BBBC" }, + { name = "glint", version = "0.17.1", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_community_colour", "gleam_stdlib", "snag"], otp_app = "glint", source = "hex", outer_checksum = "DF094D7A97C54F4A23F670A7109A188DCBBDD17E003B3E650566835BDBA6BFDF" }, { name = "repeatedly", version = "2.1.1", build_tools = ["gleam"], requirements = [], otp_app = "repeatedly", source = "hex", outer_checksum = "38808C3EC382B0CD981336D5879C24ECB37FCB9C1D1BD128F7A80B0F74404D79" }, { name = "shellout", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "shellout", source = "hex", outer_checksum = "E2FCD18957F0E9F67E1F497FC9FF57393392F8A9BAEAEA4779541DE7A68DD7E0" }, { name = "simplifile", version = "0.4.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "8F3C94B83F691CCFACD784A4D7C1F7E5A0437D93341549B908EE3B32E3477447" }, @@ -29,7 +29,7 @@ gleam_otp = { version = "~> 0.4" } gleam_package_interface = { version = "~> 1.0" } gleam_stdlib = { version = "~> 0.34 or ~> 1.0" } gleeunit = { version = "~> 1.0" } -glint = { version = " ~> 0.16.0" } +glint = { version = "~> 0.17" } shellout = { version = "~> 1.6" } simplifile = { version = "~> 0.3" } snag = { version = "~> 0.2" } diff --git a/src/gladvent/internal/cmd/run.gleam b/src/gladvent/internal/cmd/run.gleam index 52610d3..45f8c63 100644 --- a/src/gladvent/internal/cmd/run.gleam +++ b/src/gladvent/internal/cmd/run.gleam @@ -162,8 +162,8 @@ fn gleam_err_to_string(g: GleamErr) -> String { "at line", int.to_string(g.line), g.value - |> option.map(fn(val) { "with value " <> string.inspect(val) }) - |> option.unwrap(""), + |> option.map(fn(val) { "with value " <> string.inspect(val) }) + |> option.unwrap(""), ], " ", ) diff --git a/src/gladvent/internal/runners.gleam b/src/gladvent/internal/runners.gleam index df9a332..782a336 100644 --- a/src/gladvent/internal/runners.gleam +++ b/src/gladvent/internal/runners.gleam @@ -139,8 +139,8 @@ pub fn get_day( use runner_param_type <- result.try(case parse { Error(Nil) -> Ok(string) - Ok(package_interface.Function(parameters: [param], return: return, ..)) if param.type_ == string -> - Ok(return) + Ok(package_interface.Function(parameters: [param], return: return, ..)) if param.type_ + == string -> Ok(return) _ -> Error(ParseFunctionInvalid( "parse function must have 1 input parameter of type String", @@ -162,8 +162,8 @@ pub fn get_day( pt_1, pt_2, parse - |> result.replace(parse_function(module_name)) - |> option.from_result, + |> result.replace(parse_function(module_name)) + |> option.from_result, )) }