From a347eaebbc44444dbbc5fd419b70230eb5324fb3 Mon Sep 17 00:00:00 2001 From: Philip Giuliani Date: Fri, 21 Jun 2024 13:55:18 +0200 Subject: [PATCH] Update dependencies --- .github/workflows/test.yml | 4 ++-- .tool-versions | 4 ++-- src/glubs/internal/timestamp.gleam | 2 +- src/glubs/srt.gleam | 4 ++-- src/glubs/webvtt.gleam | 6 +++--- test/glubs/srt_test.gleam | 4 ++-- test/glubs/webvtt_test.gleam | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a1ea6e..ea77c9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,8 +14,8 @@ jobs: - uses: actions/checkout@v3 - uses: erlef/setup-beam@v1 with: - otp-version: "26.2.2" - gleam-version: "1.0.0-rc2" + otp-version: "27.0" + gleam-version: "1.2.1" rebar3-version: "3" # elixir-version: "1.15.4" - run: gleam deps download diff --git a/.tool-versions b/.tool-versions index 499b2ca..86bb63e 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -gleam 1.0.0-rc2 -erlang 26 +gleam 1.2.1 +erlang 27 diff --git a/src/glubs/internal/timestamp.gleam b/src/glubs/internal/timestamp.gleam index 86c3486..446e5f2 100644 --- a/src/glubs/internal/timestamp.gleam +++ b/src/glubs/internal/timestamp.gleam @@ -1,7 +1,7 @@ +import gleam/int import gleam/result import gleam/string import gleam/string_builder.{type StringBuilder} -import gleam/int // Parses the given string to a timestamp. pub fn parse(input: String, fraction_sep: String) -> Result(Int, Nil) { diff --git a/src/glubs/srt.gleam b/src/glubs/srt.gleam index 2822b3b..0d22558 100644 --- a/src/glubs/srt.gleam +++ b/src/glubs/srt.gleam @@ -1,7 +1,7 @@ -import gleam/string +import gleam/int import gleam/list import gleam/result -import gleam/int +import gleam/string import gleam/string_builder.{type StringBuilder} import glubs/internal/timestamp diff --git a/src/glubs/webvtt.gleam b/src/glubs/webvtt.gleam index 834c780..0815cfe 100644 --- a/src/glubs/webvtt.gleam +++ b/src/glubs/webvtt.gleam @@ -1,7 +1,7 @@ +import gleam/list import gleam/option.{type Option, None, Some} -import gleam/string import gleam/result -import gleam/list +import gleam/string import gleam/string_builder.{type StringBuilder} import glubs/internal/timestamp @@ -46,7 +46,7 @@ pub fn parse(webvtt: String) -> Result(WebVTT, String) { /// Converts a WebVTT type to a string. pub fn to_string(webvtt: WebVTT) -> String { - let assert WebVTT(metadata: metadata, comment: comment, items: items) = webvtt + let WebVTT(metadata: metadata, comment: comment, items: items) = webvtt [ header_to_string(comment), diff --git a/test/glubs/srt_test.gleam b/test/glubs/srt_test.gleam index 5000115..d20b18d 100644 --- a/test/glubs/srt_test.gleam +++ b/test/glubs/srt_test.gleam @@ -1,6 +1,6 @@ -import simplifile -import glubs/srt.{type Srt, Cue, Srt} import gleeunit/should +import glubs/srt.{type Srt, Cue, Srt} +import simplifile pub fn parse_example_test() { let assert Ok(content) = simplifile.read("test/fixtures/example.srt") diff --git a/test/glubs/webvtt_test.gleam b/test/glubs/webvtt_test.gleam index c85541f..871e2ad 100644 --- a/test/glubs/webvtt_test.gleam +++ b/test/glubs/webvtt_test.gleam @@ -1,5 +1,5 @@ -import gleeunit/should import gleam/option.{None, Some} +import gleeunit/should import glubs/webvtt.{Cue, EndTag, Note, StartTag, Style, Text, Timestamp, WebVTT} import simplifile