11import { dir as tmpDir } from "tmp-promise" ;
2- import { writeFile } from "fs/promises" ;
3- import { join } from "path" ;
4- import { execFile } from "child_process" ;
5- import { promisify } from "util" ;
2+ import { writeFile } from "node: fs/promises" ;
3+ import { join } from "node: path" ;
4+ import { execFile } from "node: child_process" ;
5+ import { promisify } from "node: util" ;
66import { dump as yamlDump } from "js-yaml" ;
7- import * as fs from "fs/promises" ;
7+ import * as fs from "node: fs/promises" ;
88
99const execFileAsync = promisify ( execFile ) ;
1010
@@ -58,7 +58,7 @@ export async function createTestWorkspace(): Promise<TestWorkspace> {
5858 const existingContent = await fs
5959 . readFile ( yarnrcPath , "utf8" )
6060 . catch ( ( ) => "" ) ;
61- await writeFile ( yarnrcPath , existingContent + "\n" + yamlDump ( content ) ) ;
61+ await writeFile ( yarnrcPath , ` ${ existingContent } \n ${ yamlDump ( content ) } ` ) ;
6262 } ;
6363
6464 return {
@@ -75,7 +75,7 @@ export async function createTestWorkspace(): Promise<TestWorkspace> {
7575 */
7676export async function createTestProtocolPlugin (
7777 workspace : TestWorkspace ,
78- protocolName : string
78+ protocolName : string ,
7979) : Promise < string > {
8080 const pluginCode = `
8181module.exports = {
@@ -122,7 +122,7 @@ export function extractDependencies(log: string): string[] {
122122 . filter ( ( str ) => str != null && str . length > 0 )
123123 . map (
124124 ( depsString ) =>
125- JSON . parse ( depsString ) as { value : string ; children : object }
125+ JSON . parse ( depsString ) as { value : string ; children : object } ,
126126 )
127127 . reduce ( ( result , item ) => [ ...result , item . value ] , [ ] as string [ ] ) ;
128128}
0 commit comments