Skip to content

Commit

Permalink
update-gleeunit-dep
Browse files Browse the repository at this point in the history
  • Loading branch information
inoas committed Jul 10, 2024
1 parent 40698a9 commit 9e186b6
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
deno 1.42.2
erlang 26.2.3
gleam 1.0.0
gleam 1.3.0
nodejs 18.20.2
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 1.1.0

- Updated upstream gleeunit dependency to 1.2.0 (glacier_gleeunit 1.2.1001).

## 1.0.0

- Updates glacier_gleeunit dep to up to date version.
- Updates glacier_gleeunit dependency to up to date version.

## 0.10.0

Expand Down
33 changes: 14 additions & 19 deletions gleam.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
name = "glacier"
version = "1.0.0"
version = "1.1.0"

licences = ["Apache-2.0"]
description = "Glacier brings incremental interactive unit testing to Gleam. It is meant as a drop-in replacement for Gleeunit and depends and wraps a fork of it."
repository = { type = "github", user = "inoas", repo = "glacier" }
# links = [{ title = "Website", href = "https://gleam.run" }]
internal_modules = [
"glacier_demo",
"glacier_demo/*",
]
gleam = "~> 1.0"
internal_modules = ["glacier_demo", "glacier_demo/*"]
gleam = ">= 1.0.0"

[dependencies]
argv = "~> 1.0"
fs = "~> 8.6"
glacier_gleeunit = ">= 1.1.2001 and < 2.0.0"
argv = ">= 1.0.0 and < 2.0.0"
fs = ">= 8.6.0 and < 9.0.0"
glacier_gleeunit = ">= 1.2.1001 and < 2.0.0"
# glacier_gleeunit = { path = "../gleeunit" }
gleam_community_ansi = "~> 1.4"
gleam_community_colour = "~> 1.4"
gleam_stdlib = "~> 0.36 or ~> 1.0"
shellout = "~> 1.6"
simplifile = "~> 1.7"

[dev-dependencies]
gleam_community_ansi = ">= 1.4.0 and < 2.0.0"
gleam_community_colour = ">= 1.4.0 and < 2.0.0"
gleam_stdlib = ">= 0.36.0 and < 2.0.0"
shellout = ">= 1.6.0 and < 2.0.0"
simplifile = ">= 1.7.0 and < 2.0.0"

[javascript.deno]
allow_net = ["deno.land"]
Expand All @@ -31,7 +26,7 @@ allow_run = ["gleam"]

