@@ -187,7 +187,7 @@ type Command
187
187
| Make MakeFlags
188
188
| Docs DocsFlags
189
189
| PackageValidate PackageValidateFlags
190
- | PackageBump PackageValidateFlags
190
+ | PackageBump PackageBumpFlags
191
191
| PackageDiff PackageDiffFlags
192
192
193
193
@@ -244,6 +244,24 @@ type DocsOutput
244
244
245
245
{-|-}
246
246
type alias PackageValidateFlags =
247
+ { projectPath : Path
248
+ , knownVersions : Array SemanticVersion
249
+ , previousVersion :
250
+ Maybe
251
+ { outline : Outline
252
+ , rootSources : Dict String String
253
+ , dependencies : Dict String { outline : Outline.PkgOutline, sources : Dict String String }
254
+ }
255
+ , currentVersion :
256
+ { outline : Outline
257
+ , rootSources : Dict String String
258
+ , dependencies : Dict String { outline : Outline.PkgOutline, sources : Dict String String }
259
+ }
260
+ }
261
+
262
+
263
+ {-|-}
264
+ type alias PackageBumpFlags =
247
265
{ projectPath : Path
248
266
, knownVersions : Array SemanticVersion
249
267
, publishedVersion :
@@ -372,13 +390,17 @@ commandEncoder interactive pathToString command =
372
390
, { key = "dependencies", value = Json.dict identity depsToJson flags.currentVersion.dependencies }
373
391
]
374
392
}
375
- , { key = "published -version"
393
+ , { key = "previous -version"
376
394
, value =
377
- Json.object
378
- [ { key = "project-outline", value = Outline.toJson flags.publishedVersion.outline }
379
- , { key = "sources", value = Json.dict identity Json.string flags.publishedVersion.rootSources }
380
- , { key = "dependencies", value = Json.dict identity depsToJson flags.publishedVersion.dependencies }
381
- ]
395
+ maybeEncoder
396
+ (\package ->
397
+ Json.object
398
+ [ { key = "project-outline", value = Outline.toJson package.outline }
399
+ , { key = "sources", value = Json.dict identity Json.string package.rootSources }
400
+ , { key = "dependencies", value = Json.dict identity depsToJson package.dependencies }
401
+ ]
402
+ )
403
+ flags.previousVersion
382
404
}
383
405
]
384
406
0 commit comments