{"id":17006070,"url":"https://github.com/duologic/semver-libsonnet","last_synced_at":"2026-01-28T00:37:02.007Z","repository":{"id":254757125,"uuid":"846594189","full_name":"Duologic/semver-libsonnet","owner":"Duologic","description":"Jsonnet library to parse and validate Semantic Versioning","archived":false,"fork":false,"pushed_at":"2024-10-16T12:43:11.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T06:38:23.472Z","etag":null,"topics":["jsonnet","jsonnet-lib","semantic-versioning","semver","semver-parser"],"latest_commit_sha":null,"homepage":"","language":"Jsonnet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Duologic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-23T14:36:26.000Z","updated_at":"2025-01-07T07:40:35.000Z","dependencies_parsed_at":"2024-08-25T23:11:28.727Z","dependency_job_id":"9f013be1-3bc6-42f8-89ed-1e0968cc3d93","html_url":"https://github.com/Duologic/semver-libsonnet","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"a8b30bacf7581b9ddace1ca998eb6172313ff264"},"previous_names":["duologic/semver-libsonnet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Duologic/semver-libsonnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fsemver-libsonnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fsemver-libsonnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fsemver-libsonnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fsemver-libsonnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Duologic","download_url":"https://codeload.github.com/Duologic/semver-libsonnet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Duologic%2Fsemver-libsonnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28829516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jsonnet","jsonnet-lib","semantic-versioning","semver","semver-parser"],"created_at":"2024-10-14T05:04:56.927Z","updated_at":"2026-01-28T00:37:01.971Z","avatar_url":"https://github.com/Duologic.png","language":"Jsonnet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# semver\n\nJsonnet library to parse and validate Semantic Versioning.\n\nImplemented according spec Semantic Versioning 2.0.0\n\nUsing BNF: https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions\n\n## Install\n\n```\njb install github.com/Duologic/semver-libsonnet/semver@main\n```\n## Usage\n\nExample:\n\n```jsonnet\nlocal semver = import 'github.com/Duologic/semver-libsonnet/semver/main.libsonnet';\n\nsemver.parse('2.0.0-rc.1+build.123')\n\n```\n\nOutput:\n\n```json\n{\n    \"build\": \"build.123\",\n    \"major\": \"2\",\n    \"minor\": \"0\",\n    \"patch\": \"0\",\n    \"pre-release\": \"rc.1\"\n}\n```\n\n\n## Index\n\n* [`fn parse(semver)`](#fn-parse)\n* [`fn validate(semver)`](#fn-validate)\n\n## Fields\n\n### fn parse\n\n```jsonnet\nparse(semver)\n```\n\nPARAMETERS:\n\n* **semver** (`string`)\n\n`parse` will parse and validate a Semantic Version from a string and returning an object. It'll throw an assertion if the string is not valid.\n### fn validate\n\n```jsonnet\nvalidate(semver)\n```\n\nPARAMETERS:\n\n* **semver** (`string`)\n\n`validate` will parse and validate a Semantic Version from a string and return a boolean.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduologic%2Fsemver-libsonnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduologic%2Fsemver-libsonnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduologic%2Fsemver-libsonnet/lists"}