Skip to content

Commit c1553e4

Browse files
committed
Pass known versions to backend for bump and validate commands.
1 parent b719b0a commit c1553e4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Compiler/Backend.gren

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,15 @@ type Command
185185
= Repl ReplFlags
186186
| Make MakeFlags
187187
| Docs DocsFlags
188-
| PackageValidate ProjectSources
189-
| PackageBump ProjectSources
188+
| PackageValidate PackageValidateFlags
189+
| PackageBump PackageValidateFlags
190190
| PackageDiff DiffArgs
191191

192192

193193
{-|-}
194-
type alias ProjectSources =
194+
type alias PackageValidateFlags =
195195
{ projectPath : Path
196+
, knownVersions : Array SemanticVersion
196197
, outline : Outline
197198
, rootSources : Dict String String
198199
, dependencies : Dict String { outline : Outline.PkgOutline, sources : Dict String String }
@@ -344,6 +345,8 @@ commandEncoder interactive pathToString command =
344345
PackageValidate flags ->
345346
Json.object
346347
[ { key = "command", value = Json.string "packageValidate" }
348+
, { key = "interactive", value = Json.bool interactive }
349+
, { key = "known-versions", value = Json.array SemanticVersion.toJson flags.knownVersions }
347350
, { key = "project-path", value = Json.string <| pathToString flags.projectPath }
348351
, { key = "project-outline", value = Outline.toJson flags.outline }
349352
, { key = "sources", value = Json.dict identity Json.string flags.rootSources }
@@ -354,6 +357,7 @@ commandEncoder interactive pathToString command =
354357
Json.object
355358
[ { key = "command", value = Json.string "packageBump" }
356359
, { key = "interactive", value = Json.bool interactive }
360+
, { key = "known-versions", value = Json.array SemanticVersion.toJson flags.knownVersions }
357361
, { key = "project-path", value = Json.string <| pathToString flags.projectPath }
358362
, { key = "project-outline", value = Outline.toJson flags.outline }
359363
, { key = "sources", value = Json.dict identity Json.string flags.rootSources }

0 commit comments

Comments
 (0)