Deps migration (#1988)

* chore: migrate eslint to oxlint

* chore: migrate prettier to oxfmt

* chore: migrate typescript

* chore: toThrow should have a expected value

* chore: cast test value as Day

* chore: small title fix

* chore: mocks should be hoisted

* chore: incorrect async useage

* chore: test should be inside description

* chore: test sohuld include an expeced

* chore: oxfmt

---------

Co-authored-by: alex-Arc <omnivox@LAPTOP-RC5SNBVV.localdomain>
This commit is contained in:
Carlos Valente
2026-03-08 16:22:12 +01:00
committed by GitHub
parent 9516ac21bb
commit 1849b4d39f
501 changed files with 2678 additions and 4654 deletions
@@ -1,8 +1,11 @@
import { Playback } from 'ontime-types';
import type { Instant } from 'ontime-types';
import { isRestorePoint } from '../restore.parser.js';
import { RestorePoint } from '../restore.type.js';
const asInstant = (value: number): Instant => value as Instant;
describe('isRestorePoint()', () => {
it('validates a well defined object', () => {
let restorePoint: RestorePoint = {
@@ -12,7 +15,7 @@ describe('isRestorePoint()', () => {
addedTime: 2,
pausedAt: 3,
firstStart: 1,
startEpoch: 1,
startEpoch: asInstant(1),
currentDay: 0,
};
expect(isRestorePoint(restorePoint)).toBe(true);
@@ -24,7 +27,7 @@ describe('isRestorePoint()', () => {
addedTime: 0,
pausedAt: null,
firstStart: 1,
startEpoch: 1,
startEpoch: asInstant(1),
currentDay: 2,
};
expect(isRestorePoint(restorePoint)).toBe(true);
@@ -1,10 +1,12 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Playback } from 'ontime-types';
import type { Instant } from 'ontime-types';
import { vi } from 'vitest';
import { RestorePoint } from '../restore.type.js';
import { restoreService } from '../restore.service.js';
import { RestorePoint } from '../restore.type.js';
const asInstant = (value: number): Instant => value as Instant;
describe('restoreService', () => {
describe('load()', () => {
@@ -16,7 +18,7 @@ describe('restoreService', () => {
addedTime: 5678,
pausedAt: 9087,
firstStart: 1234,
startEpoch: 1234,
startEpoch: asInstant(1234),
currentDay: 0,
};
@@ -35,7 +37,7 @@ describe('restoreService', () => {
addedTime: 0,
pausedAt: null,
firstStart: 1234,
startEpoch: 1234,
startEpoch: asInstant(1234),
currentDay: null,
};
@@ -83,7 +85,7 @@ describe('restoreService', () => {
addedTime: 1234,
pausedAt: 1234,
firstStart: 1234,
startEpoch: 1234,
startEpoch: asInstant(1234),
currentDay: 0,
};
@@ -101,7 +103,7 @@ describe('restoreService', () => {
addedTime: 2345,
pausedAt: 2345,
firstStart: 2345,
startEpoch: 2345,
startEpoch: asInstant(2345),
currentDay: 0,
};
@@ -112,7 +114,7 @@ describe('restoreService', () => {
addedTime: 3456,
pausedAt: 3456,
firstStart: 3456,
startEpoch: 3456,
startEpoch: asInstant(3456),
currentDay: 1,
};
@@ -134,7 +136,7 @@ describe('restoreService', () => {
addedTime: 5678,
pausedAt: 5678,
firstStart: 5678,
startEpoch: 5678,
startEpoch: asInstant(5678),
currentDay: 0,
};
@@ -1,7 +1,6 @@
import { Playback } from 'ontime-types';
import { is } from '../../utils/is.js';
import type { RestorePoint } from './restore.type.js';
/**
@@ -1,8 +1,7 @@
import { JSONFile } from 'lowdb/node';
import { deepEqual } from 'fast-equals';
import { JSONFile } from 'lowdb/node';
import { publicFiles } from '../../setup/index.js';
import { isRestorePoint } from './restore.parser.js';
import type { RestorePoint } from './restore.type.js';
@@ -1,4 +1,4 @@
import { Playback, MaybeString, MaybeNumber, Maybe, Instant } from 'ontime-types';
import { Instant, Maybe, MaybeNumber, MaybeString, Playback } from 'ontime-types';
export type RestorePoint = {
playback: Playback;