| author | |
| committer | |
| log | d5f3d9ad04713fe889980e05a2a725d5ad4c8b57 |
| tree | 71ff8a72b340f01cb26a4fd6dcc0b82b785b4e7e |
| parent | c04a957c4a5571a2e633e57db3e5c7160df04dc9 |
18 files changed, 61 insertions(+), 72 deletions(-)
.github/workflows/nightly.yml+1-1| ... | ... | @@ -26,7 +26,7 @@ jobs: |
| 26 | 26 | - name: Setup Zig |
| 27 | 27 | uses: goto-bus-stop/setup-zig@v1 |
| 28 | 28 | with: |
| 29 | version: "0.11.0-dev.2777+b95cdf0ae" | |
| 29 | version: "0.11.0-dev.3620+c76ce25a6" | |
| 30 | 30 | |
| 31 | 31 | - run: zig version |
| 32 | 32 | - run: zig env |
.github/workflows/push.yml+1-1| ... | ... | @@ -19,7 +19,7 @@ jobs: |
| 19 | 19 | - name: Setup Zig |
| 20 | 20 | uses: goto-bus-stop/setup-zig@v1 |
| 21 | 21 | with: |
| 22 | version: "0.11.0-dev.2777+b95cdf0ae" | |
| 22 | version: "0.11.0-dev.3620+c76ce25a6" | |
| 23 | 23 | |
| 24 | 24 | - run: zig version |
| 25 | 25 | - run: zig env |
README.md+1-1| ... | ... | @@ -17,7 +17,7 @@ A package manager for the Zig programming language. |
| 17 | 17 | - https://github.com/nektro/zigmod/releases |
| 18 | 18 | |
| 19 | 19 | ## Built With |
| 20 | - Zig master (at least `0.11.0-dev.2777+b95cdf0ae`) | |
| 20 | - Zig master (at least `0.11.0-dev.3620+c76ce25a6`) | |
| 21 | 21 | - See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock) |
| 22 | 22 | |
| 23 | 23 | ### Build from Source |
deps.zig+14-21| ... | ... | @@ -57,18 +57,17 @@ pub fn fetch(exe: *std.build.LibExeObjStep) void { |
| 57 | 57 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/MasterQ32/zig-uri", "d4299ad6043ad19f2ce0676687b0bff57273eae2").step); |
| 58 | 58 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/marlersoft/zigwin32", "b70e7f818d77a0c0f39b0bd9c549e16439ff5780").step); |
| 59 | 59 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/arqv-ini", "ee395fd34e152d9067def609d86b7af5382b83b1").step); |
| 60 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/iguanaTLS", "9356ff1d2edf627b531a2829a679a7b6d908a6ca").step); | |
| 60 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/iguanaTLS", "e70995575b397f33d798339d4f1656bcdf0ab82f").step); | |
| 61 | 61 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-ansi", "faf9585bfe5980c24748ee8a3e6a22faaa50b437").step); |
| 62 | 62 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-detect-license", "8f13721bd18c0e546841b6f2e11da839550d6287").step); |
| 63 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "a74468be60283e66e9b20388372394b54219d6b0").step); | |
| 63 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-extras", "ff267312e8d714c9b9d8c44ad3291f6e509dc12f").step); | |
| 64 | 64 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-inquirer", "5cc2a5565d04fe2c0085f0d6818590e800d9dcf7").step); |
| 65 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-json", "b0111b41d725682629b7f899b90500ddad3818bf").step); | |
| 66 | 65 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "550cabd5a18ace5e67761bc5b867c10e926f4314").step); |
| 67 | 66 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "c9b8cbf3565675a056ad4e9b57cb4f84020e7680").step); |
| 68 | 67 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "3c07c6e4eb0965dafd0b029c632f823631b3169c").step); |
| 69 | 68 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-range", "4b2f12808aa09be4b27a163efc424dd4e0415992").step); |
| 70 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "6094c777eb7b7fbadbf5102f3872d3ad0a2a630e").step); | |
| 71 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "3f3641e90697546e7f8aeef365815c4ccab168b0").step); | |
| 69 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8").step); | |
| 70 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9").step); | |
| 72 | 71 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/hzzp", "501386e13b2f7849128f3b271d23de6127b1d9d7").step); |
| 73 | 72 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/zfetch", "829973144f680cd16be16923041fa810c1dee417").step); |
| 74 | 73 | exe.step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "d13ba6137084e55f873f6afb67447fe8906cc951").step); |
| ... | ... | @@ -158,7 +157,7 @@ pub const Package = struct { |
| 158 | 157 | }; |
| 159 | 158 | |
| 160 | 159 | fn checkMinZig(current: std.SemanticVersion, exe: *std.build.LibExeObjStep) void { |
| 161 | const min = std.SemanticVersion.parse("0.11.0-dev.2777+b95cdf0ae") catch return; | |
| 160 | const min = std.SemanticVersion.parse("0.11.0-dev.3620+c76ce25a6") catch return; | |
| 162 | 161 | if (current.order(min).compare(.lt)) @panic(exe.step.owner.fmt("Your Zig version v{} does not meet the minimum build requirement of v{}", .{current, min})); |
| 163 | 162 | } |
| 164 | 163 | |
| ... | ... | @@ -179,9 +178,9 @@ pub const package_data = struct { |
| 179 | 178 | .entry = "/git/github.com/nektro/arqv-ini/ee395fd34e152d9067def609d86b7af5382b83b1/src/ini.zig", |
| 180 | 179 | }; |
| 181 | 180 | pub var _csbnipaad8n7 = Package{ |
| 182 | .store = "/git/github.com/nektro/iguanaTLS/9356ff1d2edf627b531a2829a679a7b6d908a6ca", | |
| 181 | .store = "/git/github.com/nektro/iguanaTLS/e70995575b397f33d798339d4f1656bcdf0ab82f", | |
| 183 | 182 | .name = "iguanaTLS", |
| 184 | .entry = "/git/github.com/nektro/iguanaTLS/9356ff1d2edf627b531a2829a679a7b6d908a6ca/src/main.zig", | |
| 183 | .entry = "/git/github.com/nektro/iguanaTLS/e70995575b397f33d798339d4f1656bcdf0ab82f/src/main.zig", | |
| 185 | 184 | }; |
| 186 | 185 | pub var _s84v9o48ucb0 = Package{ |
| 187 | 186 | .store = "/git/github.com/nektro/zig-ansi/faf9585bfe5980c24748ee8a3e6a22faaa50b437", |
| ... | ... | @@ -189,15 +188,9 @@ pub const package_data = struct { |
| 189 | 188 | .entry = "/git/github.com/nektro/zig-ansi/faf9585bfe5980c24748ee8a3e6a22faaa50b437/src/lib.zig", |
| 190 | 189 | }; |
| 191 | 190 | pub var _f7dubzb7cyqe = Package{ |
| 192 | .store = "/git/github.com/nektro/zig-extras/a74468be60283e66e9b20388372394b54219d6b0", | |
| 191 | .store = "/git/github.com/nektro/zig-extras/ff267312e8d714c9b9d8c44ad3291f6e509dc12f", | |
| 193 | 192 | .name = "extras", |
| 194 | .entry = "/git/github.com/nektro/zig-extras/a74468be60283e66e9b20388372394b54219d6b0/src/lib.zig", | |
| 195 | }; | |
| 196 | pub var _ocmr9rtohgcc = Package{ | |
| 197 | .store = "/git/github.com/nektro/zig-json/b0111b41d725682629b7f899b90500ddad3818bf", | |
| 198 | .name = "json", | |
| 199 | .entry = "/git/github.com/nektro/zig-json/b0111b41d725682629b7f899b90500ddad3818bf/src/lib.zig", | |
| 200 | .deps = &[_]*Package{ &_f7dubzb7cyqe }, | |
| 193 | .entry = "/git/github.com/nektro/zig-extras/ff267312e8d714c9b9d8c44ad3291f6e509dc12f/src/lib.zig", | |
| 201 | 194 | }; |
| 202 | 195 | pub var _0npcrzfdlrvk = Package{ |
| 203 | 196 | .store = "/git/github.com/nektro/zig-licenses/c9b8cbf3565675a056ad4e9b57cb4f84020e7680", |
| ... | ... | @@ -233,15 +226,15 @@ pub const package_data = struct { |
| 233 | 226 | .deps = &[_]*Package{ &_pt88y5d80m25, &_96h80ezrvj7i }, |
| 234 | 227 | }; |
| 235 | 228 | pub var _iecwp4b3bsfm = Package{ |
| 236 | .store = "/git/github.com/nektro/zig-time/6094c777eb7b7fbadbf5102f3872d3ad0a2a630e", | |
| 229 | .store = "/git/github.com/nektro/zig-time/ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8", | |
| 237 | 230 | .name = "time", |
| 238 | .entry = "/git/github.com/nektro/zig-time/6094c777eb7b7fbadbf5102f3872d3ad0a2a630e/time.zig", | |
| 231 | .entry = "/git/github.com/nektro/zig-time/ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8/time.zig", | |
| 239 | 232 | .deps = &[_]*Package{ &_f7dubzb7cyqe }, |
| 240 | 233 | }; |
| 241 | 234 | pub var _g982zq6e8wsv = Package{ |
| 242 | .store = "/git/github.com/nektro/zig-yaml/3f3641e90697546e7f8aeef365815c4ccab168b0", | |
| 235 | .store = "/git/github.com/nektro/zig-yaml/e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9", | |
| 243 | 236 | .name = "yaml", |
| 244 | .entry = "/git/github.com/nektro/zig-yaml/3f3641e90697546e7f8aeef365815c4ccab168b0/yaml.zig", | |
| 237 | .entry = "/git/github.com/nektro/zig-yaml/e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9/yaml.zig", | |
| 245 | 238 | .deps = &[_]*Package{ &_f7dubzb7cyqe }, |
| 246 | 239 | }; |
| 247 | 240 | pub var _9k24gimke1an = Package{ |
| ... | ... | @@ -263,7 +256,7 @@ pub const package_data = struct { |
| 263 | 256 | pub var _89ujp8gq842x = Package{ |
| 264 | 257 | .name = "zigmod", |
| 265 | 258 | .entry = "/../..//src/lib.zig", |
| 266 | .deps = &[_]*Package{ &_g982zq6e8wsv, &_s84v9o48ucb0, &_2ta738wrqbaq, &_0npcrzfdlrvk, &_ejw82j2ipa0e, &_ocmr9rtohgcc, &_2ovav391ivak, &_c1xirp1ota5p, &_u7sysdckdymi, &_iecwp4b3bsfm, &_f7dubzb7cyqe }, | |
| 259 | .deps = &[_]*Package{ &_g982zq6e8wsv, &_s84v9o48ucb0, &_2ta738wrqbaq, &_0npcrzfdlrvk, &_ejw82j2ipa0e, &_2ovav391ivak, &_c1xirp1ota5p, &_u7sysdckdymi, &_iecwp4b3bsfm, &_f7dubzb7cyqe }, | |
| 267 | 260 | }; |
| 268 | 261 | pub var _root = Package{ |
| 269 | 262 | }; |
docs/README.md+1-1| ... | ... | @@ -10,7 +10,7 @@ The rest of this documentation will assume you already have Zig installed. |
| 10 | 10 | |
| 11 | 11 | As Zig is still in development itself, if you plan to contribute to Zigmod you will need a master download of Zig. Those can be obtained from https://ziglang.org/download/#release-master. |
| 12 | 12 | |
| 13 | The earliest Zig release this Zigmod was verified to work with is `0.11.0-dev.2777+b95cdf0ae`. | |
| 13 | The earliest Zig release this Zigmod was verified to work with is `0.11.0-dev.3620+c76ce25a6`. | |
| 14 | 14 | |
| 15 | 15 | ## Download |
| 16 | 16 | You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source. |
licenses.txt-1| ... | ... | @@ -9,7 +9,6 @@ MIT: |
| 9 | 9 | - git https://github.com/nektro/zig-detect-license |
| 10 | 10 | - git https://github.com/nektro/zig-extras |
| 11 | 11 | - git https://github.com/nektro/zig-inquirer |
| 12 | - git https://github.com/nektro/zig-json | |
| 13 | 12 | - git https://github.com/nektro/zig-leven |
| 14 | 13 | - git https://github.com/nektro/zig-licenses |
| 15 | 14 | - git https://github.com/nektro/zig-licenses-text |
src/cmd/aq.zig+5-5| ... | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const string = []const u8; |
| 3 | 3 | const gpa = std.heap.c_allocator; |
| 4 | 4 | const zfetch = @import("zfetch"); |
| 5 | const json = @import("json"); | |
| 5 | const extras = @import("extras"); | |
| 6 | 6 | |
| 7 | 7 | const u = @import("./../util/index.zig"); |
| 8 | 8 | |
| ... | ... | @@ -43,7 +43,7 @@ pub fn execute(args: [][]u8) !void { |
| 43 | 43 | u.fail("unknown command \"{s}\" for \"zigmod aq\"", .{args[0]}); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | pub fn server_fetch(url: string) !json.Value { | |
| 46 | pub fn server_fetch(url: string) !std.json.ValueTree { | |
| 47 | 47 | const req = try zfetch.Request.init(gpa, url, null); |
| 48 | 48 | defer req.deinit(); |
| 49 | 49 | |
| ... | ... | @@ -55,10 +55,10 @@ pub fn server_fetch(url: string) !json.Value { |
| 55 | 55 | |
| 56 | 56 | const r = req.reader(); |
| 57 | 57 | const body_content = try r.readAllAlloc(gpa, std.math.maxInt(usize)); |
| 58 | const val = try json.parse(gpa, body_content); | |
| 58 | const val = try extras.parse_json(gpa, body_content); | |
| 59 | 59 | |
| 60 | if (val.getT("message", .String)) |msg| { | |
| 61 | std.log.err("server: {s}", .{msg}); | |
| 60 | if (val.root.object.get("message")) |msg| { | |
| 61 | std.log.err("server: {s}", .{msg.string}); | |
| 62 | 62 | return error.AquilaBadResponse; |
| 63 | 63 | } |
| 64 | 64 | return val; |
src/cmd/aquila/add.zig+2-2| ... | ... | @@ -19,8 +19,8 @@ pub fn do(dir: std.fs.Dir, pkg_id: string) !string { |
| 19 | 19 | const val = try aq.server_fetch(url); |
| 20 | 20 | |
| 21 | 21 | const pkg_url = try std.fmt.allocPrint(gpa, "https://{s}/{s}", .{ |
| 22 | val.getT(.{ "repo", "domain" }, .String).?, | |
| 23 | val.getT(.{ "package", "remote_name" }, .String).?, | |
| 22 | val.root.object.get("repo").?.object.get("domain").?.string, | |
| 23 | val.root.object.get("package").?.object.get("remote_name").?.string, | |
| 24 | 24 | }); |
| 25 | 25 | |
| 26 | 26 | const m = try zigmod.ModFile.from_dir(gpa, dir); |
src/cmd/fetch.zig+1-1| ... | ... | @@ -165,7 +165,7 @@ fn create_lockfile(alloc: std.mem.Allocator, list: *std.ArrayList(zigmod.Module) |
| 165 | 165 | const fl = try dir.createFile("zigmod.lock", .{}); |
| 166 | 166 | defer fl.close(); |
| 167 | 167 | |
| 168 | std.sort.sort(zigmod.Module, list.items, {}, zigmod.Module.lessThan); | |
| 168 | std.mem.sort(zigmod.Module, list.items, {}, zigmod.Module.lessThan); | |
| 169 | 169 | |
| 170 | 170 | const wl = fl.writer(); |
| 171 | 171 | try wl.writeAll("2\n"); |
src/cmd/generate.zig+1-1| ... | ... | @@ -26,7 +26,7 @@ pub fn execute(args: [][]u8) !void { |
| 26 | 26 | var list = std.ArrayList(zigmod.Module).init(gpa); |
| 27 | 27 | try common.collect_pkgs(top_module, &list); |
| 28 | 28 | |
| 29 | std.sort.sort(zigmod.Module, list.items, {}, zigmod.Module.lessThan); | |
| 29 | std.mem.sort(zigmod.Module, list.items, {}, zigmod.Module.lessThan); | |
| 30 | 30 | |
| 31 | 31 | try create_depszig(gpa, cachepath, dir, top_module, list.items); |
| 32 | 32 | } |
src/cmd/license.zig+1-1| ... | ... | @@ -29,7 +29,7 @@ pub fn execute(args: [][]u8) !void { |
| 29 | 29 | var master_list = List.init(gpa); |
| 30 | 30 | errdefer master_list.deinit(); |
| 31 | 31 | try common.collect_pkgs(top_module, &master_list); |
| 32 | std.sort.sort(zigmod.Module, master_list.items, {}, zigmod.Module.lessThan); | |
| 32 | std.mem.sort(zigmod.Module, master_list.items, {}, zigmod.Module.lessThan); | |
| 33 | 33 | |
| 34 | 34 | var map = Map.init(gpa); |
| 35 | 35 | errdefer map.deinit(); |
src/cmd/zpm.zig+20-21| ... | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const string = []const u8; |
| 3 | 3 | const gpa = std.heap.c_allocator; |
| 4 | 4 | const zfetch = @import("zfetch"); |
| 5 | const json = @import("json"); | |
| 5 | const extras = @import("extras"); | |
| 6 | 6 | |
| 7 | 7 | const u = @import("./../util/index.zig"); |
| 8 | 8 | |
| ... | ... | @@ -55,14 +55,13 @@ pub fn execute(args: [][]u8) !void { |
| 55 | 55 | u.fail("unknown command \"{s}\" for \"zigmod zpm\"", .{args[0]}); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | pub fn server_fetch(url: string) !json.Value { | |
| 58 | pub fn server_fetch(url: string) !std.json.ValueTree { | |
| 59 | 59 | const req = try zfetch.Request.init(gpa, url, null); |
| 60 | 60 | defer req.deinit(); |
| 61 | 61 | try req.do(.GET, null, null); |
| 62 | 62 | const r = req.reader(); |
| 63 | 63 | const body_content = try r.readAllAlloc(gpa, std.math.maxInt(usize)); |
| 64 | const val = try json.parse(gpa, body_content); | |
| 65 | return val; | |
| 64 | return extras.parse_json(gpa, body_content); | |
| 66 | 65 | } |
| 67 | 66 | |
| 68 | 67 | pub fn server_fetchArray(url: string) ![]const Package { |
| ... | ... | @@ -70,39 +69,39 @@ pub fn server_fetchArray(url: string) ![]const Package { |
| 70 | 69 | var list = std.ArrayList(Package).init(gpa); |
| 71 | 70 | errdefer list.deinit(); |
| 72 | 71 | |
| 73 | for (val.Array) |item| { | |
| 74 | if (item.getT("root_file", .String) == null) continue; | |
| 72 | for (val.root.array.items) |item| { | |
| 73 | if (item.object.get("root_file") == null) continue; | |
| 75 | 74 | try list.append(Package{ |
| 76 | .name = item.getT("name", .String).?, | |
| 77 | .author = item.getT("author", .String).?, | |
| 78 | .description = item.getT("description", .String).?, | |
| 79 | .tags = try valueStrArray(item.getT("tags", .Array).?), | |
| 80 | .git = item.getT("git", .String).?, | |
| 81 | .root_file = item.getT("root_file", .String).?, | |
| 82 | .source = @intCast(u32, item.getT("source", .Int).?), | |
| 83 | .links = try valueLinks(item.get("links").?), | |
| 75 | .name = item.object.get("name").?.string, | |
| 76 | .author = item.object.get("author").?.string, | |
| 77 | .description = item.object.get("description").?.string, | |
| 78 | .tags = try valueStrArray(item.object.get("tags").?.array.items), | |
| 79 | .git = item.object.get("git").?.string, | |
| 80 | .root_file = item.object.get("root_file").?.string, | |
| 81 | .source = @intCast(u32, item.object.get("source").?.integer), | |
| 82 | .links = try valueLinks(item.object.get("links").?), | |
| 84 | 83 | }); |
| 85 | 84 | } |
| 86 | 85 | return list.toOwnedSlice(); |
| 87 | 86 | } |
| 88 | 87 | |
| 89 | fn valueStrArray(vals: []json.Value) ![]string { | |
| 88 | fn valueStrArray(vals: []std.json.Value) ![]string { | |
| 90 | 89 | var list = std.ArrayList(string).init(gpa); |
| 91 | 90 | errdefer list.deinit(); |
| 92 | 91 | |
| 93 | 92 | for (vals) |item| { |
| 94 | if (item != .String) continue; | |
| 95 | try list.append(item.String); | |
| 93 | if (item != .string) continue; | |
| 94 | try list.append(item.string); | |
| 96 | 95 | } |
| 97 | 96 | return list.toOwnedSlice(); |
| 98 | 97 | } |
| 99 | 98 | |
| 100 | fn valueLinks(vals: json.Value) ![]?string { | |
| 99 | fn valueLinks(vals: std.json.Value) ![]?string { | |
| 101 | 100 | var list = std.ArrayList(?string).init(gpa); |
| 102 | 101 | errdefer list.deinit(); |
| 103 | 102 | |
| 104 | try list.append(vals.getT("github", .String)); | |
| 105 | try list.append(vals.getT("aquila", .String)); | |
| 106 | try list.append(vals.getT("astrolabe", .String)); | |
| 103 | if (vals.object.get("github")) |x| try list.append(x.string); | |
| 104 | if (vals.object.get("aquila")) |x| try list.append(x.string); | |
| 105 | if (vals.object.get("astrolabe")) |x| try list.append(x.string); | |
| 107 | 106 | return list.toOwnedSlice(); |
| 108 | 107 | } |
src/cmd/zpm/tags.zig+5-5| ... | ... | @@ -17,8 +17,8 @@ pub fn execute(args: [][]u8) !void { |
| 17 | 17 | |
| 18 | 18 | const name_col_width = blk: { |
| 19 | 19 | var w: usize = 4; |
| 20 | for (val.Array) |tag| { | |
| 21 | const len = tag.getT("name", .String).?.len; | |
| 20 | for (val.root.array.items) |tag| { | |
| 21 | const len = tag.object.get("name").?.string.len; | |
| 22 | 22 | if (len > w) { |
| 23 | 23 | w = len; |
| 24 | 24 | } |
| ... | ... | @@ -30,11 +30,11 @@ pub fn execute(args: [][]u8) !void { |
| 30 | 30 | try print_c_n(out, ' ', name_col_width - 4); |
| 31 | 31 | try out.writeAll("DESCRIPTION\n"); |
| 32 | 32 | |
| 33 | for (val.Array) |tag| { | |
| 34 | const name = tag.getT("name", .String).?; | |
| 33 | for (val.root.array.items) |tag| { | |
| 34 | const name = tag.object.get("name").?.string; | |
| 35 | 35 | try out.writeAll(name); |
| 36 | 36 | try print_c_n(out, ' ', name_col_width - name.len); |
| 37 | try out.writeAll(tag.getT("description", .String).?); | |
| 37 | try out.writeAll(tag.object.get("description").?.string); | |
| 38 | 38 | try out.writeAll("\n"); |
| 39 | 39 | } |
| 40 | 40 | } |
src/common.zig+1-1| ... | ... | @@ -297,7 +297,7 @@ pub fn add_files_package(alloc: std.mem.Allocator, cachepath: string, pkg_name: |
| 297 | 297 | var walker = try dir.walk(alloc); |
| 298 | 298 | defer walker.deinit(); |
| 299 | 299 | while (try walker.next()) |p| { |
| 300 | if (p.kind == .Directory) { | |
| 300 | if (p.kind == .directory) { | |
| 301 | 301 | continue; |
| 302 | 302 | } |
| 303 | 303 | const path = try alloc.dupe(u8, p.path); |
src/util/funcs.zig+1-1| ... | ... | @@ -53,7 +53,7 @@ pub fn does_folder_exist(fpath: string) !bool { |
| 53 | 53 | }; |
| 54 | 54 | defer file.close(); |
| 55 | 55 | const s = try file.stat(); |
| 56 | if (s.kind != .Directory) { | |
| 56 | if (s.kind != .directory) { | |
| 57 | 57 | return false; |
| 58 | 58 | } |
| 59 | 59 | return true; |
src/util/module.zig+1-1| ... | ... | @@ -74,7 +74,7 @@ pub const Module = struct { |
| 74 | 74 | try file_list_2.append(_b); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | std.sort.sort(string, file_list_2.items, void{}, struct { | |
| 77 | std.mem.sort(string, file_list_2.items, void{}, struct { | |
| 78 | 78 | pub fn lt(context: void, lhs: string, rhs: string) bool { |
| 79 | 79 | _ = context; |
| 80 | 80 | return std.mem.lessThan(u8, lhs, rhs); |
zig.mod+1-2| ... | ... | @@ -3,14 +3,13 @@ name: zigmod |
| 3 | 3 | main: src/lib.zig |
| 4 | 4 | license: MIT |
| 5 | 5 | description: A package manager for the Zig programming language. |
| 6 | min_zig_version: 0.11.0-dev.2777+b95cdf0ae | |
| 6 | min_zig_version: 0.11.0-dev.3620+c76ce25a6 | |
| 7 | 7 | dependencies: |
| 8 | 8 | - src: git https://github.com/nektro/zig-yaml |
| 9 | 9 | - src: git https://github.com/nektro/zig-ansi |
| 10 | 10 | - src: git https://github.com/ziglibs/known-folders |
| 11 | 11 | - src: git https://github.com/nektro/zig-licenses |
| 12 | 12 | - src: git https://github.com/truemedian/zfetch |
| 13 | - src: git https://github.com/nektro/zig-json | |
| 14 | 13 | - src: git https://github.com/nektro/zig-detect-license |
| 15 | 14 | - src: git https://github.com/nektro/zig-inquirer |
| 16 | 15 | - src: git https://github.com/nektro/arqv-ini |
zigmod.lock+4-5| ... | ... | @@ -2,18 +2,17 @@ |
| 2 | 2 | git https://github.com/MasterQ32/zig-uri commit-d4299ad6043ad19f2ce0676687b0bff57273eae2 |
| 3 | 3 | git https://github.com/marlersoft/zigwin32 commit-b70e7f818d77a0c0f39b0bd9c549e16439ff5780 |
| 4 | 4 | git https://github.com/nektro/arqv-ini commit-ee395fd34e152d9067def609d86b7af5382b83b1 |
| 5 | git https://github.com/nektro/iguanaTLS commit-9356ff1d2edf627b531a2829a679a7b6d908a6ca | |
| 5 | git https://github.com/nektro/iguanaTLS commit-e70995575b397f33d798339d4f1656bcdf0ab82f | |
| 6 | 6 | git https://github.com/nektro/zig-ansi commit-faf9585bfe5980c24748ee8a3e6a22faaa50b437 |
| 7 | 7 | git https://github.com/nektro/zig-detect-license commit-8f13721bd18c0e546841b6f2e11da839550d6287 |
| 8 | git https://github.com/nektro/zig-extras commit-a74468be60283e66e9b20388372394b54219d6b0 | |
| 8 | git https://github.com/nektro/zig-extras commit-ff267312e8d714c9b9d8c44ad3291f6e509dc12f | |
| 9 | 9 | git https://github.com/nektro/zig-inquirer commit-5cc2a5565d04fe2c0085f0d6818590e800d9dcf7 |
| 10 | git https://github.com/nektro/zig-json commit-b0111b41d725682629b7f899b90500ddad3818bf | |
| 11 | 10 | git https://github.com/nektro/zig-leven commit-550cabd5a18ace5e67761bc5b867c10e926f4314 |
| 12 | 11 | git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f84020e7680 |
| 13 | 12 | git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c |
| 14 | 13 | git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e0415992 |
| 15 | git https://github.com/nektro/zig-time commit-6094c777eb7b7fbadbf5102f3872d3ad0a2a630e | |
| 16 | git https://github.com/nektro/zig-yaml commit-3f3641e90697546e7f8aeef365815c4ccab168b0 | |
| 14 | git https://github.com/nektro/zig-time commit-ca9c0e6b644d74c1d549cc2c1ee22113aa021bd8 | |
| 15 | git https://github.com/nektro/zig-yaml commit-e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9 | |
| 17 | 16 | git https://github.com/truemedian/hzzp commit-501386e13b2f7849128f3b271d23de6127b1d9d7 |
| 18 | 17 | git https://github.com/truemedian/zfetch commit-829973144f680cd16be16923041fa810c1dee417 |
| 19 | 18 | git https://github.com/ziglibs/known-folders commit-d13ba6137084e55f873f6afb67447fe8906cc951 |