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
@@ -38,10 +38,10 @@ describe('match a string to an enum that is', () => {
expect(key).toBe('abc');
});
it('invalid key', () => {
expect(() => coerceEnum('123', testEnum)).toThrow();
expect(() => coerceEnum('123', testEnum)).toThrow('Invalid value received');
});
it('invalid type', () => {
expect(() => coerceEnum(123, testEnum)).toThrow();
expect(() => coerceEnum(123, testEnum)).toThrow('Invalid value received');
});
});
@@ -1,6 +1,7 @@
import { describe, it, expect, Mock } from 'vitest';
import * as fs from 'fs';
import { Mock, describe, expect, it } from 'vitest';
import {
appendToName,
ensureJsonExtension,
@@ -1,4 +1,5 @@
import { MILLIS_PER_MINUTE } from 'ontime-utils';
import { parseExcelDate } from '../time.js';
describe('parseExcelDate', () => {
-1
View File
@@ -1,5 +1,4 @@
import { isProduction } from '../setup/environment.js';
import { consoleError } from './console.js';
/**
+3 -2
View File
@@ -1,6 +1,7 @@
import { existsSync, mkdirSync, PathLike, constants } from 'fs';
import { readdir, copyFile, unlink } from 'fs/promises';
import { PathLike, constants, existsSync, mkdirSync } from 'fs';
import { copyFile, readdir, unlink } from 'fs/promises';
import { basename, join, parse } from 'path';
import { consoleError } from './console.js';
import { is } from './is.js';
+4 -5
View File
@@ -1,13 +1,12 @@
import { writeFileSync } from 'fs';
import { join } from 'path';
import { ONTIME_VERSION } from '../ONTIME_VERSION.js';
import { getState } from '../stores/runtimeState.js';
import { publicDir } from '../setup/index.js';
import { ensureDirectory } from './fileManagement.js';
import { getCurrentRundown } from '../api-data/rundown/rundown.dao.js';
import { logger } from '../classes/Logger.js';
import { ONTIME_VERSION } from '../ONTIME_VERSION.js';
import { publicDir } from '../setup/index.js';
import { getState } from '../stores/runtimeState.js';
import { ensureDirectory } from './fileManagement.js';
/**
* Writes a file to the crash report location
* @param fileName
+1 -1
View File
@@ -1,4 +1,4 @@
import { MILLIS_PER_HOUR, MILLIS_PER_MINUTE, MILLIS_PER_SECOND, pad, parseUserTime, isISO8601 } from 'ontime-utils';
import { MILLIS_PER_HOUR, MILLIS_PER_MINUTE, MILLIS_PER_SECOND, isISO8601, pad, parseUserTime } from 'ontime-utils';
export const timeFormat = 'HH:mm';
export const timeFormatSeconds = 'HH:mm:ss';
+3 -3
View File
@@ -1,11 +1,11 @@
import multer from 'multer';
import path from 'path';
import fs from 'fs';
import { rm } from 'fs/promises';
import path from 'path';
import multer from 'multer';
import sanitize from 'sanitize-filename';
import { getAppDataPath, publicDir } from '../setup/index.js';
import { ensureDirectory } from './fileManagement.js';
function generateNewFileName(filePath: string, callback: (newName: string) => void) {