runDaily.js 1.1 KB

1234567891011121314151617181920212223242526272829
  1. // @ts-check
  2. /*---------------------------------------------------------------------------------------------
  3. * Copyright (c) Microsoft Corporation. All rights reserved.
  4. * Licensed under the MIT License. See License.txt in the project root for license information.
  5. *--------------------------------------------------------------------------------------------*/
  6. const { execSync } = require("child_process");
  7. const { join } = require("path");
  8. const { readFileSync, writeFileSync } = require("fs");
  9. // Update to the daily build
  10. execSync("npm install --save typescript@next");
  11. // Update the dts files
  12. execSync("npm run import-typescript");
  13. // Sync the versions
  14. const packagePath = join(__dirname, "../package.json");
  15. const package = JSON.parse(readFileSync(packagePath, "utf8"));
  16. const tsPackagePath = join(__dirname, "../node_modules/typescript/package.json");
  17. const tsPackage = JSON.parse(readFileSync(tsPackagePath, "utf8"));
  18. // Set the monaco-typescript version to directly match the typescript nightly version
  19. package.version = tsPackage.version;
  20. writeFileSync(packagePath, JSON.stringify(package), "utf8");
  21. // Update the dts files
  22. execSync("npm run compile");