Skip to content

Commit

Permalink
refactor: Adresses review notes for Unity3D datasource (#28190)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViMaSter committed Mar 31, 2024
1 parent 1fbea71 commit 6fc4cea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/modules/datasource/unity3d/index.ts
@@ -1,4 +1,4 @@
import { XmlDocument } from 'xmldoc';
import { XmlDocument, XmlElement } from 'xmldoc';
import { logger } from '../../../logger';
import { cache } from '../../../util/cache/package/decorator';
import * as Unity3dVersioning from '../../versioning/unity3d';
Expand All @@ -7,7 +7,7 @@ import type { GetReleasesConfig, Release, ReleaseResult } from '../types';

export class Unity3dDatasource extends Datasource {
static readonly homepage = 'https://unity.com/';
static readonly streams: { [key: string]: string } = {
static readonly streams: Record<string, string> = {
lts: `${Unity3dDatasource.homepage}releases/editor/lts-releases.xml`,
stable: `${Unity3dDatasource.homepage}releases/editor/releases.xml`,
beta: `${Unity3dDatasource.homepage}releases/editor/beta/latest.xml`,
Expand All @@ -32,7 +32,7 @@ export class Unity3dDatasource extends Datasource {
registryUrl: string | undefined,
withHash: boolean,
): Promise<ReleaseResult | null> {
let channel = null;
let channel: XmlElement | undefined = undefined;
try {
const response = await this.http.get(registryUrl!);
const document = new XmlDocument(response.body);
Expand Down

0 comments on commit 6fc4cea

Please sign in to comment.