()
| 2 | import { packages } from "./workspace"; |
| 3 | |
| 4 | export function updateWorkspacesVersion() { |
| 5 | const file = "package.json"; |
| 6 | const version = JSON.parse(fs.readFileSync(file, "utf8")).version; |
| 7 | |
| 8 | for (const packageName of packages) { |
| 9 | const workspaceFile = `${packageName}/package.json`; |
| 10 | const packageInfos = JSON.parse(fs.readFileSync(workspaceFile, "utf8")); |
| 11 | packageInfos.version = version; |
| 12 | fs.writeFileSync(workspaceFile, JSON.stringify(packageInfos, null, "\t")); |
| 13 | } |
| 14 | } |