File tree 7 files changed +22
-8
lines changed
7 files changed +22
-8
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ inputs:
17
17
zig-v8 :
18
18
description : ' zig v8 version to install'
19
19
required : false
20
- default : ' v0.1.18 '
20
+ default : ' v0.1.19 '
21
21
v8 :
22
22
description : ' v8 version to install'
23
23
required : false
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ARG ZIG=0.14.0
5
5
ARG ZIG_MINISIG=RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U
6
6
ARG ARCH=x86_64
7
7
ARG V8=11.1.134
8
- ARG ZIG_V8=v0.1.18
8
+ ARG ZIG_V8=v0.1.19
9
9
10
10
RUN apt-get update -yq && \
11
11
apt-get install -yq xz-utils \
Original file line number Diff line number Diff line change 13
13
.hash = "tigerbeetle_io-0.0.0-ViLgxpyRBAB5BMfIcj3KMXfbJzwARs9uSl8aRy2OXULd" ,
14
14
},
15
15
.v8 = .{
16
- .url = "https://github.com/lightpanda-io/zig-v8-fork/archive/97bcfb61da8c97de1321d677a6727a927a9db9a4 .tar.gz" ,
17
- .hash = "v8-0.0.0-xddH69DoIADZ8YXZ_EIx_tKdQKEoGsgob_3_ZIi0O_nV " ,
16
+ .url = "https://github.com/lightpanda-io/zig-v8-fork/archive/5d46f159ca44535cfb4fccd9d46f719eb7eac5fc .tar.gz" ,
17
+ .hash = "v8-0.0.0-xddH66zuIADu8FcQx2kkczC0yhqBY7LoA08-GRWF_zMA " ,
18
18
},
19
19
//.v8 = .{ .path = "../zig-v8-fork" },
20
20
//.tigerbeetle_io = .{ .path = "../tigerbeetle-io" },
Original file line number Diff line number Diff line change @@ -940,3 +940,14 @@ fn timestamp() u32 {
940
940
const ts = std .posix .clock_gettime (std .posix .CLOCK .MONOTONIC ) catch unreachable ;
941
941
return @intCast (ts .sec );
942
942
}
943
+
944
+ const testing = @import ("../testing.zig" );
945
+ test "Browser" {
946
+ var runner = try testing .jsRunner (testing .tracking_allocator , .{});
947
+ defer runner .deinit ();
948
+
949
+ // this will crash if ICU isn't properly configured / ininitialized
950
+ try runner .testCases (&.{
951
+ .{ "new Intl.DateTimeFormat()" , "[object Intl.DateTimeFormat]" },
952
+ }, .{});
953
+ }
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ pub fn main() !void {
65
65
else = > {},
66
66
}
67
67
68
- const platform = Platform .init ();
68
+ const platform = try Platform .init ();
69
69
defer platform .deinit ();
70
70
71
71
var app = try App .init (alloc , .{
@@ -423,7 +423,7 @@ var test_wg: std.Thread.WaitGroup = .{};
423
423
test "tests:beforeAll" {
424
424
try parser .init ();
425
425
test_wg .startMany (3 );
426
- _ = Platform .init ();
426
+ _ = try Platform .init ();
427
427
428
428
{
429
429
const address = try std .net .Address .parseIp ("127.0.0.1" , 9582 );
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ pub fn main() !void {
118
118
}
119
119
120
120
// initialize VM JS lib.
121
- const platform = Platform .init ();
121
+ const platform = try Platform .init ();
122
122
defer platform .deinit ();
123
123
124
124
// prepare libraries to load on each test case.
Original file line number Diff line number Diff line change @@ -34,7 +34,10 @@ const SCOPE_ARENA_RETAIN = 1024 * 64;
34
34
pub const Platform = struct {
35
35
inner : v8.Platform ,
36
36
37
- pub fn init () Platform {
37
+ pub fn init () ! Platform {
38
+ if (v8 .initV8ICU () == false ) {
39
+ return error .FailedToInitializeICU ;
40
+ }
38
41
const platform = v8 .Platform .initDefault (0 , true );
39
42
v8 .initV8Platform (platform );
40
43
v8 .initV8 ();
You can’t perform that action at this time.
0 commit comments