ci: conventional commits changelog (#3843)
* feat(live-preview): another oen * wip: changelog script * wippppp * chore: this worked * wip: changelog working * chore(script): working changelog gen * chore(script): update changelog during release
This commit is contained in:
@@ -13,13 +13,22 @@ export type PackageDetails = {
|
||||
newCommits: number
|
||||
shortName: string
|
||||
packagePath: string
|
||||
prevGitTag: string
|
||||
prevGitTagHash: string
|
||||
publishedVersion: string
|
||||
publishDate: string
|
||||
version: string
|
||||
}
|
||||
|
||||
export const getPackageDetails = async (): Promise<PackageDetails[]> => {
|
||||
const packageDirs = fse.readdirSync(packagesDir).filter((d) => d !== 'eslint-config-payload')
|
||||
export const getPackageDetails = async (pkg?: string): Promise<PackageDetails[]> => {
|
||||
let packageDirs: string[] = []
|
||||
if (pkg) {
|
||||
packageDirs = fse.readdirSync(packagesDir).filter((d) => d === pkg)
|
||||
} else {
|
||||
packageDirs = fse.readdirSync(packagesDir).filter((d) => d !== 'eslint-config-payload')
|
||||
}
|
||||
console.log(packageDirs)
|
||||
|
||||
const packageDetails = await Promise.all(
|
||||
packageDirs.map(async (dirName) => {
|
||||
const packageJson = await fse.readJson(`${packagesDir}/${dirName}/package.json`)
|
||||
@@ -49,6 +58,8 @@ export const getPackageDetails = async (): Promise<PackageDetails[]> => {
|
||||
newCommits: newCommits.total,
|
||||
shortName: dirName,
|
||||
packagePath: `packages/${dirName}`,
|
||||
prevGitTag,
|
||||
prevGitTagHash,
|
||||
publishedVersion,
|
||||
publishDate,
|
||||
version: packageJson.version,
|
||||
|
||||
Reference in New Issue
Block a user