Skip to content

Commit 0cd85a8

Browse files
committedAug 23, 2024
Pretty (and ohsnap) version bump
1 parent 930f43e commit 0cd85a8

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed
 

‎README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Let me show you its features!
1515
The best way to use `ohsnap` is to install it using the [Zig Build System](https://ziglang.org/learn/build-system/). From your project repo root, use `zig fetch` like this:
1616

1717
```sh
18-
zig fetch --save "https://github.com/mnemnion/ohsnap/archive/refs/tags/v0.3.0.tar.gz"
18+
zig fetch --save "https://github.com/mnemnion/ohsnap/archive/refs/tags/v0.3.1.tar.gz"
1919
```
2020

2121
Then add it to your test artifact like so:
@@ -126,14 +126,14 @@ test "snap with timestamp" {
126126
const oh = OhSnap{};
127127
const with_stamp = StampedStruct.init(
128128
"frobnicate the turbo-encabulator",
129-
37337,
129+
31337,
130130
);
131131
try oh.snap(
132132
@src(),
133133
\\ohsnap.StampedStruct
134134
\\ .message: []const u8
135135
\\ "frobnicate the turbo-encabulator"
136-
\\ .tag: u64 = 37337
136+
\\ .tag: u64 = 31337
137137
\\ .timestamp: isize = 1721501316
138138
,
139139
).expectEqual(with_stamp);
@@ -152,7 +152,7 @@ Simply replace the timestamp like so:
152152
\\ohsnap.StampedStruct
153153
\\ .message: []const u8
154154
\\ "frobnicate the turbo-encabulator"
155-
\\ .tag: u64 = 37337
155+
\\ .tag: u64 = 31337
156156
\\ .timestamp: isize = <^\d+$>
157157
,
158158
).expectEqual(with_stamp);
@@ -167,7 +167,7 @@ Let's say you make a change:
167167
```zig
168168
const with_stamp = StampedStruct.init(
169169
"thoroughly frobnicate the encabulator",
170-
37337,
170+
31337,
171171
);
172172
```
173173

@@ -182,7 +182,7 @@ Since this was an intentional change, we need to update the snap:
182182
\\ohsnap.StampedStruct
183183
\\ .message: []const u8
184184
\\ "frobnicate the turbo-encabulator"
185-
\\ .tag: u64 = 37337
185+
\\ .tag: u64 = 31337
186186
\\ .timestamp: isize = <^\d+$>
187187
,
188188
).expectEqual(with_stamp);
@@ -196,7 +196,7 @@ Once again, through the magic of diffing, `ohsnap` will locate the regexen in th
196196
\\ohsnap.StampedStruct
197197
\\ .message: []const u8
198198
\\ "thoroughly frobnicate the encabulator"
199-
\\ .tag: u64 = 37337
199+
\\ .tag: u64 = 31337
200200
\\ .timestamp: isize = <^\d+$>
201201
,
202202
).expectEqual(with_stamp);

‎build.zig

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub fn build(b: *std.Build) void {
4242
lib_unit_tests.root_module.addImport("diffz", diffz_dep.module("diffz"));
4343
snap_module.addImport("diffz", diffz_dep.module("diffz"));
4444
}
45+
4546
if (b.lazyDependency("mvzr", .{
4647
.target = target,
4748
.optimize = optimize,

‎build.zig.zon

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
// This is a [Semantic Version](https://semver.org/).
1212
// In a future version of Zig it will be used for package deduplication.
13-
.version = "0.2.2",
13+
.version = "0.3.1",
1414

1515
// This field is optional.
1616
// This is currently advisory only; Zig does not yet do anything
@@ -25,8 +25,8 @@
2525

2626
.dependencies = .{
2727
.pretty = .{
28-
.url = "https://github.com/timfayz/pretty/archive/refs/tags/v0.10.2.tar.gz",
29-
.hash = "12201325c0651a8cc167d1d3bd07a71aa3b87b91065d45a64298a3e1d5716d62ed85",
28+
.url = "https://github.com/timfayz/pretty/archive/refs/tags/v0.10.4.tar.gz",
29+
.hash = "1220db3fa6510f1686587aab46ac92a882d4f5a287a20d7b687f654a7b8ce3a0e8d6",
3030
},
3131
.diffz = .{
3232
.url = "https://github.com/mnemnion/diffz/archive/refs/tags/v0.0.4-rc1.tar.gz",

0 commit comments

Comments
 (0)
Please sign in to comment.