From aa17f013c1f22a73c562fe9630437b64fe93b341 Mon Sep 17 00:00:00 2001 From: James Puleo Date: Wed, 5 Oct 2022 07:19:19 -0400 Subject: [PATCH 01/15] Use a string interpolation and escape single quotes when escaping tables --- TShockAPI/DB/IQueryBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TShockAPI/DB/IQueryBuilder.cs b/TShockAPI/DB/IQueryBuilder.cs index 19af36a9..03f67202 100644 --- a/TShockAPI/DB/IQueryBuilder.cs +++ b/TShockAPI/DB/IQueryBuilder.cs @@ -172,7 +172,7 @@ namespace TShockAPI.DB /// protected override string EscapeTableName(string table) { - return table.SFormat("'{0}'", table); + return $"\'{table}\'"; } } From 6eadc1159d429da2e25d474959751c6267e081f0 Mon Sep 17 00:00:00 2001 From: James Puleo Date: Wed, 5 Oct 2022 13:57:08 -0400 Subject: [PATCH 02/15] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd7736bb..f89e26be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Added preliminary support for Terraria 1.4.4.4. (@SignatureBeef) * GrassSpreadEventArgs Color property has been changed from a Byte to a TileColorCache type. (@SignatureBeef) * SetDefaultsEventArgs now includes a nullable ItemVariant instance. (@SignatureBeef) +* Use a string interpolation and escape single quotes when escaping tables (@drunderscore) ## TShock 4.5.18 * Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph) From d55f3840e943926ba04115a21d8850c4440bae9c Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Wed, 5 Oct 2022 21:00:13 -0700 Subject: [PATCH 03/15] Update submodule for 3277e865ad96ec1b777519812160f3bb835bc4bf --- TerrariaServerAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TerrariaServerAPI b/TerrariaServerAPI index ada18322..3277e865 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit ada183220947c1e44887161431e1ad520eb0e931 +Subproject commit 3277e865ad96ec1b777519812160f3bb835bc4bf From c313b0733e5f2c889f5608951ed99302e3cbd8af Mon Sep 17 00:00:00 2001 From: Arthri <41360489+Arthri@users.noreply.github.com> Date: Thu, 6 Oct 2022 13:23:46 +0800 Subject: [PATCH 04/15] Remove obsolete resources --- CHANGELOG.md | 1 + TShockAPI/Resources.Designer.cs | 63 ----------------- TShockAPI/Resources.resx | 121 -------------------------------- 3 files changed, 1 insertion(+), 184 deletions(-) delete mode 100644 TShockAPI/Resources.Designer.cs delete mode 100644 TShockAPI/Resources.resx diff --git a/CHANGELOG.md b/CHANGELOG.md index f89e26be..5f122591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * GrassSpreadEventArgs Color property has been changed from a Byte to a TileColorCache type. (@SignatureBeef) * SetDefaultsEventArgs now includes a nullable ItemVariant instance. (@SignatureBeef) * Use a string interpolation and escape single quotes when escaping tables (@drunderscore) +* Removed obsolete resource files `TShockAPI/Resources.resx` and `TShockAPI/Resources.Designer.cs`. (@Arthri) ## TShock 4.5.18 * Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph) diff --git a/TShockAPI/Resources.Designer.cs b/TShockAPI/Resources.Designer.cs deleted file mode 100644 index 49c1d908..00000000 --- a/TShockAPI/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.34209 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace TShockAPI { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TShockAPI.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/TShockAPI/Resources.resx b/TShockAPI/Resources.resx deleted file mode 100644 index 2f96abec..00000000 --- a/TShockAPI/Resources.resx +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - \ No newline at end of file From f727ac91b760fd3b138305fa31fae6b527356b5f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Oct 2022 07:28:14 +0000 Subject: [PATCH 05/15] Add renovate.json --- renovate.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..39a2b6e9 --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base" + ] +} From 0dd2d70f649d750426f05ba189a22d5fa70a8538 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:09:11 -0700 Subject: [PATCH 06/15] Enable submodule support on renovate --- renovate.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 39a2b6e9..c795ea98 100644 --- a/renovate.json +++ b/renovate.json @@ -2,5 +2,8 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:base" - ] + ], + "git-submodules": { + "enabled": true + } } From d78744a7cbcd4f9da37ef23ac6a1c1a2c1975003 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:11:22 -0700 Subject: [PATCH 07/15] Specify branch for gitmodules by default (this is to help renovate figure out what to update) --- .gitmodules | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitmodules b/.gitmodules index a5435efd..f3c700b6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,4 @@ path = TerrariaServerAPI url = https://github.com/NyxStudios/TerrariaAPI-Server.git ignore = dirty + branch = general-devel From 0764f3e46ec9ca315c19d4278c1103b9cba2f77f Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:17:51 -0700 Subject: [PATCH 08/15] Bump otapi here too? --- renovate.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/renovate.json b/renovate.json index c795ea98..b0606b7d 100644 --- a/renovate.json +++ b/renovate.json @@ -5,5 +5,12 @@ ], "git-submodules": { "enabled": true + }, + "packageRules": [ + { + "matchPackageNames": ["OTAPI.Upcoming"], + "ignoreUnstable": "false", + "bumpVersion": "prerelease", } + ] } From 87d85d1b9d013486fc54f911504e021868725301 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:22:45 -0700 Subject: [PATCH 09/15] Allow ModFramework to change versions --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index b0606b7d..696e1825 100644 --- a/renovate.json +++ b/renovate.json @@ -8,7 +8,7 @@ }, "packageRules": [ { - "matchPackageNames": ["OTAPI.Upcoming"], + "matchPackageNames": ["OTAPI.Upcoming", "ModFramework"], "ignoreUnstable": "false", "bumpVersion": "prerelease", } From e898cedee74d090a95e8a4af655d7ddc916589dc Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:29:07 -0700 Subject: [PATCH 10/15] Change changelog checker to permit simple skips Skip things labeled simple --- .github/workflows/danger.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index e8e4b463..d9926370 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -15,7 +15,7 @@ jobs: uses: Zomzog/changelog-checker@564f4aa7a062e7498bd253f616569f02fb024c06 with: fileName: CHANGELOG.md - noChangelogLabel: Blocked + noChangelogLabel: simple checkNotification: Simple env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 3f2455903e8be2ce880b4698e3fe3a5731befb82 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:31:13 -0700 Subject: [PATCH 11/15] Tell renovate to be simple about things --- renovate.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 696e1825..56fd5973 100644 --- a/renovate.json +++ b/renovate.json @@ -12,5 +12,6 @@ "ignoreUnstable": "false", "bumpVersion": "prerelease", } - ] + ], + "labels": ["simple"] } From 4a426b476a03a0e4ba436aa0fc8f10a70eaca264 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:34:47 -0700 Subject: [PATCH 12/15] Remove changelog checker job --- .github/workflows/danger.yml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .github/workflows/danger.yml diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml deleted file mode 100644 index d9926370..00000000 --- a/.github/workflows/danger.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Danger -on: - workflow_dispatch: - pull_request: - types: [synchronize, edited, opened, reopened] -jobs: - build: - name: Run changelog check - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: Changelog check - uses: Zomzog/changelog-checker@564f4aa7a062e7498bd253f616569f02fb024c06 - with: - fileName: CHANGELOG.md - noChangelogLabel: simple - checkNotification: Simple - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From 620bd9c4f38b846d97f17e0d99341c81baf30c4f Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:37:26 -0700 Subject: [PATCH 13/15] Tell renovate to batch updates for OTAPI things This should make it one PR for ModFramework and OTAPI --- renovate.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/renovate.json b/renovate.json index 56fd5973..3a2cda01 100644 --- a/renovate.json +++ b/renovate.json @@ -11,7 +11,7 @@ "matchPackageNames": ["OTAPI.Upcoming", "ModFramework"], "ignoreUnstable": "false", "bumpVersion": "prerelease", + "groupName": "OTAPI things" } - ], - "labels": ["simple"] + ] } From 184dfb7724524c08bfd7db57a2654396f30f0be5 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Thu, 6 Oct 2022 01:42:24 -0700 Subject: [PATCH 14/15] Permit batching TSAPI, OTAPI, and ModFW This should mean 1 PR updates three things using renovate. --- renovate.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renovate.json b/renovate.json index 3a2cda01..159ec1e2 100644 --- a/renovate.json +++ b/renovate.json @@ -8,7 +8,7 @@ }, "packageRules": [ { - "matchPackageNames": ["OTAPI.Upcoming", "ModFramework"], + "matchPackageNames": ["OTAPI.Upcoming", "ModFramework", "TerrariaServerAPI"], "ignoreUnstable": "false", "bumpVersion": "prerelease", "groupName": "OTAPI things" From fd07f937346b0302706e84166259dbce766008aa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 6 Oct 2022 08:42:57 +0000 Subject: [PATCH 15/15] Update OTAPI things --- TShockLauncher/TShockLauncher.csproj | 4 ++-- TerrariaServerAPI | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TShockLauncher/TShockLauncher.csproj b/TShockLauncher/TShockLauncher.csproj index 6ac080fc..9128b93c 100644 --- a/TShockLauncher/TShockLauncher.csproj +++ b/TShockLauncher/TShockLauncher.csproj @@ -23,10 +23,10 @@ - + - + PreserveNewest true diff --git a/TerrariaServerAPI b/TerrariaServerAPI index 3277e865..36bcd959 160000 --- a/TerrariaServerAPI +++ b/TerrariaServerAPI @@ -1 +1 @@ -Subproject commit 3277e865ad96ec1b777519812160f3bb835bc4bf +Subproject commit 36bcd9594cc0406d34393dac5e7e806c2c4ea66e