Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow manifest versions to be defined as SemVer strings #274

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions source/general/manifest/manifest.1.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"title": "UUID"
},
"version": {
"$ref": "../Version.json",
"title": "Version",
"description": "This is the version of your pack in the format [majorVersion, minorVersion, revision].",
"title": "Version"
"oneOf": [{ "$ref": "../Version.json" }, { "$ref": "../semver.json" }]
},
"min_engine_version": {
"type": "string",
Expand Down Expand Up @@ -72,9 +72,9 @@
"title": "UUID"
},
"version": {
"$ref": "../Version.json",
"title": "Version",
"description": "This is the version of the module in the same format as the pack's version in the header. This can be used to further identify changes in your pack",
"title": "Version"
"oneOf": [{ "$ref": "../Version.json" }, { "$ref": "../semver.json" }]
}
}
},
Expand All @@ -94,9 +94,9 @@
"title": "UUID"
},
"version": {
"$ref": "../Version.json",
"title": "Version",
"description": "This is the specific version of the pack that your pack depends on. Should match the version the other pack has in its manifest file",
"title": "Version"
"oneOf": [{ "$ref": "../Version.json" }, { "$ref": "../semver.json" }]
}
},
"description": "UNDOCUMENTED: dependencies.",
Expand Down
35 changes: 9 additions & 26 deletions source/general/manifest/manifest.2.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,25 +94,11 @@
]
},
"version": {
"type": "string",
"description": "This is the specific version of the module that your pack depends on.",
"title": "Version",
"description": "This is the specific version of the module that your pack depends on.",
"$ref": "../semver.json",
"default": "1.9.0",
"examples": [
"1.10.0-beta",
"1.10.0",
"1.9.0",
"1.8.0",
"1.7.0",
"1.6.0",
"1.5.0",
"1.4.0",
"1.3.0",
"1.2.0",
"1.2.0-beta",
"1.1.0",
"1.0.0"
]
"examples": ["1.10.0-beta", "1.10.0", "1.9.0", "1.8.0", "1.7.0", "1.6.0", "1.5.0", "1.4.0", "1.3.0", "1.2.0", "1.2.0-beta", "1.1.0", "1.0.0"]
}
}
}
Expand Down Expand Up @@ -168,8 +154,8 @@
},
"version": {
"title": "Version",
"$ref": "../Version.json",
"description": "This is the version of your pack in the format [majorVersion, minorVersion, revision]."
"description": "This is the version of your pack in the format [majorVersion, minorVersion, revision].",
"oneOf": [{ "$ref": "../Version.json" }, { "$ref": "../semver.json" }]
}
}
},
Expand Down Expand Up @@ -207,9 +193,9 @@
"title": "Uuid"
},
"version": {
"$ref": "../Version.json",
"title": "Version",
"description": "This is the version of your pack in the format [majorVersion, minorVersion, revision]. The version number is used when importing a pack that has been imported before. The new pack will replace the old one if the version is higher, and ignored if it's the same or lower",
"title": "Version"
"oneOf": [{ "$ref": "../Version.json" }, { "$ref": "../semver.json" }]
},
"entry": {
"type": "string",
Expand Down Expand Up @@ -237,19 +223,16 @@
"type": "object",
"propertyNames": {
"pattern": "^[a-zA-Z0-9\\_\\-]+$",
"maxLength": 32,
"maximum": 32
"maxLength": 32
},
"additionalProperties": {
"type": "array",
"examples": [["1.0.0"]],
"title": "Tool",
"description": "The tool and the version used to modified this pack.",
"items": {
"type": "string",
"title": "Version",
"examples": ["1.0.0"],
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$"
"$ref": "../semver.json"
}
}
},
Expand Down
11 changes: 11 additions & 0 deletions source/general/semver.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "semver",
"title": "Semantic Version",
"description": "A semver.org compliant version number.",
"type": "string",
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
"minLength": 5,
"maxLength": 256,
"examples": ["1.0.0", "1.1.0-beta"]
}
Loading