Skip to content

Commit 3cb9480

Browse files
committed
chore: upgrade gleam version
1 parent b32fe23 commit 3cb9480

10 files changed

Lines changed: 38 additions & 38 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: erlef/setup-beam@v1
1616
with:
1717
otp-version: "26.0.2"
18-
gleam-version: "0.34.0"
18+
gleam-version: "1.1.0-rc3"
1919
rebar3-version: "3"
2020
# elixir-version: "1.15.4"
2121
- run: gleam deps download

src/ast.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import evil.{expect}
12
import gleam/list
23
import gleam/string
34
import request.{type Request}
4-
import evil.{expect}
55

66
pub fn get_import_path_from_mod_name(module_str: String, req: Request) {
77
list.find_map(in: req.module.imports, with: fn(imp) {

src/common.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import justin
21
import gleam/string
2+
import justin
33

44
pub fn decoder_name_of_t(raw_name: String) -> String {
55
let snake_name = justin.snake_case(raw_name)

src/gserde.gleam

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1+
import dot_env/env
2+
import evil.{expect}
3+
import fswalk
4+
import glance
5+
import gleam/bool
16
import gleam/io
27
import gleam/list
3-
import gleam/bool
4-
import gleam/string
58
import gleam/result
6-
import glance
7-
import internal/serializer
8-
import dot_env/env
9+
import gleam/string
910
import internal/deserializer
10-
import simplifile
11+
import internal/serializer
1112
import request.{type Request, Request}
12-
import fswalk
13-
import evil.{expect}
13+
import simplifile
1414

1515
pub fn gen(req: Request) {
1616
let ser =
@@ -106,11 +106,11 @@ pub fn process_single(src_filename: String, is_debug) {
106106
simplifile.write(
107107
to: dest_filename,
108108
contents: [
109-
"import gleam/json",
110-
"import gleam/dynamic",
111-
"import " <> src_module_name,
112-
filecontent,
113-
]
109+
"import gleam/json",
110+
"import gleam/dynamic",
111+
"import " <> src_module_name,
112+
filecontent,
113+
]
114114
|> string.join("\n"),
115115
)
116116
|> result.unwrap(Nil)

src/internal/codegen/modules.gleam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import gleam/list
2-
import gleam/string
32
import gleam/set
4-
import internal/codegen/types.{type GleamType} as t
3+
import gleam/string
54
import internal/codegen/statements.{type GleamStatement} as gens
5+
import internal/codegen/types.{type GleamType} as t
66

77
pub type Mod {
88
Mod(

src/internal/codegen/statements.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import gleam/int.{to_string as to_s}
2-
import gleam/option.{type Option, None, Some}
32
import gleam/list.{map}
3+
import gleam/option.{type Option, None, Some}
44
import gleam/string.{join}
55
import internal/codegen/types.{type GleamType} as t
66

src/internal/deserializer.gleam

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
import common.{decoder_name_of_t}
2+
import evil.{expect}
13
import glance
2-
import internal/codegen/statements as gens
3-
import internal/codegen/types as t
4-
import gleam/string
4+
import gleam/int
5+
import gleam/io
56
import gleam/list
67
import gleam/option
7-
import gleam/io
8-
import gleam/int
9-
import request.{type Request, Request}
10-
import common.{decoder_name_of_t}
8+
import gleam/string
9+
import internal/codegen/statements as gens
10+
import internal/codegen/types as t
1111
import internal/path.{basename}
12-
import evil.{expect}
12+
import request.{type Request, Request}
1313

1414
fn quote(str) {
1515
"\"" <> str <> "\""

src/internal/path.gleam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import gleam/string
21
import gleam/list
32
import gleam/result
3+
import gleam/string
44

55
pub fn basename(path: String) {
66
string.split(path, on: "/")

src/internal/serializer.gleam

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
import ast.{get_import_path_from_mod_name}
12
import evil.{expect}
23
import glance
3-
import internal/codegen/statements as gens
4-
import internal/codegen/modules as genm
5-
import internal/codegen/types as t
6-
import gleam/string
4+
import gleam/int
75
import gleam/list
86
import gleam/option.{None, Some}
9-
import gleam/int
10-
import ast.{get_import_path_from_mod_name}
11-
import request.{Request}
7+
import gleam/string
8+
import internal/codegen/modules as genm
9+
import internal/codegen/statements as gens
10+
import internal/codegen/types as t
1211
import internal/path.{basename}
12+
import request.{Request}
1313

1414
type StmtGenReq {
1515
Stmt(t: t.GleamType, module_path: String, imports: List(String))

test/gserde_test.gleam

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
import gleam/list
2+
import gleam/string
13
import gleeunit
24
import gleeunit/should
3-
import simplifile
4-
import gleam/string
5-
import gleam/list
65
import shellout
6+
import simplifile
77

88
pub fn main() {
99
gleeunit.main()

0 commit comments

Comments
 (0)