Commit Graph

100 Commits

Author SHA1 Message Date
Karl Seguin
20e4261aa7 Support union parameters
There's ambiguity in mapping due to the flexible nature of JavaScript. Hopefully
most types are unambiguous, like a string or am *parser.Node.

We need to "probe" each field to see if it's a possible candidate for the JS
value. On a perfect match, we stop probing and set the appropriate union field.
There are 2 levels of possible matches: candidate and coerce. A "candidate"
match has higher precedence. This is necessary because, in JavaScript, a lot
of things can be coerced to a lot of other, seemingly wrong, things.

For example, say we have this union:

a: i32,
b: bool,

Field `a` is a perfect match for the value 123. And field b is a coerce match
(because, yes, 123 can be coerced to a boolean). So we map it to `a`.

Field `a` is a candidate match for the value 34.2, because float -> int are both
"Numbers" in JavaScript. And field b is a coerce match. So we map it to `a`.

Both field `a` and field `b` are coerce matches for "hello". So we map it to `a`
because it's declared first (this relies on how Zig currently works, but I don't
think the ordering of type declarations is guaranteed, so that's an issue).
2025-05-01 18:31:55 +08:00
Karl Seguin
89fea9b4df initialize ICU
This makes functions like new Intl.DateTimeFormat() not crash.
2025-04-25 13:15:38 +08:00
sjorsdonkers
5026c48805 Update zig-v8 to v0.1.18 2025-04-22 13:49:00 +02:00
Pierre Tachoire
74fa9a6b2b ci: use the demo go runner 2025-04-17 17:57:19 +02:00
Karl Seguin
cda6f89dba work on fixing github workflows 2025-04-15 15:18:06 +08:00
Pierre Tachoire
b176857b8d add bornlex to cla whitelist 2025-04-11 11:14:01 +02:00
Pierre Tachoire
d772eaf4a2 upgrade zig-jsruntime 2025-04-08 17:34:56 +02:00
Pierre Tachoire
c6ad734de0 ci: run wpt classic only on PR 2025-03-31 12:35:34 +02:00
Pierre Tachoire
fbe8086c98 ci: add a browser fetch test 2025-03-31 12:35:29 +02:00
Pierre Tachoire
24d5dfe3c6 Merge pull request #371 from lightpanda-io/ci-wpt-split
Some checks failed
e2e-test / zig build release (push) Has been cancelled
wpt / web platform tests (push) Has been cancelled
wpt / web platform tests json output (push) Has been cancelled
zig-test / zig build dev (push) Has been cancelled
zig-test / zig test (push) Has been cancelled
e2e-test / puppeteer-perf (push) Has been cancelled
e2e-test / demo-scripts (push) Has been cancelled
wpt / perf-fmt (push) Has been cancelled
zig-test / perf-fmt (push) Has been cancelled
nightly build / build-linux-x86_64 (push) Has been cancelled
nightly build / build-linux-aarch64 (push) Has been cancelled
nightly build / build-macos-aarch64 (push) Has been cancelled
nightly build / build-macos-x86_64 (push) Has been cancelled
ci: split wpt wnd wpt-json jobs
2025-03-28 13:39:32 +01:00
Pierre Tachoire
57025f8173 upgrade vendor/zig-js-runtime 2025-03-27 14:28:00 +01:00
Pierre Tachoire
f2565049b8 ci: add Sjors to the cla allow list 2025-03-25 14:40:36 +01:00
Pierre Tachoire
8931506657 ci: use ubuntu 22.04 for x86_64 build 2025-03-22 10:40:50 +01:00
Pierre Tachoire
e79cd58c8f ci: add macos x86_64 nightly build 2025-03-19 17:12:10 +01:00
Pierre Tachoire
0d291f1a36 ci: upgrade zig v8 version 2025-03-19 17:12:05 +01:00
Karl Seguin
21c9dde858 Zig 0.14 compatibility 2025-03-19 16:28:15 +01:00
Karl Seguin
6b83281539 Add navigate telemetry 2025-03-18 08:25:44 +08:00
Pierre Tachoire
9811c5d577 ci: use ubuntu 24.04 2025-03-15 10:24:34 +01:00
Pierre Tachoire
725b48d8aa ci: fix install params for linux 2025-03-15 10:01:46 +01:00
Pierre Tachoire
ade9fa5d0e ci: add linux aarch64 to the nightly build 2025-03-14 14:38:05 +01:00
Pierre Tachoire
f84c4393b9 ci: upgrade zig-v8 version 2025-03-14 14:37:38 +01:00
Pierre Tachoire
fd6aa6e54e ci: add e2e test w/ playwright connection 2025-03-11 09:52:11 +01:00
Pierre Tachoire
a3045c9808 ci: run demo's puppeteer scripts 2025-03-10 15:59:46 +01:00
Karl Seguin
d501cbf765 Make the the short git SHA available within the program 2025-02-26 20:44:44 +08:00
Pierre Tachoire
155559c2c4 ci: increase the max memory value to detect regression 2025-02-26 10:55:19 +01:00
Karl Seguin
734cf243f6 update workflow to launch lightpanda in serve mode 2025-02-22 12:40:47 +08:00
Pierre Tachoire
9401eff297 ci: add unittest execution 2025-02-20 17:10:10 +01:00
Pierre Tachoire
dc1d593019 ci: adjust memory regression max values 2025-02-18 10:57:36 +01:00
Pierre Tachoire
9894cceeaa ci: extract end-to-end test on its own file 2025-02-18 10:52:08 +01:00
Pierre Tachoire
bcedbc845e ci: add puppeteer regression test 2025-02-17 16:39:15 +01:00
Pierre Tachoire
fd7db18221 ci: split wpt and wpt-json jobs 2025-01-22 13:59:14 +01:00
Pierre Tachoire
673e16878d ci: run tests on vendor changes 2025-01-22 13:48:52 +01:00
Pierre Tachoire
d777d77b06 ci: update sig-v8 version 2025-01-13 10:36:52 +01:00
Pierre Tachoire
c95d739347 ci: add test end to end
using puppeteer test from https://github.com/lightpanda-io/demo
2024-12-31 12:01:27 +01:00
Pierre Tachoire
193780a88f cla: add katie-lpd to the allow list
Some checks are pending
wpt / web platform tests (push) Waiting to run
wpt / perf-fmt (push) Blocked by required conditions
zig-test / zig build dev (push) Waiting to run
zig-test / zig build release (push) Waiting to run
zig-test / zig test (push) Waiting to run
zig-test / perf-fmt (push) Blocked by required conditions
2024-12-13 14:33:57 +01:00
Pierre Tachoire
eae21a034e Merge pull request #306 from lightpanda-io/cla
contrib: add CLA signature process
2024-11-26 10:31:17 +01:00
Pierre Tachoire
45c7af9769 ci: remove useless token
The repos are public now, we don't need the token anymore to fetch.
2024-11-26 09:37:40 +01:00
Pierre Tachoire
f9ddd5c368 contrib: add CLA signature process 2024-11-26 09:35:14 +01:00
Francis Bouvier
46d0aa6f9e Remove all references to the name 'browsercore'
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-10-29 22:16:56 +01:00
Francis Bouvier
486c19079a Merge get and server binaires
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-10-18 16:06:23 +02:00
Pierre Tachoire
b281ba7754 ci: use zig-v8 0.1.9 2024-10-22 15:03:01 +02:00
Pierre Tachoire
10994b202b ci: use ubuntu latest for all expect nightly build 2024-10-22 14:27:47 +02:00
Pierre Tachoire
2aeac1bdeb ci: force ubuntu 22.04 for nightly build
To ensure a better compatibility.
2024-10-22 14:27:10 +02:00
Francis Bouvier
8d83dfad45 ci: force ubuntu version (24.04)
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-10-17 10:24:00 +02:00
Pierre Tachoire
e450072f45 ci: add zig v8 version into the cache key 2024-10-16 21:00:44 +02:00
Francis Bouvier
7f08d08a78 Update zig-v8 again
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-10-16 17:54:41 +02:00
Francis Bouvier
462485bfcb Update zig-v8 and zig-js-runtime deps
Signed-off-by: Francis Bouvier <francis@lightpanda.io>
2024-10-16 14:56:04 +02:00
Pierre Tachoire
5dfdedea0e Merge pull request #266 from lightpanda-io/ci-node20
ci: upgrade cache action to node20
2024-09-13 15:04:11 +02:00
Pierre Tachoire
8d89c6053e ci: upgrade cache action to node20 2024-09-13 14:52:06 +02:00
Pierre Tachoire
fd0813fead ci: target cpu x86_64 to improve CPU compat
The `-Dcpu` option force compiling using less CPU's capabilities.
This will improve the binary compatibility with older CPUs.
2024-09-13 14:36:44 +02:00