File
Blob: npm/scripts/build-types-package.mjs
| 1 | import path from "path"; |
| 2 | import fs from "fs"; |
| 3 | |
| 4 | function buildTypesPackage() { |
| 5 | const packageJsonPath = path.join("npm", "workers-types", "package.json"); |
| 6 | const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8")); |
| 7 | packageJson.version = process.env.WORKERD_VERSION; |
| 8 | fs.writeFileSync( |
| 9 | packageJsonPath, |
| 10 | JSON.stringify(packageJson, null, 2) + "\n" |
| 11 | ); |
| 12 | } |
| 13 | |
| 14 | buildTypesPackage(); |