diff --git a/dev/exemplify/.gitignore b/dev/exemplify/.gitignore deleted file mode 100644 index 599be4e..0000000 --- a/dev/exemplify/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.beam -*.ez -/build -erl_crash.dump diff --git a/dev/exemplify/README.md b/dev/exemplify/README.md deleted file mode 100644 index 83f7a11..0000000 --- a/dev/exemplify/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# exemplify - -Checks or updates a code snippet in the README markdown. - -Currently not generic or descriptive enough to be published, -but leave me a note if you'd want a version of this :) - - -Example, which is auto-updated locally, checked on CI: -```gleam -import exemplify - -pub fn main() { - exemplify.update_or_check() -} -``` diff --git a/dev/exemplify/gleam.toml b/dev/exemplify/gleam.toml deleted file mode 100644 index 4c28e89..0000000 --- a/dev/exemplify/gleam.toml +++ /dev/null @@ -1,22 +0,0 @@ -name = "exemplify" -version = "1.0.0" - -# Fill out these fields if you intend to generate HTML documentation or publish -# your project to the Hex package manager. -# -# description = "" -# licences = ["Apache-2.0"] -# repository = { type = "github", user = "", repo = "" } -# links = [{ title = "Website", href = "" }] -# -# For a full reference of all the available options, you can have a look at -# https://gleam.run/writing-gleam/gleam-toml/. - -[dependencies] -gleam_stdlib = ">= 0.44.0 and < 2.0.0" -simplifile = ">= 2.3.0 and < 3.0.0" -envoy = ">= 1.0.2 and < 2.0.0" -gleam_regexp = ">= 1.1.1 and < 2.0.0" - -[dev-dependencies] -gleeunit = ">= 1.0.0 and < 2.0.0" diff --git a/dev/exemplify/manifest.toml b/dev/exemplify/manifest.toml deleted file mode 100644 index b0ea7ec..0000000 --- a/dev/exemplify/manifest.toml +++ /dev/null @@ -1,18 +0,0 @@ -# This file was generated by Gleam -# You typically do not need to edit this file - -packages = [ - { name = "envoy", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "envoy", source = "hex", outer_checksum = "95FD059345AA982E89A0B6E2A3BF1CF43E17A7048DCD85B5B65D3B9E4E39D359" }, - { name = "filepath", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "B06A9AF0BF10E51401D64B98E4B627F1D2E48C154967DA7AF4D0914780A6D40A" }, - { name = "gleam_regexp", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_regexp", source = "hex", outer_checksum = "9C215C6CA84A5B35BB934A9B61A9A306EC743153BE2B0425A0D032E477B062A9" }, - { name = "gleam_stdlib", version = "0.62.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "DC8872BC0B8550F6E22F0F698CFE7F1E4BDA7312FDEB40D6C3F44C5B706C8310" }, - { name = "gleeunit", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "63022D81C12C17B7F1A60E029964E830A4CBD846BBC6740004FC1F1031AE0326" }, - { name = "simplifile", version = "2.3.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0A868DAC6063D9E983477981839810DC2E553285AB4588B87E3E9C96A7FB4CB4" }, -] - -[requirements] -envoy = { version = ">= 1.0.2 and < 2.0.0" } -gleam_regexp = { version = ">= 1.1.1 and < 2.0.0" } -gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" } -gleeunit = { version = ">= 1.0.0 and < 2.0.0" } -simplifile = { version = ">= 2.3.0 and < 3.0.0" } diff --git a/dev/exemplify/src/exemplify.gleam b/dev/exemplify/src/exemplify.gleam deleted file mode 100644 index 00b74cb..0000000 --- a/dev/exemplify/src/exemplify.gleam +++ /dev/null @@ -1,41 +0,0 @@ -import envoy -import gleam/io -import gleam/option.{Some} -import gleam/regexp -import gleam/string -import simplifile - -pub fn update_or_check() { - let readme_filename = "./README.md" - let assert Ok(readme) = simplifile.read(readme_filename) - let assert Ok(example) = simplifile.read("./test/example.gleam") - let assert Ok(regex) = - regexp.compile( - "^```gleam\\n([\\s\\S]*)^```\\n?", - regexp.Options(case_insensitive: False, multi_line: True), - ) - let assert [match] = regexp.scan(regex, readme) - let assert [snippet] = match.submatches - - case snippet == Some(example) { - True -> Nil - False -> { - case envoy.get("GITHUB_WORKFLOW") { - Error(Nil) -> { - io.println_error("\nUpdating example in README!") - - // If we only replaced the snippet, this wouldn't work for empty snippets, - // so we replace the full match instead. - let with_fences = "```gleam\n" <> example <> "```\n" - assert simplifile.write( - to: readme_filename, - contents: string.replace(readme, match.content, with_fences), - ) - == Ok(Nil) - Nil - } - Ok(_) -> panic as "Example in README was out of date!" - } - } - } -} diff --git a/dev/exemplify/test/example.gleam b/dev/exemplify/test/example.gleam deleted file mode 100644 index 21f1dc9..0000000 --- a/dev/exemplify/test/example.gleam +++ /dev/null @@ -1,5 +0,0 @@ -import exemplify - -pub fn main() { - exemplify.update_or_check() -} diff --git a/dev/exemplify/test/exemplify_test.gleam b/dev/exemplify/test/exemplify_test.gleam deleted file mode 100644 index d37c854..0000000 --- a/dev/exemplify/test/exemplify_test.gleam +++ /dev/null @@ -1,10 +0,0 @@ -import exemplify -import gleeunit - -pub fn main() -> Nil { - gleeunit.main() -} - -pub fn run_test() { - exemplify.update_or_check() -} diff --git a/drift/CHANGELOG.md b/drift/CHANGELOG.md new file mode 100644 index 0000000..e146584 --- /dev/null +++ b/drift/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## Unreleased + +## [1.0.1] - 2025-08-03 + +### Fixed +- Replaces a local dev dependency with one from hex. + This works around a bug that currently makes the LSP misbehave when + browsing the package source. + +## [1.0.0] - 2025-07-19 + +### Added +- Initial release with basic functionality. + +[Unreleased]: https://github.com/sbergen/drift/compare/drift-v1.0.1...HEAD +[1.0.1]: https://github.com/sbergen/drift/releases/tag/drift-v1.0.1 +[1.0.0]: https://github.com/sbergen/drift/releases/tag/v1.0.0 diff --git a/drift/gleam.toml b/drift/gleam.toml index 6c6c5c3..8b818fa 100644 --- a/drift/gleam.toml +++ b/drift/gleam.toml @@ -1,14 +1,21 @@ name = "drift" -version = "1.0.0" +version = "1.0.1" description = """Define pure functional cores in target-agnostic Gleam, \ which can wrapped to run on both the Erlang and JS targets.""" licences = ["Apache-2.0"] repository = { type = "github", user = "sbergen", repo = "drift", path = "drift" } +[documentation] +pages = [ + { title = "Changelog", path = "changelog.html", source = "./CHANGELOG.md" }, +] + [dependencies] gleam_stdlib = ">= 0.44.0 and < 2.0.0" [dev-dependencies] gleeunit = ">= 1.0.0 and < 2.0.0" -exemplify = { path = "../dev/exemplify" } +checkmark = ">= 2.0.0 and < 3.0.0" +simplifile = ">= 2.3.0 and < 3.0.0" +envoy = ">= 1.0.2 and < 2.0.0" diff --git a/drift/manifest.toml b/drift/manifest.toml index c09e9bd..322bdd3 100644 --- a/drift/manifest.toml +++ b/drift/manifest.toml @@ -2,16 +2,18 @@ # You typically do not need to edit this file packages = [ + { name = "checkmark", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "splitter"], otp_app = "checkmark", source = "hex", outer_checksum = "19903CF019FFBA036DB8986EC61C369C93FFA9185D39C0C28681FD524C2C7DF8" }, { name = "envoy", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "envoy", source = "hex", outer_checksum = "95FD059345AA982E89A0B6E2A3BF1CF43E17A7048DCD85B5B65D3B9E4E39D359" }, - { name = "exemplify", version = "1.0.0", build_tools = ["gleam"], requirements = ["envoy", "gleam_regexp", "gleam_stdlib", "simplifile"], source = "local", path = "../dev/exemplify" }, { name = "filepath", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "B06A9AF0BF10E51401D64B98E4B627F1D2E48C154967DA7AF4D0914780A6D40A" }, - { name = "gleam_regexp", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_regexp", source = "hex", outer_checksum = "9C215C6CA84A5B35BB934A9B61A9A306EC743153BE2B0425A0D032E477B062A9" }, { name = "gleam_stdlib", version = "0.62.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "DC8872BC0B8550F6E22F0F698CFE7F1E4BDA7312FDEB40D6C3F44C5B706C8310" }, { name = "gleeunit", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "63022D81C12C17B7F1A60E029964E830A4CBD846BBC6740004FC1F1031AE0326" }, { name = "simplifile", version = "2.3.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0A868DAC6063D9E983477981839810DC2E553285AB4588B87E3E9C96A7FB4CB4" }, + { name = "splitter", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "splitter", source = "hex", outer_checksum = "128FC521EE33B0012E3E64D5B55168586BC1B9C8D7B0D0CA223B68B0D770A547" }, ] [requirements] -exemplify = { path = "../dev/exemplify" } +checkmark = { version = ">= 2.0.0 and < 3.0.0" } +envoy = { version = ">= 1.0.2 and < 2.0.0" } gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" } gleeunit = { version = ">= 1.0.0 and < 2.0.0" } +simplifile = { version = ">= 2.3.0 and < 3.0.0" } diff --git a/drift/test/drift_test.gleam b/drift/test/drift_test.gleam index d5c20fb..bd168d0 100644 --- a/drift/test/drift_test.gleam +++ b/drift/test/drift_test.gleam @@ -1,10 +1,15 @@ -import exemplify +import checkmark +import envoy import gleeunit +import simplifile pub fn main() -> Nil { gleeunit.main() } pub fn check_or_update_readme_test() { - exemplify.update_or_check() + checkmark.new(simplifile.read, simplifile.write) + |> checkmark.file("README.md") + |> checkmark.should_contain_contents_of("test/example.gleam", tagged: "gleam") + |> checkmark.check_or_update(envoy.get("GITHUB_WORKFLOW") == Error(Nil)) } diff --git a/drift_actor/CHANGELOG.md b/drift_actor/CHANGELOG.md index 0b5c07b..d1a0f56 100644 --- a/drift_actor/CHANGELOG.md +++ b/drift_actor/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [2.0.1] - 2025-08-03 + +### Fixed +- Replaces a local dev dependency with one from hex. + This works around a bug that currently makes the LSP misbehave when + browsing the package source. + ## [2.0.0] - 2025-07-20 ### Changed @@ -18,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release with basic functionality. -[Unreleased]: https://github.com/sbergen/drift/compare/drift_actor-v2.0.0...HEAD +[Unreleased]: https://github.com/sbergen/drift/compare/drift_actor-v2.0.1...HEAD +[2.0.1]: https://github.com/sbergen/drift/releases/tag/drift_actor-v2.0.1 [2.0.0]: https://github.com/sbergen/drift/releases/tag/drift_actor-v2.0.0 -[1.0.0]: https://github.com/sbergen/drift/releases/tag/v1.0.0 \ No newline at end of file +[1.0.0]: https://github.com/sbergen/drift/releases/tag/v1.0.0 diff --git a/drift_actor/gleam.toml b/drift_actor/gleam.toml index f5761a4..e9ca914 100644 --- a/drift_actor/gleam.toml +++ b/drift_actor/gleam.toml @@ -1,10 +1,15 @@ name = "drift_actor" -version = "2.0.0" +version = "2.0.1" description = "Run drift steppers as an OTP actor on Erlang." licences = ["Apache-2.0"] repository = { type = "github", user = "sbergen", repo = "drift", path = "drift_actor", tag-prefix = "drift_actor-" } +[documentation] +pages = [ + { title = "Changelog", path = "changelog.html", source = "./CHANGELOG.md" }, +] + [dependencies] gleam_stdlib = ">= 0.60.0 and < 2.0.0" gleam_otp = ">= 1.0.0 and < 2.0.0" @@ -13,4 +18,6 @@ drift = ">= 1.0.0 and < 2.0.0" [dev-dependencies] gleeunit = ">= 1.0.0 and < 2.0.0" -exemplify = { path = "../dev/exemplify" } +checkmark = ">= 2.0.0 and < 3.0.0" +simplifile = ">= 2.3.0 and < 3.0.0" +envoy = ">= 1.0.2 and < 2.0.0" diff --git a/drift_actor/manifest.toml b/drift_actor/manifest.toml index 63fe454..cf9dc61 100644 --- a/drift_actor/manifest.toml +++ b/drift_actor/manifest.toml @@ -2,22 +2,24 @@ # You typically do not need to edit this file packages = [ + { name = "checkmark", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "splitter"], otp_app = "checkmark", source = "hex", outer_checksum = "19903CF019FFBA036DB8986EC61C369C93FFA9185D39C0C28681FD524C2C7DF8" }, { name = "drift", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "drift", source = "hex", outer_checksum = "5820441E6AC2FE454D63ACD233358D05BEF99BB7304A7E44D604C7E8574A9DAE" }, { name = "envoy", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "envoy", source = "hex", outer_checksum = "95FD059345AA982E89A0B6E2A3BF1CF43E17A7048DCD85B5B65D3B9E4E39D359" }, - { name = "exemplify", version = "1.0.0", build_tools = ["gleam"], requirements = ["envoy", "gleam_regexp", "gleam_stdlib", "simplifile"], source = "local", path = "../dev/exemplify" }, { name = "filepath", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "B06A9AF0BF10E51401D64B98E4B627F1D2E48C154967DA7AF4D0914780A6D40A" }, { name = "gleam_erlang", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "F91CE62A2D011FA13341F3723DB7DB118541AAA5FE7311BD2716D018F01EF9E3" }, { name = "gleam_otp", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "7020E652D18F9ABAC9C877270B14160519FA0856EE80126231C505D719AD68DA" }, - { name = "gleam_regexp", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_regexp", source = "hex", outer_checksum = "9C215C6CA84A5B35BB934A9B61A9A306EC743153BE2B0425A0D032E477B062A9" }, { name = "gleam_stdlib", version = "0.62.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "DC8872BC0B8550F6E22F0F698CFE7F1E4BDA7312FDEB40D6C3F44C5B706C8310" }, { name = "gleeunit", version = "1.6.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "63022D81C12C17B7F1A60E029964E830A4CBD846BBC6740004FC1F1031AE0326" }, { name = "simplifile", version = "2.3.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0A868DAC6063D9E983477981839810DC2E553285AB4588B87E3E9C96A7FB4CB4" }, + { name = "splitter", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "splitter", source = "hex", outer_checksum = "128FC521EE33B0012E3E64D5B55168586BC1B9C8D7B0D0CA223B68B0D770A547" }, ] [requirements] +checkmark = { version = ">= 2.0.0 and < 3.0.0" } drift = { version = ">= 1.0.0 and < 2.0.0" } -exemplify = { path = "../dev/exemplify" } +envoy = { version = ">= 1.0.2 and < 2.0.0" } gleam_erlang = { version = ">= 1.0.0 and < 2.0.0" } gleam_otp = { version = ">= 1.0.0 and < 2.0.0" } gleam_stdlib = { version = ">= 0.60.0 and < 2.0.0" } gleeunit = { version = ">= 1.0.0 and < 2.0.0" } +simplifile = { version = ">= 2.3.0 and < 3.0.0" } diff --git a/drift_actor/test/drift_actor_test.gleam b/drift_actor/test/drift_actor_test.gleam index d5c20fb..bd168d0 100644 --- a/drift_actor/test/drift_actor_test.gleam +++ b/drift_actor/test/drift_actor_test.gleam @@ -1,10 +1,15 @@ -import exemplify +import checkmark +import envoy import gleeunit +import simplifile pub fn main() -> Nil { gleeunit.main() } pub fn check_or_update_readme_test() { - exemplify.update_or_check() + checkmark.new(simplifile.read, simplifile.write) + |> checkmark.file("README.md") + |> checkmark.should_contain_contents_of("test/example.gleam", tagged: "gleam") + |> checkmark.check_or_update(envoy.get("GITHUB_WORKFLOW") == Error(Nil)) } diff --git a/drift_js/CHANGELOG b/drift_js/CHANGELOG index 6263979..3632b8b 100644 --- a/drift_js/CHANGELOG +++ b/drift_js/CHANGELOG @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [1.1.0] - 2025-08-03 + +### Fixed +- Replaces a local dev dependency with one from hex. + This works around a bug that currently makes the LSP misbehave when + browsing the package source. + ### Added - Adds the `send_after` function to `runtime`, which allows sending messages with a delay, or scheduling them on the task queue with a delay of zero. @@ -22,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release with basic functionality. -[Unreleased]: https://github.com/sbergen/drift/compare/drift_js-v1.0.1...HEAD +[Unreleased]: https://github.com/sbergen/drift/compare/drift_js-v1.1.0...HEAD +[1.1.0]: https://github.com/sbergen/drift/releases/tag/drift_js-v1.1.0 [1.0.1]: https://github.com/sbergen/drift/releases/tag/drift_js-v1.0.1 -[1.0.0]: https://github.com/sbergen/drift/releases/tag/v1.0.0 \ No newline at end of file +[1.0.0]: https://github.com/sbergen/drift/releases/tag/v1.0.0 diff --git a/drift_js/gleam.toml b/drift_js/gleam.toml index 0952b58..0c572ae 100644 --- a/drift_js/gleam.toml +++ b/drift_js/gleam.toml @@ -1,5 +1,5 @@ name = "drift_js" -version = "1.0.1" +version = "1.1.0" target = "javascript" description = "Run drift steppers on JavaScript targets." @@ -7,6 +7,11 @@ licences = ["Apache-2.0"] repository = { type = "github", user = "sbergen", repo = "drift", path = "drift_js", tag-prefix = "drift_js-" } internal_modules = ["drift/js/internal/*"] +[documentation] +pages = [ + { title = "Changelog", path = "changelog.html", source = "./CHANGELOG.md" }, +] + [dependencies] gleam_stdlib = ">= 0.44.0 and < 2.0.0" gleam_javascript = ">= 1.0.0 and < 2.0.0" @@ -14,4 +19,6 @@ drift = ">= 1.0.0 and < 2.0.0" [dev-dependencies] gleeunit = ">= 1.0.0 and < 2.0.0" -exemplify = { path = "../dev/exemplify" } +checkmark = ">= 2.0.0 and < 3.0.0" +simplifile = ">= 2.3.0 and < 3.0.0" +envoy = ">= 1.0.2 and < 2.0.0" diff --git a/drift_js/manifest.toml b/drift_js/manifest.toml index e15701c..d170164 100644 --- a/drift_js/manifest.toml +++ b/drift_js/manifest.toml @@ -2,20 +2,22 @@ # You typically do not need to edit this file packages = [ + { name = "checkmark", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "splitter"], otp_app = "checkmark", source = "hex", outer_checksum = "19903CF019FFBA036DB8986EC61C369C93FFA9185D39C0C28681FD524C2C7DF8" }, { name = "drift", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "drift", source = "hex", outer_checksum = "5820441E6AC2FE454D63ACD233358D05BEF99BB7304A7E44D604C7E8574A9DAE" }, { name = "envoy", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "envoy", source = "hex", outer_checksum = "95FD059345AA982E89A0B6E2A3BF1CF43E17A7048DCD85B5B65D3B9E4E39D359" }, - { name = "exemplify", version = "1.0.0", build_tools = ["gleam"], requirements = ["envoy", "gleam_regexp", "gleam_stdlib", "simplifile"], source = "local", path = "../dev/exemplify" }, { name = "filepath", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "B06A9AF0BF10E51401D64B98E4B627F1D2E48C154967DA7AF4D0914780A6D40A" }, { name = "gleam_javascript", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_javascript", source = "hex", outer_checksum = "EF6C77A506F026C6FB37941889477CD5E4234FCD4337FF0E9384E297CB8F97EB" }, - { name = "gleam_regexp", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_regexp", source = "hex", outer_checksum = "9C215C6CA84A5B35BB934A9B61A9A306EC743153BE2B0425A0D032E477B062A9" }, { name = "gleam_stdlib", version = "0.59.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "F8FEE9B35797301994B81AF75508CF87C328FE1585558B0FFD188DC2B32EAA95" }, { name = "gleeunit", version = "1.3.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "A7DD6C07B7DA49A6E28796058AA89E651D233B357D5607006D70619CD89DAAAB" }, { name = "simplifile", version = "2.3.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0A868DAC6063D9E983477981839810DC2E553285AB4588B87E3E9C96A7FB4CB4" }, + { name = "splitter", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "splitter", source = "hex", outer_checksum = "128FC521EE33B0012E3E64D5B55168586BC1B9C8D7B0D0CA223B68B0D770A547" }, ] [requirements] +checkmark = { version = ">= 2.0.0 and < 3.0.0" } drift = { version = ">= 1.0.0 and < 2.0.0" } -exemplify = { path = "../dev/exemplify" } +envoy = { version = ">= 1.0.2 and < 2.0.0" } gleam_javascript = { version = ">= 1.0.0 and < 2.0.0" } gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" } gleeunit = { version = ">= 1.0.0 and < 2.0.0" } +simplifile = { version = ">= 2.3.0 and < 3.0.0" } diff --git a/drift_js/test/drift_js_test.gleam b/drift_js/test/drift_js_test.gleam index 6c68a0d..18f6d05 100644 --- a/drift_js/test/drift_js_test.gleam +++ b/drift_js/test/drift_js_test.gleam @@ -1,18 +1,23 @@ +import checkmark import drift.{type Action, type Context, type Effect, type Step} import drift/js/runtime.{ type Runtime, type TerminalResult, CallTimedOut, RuntimeStopped, Terminated, } -import exemplify +import envoy import gleam/javascript/promise.{type Promise, await} import gleam/list import gleeunit +import simplifile pub fn main() -> Nil { gleeunit.main() } pub fn check_or_update_readme_test() { - exemplify.update_or_check() + checkmark.new(simplifile.read, simplifile.write) + |> checkmark.file("README.md") + |> checkmark.should_contain_contents_of("test/example.gleam", tagged: "gleam") + |> checkmark.check_or_update(envoy.get("GITHUB_WORKFLOW") == Error(Nil)) } pub fn run_result_not_terminated_test() -> Promise(Nil) { diff --git a/drift_record/CHANGELOG.md b/drift_record/CHANGELOG.md new file mode 100644 index 0000000..dc6f310 --- /dev/null +++ b/drift_record/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## Unreleased + +## [1.0.1] - 2025-08-03 + +### Fixed +- Replaces a local dev dependency with one from hex. + This works around a bug that currently makes the LSP misbehave when + browsing the package source. + +## [1.0.0] - 2025-07-19 + +### Added +- Initial release with basic functionality. + +[Unreleased]: https://github.com/sbergen/drift/compare/drift_record-v1.0.1...HEAD +[1.0.1]: https://github.com/sbergen/drift/releases/tag/drift_record-v1.0.1 +[1.0.0]: https://github.com/sbergen/drift/releases/tag/v1.0.0 diff --git a/drift_record/gleam.toml b/drift_record/gleam.toml index 9aa81cc..75b0756 100644 --- a/drift_record/gleam.toml +++ b/drift_record/gleam.toml @@ -1,11 +1,16 @@ name = "drift_record" -version = "1.0.0" +version = "1.0.1" description = "Record logs for drift steppers, and use them in snapshot tests." licences = ["Apache-2.0"] repository = { type = "github", user = "sbergen", repo = "drift", path = "drift_js" } internal_modules = ["drift/js/internal/*"] +[documentation] +pages = [ + { title = "Changelog", path = "changelog.html", source = "./CHANGELOG.md" }, +] + [dependencies] gleam_stdlib = ">= 0.44.0 and < 2.0.0" drift = ">= 1.0.0 and < 2.0.0" @@ -13,4 +18,6 @@ drift = ">= 1.0.0 and < 2.0.0" [dev-dependencies] gleeunit = ">= 1.0.0 and < 2.0.0" birdie = ">= 1.3.0 and < 2.0.0" -exemplify = { path = "../dev/exemplify" } +checkmark = ">= 2.0.0 and < 3.0.0" +simplifile = ">= 2.3.0 and < 3.0.0" +envoy = ">= 1.0.2 and < 2.0.0" diff --git a/drift_record/manifest.toml b/drift_record/manifest.toml index 7ca49cf..8d37c74 100644 --- a/drift_record/manifest.toml +++ b/drift_record/manifest.toml @@ -4,10 +4,10 @@ packages = [ { name = "argv", version = "1.0.2", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "BA1FF0929525DEBA1CE67256E5ADF77A7CDDFE729E3E3F57A5BDCAA031DED09D" }, { name = "birdie", version = "1.3.0", build_tools = ["gleam"], requirements = ["argv", "edit_distance", "filepath", "glance", "gleam_community_ansi", "gleam_stdlib", "justin", "rank", "simplifile", "term_size", "trie_again"], otp_app = "birdie", source = "hex", outer_checksum = "425916385B6CD82A58F54CC39605262A524B169746FC9AD9C799BC76E88F7AF3" }, + { name = "checkmark", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "splitter"], otp_app = "checkmark", source = "hex", outer_checksum = "19903CF019FFBA036DB8986EC61C369C93FFA9185D39C0C28681FD524C2C7DF8" }, { name = "drift", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "drift", source = "hex", outer_checksum = "5820441E6AC2FE454D63ACD233358D05BEF99BB7304A7E44D604C7E8574A9DAE" }, { name = "edit_distance", version = "2.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "edit_distance", source = "hex", outer_checksum = "A1E485C69A70210223E46E63985FA1008B8B2DDA9848B7897469171B29020C05" }, { name = "envoy", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "envoy", source = "hex", outer_checksum = "95FD059345AA982E89A0B6E2A3BF1CF43E17A7048DCD85B5B65D3B9E4E39D359" }, - { name = "exemplify", version = "1.0.0", build_tools = ["gleam"], requirements = ["envoy", "gleam_regexp", "gleam_stdlib", "simplifile"], source = "local", path = "../dev/exemplify" }, { name = "filepath", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "B06A9AF0BF10E51401D64B98E4B627F1D2E48C154967DA7AF4D0914780A6D40A" }, { name = "glance", version = "3.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "glexer"], otp_app = "glance", source = "hex", outer_checksum = "F3458292AFB4136CEE23142A8727C1270494E7A96978B9B9F9D2C1618583EF3D" }, { name = "gleam_community_ansi", version = "1.4.3", build_tools = ["gleam"], requirements = ["gleam_community_colour", "gleam_regexp", "gleam_stdlib"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "8A62AE9CC6EA65BEA630D95016D6C07E4F9973565FA3D0DE68DC4200D8E0DD27" }, @@ -20,13 +20,16 @@ packages = [ { name = "justin", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "justin", source = "hex", outer_checksum = "7FA0C6DB78640C6DC5FBFD59BF3456009F3F8B485BF6825E97E1EB44E9A1E2CD" }, { name = "rank", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "rank", source = "hex", outer_checksum = "5660E361F0E49CBB714CC57CC4C89C63415D8986F05B2DA0C719D5642FAD91C9" }, { name = "simplifile", version = "2.3.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0A868DAC6063D9E983477981839810DC2E553285AB4588B87E3E9C96A7FB4CB4" }, + { name = "splitter", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "splitter", source = "hex", outer_checksum = "128FC521EE33B0012E3E64D5B55168586BC1B9C8D7B0D0CA223B68B0D770A547" }, { name = "term_size", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "term_size", source = "hex", outer_checksum = "D00BD2BC8FB3EBB7E6AE076F3F1FF2AC9D5ED1805F004D0896C784D06C6645F1" }, { name = "trie_again", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "trie_again", source = "hex", outer_checksum = "5B19176F52B1BD98831B57FDC97BD1F88C8A403D6D8C63471407E78598E27184" }, ] [requirements] birdie = { version = ">= 1.3.0 and < 2.0.0" } +checkmark = { version = ">= 2.0.0 and < 3.0.0" } drift = { version = ">= 1.0.0 and < 2.0.0" } -exemplify = { path = "../dev/exemplify" } +envoy = { version = ">= 1.0.2 and < 2.0.0" } gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" } gleeunit = { version = ">= 1.0.0 and < 2.0.0" } +simplifile = { version = ">= 2.3.0 and < 3.0.0" } diff --git a/drift_record/test/drift_record_test.gleam b/drift_record/test/drift_record_test.gleam index 326fa6d..92111be 100644 --- a/drift_record/test/drift_record_test.gleam +++ b/drift_record/test/drift_record_test.gleam @@ -1,19 +1,24 @@ import birdie import calculator +import checkmark import drift import drift/record.{discard} import echoer -import exemplify +import envoy import gleam/option.{Some} import gleam/string import gleeunit +import simplifile pub fn main() -> Nil { gleeunit.main() } pub fn check_or_update_readme_test() { - exemplify.update_or_check() + checkmark.new(simplifile.read, simplifile.write) + |> checkmark.file("README.md") + |> checkmark.should_contain_contents_of("test/example.gleam", tagged: "gleam") + |> checkmark.check_or_update(envoy.get("GITHUB_WORKFLOW") == Error(Nil)) } pub fn small_time_advance_test() {