@@ -6,6 +6,7 @@ import { task } from "hereby";
66import _glob from "glob" ;
77import util from "util" ;
88import chalk from "chalk" ;
9+ import fsExtra from "fs-extra" ;
910import { Debouncer , Deferred , exec , getDiffTool , getDirSize , memoize , needsUpdate , readJson } from "./scripts/build/utils.mjs" ;
1011import { localBaseline , localRwcBaseline , refBaseline , refRwcBaseline , runConsoleTests } from "./scripts/build/tests.mjs" ;
1112import { buildProject , cleanProject , watchProject } from "./scripts/build/projects.mjs" ;
@@ -854,3 +855,14 @@ export const help = task({
854855 hiddenFromTaskList : true ,
855856 run : ( ) => exec ( "hereby" , [ "--tasks" ] , { hidePrompt : true } ) ,
856857} ) ;
858+
859+ export const bumpLkgToNightly = task ( {
860+ name : "bump-lkg-to-nightly" ,
861+ description : "Bumps typescript in package.json to the latest nightly and copies it to LKG." ,
862+ run : async ( ) => {
863+ await exec ( "npm" , [ "install" , "--save-dev" , "--save-exact" , "typescript@next" ] ) ;
864+ await fs . promises . rm ( "lib" , { recursive : true , force : true } ) ;
865+ await fsExtra . copy ( "node_modules/typescript/lib" , "lib" ) ;
866+ await fs . promises . writeFile ( "lib/.gitattributes" , "* text eol=lf" ) ;
867+ }
868+ } ) ;
0 commit comments