forked from OpenWF/SpaceNinjaServer
		
	chore: fix nodejs deprecation warning in dev script (#2947)
Reviewed-on: OpenWF/SpaceNinjaServer#2947 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									654652b889
								
							
						
					
					
						commit
						b2749765a3
					
				@ -41,8 +41,7 @@ function run(changedFile) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const thisbuildproc = spawn(
 | 
					    const thisbuildproc = spawn(
 | 
				
			||||||
        process.versions.bun ? "bun" : "npm",
 | 
					        [process.versions.bun ? "bun" : "npm", "run", cangoraw ? "verify" : "build:dev"].join(" "),
 | 
				
			||||||
        ["run", cangoraw ? "verify" : "build:dev"],
 | 
					 | 
				
			||||||
        spawnopts
 | 
					        spawnopts
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    const thisbuildstart = Date.now();
 | 
					    const thisbuildstart = Date.now();
 | 
				
			||||||
@ -55,8 +54,13 @@ function run(changedFile) {
 | 
				
			|||||||
        if (code === 0) {
 | 
					        if (code === 0) {
 | 
				
			||||||
            console.log(`${cangoraw ? "Verified" : "Built"} in ${Date.now() - thisbuildstart} ms`);
 | 
					            console.log(`${cangoraw ? "Verified" : "Built"} in ${Date.now() - thisbuildstart} ms`);
 | 
				
			||||||
            runproc = spawn(
 | 
					            runproc = spawn(
 | 
				
			||||||
                process.versions.bun ? "bun" : "npm",
 | 
					                [
 | 
				
			||||||
                ["run", cangoraw ? (process.versions.bun ? "raw:bun" : "raw") : "start", "--", ...args],
 | 
					                    process.versions.bun ? "bun" : "npm",
 | 
				
			||||||
 | 
					                    "run",
 | 
				
			||||||
 | 
					                    cangoraw ? (process.versions.bun ? "raw:bun" : "raw") : "start",
 | 
				
			||||||
 | 
					                    "--",
 | 
				
			||||||
 | 
					                    ...args
 | 
				
			||||||
 | 
					                ].join(" "),
 | 
				
			||||||
                spawnopts
 | 
					                spawnopts
 | 
				
			||||||
            );
 | 
					            );
 | 
				
			||||||
            runproc.on("exit", () => {
 | 
					            runproc.on("exit", () => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user