Skip to content

Commit

Permalink
feat(datasource): Add Unity3D (#27971)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
  • Loading branch information
ViMaSter and secustor committed Mar 25, 2024
1 parent 4023665 commit 0b73d68
Show file tree
Hide file tree
Showing 10 changed files with 510 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/modules/datasource/api.ts
Expand Up @@ -59,6 +59,7 @@ import { SbtPluginDatasource } from './sbt-plugin';
import { TerraformModuleDatasource } from './terraform-module';
import { TerraformProviderDatasource } from './terraform-provider';
import type { DatasourceApi } from './types';
import { Unity3dDatasource } from './unity3d';

const api = new Map<string, DatasourceApi>();
export default api;
Expand Down Expand Up @@ -126,3 +127,4 @@ api.set(SbtPackageDatasource.id, new SbtPackageDatasource());
api.set(SbtPluginDatasource.id, new SbtPluginDatasource());
api.set(TerraformModuleDatasource.id, new TerraformModuleDatasource());
api.set(TerraformProviderDatasource.id, new TerraformProviderDatasource());
api.set(Unity3dDatasource.id, new Unity3dDatasource());
21 changes: 21 additions & 0 deletions lib/modules/datasource/unity3d/__fixtures__/beta.xml
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="https://unity.com/">
<channel>
<title>Latest Unity Beta Releases</title>
<link>https://unity.com/</link>
<description>Latest Unity Beta Releases</description>
<language>en</language>

<item>
<title>2023.3.0b6</title>
<link>https://unity.com/releases/editor/beta/2023.3.0b6</link>
<description>
Beta description
</description>
<pubDate>2024-02-07T07:24:40</pubDate>
<dc:creator>Unity Technologies</dc:creator>
<guid isPermaLink="false">4ca2224a582d</guid>
</item>

</channel>
</rss>
21 changes: 21 additions & 0 deletions lib/modules/datasource/unity3d/__fixtures__/lts.xml
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="https://unity.com/">
<channel>
<title>Latest Unity Lts Releases</title>
<link>https://unity.com/</link>
<description>Latest Unity LTS Releases</description>
<language>en</language>

<item>
<title>2021.3.35f1</title>
<link>https://unity.com/releases/editor/whats-new/2021.3.35</link>
<description>
LTS description
</description>
<pubDate>2024-02-06T15:40:15</pubDate>
<dc:creator>Unity Technologies</dc:creator>
<guid isPermaLink="false">157b46ce122a</guid>
</item>

</channel>
</rss>
4 changes: 4 additions & 0 deletions lib/modules/datasource/unity3d/__fixtures__/no_channel.xml
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="https://unity.com/">

</rss>
11 changes: 11 additions & 0 deletions lib/modules/datasource/unity3d/__fixtures__/no_item.xml
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="https://unity.com/">
<channel>
<title>Latest Unity Beta Releases</title>
<link>https://unity.com/</link>
<description>Latest Unity Beta Releases</description>
<language>en</language>


</channel>
</rss>
20 changes: 20 additions & 0 deletions lib/modules/datasource/unity3d/__fixtures__/no_title.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="https://unity.com/">
<channel>
<title>Latest Unity Full Releases</title>
<link>https://unity.com/</link>
<description>Latest Unity Full Releases</description>
<language>en</language>

<item>
<link>https://unity.com/releases/editor/whats-new/2021.3.35</link>
<description>
Stable description2
</description>
<pubDate>2024-02-06T15:40:15</pubDate>
<dc:creator>Unity Technologies</dc:creator>
<guid isPermaLink="false">157b46ce122a</guid>
</item>

</channel>
</rss>
31 changes: 31 additions & 0 deletions lib/modules/datasource/unity3d/__fixtures__/stable.xml
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0" xml:base="https://unity.com/">
<channel>
<title>Latest Unity Full Releases</title>
<link>https://unity.com/</link>
<description>Latest Unity Full Releases</description>
<language>en</language>

<item>
<title>2023.2.9f1</title>
<link>https://unity.com/releases/editor/whats-new/2023.2.9</link>
<description>
Stable description
</description>
<pubDate>2024-02-07T06:56:57</pubDate>
<dc:creator>Unity Technologies</dc:creator>
<guid isPermaLink="false">0c9c2e1f4bef</guid>
</item>
<item>
<title>2021.3.35f1</title>
<link>https://unity.com/releases/editor/whats-new/2021.3.35</link>
<description>
Stable description2
</description>
<pubDate>2024-02-06T15:40:15</pubDate>
<dc:creator>Unity Technologies</dc:creator>
<guid isPermaLink="false">157b46ce122a</guid>
</item>

</channel>
</rss>

0 comments on commit 0b73d68

Please sign in to comment.