[documentation]
pages = [
{ title = "Changelog", path = "changelog.html", source = "CHANGELOG.md" },
{ title = "Contribute", path = "contribute.html", source = "CONTRIBUTE.md" },
{ title = "Licence", path = "licence.html", source = "LICENCE" },
{ title = "Changelog", path = "changelog.html", source = "CHANGELOG.md" },
{ title = "Contribute", path = "contribute.html", source = "CONTRIBUTE.md" },
{ title = "Licence", path = "licence.html", source = "LICENCE" },
]
24 changes: 12 additions & 12 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ packages = [
{ name = "argv", version = "1.0.2", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "BA1FF0929525DEBA1CE67256E5ADF77A7CDDFE729E3E3F57A5BDCAA031DED09D" },
{ name = "filepath", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "EFB6FF65C98B2A16378ABC3EE2B14124168C0CE5201553DE652E2644DCFDB594" },
{ name = "fs", version = "8.6.1", build_tools = ["rebar3"], requirements = [], otp_app = "fs", source = "hex", outer_checksum = "61EA2BDAEDAE4E2024D0D25C63E44DCCF65622D4402DB4A2DF12868D1546503F" },
{ name = "glacier_gleeunit", version = "1.1.2001", build_tools = ["gleam"], requirements = ["argv", "gleam_stdlib"], otp_app = "glacier_gleeunit", source = "hex", outer_checksum = "57794F5F0D05DCFBC439C78E4EBA24DE655077AEF812092B0CAE16CF13DA8A89" },
{ name = "glacier_gleeunit", version = "1.2.1001", build_tools = ["gleam"], requirements = ["argv", "gleam_stdlib"], otp_app = "glacier_gleeunit", source = "hex", outer_checksum = "F63ABBCE21DDBB0410B1365756BA4F897B504EA567A24462A1BC3291972FC981" },
{ 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.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.36.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "C0D14D807FEC6F8A08A7C9EF8DFDE6AE5C10E40E21325B2B29365965D82EB3D4" },
{ name = "gleam_json", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib", "thoas"], otp_app = "gleam_json", source = "hex", outer_checksum = "9063D14D25406326C0255BDA0021541E797D8A7A12573D849462CAFED459F6EB" },
{ name = "gleam_stdlib", version = "0.39.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "2D7DE885A6EA7F1D5015D1698920C9BAF7241102836CE0C3837A4F160128A9C4" },
{ name = "shellout", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "shellout", source = "hex", outer_checksum = "E2FCD18957F0E9F67E1F497FC9FF57393392F8A9BAEAEA4779541DE7A68DD7E0" },
{ name = "simplifile", version = "1.7.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "1D5DFA3A2F9319EC85825F6ED88B8E449F381B0D55A62F5E61424E748E7DDEB0" },
{ name = "thoas", version = "0.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "4918D50026C073C4AB1388437132C77A6F6F7C8AC43C60C13758CC0ADCE2134E" },
{ name = "thoas", version = "1.2.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "E38697EDFFD6E91BD12CEA41B155115282630075C2A727E7A6B2947F5408B86A" },
]

[requirements]
argv = { version = "~> 1.0" }
fs = { version = "~> 8.6" }
glacier_gleeunit = { version = ">= 1.1.2001 and < 2.0.0" }
gleam_community_ansi = { version = "~> 1.4" }
gleam_community_colour = { version = "~> 1.4" }
gleam_stdlib = { version = "~> 0.36 or ~> 1.0" }
shellout = { version = "~> 1.6" }
simplifile = { version = "~> 1.7" }
argv = { version = ">= 1.0.0 and < 2.0.0" }
fs = { version = ">= 8.6.0 and < 9.0.0" }
glacier_gleeunit = { version = ">= 1.2.1001 and < 2.0.0" }
gleam_community_ansi = { version = ">= 1.4.0 and < 2.0.0" }
gleam_community_colour = { version = ">= 1.4.0 and < 2.0.0" }
gleam_stdlib = { version = ">= 0.36.0 and < 2.0.0" }
shellout = { version = ">= 1.6.0 and < 2.0.0" }
simplifile = { version = ">= 1.7.0 and < 2.0.0" }
28 changes: 14 additions & 14 deletions src/glacier.gleam
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import gleam_community/ansi
import gleam_community/colour
import gleam/io
import gleam/list
import gleam/string
import gleam/string_builder
import gleam_community/ansi
import gleam_community/colour
import gleeunit

/// Lets Gleam switch code based on the current target.
Expand Down Expand Up @@ -196,7 +196,8 @@ fn parse_module_string(
ParseModeSearch, _collected, "\"" ->
parse_module_string(rest_chars, imports, ParseModeInString, "")
// Collecting import keyword: Continue Initial
ParseModeSearch, collected, char if collected == ""
ParseModeSearch, collected, char
if collected == ""
&& char == "i"
|| collected == "i"
&& char == "m"
Expand All @@ -207,18 +208,18 @@ fn parse_module_string(
|| collected == "impo"
&& char == "r"
|| collected == "impor"
&& char == "t" ->
&& char == "t"
->
parse_module_string(
rest_chars,
imports,
ParseModeSearch,
collected <> char,
)
// Found `import` + whitespaceish: Enter Import
ParseModeSearch, "import", char if char == " "
|| char == "\t"
|| char == "\n"
|| char == "\r\n" -> {
ParseModeSearch, "import", char
if char == " " || char == "\t" || char == "\n" || char == "\r\n"
-> {
let #(rest_chars, new_import) =
parse_import_chars(rest_chars, string_builder.new())
let new_import = string_builder.to_string(new_import)
Expand Down Expand Up @@ -281,10 +282,9 @@ fn parse_import_chars(
// Return if \n
["\n", ..rest_chars] -> #(rest_chars, import_module)
// Ignore whitespaces
[char, ..rest_chars] if char == "\t"
|| char == "\r"
|| char == "\n"
|| char == "\r\n" -> parse_import_chars(rest_chars, import_module)
[char, ..rest_chars]
if char == "\t" || char == "\r" || char == "\n" || char == "\r\n"
-> parse_import_chars(rest_chars, import_module)
// Append for any other character
[char, ..rest_chars] ->
parse_import_chars(rest_chars, string_builder.append(import_module, char))
Expand Down Expand Up @@ -407,10 +407,10 @@ fn to_relative_path(absolute_file_path path: String) -> String {
relative_file_name
}

@target(erlang)
import simplifile as file
@target(erlang)
import shellout
@target(erlang)
import simplifile as file

@target(erlang)
fn do_target() -> Target {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import gleeunit/should
import glacier_demo/glacier_demo_module_c
import gleeunit/should

pub fn function_5_test() {
glacier_demo_module_c.function_5()
Expand Down

0 comments on commit 9e186b6

Please sign in to comment.