{"id":22894883,"url":"https://github.com/duzun/verup","last_synced_at":"2025-06-11T12:38:06.020Z","repository":{"id":31131102,"uuid":"34690762","full_name":"duzun/verup","owner":"duzun","description":"Increment and update version in all project files","archived":false,"fork":false,"pushed_at":"2020-01-17T13:46:07.000Z","size":30,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T19:50:54.237Z","etag":null,"topics":["build","increment","javascript","nodejs","patch","version","verup"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/duzun.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}},"created_at":"2015-04-27T20:55:22.000Z","updated_at":"2020-01-17T13:46:05.000Z","dependencies_parsed_at":"2022-07-24T17:02:02.735Z","dependency_job_id":null,"html_url":"https://github.com/duzun/verup","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fverup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fverup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fverup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fverup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duzun","download_url":"https://codeload.github.com/duzun/verup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duzun%2Fverup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258803252,"owners_count":22760427,"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":["build","increment","javascript","nodejs","patch","version","verup"],"created_at":"2024-12-13T23:27:16.516Z","updated_at":"2025-06-11T12:38:05.997Z","avatar_url":"https://github.com/duzun.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# verup [![npm version](https://badge.fury.io/js/verup.svg)](https://badge.fury.io/js/verup)\n\n**v1.7.1**\n\nIncrement and update version in all project files.\n\n## Install\n\n```sh\nnpm i --save-dev verup\n```\n\nFor convenience, install it globally too:\n\n```sh\nnpm i -g verup\n```\n\nActually, it is not required to install `verup` if you have npm@5.2.0 and up.\n\nJust run `npx verup` after you've added `extra.verup` field to `package.json` file.\n\nHere is an example of what `package.json` might contain:\n\n```js\n...\n\"scripts\": {\n  \"verup\": \"verup\",\n  \"build\": \"verup -- 1 \u0026\u0026 build.sh\",\n  \"version\": \"verup 0\" // this one gets called on `npm version \u003cnewver\u003e` to patch other project files\n},\n\"extra\": {\n  \"verup\": {\n    \"files\": [...],\n    \"regs\":[...]\n  }\n}\n...\n```\n\n## CLI\n\nNow you can run:\n\n```sh\nnpx verup 1       # to increment revision by 1 or\nnpx verup -2      # to decrement revision by 2 or\nnpx verup \"1.0\"   # to increment minor version by 1 or\nnpx verup \"1.0.0\" # to increment major version by 1\n```\n\nOr using `npm` in your project's root, when you have `scripts.verup` in `package.json`\n(see example above):\n\n```sh\nnpm run verup -- 2    # to increment revision by 2 or\nnpm run verup -- -1   # to decrement revision by 1 or\nnpm run verup -- -1.0 # to decrement minor version by 1\nnpm version [\u003cnewver\u003e | major | minor | patch | ...] --no-git-tag-version\n```\n\nWhen `verup` is installed globally, you could run it in the project folder like this:\n\n```sh\nverup 1\nverup 1.0\nverup -1.0\n```\n\nIf you have subprojects, and want to avoid confusion as of\nwhich project to patch, use `-n \u003cprojectName\u003e` option:\n\n```sh\n./node_modules/my-subproject/node_modules/verup -n 'main-project' -b 1.0\n```\n\nThis will look for `package.json` with `name == 'main-project'` in all parent folders,\nuntil it finds the right level, and patch the files at that level.\n\n\n## In package.json\n\nThe minimum setup for your project is to add the list of file names that contain\nversion string to `package.json` at `extra.verup.files`.\nHere is a sample:\n\n```js\n...\n\"extra\": {\n  \"verup\": {\n    \"files\": [\n      \"manifest.json\",\n      \"index.js\",\n      \"README.MD\" ...\n    ]\n  }\n}\n...\n```\n\nIf the file is a `.json`, version is expected to be at key `version`.\nOtherwise version string is searched line by line using a list of regular expressions.\nBy default it would look for expressions like:\n\n- `var version = 'x.x.x'`\n- `$version = 'x.x.x'`\n- `version := 'x.x.x'`\n- `@version x.x.x`\n- `const VERSION = 'x.x.x'`\n- `* vX.X.X`\n\nYou can define you own list of regular expressions in `package.json` at `extra.verup.regs`:\n\n```js\n...\n\"extra\": {\n  \"verup\": {\n    \"regs\": [\n      \"((?:\\\\$|(?:\\\\s*\\\\*?\\\\s*@)|(?:^\\\\s*(?:var|,)?\\\\s+))ver(?:sion)?[\\\\s\\\\:='\\\"]+)([0-9]+(?:\\\\.[0-9]+){2,2})\",\n      \"^(\\\\s*\\\\$(?:_)?version[\\\\s='\\\"]+)([0-9]+(?:\\\\.[0-9]+){2,2})\",\n      \"^(\\\\s?\\\\*.*v)([0-9]+(?:\\\\.[0-9]+){2,2})\"\n    ]\n  }\n}\n...\n```\n\n\n### Related\n\nConsider reading [semver](https://semver.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduzun%2Fverup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduzun%2Fverup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduzun%2Fverup/lists"}