You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
monaco-editor/scripts/runDaily.js

30 lines
1.1 KiB
JavaScript

// @ts-check
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
const { execSync } = require("child_process");
const { join } = require("path");
const { readFileSync, writeFileSync } = require("fs");
6 years ago
// Update to the daily build
execSync("npm install --save typescript@next");
6 years ago
// Update the dts files
execSync("npm run import-typescript");
6 years ago
// Sync the versions
const packagePath = join(__dirname, "../package.json");
const package = JSON.parse(readFileSync(packagePath, "utf8"));
6 years ago
const tsPackagePath = join(__dirname, "../node_modules/typescript/package.json");
const tsPackage = JSON.parse(readFileSync(tsPackagePath, "utf8"));
6 years ago
// Set the monaco-typescript version to directly match the typescript nightly version
package.version = tsPackage.version;
writeFileSync(packagePath, JSON.stringify(package), "utf8");
6 years ago
// Update the dts files
execSync("npm run compile");