better ergonomics for versions (#2717)

This commit is contained in:
Matt Hill
2024-08-19 13:44:57 -06:00
committed by GitHub
parent 6a8d8babce
commit a083f25b6c
10 changed files with 28 additions and 51 deletions

View File

@@ -6,8 +6,8 @@ import { Variants } from "../config/builder/variants"
import { ValueSpec } from "../config/configTypes"
import { setupManifest } from "../manifest/setupManifest"
import { StartSdk } from "../StartSdk"
import { VersionGraph } from "../versionInfo/setupVersionGraph"
import { VersionInfo } from "../versionInfo/VersionInfo"
import { VersionGraph } from "../version/VersionGraph"
import { VersionInfo } from "../version/VersionInfo"
describe("builder tests", () => {
test("text", async () => {
@@ -369,6 +369,13 @@ describe("values", () => {
const sdk = StartSdk.of()
.withManifest(
setupManifest(
VersionGraph.of(
VersionInfo.of({
version: "1.0.0:0",
releaseNotes: "",
migrations: {},
}),
),
{
id: "testOutput",
title: "",
@@ -402,13 +409,6 @@ describe("values", () => {
},
},
},
VersionGraph.of(
VersionInfo.of({
version: "1.0.0:0",
releaseNotes: "",
migrations: {},
}),
),
),
)
.withStore<{ test: "a" }>()

View File

@@ -1,12 +1,21 @@
import { StartSdk } from "../StartSdk"
import { setupManifest } from "../manifest/setupManifest"
import { VersionInfo } from "../versionInfo/VersionInfo"
import { VersionGraph } from "../versionInfo/setupVersionGraph"
import { VersionInfo } from "../version/VersionInfo"
import { VersionGraph } from "../version/VersionGraph"
export type Manifest = any
export const sdk = StartSdk.of()
.withManifest(
setupManifest(
VersionGraph.of(
VersionInfo.of({
version: "1.0.0:0",
releaseNotes: "",
migrations: {},
})
.satisfies("#other:1.0.0:0")
.satisfies("#other:2.0.0:0"),
),
{
id: "testOutput",
title: "",
@@ -41,15 +50,6 @@ export const sdk = StartSdk.of()
},
},
},
VersionGraph.of(
VersionInfo.of({
version: "1.0.0:0",
releaseNotes: "",
migrations: {},
})
.satisfies("#other:1.0.0:0")
.satisfies("#other:2.0.0:0"),
),
),
)
.withStore<{ storeRoot: { storeLeaf: "value" } }>()