升级 SpacetimeDB 到 2.4.1
更新 server-rs SpacetimeDB crate 锁定版本与 Cargo.lock。 刷新 spacetime-client 生成绑定到 2.4.1。 同步 dev 脚本、容器、Jenkins 和运维文档中的 STDB 版本。 补充 dev 脚本版本校验测试,兼容 Cargo 精确版本要求。
This commit is contained in:
@@ -15,6 +15,7 @@ import {
|
||||
createWatchConfigs,
|
||||
isDirectModuleExecution,
|
||||
isSpacetimePublishPermissionError,
|
||||
normalizeCargoVersionRequirement,
|
||||
parseSpacetimeToolVersion,
|
||||
parseArgs,
|
||||
resolveDevStackStatePath,
|
||||
@@ -34,7 +35,7 @@ function workspaceSpacetimeVersionForTest() {
|
||||
if (!match) {
|
||||
throw new Error('无法读取测试用 SpacetimeDB 版本');
|
||||
}
|
||||
return match[1];
|
||||
return normalizeCargoVersionRequirement(match[1]);
|
||||
}
|
||||
|
||||
describe('dev scheduler argument routing', () => {
|
||||
@@ -402,20 +403,25 @@ describe('dev scheduler watch routing', () => {
|
||||
});
|
||||
|
||||
describe('dev scheduler spacetime refresh', () => {
|
||||
test('解析 Cargo 精确版本要求时用于 CLI 校验的版本号不带等号', () => {
|
||||
expect(normalizeCargoVersionRequirement('=2.4.1')).toBe('2.4.1');
|
||||
expect(normalizeCargoVersionRequirement('2.4.1')).toBe('2.4.1');
|
||||
});
|
||||
|
||||
test('解析 spacetime --version 输出里的 tool version', () => {
|
||||
const version = parseSpacetimeToolVersion(`
|
||||
A new version of SpacetimeDB is available: v2.3.0 (current: v2.2.0)
|
||||
spacetimedb tool version 2.3.0; spacetimedb-lib version 2.3.0;
|
||||
A new version of SpacetimeDB is available: v2.4.1 (current: v2.4.0)
|
||||
spacetimedb tool version 2.4.1; spacetimedb-lib version 2.4.1;
|
||||
`);
|
||||
|
||||
expect(version).toBe('2.3.0');
|
||||
expect(version).toBe('2.4.1');
|
||||
});
|
||||
|
||||
test('本机 spacetime 版本和 workspace 锁定版本不一致时直接报清楚', () => {
|
||||
expect(() =>
|
||||
assertSpacetimeToolVersionMatchesWorkspace({
|
||||
toolVersion: '2.1.0',
|
||||
workspaceVersion: '2.3.0',
|
||||
workspaceVersion: '2.4.1',
|
||||
}),
|
||||
).toThrow('procedure 返回值 BSATN 反序列化失败');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user