{"_id":"@avolgha/changelog","name":"@avolgha/changelog","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@avolgha/changelog","version":"1.0.0","description":"<p><h2 align=\"center\">changelog</h2></p>","packageManager":"pnpm@8.1.1","bin":{"changelog":"dist/changelog.cjs.js"},"main":"dist/changelog.cjs.js","module":"dist/changelog.esm.js","types":"dist/types/main.d.ts","repository":{"type":"git","url":"git+https://github.com/avolgha/changelog.git"},"author":{"name":"avolgha","email":"avolgha@gmail.com","url":"github.com/avolgha"},"license":"BSD-3 Clause Clear","bugs":{"url":"https://github.com/avolgha/changelog/issues"},"homepage":"https://github.com/avolgha/changelog","devDependencies":{"@eslint/create-config":"^0.4.2","@rollup/plugin-terser":"^0.4.0","@rollup/plugin-typescript":"^11.0.0","@types/node":"^18.15.11","@types/semver":"^7.5.0","@typescript-eslint/eslint-plugin":"^5.54.0","@typescript-eslint/parser":"^5.54.0","eslint":"^8.35.0","rollup":"^3.18.0","tslib":"^2.5.0","typescript":"^4.9.5"},"dependencies":{"semver":"^7.5.4"},"scripts":{"bundle":"rollup -c","watch":"rollup -cw","lint":"eslint src/"},"_id":"@avolgha/changelog@1.0.0","_integrity":"sha512-L5UKiInmg6xRCxhtqOZLQe13kX2/TQ8Du7WMksX4b7bUf3h4USnRcfx6hwHszVkPtp2Wddz6Myb2l1fyeJLN/w==","_resolved":"C:\\Users\\user\\AppData\\Local\\Temp\\5b7a722784fb075afb3c0545884e7055\\avolgha-changelog-1.0.0.tgz","_from":"file:avolgha-changelog-1.0.0.tgz","_nodeVersion":"20.3.1","_npmVersion":"8.7.0","dist":{"integrity":"sha512-L5UKiInmg6xRCxhtqOZLQe13kX2/TQ8Du7WMksX4b7bUf3h4USnRcfx6hwHszVkPtp2Wddz6Myb2l1fyeJLN/w==","shasum":"b52670b5b2ef9803907ca6d804c11a28ff5b6188","tarball":"https://registry.npmjs.org/@avolgha/changelog/-/changelog-1.0.0.tgz","fileCount":9,"unpackedSize":13662,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCEeaTLHZV2kpqKkIzKgnTTuyiViPwF9+2bk5jZadWTAiEA6XvgGxwEZflmI/ImEbIzP8axcsQNPmQJo6ZOBt0yvFE="}]},"_npmUser":{"name":"avolgha","email":"avolgha@gmail.com"},"directories":{},"maintainers":[{"name":"avolgha","email":"avolgha@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/changelog_1.0.0_1690387694269_0.35855265849117135"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-26T16:08:14.172Z","1.0.0":"2023-07-26T16:08:14.475Z","modified":"2023-07-26T16:08:14.741Z"},"maintainers":[{"name":"avolgha","email":"avolgha@gmail.com"}],"description":"<p><h2 align=\"center\">changelog</h2></p>","homepage":"https://github.com/avolgha/changelog","repository":{"type":"git","url":"git+https://github.com/avolgha/changelog.git"},"author":{"name":"avolgha","email":"avolgha@gmail.com","url":"github.com/avolgha"},"bugs":{"url":"https://github.com/avolgha/changelog/issues"},"license":"BSD-3 Clause Clear","readme":"<p><h2 align=\"center\">changelog</h2></p>\n\n## usage\n\n```typescript\nimport { Changelog } from \"@avolgha/changelog\";\n\nconst changelog = new Changelog(\".changelog.json\");\n\nchangelog.entry({\n    author: \"avolgha\",\n    description: \"initial commit\",\n    timestamp: 1690386289081,\n    commitId: \"b959d70\",\n});\n\nchangelog.save();\n```\n\n## methods\n\n###### `Changelog.constructor`\n> ```typescript\n> constructor(\n>    filepath: string,\n>    initialVersion?: string\n> );\n> ```\n\nCreate the changelog from the stored object in the given filepath.  \nIf there is nothing stored in the changelog, there will be a version tag\ncreated automatically. This will be the given initial version or `1.0.0`\nif nothing was provided.\n\n###### `Changelog.pushVersion()`\n> ```typescript\n> function pushVersion(\n>     type: \"major\" | \"minor\" | \"patch\",\n>     identifier?: string\n> ): void;\n> ```\n\nSet a new changelog version recording to the `semver` version specs.  \nYou may find a more detailed description of the function in the source\ncode [here](https://github.com/npm/node-semver/blob/main/functions/inc.js).\n\n###### `Changelog.getEntries(version?)`\n> ```typescript\n> function getEntries(\n>     version?: string\n> ): ChangelogEntry[];\n> ```\n\nGet all entries for a given version. If the version is not specified, we\ndefault back to the current stored version.\n\n###### `Changelog.getVersions()`\n> ```typescript\n> function getVersions(\n>     type: \"major\" | \"minor\" | \"patch\",\n>     identifier?: string\n> ): string[];\n> ```\n\nGet all stored versions from the changelog.\n\n###### `Changelog.entry(entry)`\n> ```typescript\n> function entry(\n>     entry: ChangelogEntry\n> ): void;\n> ```\n\nSave a new entry to the current selected version in the changelog.\n\n###### `Changelog.save()`\n> ```typescript\n> function save(): void;\n> ```\n\nStore the current changelog object to the filepath given in the\nconstructor.\n\n###### `formatToString(changelog)`\n> ```typescript\n> function formatToString(\n>     changelog: Changelog\n> ): string;\n> ```\n\nSave all entries of the changelog in a string.\n","readmeFilename":"readme.md"}