{"id":16347457,"url":"https://github.com/privatenumber/prerelease-checks","last_synced_at":"2025-03-23T00:32:52.297Z","repository":{"id":57329874,"uuid":"353222765","full_name":"privatenumber/prerelease-checks","owner":"privatenumber","description":"Run essential pre-release checks before releasing an npm package","archived":false,"fork":false,"pushed_at":"2021-04-26T01:13:39.000Z","size":1284,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-03-18T12:15:48.652Z","etag":null,"topics":["checks","cli","github","npm","pre-release","prerelease","publish","standard-version","validate","verify"],"latest_commit_sha":null,"homepage":"","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/privatenumber.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":"2021-03-31T04:16:36.000Z","updated_at":"2023-08-12T17:51:31.000Z","dependencies_parsed_at":"2022-09-06T20:30:47.225Z","dependency_job_id":null,"html_url":"https://github.com/privatenumber/prerelease-checks","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fprerelease-checks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fprerelease-checks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fprerelease-checks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Fprerelease-checks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/privatenumber","download_url":"https://codeload.github.com/privatenumber/prerelease-checks/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245040235,"owners_count":20551297,"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":["checks","cli","github","npm","pre-release","prerelease","publish","standard-version","validate","verify"],"created_at":"2024-10-11T00:42:36.852Z","updated_at":"2025-03-23T00:32:51.923Z","avatar_url":"https://github.com/privatenumber.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prerelease-checks \u003ca href=\"https://npm.im/prerelease-checks\"\u003e\u003cimg src=\"https://badgen.net/npm/v/prerelease-checks\"\u003e\u003c/a\u003e \u003ca href=\"https://npm.im/prerelease-checks\"\u003e\u003cimg src=\"https://badgen.net/npm/dm/prerelease-checks\"\u003e\u003c/a\u003e \u003ca href=\"https://packagephobia.now.sh/result?p=prerelease-checks\"\u003e\u003cimg src=\"https://packagephobia.now.sh/badge?p=prerelease-checks\"\u003e\u003c/a\u003e \u003ca href=\"https://bundlephobia.com/result?p=prerelease-checks\"\u003e\u003cimg src=\"https://badgen.net/bundlephobia/minzip/prerelease-checks\"\u003e\u003c/a\u003e\n\nRun essential pre-release checks before releasing an npm package.\n\n💞 Works well with [standard-version](https://github.com/conventional-changelog/standard-version)!\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/preview.gif\" width=\"60%\"\u003e\n\u003c/p\u003e\n\n\u003csub\u003eIf you like this project, please star it \u0026 [follow me](https://github.com/privatenumber) to see what other cool projects I'm working on! ❤️\u003c/sub\u003e\n\n## 🙋‍♂️ Why?\nBecause there are many points of failure when making a release.\n\nThis CLI runs a thorough check to guarantee a successful package release:\n\n#### ✅ npm\n- [x] Assert npm version\n- [x] Validate `package.json`\n  - [x] Check valid npm name\n  - [x] Check valid semver version\n  - [x] Verify public package\n- [x] Verify npm registry is reachable (in case custom)\n- [x] Verify npm publish registry is reachable\n- [x] Verify user is authenticated to publish registry and has permissions\n\n#### ✅ Git\n- [x] Assert Git version\n- [x] Verify working directory is clean\n- [x] Verify current branch is release branch\n- [x] Verify remote head exists\n- [x] Verify current branch is identical to upstream\n\n## 🚀 Install\n```sh\nnpm i -D prerelease-checks\n```\n\n### npx\nYou can also install-and-run as you need it via npx:\n```sh\nnpx prerelease-checks\n```\n\n## 🚦 Quick Setup\n\n\n### As a prepublish hook\nAdd `prerelease-checks` as a [`prepublishOnly` hook](https://docs.npmjs.com/cli/v7/using-npm/scripts#life-cycle-scripts) in your `package.json`:\n```diff\n {\n   \"scripts\": {\n+    \"prepublishOnly\": \"prerelease-checks\"\n   }\n }\n```\n\n\n### With standard-version\nIf you're using [standard-version](https://github.com/conventional-changelog/standard-version), add it to their `prerelease` hook.\n\n```diff\n {\n   \"scripts\": {\n+    \"prerelease\": \"prerelease-checks\",\n     \"release\": \"standard-version\"\n   }\n }\n```\n\n### Other\nYou can prepend your release script with `prerelease-checks`.\n\n```diff\n {\n   \"scripts\": {\n+    \"release\": \"prerelease-checks \u0026\u0026 my-custom-release-command\",\n   }\n }\n```\n\n\n## 🙏 Credits\nMany inspirations taken from the prerequisite checks from [np](https://github.com/sindresorhus/np/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Fprerelease-checks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprivatenumber%2Fprerelease-checks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Fprerelease-checks/lists"}