File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/open-next/src/build/patch Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11import * as fs from "node:fs/promises" ;
2- import * as buildHelper from "../helper.js" ;
32import logger from "../../logger.js" ;
3+ import * as buildHelper from "../helper.js" ;
44
55// Either before or after should be provided, otherwise just use the field directly
66export interface VersionedField < T > {
@@ -99,12 +99,12 @@ export async function applyCodePatches(
9999 }
100100
101101 // We apply the patches
102+ let patchedContent = content ;
102103
103- patchToApply . forEach ( async ( patch ) => {
104+ for ( const patch of patchToApply ) {
104105 const patchCodeFns = Array . isArray ( patch . patchCode )
105106 ? extractVersionedField ( patch . patchCode , nextVersion )
106107 : [ patch . patchCode ] ;
107- let patchedContent = content ;
108108 logger . debug (
109109 `Applying ${ patchCodeFns . length } patches to ${ filePath } for ${ patch . name } ` ,
110110 ) ;
@@ -116,8 +116,8 @@ export async function applyCodePatches(
116116 manifests,
117117 } ) ;
118118 }
119- await fs . writeFile ( filePath , patchedContent ) ;
120- } ) ;
119+ }
120+ await fs . writeFile ( filePath , patchedContent ) ;
121121 } ) ,
122122 ) ;
123123 console . timeEnd ( "Applying code patches" ) ;
You can’t perform that action at this time.
0 commit comments