@@ -60,8 +60,12 @@ function localCliEnv(): NodeJS.ProcessEnv {
6060function rolldownBindingCandidates ( ) {
6161 switch ( process . platform ) {
6262 case 'android' :
63- if ( process . arch === 'arm64' ) return [ '@rolldown/binding-android-arm64/package.json' ] ;
64- if ( process . arch === 'arm' ) return [ '@rolldown/binding-android-arm-eabi/package.json' ] ;
63+ if ( process . arch === 'arm64' ) {
64+ return [ '@rolldown/binding-android-arm64/package.json' ] ;
65+ }
66+ if ( process . arch === 'arm' ) {
67+ return [ '@rolldown/binding-android-arm-eabi/package.json' ] ;
68+ }
6569 return [ ] ;
6670 case 'darwin' :
6771 if ( process . arch === 'arm64' ) {
@@ -78,8 +82,12 @@ function rolldownBindingCandidates() {
7882 }
7983 return [ ] ;
8084 case 'freebsd' :
81- if ( process . arch === 'arm64' ) return [ '@rolldown/binding-freebsd-arm64/package.json' ] ;
82- if ( process . arch === 'x64' ) return [ '@rolldown/binding-freebsd-x64/package.json' ] ;
85+ if ( process . arch === 'arm64' ) {
86+ return [ '@rolldown/binding-freebsd-arm64/package.json' ] ;
87+ }
88+ if ( process . arch === 'x64' ) {
89+ return [ '@rolldown/binding-freebsd-x64/package.json' ] ;
90+ }
8391 return [ ] ;
8492 case 'linux' :
8593 if ( process . arch === 'arm' ) {
@@ -100,14 +108,18 @@ function rolldownBindingCandidates() {
100108 '@rolldown/binding-linux-loong64-musl/package.json' ,
101109 ] ;
102110 }
103- if ( process . arch === 'ppc64' ) return [ '@rolldown/binding-linux-ppc64-gnu/package.json' ] ;
111+ if ( process . arch === 'ppc64' ) {
112+ return [ '@rolldown/binding-linux-ppc64-gnu/package.json' ] ;
113+ }
104114 if ( process . arch === 'riscv64' ) {
105115 return [
106116 '@rolldown/binding-linux-riscv64-gnu/package.json' ,
107117 '@rolldown/binding-linux-riscv64-musl/package.json' ,
108118 ] ;
109119 }
110- if ( process . arch === 's390x' ) return [ '@rolldown/binding-linux-s390x-gnu/package.json' ] ;
120+ if ( process . arch === 's390x' ) {
121+ return [ '@rolldown/binding-linux-s390x-gnu/package.json' ] ;
122+ }
111123 if ( process . arch === 'x64' ) {
112124 return [
113125 '@rolldown/binding-linux-x64-gnu/package.json' ,
@@ -116,8 +128,12 @@ function rolldownBindingCandidates() {
116128 }
117129 return [ ] ;
118130 case 'win32' :
119- if ( process . arch === 'arm64' ) return [ '@rolldown/binding-win32-arm64-msvc/package.json' ] ;
120- if ( process . arch === 'ia32' ) return [ '@rolldown/binding-win32-ia32-msvc/package.json' ] ;
131+ if ( process . arch === 'arm64' ) {
132+ return [ '@rolldown/binding-win32-arm64-msvc/package.json' ] ;
133+ }
134+ if ( process . arch === 'ia32' ) {
135+ return [ '@rolldown/binding-win32-ia32-msvc/package.json' ] ;
136+ }
121137 if ( process . arch === 'x64' ) {
122138 return [
123139 '@rolldown/binding-win32-x64-msvc/package.json' ,
@@ -162,7 +178,8 @@ function materializeRolldownPackagedBindings() {
162178 files ?: string [ ] ;
163179 main ?: string ;
164180 } ;
165- const bindingFile = packageJson . main ?? packageJson . files ?. find ( ( file ) => file . endsWith ( '.node' ) ) ;
181+ const bindingFile =
182+ packageJson . main ?? packageJson . files ?. find ( ( file ) => file . endsWith ( '.node' ) ) ;
166183 if ( ! bindingFile ) {
167184 continue ;
168185 }
@@ -182,9 +199,7 @@ function ensureBuildWorkspaceReady() {
182199 console . error (
183200 `Found legacy checkout at ${ legacyViteRepoDir } . This repo now expects the upstream Vite checkout at ./vite.` ,
184201 ) ;
185- console . error (
186- `Run "${ installHint } " to recreate the canonical layout.` ,
187- ) ;
202+ console . error ( `Run "${ installHint } " to recreate the canonical layout.` ) ;
188203 } else {
189204 console . error (
190205 `Run "${ installHint } " to fetch the local upstream checkouts, or "${ bootstrapHint } " to prepare and build the local CLI.` ,
@@ -298,21 +313,36 @@ export function runBuildLocalCli(args: string[]) {
298313 runPnpmCommand ( 'Build rolldown JS glue' , [ '--filter' , 'rolldown' , 'build-node' ] , {
299314 hint : 'If this fails with a missing rolldown native binding, rerun "pnpm install:dev". If the error mentions "cmake", install cmake to build rolldown from source.' ,
300315 } ) ;
301- runPnpmCommand ( 'Build vite rolled-up types' , [ '-C' , 'vite' , '--filter' , 'vite' , 'build-types-roll' ] , {
302- hint : 'If this fails because vite dependencies are missing, rerun "pnpm install" from the repo root.' ,
303- } ) ;
304- runPnpmCommand ( 'Type-check vite declarations' , [ '-C' , 'vite' , '--filter' , 'vite' , 'build-types-check' ] , {
305- hint : 'If this fails because vite dependencies are missing, rerun "pnpm install" from the repo root.' ,
306- } ) ;
316+ runPnpmCommand (
317+ 'Build vite rolled-up types' ,
318+ [ '-C' , 'vite' , '--filter' , 'vite' , 'build-types-roll' ] ,
319+ {
320+ hint : 'If this fails because vite dependencies are missing, rerun "pnpm install" from the repo root.' ,
321+ } ,
322+ ) ;
323+ runPnpmCommand (
324+ 'Type-check vite declarations' ,
325+ [ '-C' , 'vite' , '--filter' , 'vite' , 'build-types-check' ] ,
326+ {
327+ hint : 'If this fails because vite dependencies are missing, rerun "pnpm install" from the repo root.' ,
328+ } ,
329+ ) ;
307330 runPnpmCommand ( 'Build vite-plus core' , [ '--filter' , '@voidzero-dev/vite-plus-core' , 'build' ] ) ;
308331 runPnpmCommand ( 'Build vite-plus test' , [ '--filter' , '@voidzero-dev/vite-plus-test' , 'build' ] ) ;
309- runPnpmCommand ( 'Build vite-plus prompts' , [ '--filter' , '@voidzero-dev/vite-plus-prompts' , 'build' ] ) ;
332+ runPnpmCommand ( 'Build vite-plus prompts' , [
333+ '--filter' ,
334+ '@voidzero-dev/vite-plus-prompts' ,
335+ 'build' ,
336+ ] ) ;
310337 runPnpmCommand ( 'Build vite-plus CLI' , [ '--filter' , 'vite-plus' , 'build' ] , {
311338 env : releaseRust ? process . env : localBuildEnv ,
312339 } ) ;
313- runCommand (
314- 'Build Rust CLI binaries' ,
315- cargoBin ,
316- [ 'build' , '-p' , 'vite_global_cli' , '-p' , 'vite_trampoline' , ...( releaseRust ? [ '--release' ] : [ ] ) ] ,
317- ) ;
340+ runCommand ( 'Build Rust CLI binaries' , cargoBin , [
341+ 'build' ,
342+ '-p' ,
343+ 'vite_global_cli' ,
344+ '-p' ,
345+ 'vite_trampoline' ,
346+ ...( releaseRust ? [ '--release' ] : [ ] ) ,
347+ ] ) ;
318348}
0 commit comments