From efc0f43b17fdc310c3a7d20ed885c0943433e37b Mon Sep 17 00:00:00 2001 From: cneicy Date: Fri, 6 Nov 2026 19:13:14 +0800 Subject: [PATCH] feat: update Godot integration and coordinated package dependencies --- .../ShrinkSDK.Command.Integration.Network.csproj | 10 +++++----- Tests/IntegrationComponentsTests.cs | 15 ++++++++------- package.json | 8 ++++---- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/DotNet~/ShrinkSDK.Command.Integration.Network.csproj b/DotNet~/ShrinkSDK.Command.Integration.Network.csproj index 9030c27..6a31a75 100644 --- a/DotNet~/ShrinkSDK.Command.Integration.Network.csproj +++ b/DotNet~/ShrinkSDK.Command.Integration.Network.csproj @@ -5,16 +5,16 @@ ShrinkCommand.Integration.Network ShrinkCommand.Integration ShrinkSDK.Command.Integration.Network - 0.2.5 + 0.2.6 ShrinkCommand and Network RPC integration. true - - - - + + + + diff --git a/Tests/IntegrationComponentsTests.cs b/Tests/IntegrationComponentsTests.cs index df1664e..fe5537a 100644 --- a/Tests/IntegrationComponentsTests.cs +++ b/Tests/IntegrationComponentsTests.cs @@ -1,5 +1,6 @@ #nullable enable using System; +using System.Collections; using System.Collections.Generic; using Cysharp.Threading.Tasks; using NUnit.Framework; @@ -9,6 +10,7 @@ using ShrinkContext; using ShrinkDataSaver.Integration.App; using ShrinkNetwork; using ShrinkNetwork.Integration.App; +using UnityEngine.TestTools; namespace ShrinkCommand.Integration.Network.Tests { @@ -27,10 +29,10 @@ namespace ShrinkCommand.Integration.Network.Tests _runtime = new ShrinkContextRuntime(); } - [TearDown] - public void TearDown() + [UnityTearDown] + public IEnumerator TearDown() { - _runtime.ShutdownAsync().GetAwaiter().GetResult(); + yield return _runtime.ShutdownAsync().ToCoroutine(); } private static void Run(UniTask task) => task.GetAwaiter().GetResult(); @@ -83,16 +85,15 @@ namespace ShrinkCommand.Integration.Network.Tests ShrinkCommandAppComponent.ServiceKey, out _), "退役撤回服务键"); } - [Test] - public void DataSaverComponent_Activates_FlushesOnDeactivate_WithdrawsKey() + [UnityTest] + public IEnumerator DataSaverComponent_Activates_FlushesOnDeactivate_WithdrawsKey() { var fiber = _runtime.Use(new ShrinkDataSaverAppComponent()); Assert.AreEqual(ShrinkFiberState.Active, fiber.State); Assert.IsTrue(_runtime.TryGetRaw(_runtime.RootContext, ShrinkDataSaverAppComponent.ServiceKey, out _)); - Assert.DoesNotThrow(() => Run(_runtime.RetireAsync(fiber)), - "停用执行补偿式收尾(设置最终落盘;未初始化环境安全跳过)"); + yield return _runtime.RetireAsync(fiber).ToCoroutine(); Assert.IsFalse(_runtime.TryGetRaw(_runtime.RootContext, ShrinkDataSaverAppComponent.ServiceKey, out _)); } diff --git a/package.json b/package.json index 9d47bc5..49276d6 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "com.cneicy.shrink-command-integration-network", - "version": "0.2.5", + "version": "0.2.6", "displayName": "ShrinkCommand - Network Integration", "description": "ShrinkCommand 与 ShrinkNetwork 的桥接层,允许远程会话通过 RPC 执行命令。", "unity": "2022.3", "dependencies": { - "com.cneicy.shrink-command": "0.4.2", - "com.cneicy.shrink-network": "0.4.2", - "com.cneicy.shrink-context-core": "0.3.0" + "com.cneicy.shrink-command": "0.4.3", + "com.cneicy.shrink-network": "0.4.3", + "com.cneicy.shrink-context-core": "0.3.1" }, "keywords": [ "command",