File tree Expand file tree Collapse file tree
bazel/rules/rules_browsers/browsers/private/update-tool Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,25 +113,17 @@ async function downloadMilestonesAndWriteVersionsFiles({
113113 generateVersionsBzlFile ( getReadableBrowserName ( browser ) , defaultVersion , versions ) ,
114114 ) ;
115115
116- // Format the resulting `.json` file. Prettier may apply some formatting that
117- // isn't consistent with default stringification (e.g. line length).
118- exec ( `npx prettier --write ${ jsonFilePath } ` , ( err , stdout , stderr ) => {
119- if ( err ) {
120- console . log ( stdout ) ;
121- console . log ( stderr ) ;
122- console . warn ( `Formatting of ${ jsonFilePath } failed: ${ err . message } ` ) ;
123- }
124- } ) ;
125-
126- // Format the resulting `.bzl` file. JSON is valid here, but it's not
127- // formatted quite right (e.g. no trailing comma).
128- exec ( `buildifier ${ bzlFilePath } ` , ( err , stdout , stderr ) => {
129- if ( err ) {
130- console . log ( stdout ) ;
131- console . log ( stderr ) ;
132- console . warn ( `Formatting of ${ bzlFilePath } failed: ${ err . message } ` ) ;
133- }
134- } ) ;
116+ exec (
117+ `pnpm ng-dev format files ${ bzlFilePath } ${ jsonFilePath } ` ,
118+ { cwd : workspaceRoot } ,
119+ ( err , stdout , stderr ) => {
120+ if ( err ) {
121+ console . log ( stdout ) ;
122+ console . log ( stderr ) ;
123+ console . warn ( `Formatting of ${ bzlFilePath } and ${ jsonFilePath } failed: ${ err . message } ` ) ;
124+ }
125+ } ,
126+ ) ;
135127}
136128
137129async function main ( ) {
You can’t perform that action at this time.
0 commit comments