Skip to content

Commit

Permalink
Require Inko 0.17.0 or newer
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickpeterse committed Oct 28, 2024
1 parent 215ddb8 commit 4cd0f80
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ website](https://inko-lang.org/).

## Requirements

- Inko 0.16.0 or newer
- Inko 0.17.0 or newer

## Development

Expand Down
8 changes: 4 additions & 4 deletions inko.pkg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require https://github.com/yorickpeterse/inko-wobsite 0.18.0 0059ab6b2eec4b72d2b94025733ec464688d2d02
require https://github.com/yorickpeterse/inko-wobsite 0.19.0 fa5e47733423aa6a902028e69de5a374a1757377
require https://github.com/yorickpeterse/inko-builder 0.13.0 7a38803e1fcd80e19ad2ea8fd90b9babf70e93a6
require https://github.com/yorickpeterse/inko-markdown 0.20.1 3fd768dc4c2ffdb310fe5190fdb7c2de5760317d
require https://github.com/yorickpeterse/inko-syntax 0.11.0 6ce493b98401f41771000ed05cd16dcee454aaba
require inko 0.16.0
require https://github.com/yorickpeterse/inko-markdown 0.21.0 3726c10b499242cb3febc931a82e35217e2f987a
require https://github.com/yorickpeterse/inko-syntax 0.12.0 517256f97795fea9cab8d188aa2afef2dbe50685
require inko 0.17.0
1 change: 0 additions & 1 deletion src/site/cli/news.inko
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import std.env
import std.fs.file (WriteOnlyFile)
import std.fs.path (Path)
import std.json (Json)
import std.stdio (STDOUT)
import std.time (DateTime)
import wobsite.time (iso_date)
import wobsite.url
Expand Down
3 changes: 0 additions & 3 deletions src/site/cli/packages.inko
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import site.github
import std.env
import std.fmt (fmt)
import std.fs.file (ReadOnlyFile, WriteOnlyFile)
import std.fs.path (Path)
import std.int (Format)
import std.io (Error)
import std.json (Json)
import std.stdio (STDOUT)

let ENV = 'GITHUB_TOKEN'
let QUERY = '
Expand Down
12 changes: 7 additions & 5 deletions src/site/github.inko
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fn get(

root.set('query', Json.String(query))
root.set('variables', Json.Object(vars))
cmd.arguments(
cmd.arguments.append(
[
'-H',
'Content-Type: application/json',
Expand All @@ -49,9 +49,9 @@ fn get(
],
)

cmd.stdin(Stream.Null)
cmd.stdout(Stream.Piped)
cmd.stderr(Stream.Null)
cmd.stdin = Stream.Null
cmd.stdout = Stream.Piped
cmd.stderr = Stream.Null

let child = try cmd.spawn.map_error(fn (e) {
Error.InvalidCommand(e.to_string)
Expand All @@ -68,6 +68,8 @@ fn get(

let stdout = ByteArray.new

try child.stdout.read_all(stdout).map_error(fn (e) { Error.InvalidRead(e) })
try child.stdout.as_mut.get.read_all(stdout).map_error(fn (e) {
Error.InvalidRead(e)
})
Json.parse(stdout).map_error(fn (e) { Error.InvalidJson(e) })
}
2 changes: 0 additions & 2 deletions src/site/layouts.inko
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import markdown.html (Filter, TableOfContents)
import site.examples (Example)
import site.packages (Package)
import site.sponsors (CorporateSponsor, Sponsor)
import std.fs.file (ReadOnlyFile)
import std.io (BufferedReader)
import wobsite (Files, Page)
import wobsite.markdown (Admonitions, SyntaxHighlight)
import wobsite.time (human_readable_date, iso_date)
Expand Down
3 changes: 0 additions & 3 deletions src/site/packages.inko
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import std.fs.file (ReadOnlyFile)
import std.fs.path (Path)
import std.int (Format)
import std.io (Error)
import std.json (Json)
import std.string (ToString)
import std.time (DateTime)
import wobsite.time (parse_date)

fn string(value: ref Json, key: String) -> Result[String, ParseError] {
match value.query.key(key).as_string {
Expand Down

0 comments on commit 4cd0f80

Please sign in to comment.