@@ -12,7 +12,7 @@ import {
1212 join ,
1313 relative ,
1414} from "path/mod.ts" ;
15- import { ensureDirSync , EOL , existsSync , format } from "fs/mod.ts" ;
15+ import { ensureDirSync , EOL , existsSync , format , LF } from "fs/mod.ts" ;
1616
1717import { cloneDeep } from "../../core/lodash.ts" ;
1818
@@ -38,7 +38,6 @@ import { kProjectLibDir, ProjectContext } from "../../project/types.ts";
3838import { projectScratchPath } from "../../project/project-scratch.ts" ;
3939import { copyMinimal , copyTo } from "../../core/copy.ts" ;
4040import { warning } from "log/mod.ts" ;
41- import { isWindows } from "../../core/platform.ts" ;
4241
4342export const kProjectFreezeDir = "_freeze" ;
4443export const kOldFreezeExecuteResults = "execute" ;
@@ -58,7 +57,7 @@ export function freezeExecuteResult(
5857 if ( result . includes [ name ] ) {
5958 result . includes [ name ] = result . includes [ name ] ! . map ( ( file ) =>
6059 // Storing file content using LF line ending
61- format ( Deno . readTextFileSync ( file ) , EOL . LF )
60+ format ( Deno . readTextFileSync ( file ) , LF )
6261 ) ;
6362 }
6463 }
@@ -142,7 +141,7 @@ export function defrostExecuteResult(
142141 result . includes [ name ] = result . includes [ name ] ! . map ( ( content ) => {
143142 const includeFile = temp . createFile ( ) ;
144143 // Restoring content in file using the OS line ending character
145- content = format ( content , isWindows ( ) ? EOL . CRLF : EOL . LF ) ;
144+ content = format ( content , EOL ) ;
146145 Deno . writeTextFileSync ( includeFile , content ) ;
147146 return includeFile ;
148147 } ) ;
@@ -305,7 +304,7 @@ export function removeFreezeResults(filesDir: string) {
305304function freezeInputHash ( input : string ) {
306305 // Calculate the hash on a content with LF line ending to avoid
307306 // different hash on different OS (#3599)
308- return md5Hash ( format ( Deno . readTextFileSync ( input ) , EOL . LF ) ) ;
307+ return md5Hash ( format ( Deno . readTextFileSync ( input ) , LF ) ) ;
309308}
310309
311310// don't use _files suffix in freezer
0 commit comments