chore(deps): update dependency eslint-plugin-unicorn to v72 (#30092)

Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
renovate[bot] 2026-07-21 15:33:46 +02:00 committed by GitHub
parent ce022233ae
commit aa08dad1f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 144 additions and 149 deletions

View file

@ -128,7 +128,7 @@ export class AssetMediaController {
this.logger.deprecate(
'Calling the thumbnail endpoint with size=original is deprecated. Use the :id/original endpoint instead',
);
const [_, reqSearch] = req.url.split('?');
const [_, reqSearch] = req.url.split('?', 2);
const redirSearchParams = new URLSearchParams(reqSearch);
redirSearchParams.delete('size');
return res.redirect('original?' + redirSearchParams.toString());
@ -142,7 +142,7 @@ export class AssetMediaController {
// viewThumbnailRes is a AssetMediaRedirectResponse
// which redirects to the original asset or a specific size to make better use of caching
const { targetSize } = viewThumbnailRes;
const [reqPath, reqSearch] = req.url.split('?');
const [reqPath, reqSearch] = req.url.split('?', 2);
let redirPath: string;
const redirSearchParams = new URLSearchParams(reqSearch);
if (targetSize === 'original') {

View file

@ -313,7 +313,7 @@ export class MediaRepository {
if (!line) {
return;
}
const [ptsStr, durationStr, flags] = line.split(',');
const [ptsStr, durationStr, flags] = line.split(',', 3);
const pts = Number.parseInt(ptsStr);
const duration = Number.parseInt(durationStr);
if (Number.isNaN(pts) || Number.isNaN(duration) || !flags) {

View file

@ -461,7 +461,7 @@ export class AuthService extends BaseService {
}
private getBearerToken(headers: IncomingHttpHeaders): string | null {
const [type, token] = (headers.authorization || '').split(' ');
const [type, token] = (headers.authorization || '').split(' ', 2);
if (type.toLowerCase() === 'bearer') {
return token;
}

View file

@ -214,7 +214,6 @@ export class DatabaseBackupService {
bin: `/usr/lib/postgresql/${databaseMajorVersion}/bin/${bin}`,
args,
databaseUsername,
// eslint-disable-next-line unicorn/prefer-minimal-ternary
databasePassword: isUrlConnection ? new URL(databaseConfig.url).password : databaseConfig.password,
databaseVersion,
databaseMajorVersion,

View file

@ -15,6 +15,7 @@ import { makeStream, newTestService, ServiceMocks } from 'test/utils';
import { vitest } from 'vitest';
async function* mockWalk() {
// eslint-disable-next-line unicorn/no-useless-promise-resolve-reject
yield await Promise.resolve(['/data/user1/photo.jpg']);
}

View file

@ -51,7 +51,7 @@ export class SystemConfigService extends BaseService {
@OnEvent({ name: 'ConfigValidate' })
onConfigValidate({ newConfig, oldConfig }: ArgOf<'ConfigValidate'>) {
const { logLevel } = this.configRepository.getEnv();
if (!_.isEqual(toPlainObject(newConfig.logging), oldConfig.logging) && logLevel) {
if (logLevel && !_.isEqual(toPlainObject(newConfig.logging), oldConfig.logging)) {
throw new Error('Logging cannot be changed while the environment variable IMMICH_LOG_LEVEL is set.');
}
}

View file

@ -172,7 +172,7 @@ export const mimeTypes = {
return AssetType.Image;
}
if (contentType.startsWith('video/') || contentType === 'application/mxf') {
if (contentType === 'application/mxf' || contentType.startsWith('video/')) {
return AssetType.Video;
}

View file

@ -9,7 +9,7 @@ type Impossible<K extends keyof any> = {
type Exact<T, U extends T = T> = U & Impossible<Exclude<keyof U, keyof T>>;
export const fromAck = (ack: string): SyncAck => {
const [type, updateId, extraId] = ack.split('|');
const [type, updateId, extraId] = ack.split('|', 3);
return { type: type as SyncEntityType, updateId, extraId };
};