{"id":18888386,"url":"https://github.com/pnpm/colorize-semver-diff","last_synced_at":"2025-04-14T23:21:35.466Z","repository":{"id":57137422,"uuid":"233969069","full_name":"pnpm/colorize-semver-diff","owner":"pnpm","description":"Makes a colorful semver diff","archived":false,"fork":false,"pushed_at":"2023-08-03T06:22:33.000Z","size":33,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T02:29:54.031Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pnpm.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}},"created_at":"2020-01-15T01:13:13.000Z","updated_at":"2022-01-30T02:22:22.000Z","dependencies_parsed_at":"2022-09-01T03:01:06.071Z","dependency_job_id":null,"html_url":"https://github.com/pnpm/colorize-semver-diff","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"3b10360f5d6c353aa87b645d58dfd321ce3b417f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Fcolorize-semver-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Fcolorize-semver-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Fcolorize-semver-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnpm%2Fcolorize-semver-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnpm","download_url":"https://codeload.github.com/pnpm/colorize-semver-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248870159,"owners_count":21174989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-08T07:43:51.892Z","updated_at":"2025-04-14T23:21:35.367Z","avatar_url":"https://github.com/pnpm.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @pnpm/colorize-semver-diff\n\n\u003e Makes a colorful semver diff\n\n\u003c!--@shields('npm', 'travis')--\u003e\n[![npm version](https://img.shields.io/npm/v/@pnpm/colorize-semver-diff.svg)](https://www.npmjs.com/package/@pnpm/colorize-semver-diff) [![Build Status](https://img.shields.io/travis/pnpm/colorize-semver-diff/master.svg)](https://travis-ci.org/pnpm/colorize-semver-diff)\n\u003c!--/@--\u003e\n\n## Installation\n\n```sh\n\u003cpnpm|yarn|npm\u003e add @pnpm/colorize-semver-diff\n```\n\n## Usage\n\n```ts\nimport colorizeSemverDiff from '@pnpm/colorize-semver-diff'\n\nconsole.log(colorizeSemverDiff({\n  change: 'feature',\n  diff: [['2'], ['1', '0', 'rc', '1']]\n}))\n```\n\n## API\n\n### colorizeSemverDiff(semverDiff)\n\nReturns a string with ANSI colors.\n\n#### semverDiff.change\n\ntype: `unknown`, `breaking`, `feature`, `fix`\n\n#### semverDiff.diff[0]\n\ntype: `string[]`\n\nAn array of version parts that are unchanged. For instance, in a diff between\n`1.0.0` and `1.2.0` the unchanged part will be `['1']`.\n\n#### semverDiff.diff[1]\n\ntype: `string[]`\n\nAn array of version parts that are changed. For instance, in a diff between\n`1.0.0` and `1.2.0` the changed part will be `['2', '0']`.\n\n## Related\n\n* [@pnpm/semver-diff](https://github.com/pnpm/semver-diff) - Gets the difference between two semver versions\n\n## License\n\n[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnpm%2Fcolorize-semver-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnpm%2Fcolorize-semver-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnpm%2Fcolorize-semver-diff/lists"}