[Fix] Handle optional versions in contract publishing (#4196)
This commit is contained in:
@@ -472,7 +472,7 @@ export class ContractPublisher extends RPCConnectionHandler {
|
||||
|
||||
const latestVersion = latestMetadata.publishedMetadata.version;
|
||||
if (
|
||||
!isIncrementalVersion(latestVersion, extraMetadataCleaned.version)
|
||||
!isIncrementalVersion(latestVersion || "0.0.0", extraMetadataCleaned.version || "0.0.0")
|
||||
) {
|
||||
throw Error(
|
||||
`Version ${extraMetadataCleaned.version} is not greater than ${latestVersion}`,
|
||||
|
||||
@@ -238,7 +238,7 @@ export const ExtraPublishMetadataSchemaInput = /* @__PURE__ */ (() =>
|
||||
message: `'${out}' is not a valid semantic version. Should be in the format of major.minor.patch. Ex: 0.4.1`,
|
||||
};
|
||||
},
|
||||
),
|
||||
).optional(),
|
||||
displayName: z.string().optional(),
|
||||
description: z.string().optional(),
|
||||
externalLinks: z
|
||||
|
||||
Reference in New Issue
Block a user