{"id":18278074,"url":"https://github.com/tanem/tanem-scripts","last_synced_at":"2025-04-05T04:30:58.962Z","repository":{"id":37270628,"uuid":"197337623","full_name":"tanem/tanem-scripts","owner":"tanem","description":":nut_and_bolt: Common scripts for my projects.","archived":false,"fork":false,"pushed_at":"2024-04-13T17:41:47.000Z","size":28928,"stargazers_count":3,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-13T18:09:34.179Z","etag":null,"topics":["authors","changelog","changelog-generator","cli","generator","git","github","javascript","markdown","node","script","scripts","shortlog","typescript"],"latest_commit_sha":null,"homepage":"https://npm.im/tanem-scripts","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/tanem.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"AUTHORS","dei":null}},"created_at":"2019-07-17T07:25:26.000Z","updated_at":"2024-04-15T05:48:07.464Z","dependencies_parsed_at":"2023-12-21T05:03:12.423Z","dependency_job_id":"b7087f7d-346f-4266-b542-258a5fb552bf","html_url":"https://github.com/tanem/tanem-scripts","commit_stats":{"total_commits":1077,"total_committers":4,"mean_commits":269.25,"dds":0.4215413184772516,"last_synced_commit":"ebee0838af534464c3b79a8fa053ce56440aa718"},"previous_names":[],"tags_count":188,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanem%2Ftanem-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanem%2Ftanem-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanem%2Ftanem-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanem%2Ftanem-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanem","download_url":"https://codeload.github.com/tanem/tanem-scripts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247289382,"owners_count":20914463,"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":["authors","changelog","changelog-generator","cli","generator","git","github","javascript","markdown","node","script","scripts","shortlog","typescript"],"created_at":"2024-11-05T12:22:53.369Z","updated_at":"2025-04-05T04:30:53.935Z","avatar_url":"https://github.com/tanem.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tanem-scripts\n\n[![npm version](https://img.shields.io/npm/v/tanem-scripts.svg?style=flat-square)](https://www.npmjs.com/package/tanem-scripts)\n[![build status](https://img.shields.io/github/workflow/status/tanem/tanem-scripts/CI?style=flat-square)](https://github.com/tanem/tanem-scripts/actions?query=workflow%3ACI)\n[![coverage status](https://img.shields.io/codecov/c/github/tanem/tanem-scripts.svg?style=flat-square)](https://codecov.io/gh/tanem/tanem-scripts)\n[![npm downloads](https://img.shields.io/npm/dm/tanem-scripts.svg?style=flat-square)](https://www.npmjs.com/package/tanem-scripts)\n\n\u003e Common scripts for my projects.\n\n## Usage\n\n```\nUsage: tanem-scripts [options] [command]\n\nCommon scripts for my projects.\n\nOptions:\n  -V, --version        output the version number\n  -h, --help           output usage information\n\nCommands:\n  authors              generates a list of authors in a format suitable for inclusion in an AUTHORS file\n  changelog [options]  generates a changelog using GitHub tags and pull requests\n  release              runs npm-version with a valid semver.inc argument\n```\n\n## API\n\n### authors()\n\nReturns a `Promise` that will be resolved with a list of authors sorted alphabetically by author name. If an error occurs during execution, the `Promise` is rejected with an `Error` object.\n\n**Example**\n\n```ts\n// Note: The `fs.promises` API was added in Node.js v10.0.0.\nimport { promises as fs } from 'fs';\nimport path from 'path';\nimport { authors } from 'tanem-scripts';\n\n(async () =\u003e {\n  try {\n    const result = await authors();\n    await fs.writeFile(path.join(__dirname, 'AUTHORS'), result, 'utf-8');\n  } catch (error) {\n    console.error(error);\n  }\n})();\n```\n\n---\n\n### changelog([options])\n\nReturns a `Promise` that will be resolved with the changelog. If an error occurs during execution, the `Promise` is rejected with an `Error` object.\n\n**Arguments**\n\n- `options` - _Optional_ An object containing the optional arguments defined below. Defaults to `{}`.\n  - `futureRelease` - _Optional_ Tag to use for PRs merged since the last published tag. If unspecified, those PRs will be excluded.\n\n**Example**\n\n```ts\n// Note: The `fs.promises` API was added in Node.js v10.0.0.\nimport { promises as fs } from 'fs';\nimport path from 'path';\nimport { changelog } from 'tanem-scripts';\n\n(async () =\u003e {\n  try {\n    const result = await changelog({\n      futureRelease: 'v2.0.0',\n    });\n    await fs.writeFile(path.join(__dirname, 'CHANGELOG.md'), result, 'utf-8');\n  } catch (error) {\n    console.error(error);\n  }\n})();\n```\n\n---\n\n### release()\n\nReturns a `Promise` that will be resolved once the release script completes. If an error occurs during execution, the `Promise` is rejected with an `Error` object.\n\n**Example**\n\n```ts\nimport { release } from 'tanem-scripts';\n\n(async () =\u003e {\n  try {\n    await release();\n  } catch (error) {\n    console.error(error);\n  }\n})();\n```\n\n## Installation\n\n```\n$ npm install tanem-scripts --save-dev\n```\n\nYou'll also need to generate a new [GitHub personal access token](https://github.com/settings/tokens), then set an environment variable by running the following command at the prompt or by adding it to your shell profile:\n\n```sh\nexport CHANGELOG_GITHUB_TOKEN=\u003cyour_github_personal_access_token\u003e\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanem%2Ftanem-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanem%2Ftanem-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanem%2Ftanem-scripts/lists"}