mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 16:38:31 +00:00
- 12-test buildDevices suite on a fake hass (curation, markers, groups, dedup, icon rules, lock override, device_class fallback, primary/LQI/temp) - t() substitutes all placeholder occurrences (pure subst() + regression test) - _saveConfigNow resyncs config on rev conflict before rethrowing - pointercancel clears the long-press timer (phantom info card on touch) - repairs.py: plan-file check re-runs after every config save - test build compiles devices.ts/types.ts; fix-test-build.mjs adds .js to ESM imports
9 lines
371 B
JavaScript
9 lines
371 B
JavaScript
// tsc keeps extensionless relative imports; Node ESM requires explicit ".js".
|
|
import { readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
for (const f of readdirSync('test-build')) {
|
|
if (!f.endsWith('.js')) continue;
|
|
const p = `test-build/${f}`;
|
|
const s = readFileSync(p, 'utf8').replace(/from\s+'(\.\/[\w-]+)'/g, "from '$1.js'");
|
|
writeFileSync(p, s);
|
|
}
|