Files
medusa-store/www/utils/packages/scripts/run-changeset.ts
Shahed Nasser 6e65158af3 docs-util: Upgrade typedoc to 0.26 (#7853)
Upgrade typedoc to v0.26 + make changes based on the update

Note: This update produces an error when generating model references when the models use the `createPsqlIndexStatementHelper` decorator. As this isn't a breaking error, and as we'll move to DML in the future, it's not necessary to spend time on a fix.
2024-06-27 10:52:44 +00:00

27 lines
622 B
TypeScript

import util from "node:util"
import { exec } from "child_process"
import path from "node:path"
const promiseExec = util.promisify(exec)
async function main() {
// check if there are any changes in diff
const diffFiles = (await promiseExec(`git diff --name-only`)).stdout
.toString()
.split("\n")
.filter(Boolean)
if (!diffFiles.length) {
console.log("No files were changed, skipping generating changeset...")
return
}
// run changeset
await promiseExec(`yarn changeset --empty`, {
cwd: path.resolve("..", "..", "..", ".."),
})
console.log("Generated changeset.")
}
void main()