Skip to content
File

Blob: npm/scripts/build-types-package.mjs

javascript15 lines
1import path from "path";
2import fs from "fs";
3 
4function 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 
14buildTypesPackage();