layouts
All repositories: gitoria
1.9 KB
// plugins/time/tests/parity.mjs — client.js (the browser half) against the native plugin.// node plugins/time/tests/parity.mjs// Runs parity.hl natively and the same calls through client.js in Node (Intl), and compares line// for line: the DST gap and fold of Europe/Vienna and America/New_York in 2026, and 1970.import { spawnSync } from 'node:child_process';import { readFileSync } from 'node:fs';import { dirname, join, resolve } from 'node:path';import { fileURLToPath } from 'node:url';const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '../../..');const BIN = process.env.HL_BIN || join(ROOT, 'native/zig-out/bin/hybriel');let failed = false;const ok = (c, m) => { if (!c) { failed = true; console.log('FAIL ' + m); } else console.log('ok ' + m); };ok(readFileSync(join(ROOT, 'plugins/time/client.js'), 'utf8') === readFileSync(join(ROOT, 'plugins/time/server.js'), 'utf8'), 'client.js is server.js, byte for byte (one implementation, two names)');const t = await import(join(ROOT, 'plugins/time/client.js'));const cases = [['Europe/Vienna', 2026, 3, 29, 2, 30], ['Europe/Vienna', 2026, 10, 25, 2, 30],['America/New_York', 2026, 3, 8, 2, 30], ['America/New_York', 2026, 11, 1, 1, 30],['Europe/Vienna', 1970, 1, 1, 0, 0], ['America/New_York', 1970, 6, 1, 12, 0], ['Europe/Vienna', 2026, 7, 1, 12, 0],];const mine = cases.map(([z, y, m, d, h, mi]) => {const ms = t.fromLocal({ year: y, month: m, day: d, hour: h, minute: mi }, z);return `${z} ${ms} ${t.offset(ms, z)} ${t.localTimestamp(ms, z)} ${t.timestamp(ms)} ${JSON.stringify(t.local(ms, z))} ${t.isZone(z)}`;});const r = spawnSync(BIN, [join(ROOT, 'plugins/time/tests/parity.hl')], { encoding: 'utf8' });const native = r.stdout.trim().split('\n');ok(r.status === 0 && native.length === mine.length, 'native run answered ' + mine.length + ' lines');mine.forEach((l, i) => ok(l === native[i], l.slice(0, 60) + (l === native[i] ? '' : '\n native: ' + native[i] + '\n client: ' + l)));process.exit(failed ? 1 : 0);
Branches
- font-segoe-ui
- hl-standard
- hl-standard-2
- hl-standard-4
- hl-standard-5
- mainmain branch
- readme-audit
Latest commits
- b78fb85a|||PR README matches the codemre
- 9f351699Preserve comments and nest supported selectors without changing rendered outputmre
- 97110ad9WIP: nest accepted layout selectors; stopped at startup parse failuremre
- ce4a0baeKeep caller slot styles whole so minimal shell apps startmre
- 12cd3992Re-vendor complete Hybriel plugins and runtime to day44mre
- b05c20feBackup tar: --hard-dereference, so mpackdb sidecars are never stored as hard links (Tracker's finding)mre
- 8d9ed0b8Re-vendor complete Hybriel plugins and runtime to day39mre
- ebd00b6cNest caller slot styles in three-panemre
- 009991efNest caller slot styles in list-firstmre
- 494d75d4Nest caller slot styles in app-sidebarmre
- e5571680Align all plugin sources with Hybriel day38bmre
- 5d204c46Re-vendor layouts to Hybriel set day38bmre
- 17e0f03eNest html-prefixed theme component overridesmre
- e54e735eFormat plain theme elements with nested rules and bare mediamre
- 547f834eRecord LY7 deployment and live verificationmre
- fa4600b1Link caller-slot style exceptions to hybriel#270mre
- 413b11e1Record corrected LY7 nesting, exact CSS and Chrome proofmre
- b810453etracker-demo: nest child and compound selectors in Stylemre
- 0b5b1d61notes-demo: nest child and compound selectors in Stylemre
- ab22bdc2mail-demo: nest child and compound selectors in Stylemre