1+ import { existsSync } from 'node:fs' ;
2+ import fs from 'node:fs/promises' ;
3+ import os from 'node:os' ;
4+ import path from 'node:path' ;
5+ import { unarchive } from 'unarchive' ;
6+ import { getRunOptions , writeConfig } from './config.js' ;
7+ import github from './github.js' ;
18import type {
29 ConfigFile ,
310 ConfigFileSettings ,
@@ -6,16 +13,6 @@ import type {
613 VendorDependency ,
714 VendorsOptions ,
815} from './types.js' ;
9-
10- import { existsSync } from 'node:fs' ;
11- import fs from 'node:fs/promises' ;
12- import os from 'node:os' ;
13- import path from 'node:path' ;
14-
15- import { unarchive } from 'unarchive' ;
16-
17- import { getRunOptions , writeConfig } from './config.js' ;
18- import github from './github.js' ;
1916import {
2017 assert ,
2118 checkIfNeedsUpdate ,
@@ -30,8 +27,8 @@ import {
3027 info ,
3128 ownerAndNameFromRepoUrl ,
3229 random ,
33- readLockfile ,
3430 readableToFile ,
31+ readLockfile ,
3532 red ,
3633 replaceVersion ,
3734 success ,
@@ -93,7 +90,7 @@ export async function sync(
9390 if ( getRunOptions ( ) . prMode && updatedDeps . length > 0 ) {
9491 const updatedDepsString = updatedDeps
9592 . map (
96- ( dep ) =>
93+ dep =>
9794 `* Bump [${ dep . name } ](${ dep . url } ) from ❌ ${ dep . oldVersion } to ✅ ${ dep . newVersion } ` ,
9895 )
9996 . join ( '\n' ) ;
@@ -256,7 +253,7 @@ export async function install({
256253 | string
257254 | [ string , string ]
258255 | [ string , { [ input : string ] : string } ]
259- ) [ ] = dependency . files . flatMap ( ( file ) =>
256+ ) [ ] = dependency . files . flatMap ( file =>
260257 // @ts -expect-error Type 'string' is not assignable to type '[string, string]'
261258 typeof file === 'object' ? Object . entries ( file ) : file ,
262259 ) ;
@@ -268,7 +265,7 @@ export async function install({
268265 const releaseFiles : { input : string ; output : ReleaseFileOutput } [ ] = [ ] ;
269266
270267 await Promise . all (
271- allFiles . map ( async ( file ) => {
268+ allFiles . map ( async file => {
272269 let input : string ;
273270 // type of parameter two
274271 let output : ReleaseFileOutput ;
@@ -301,7 +298,7 @@ export async function install({
301298 path : input ,
302299 ref,
303300 } )
304- . catch ( ( err ) => {
301+ . catch ( err => {
305302 if ( err ?. status === 404 ) {
306303 error (
307304 `File "${ file } " was not found in ${ dependency . repository } ` ,
@@ -325,7 +322,7 @@ export async function install({
325322
326323 await Promise . all (
327324 // file.output is either a string that or an object which would mean that we want to extract the files from the downloaded archive
328- releaseFiles . map ( async ( file ) => {
325+ releaseFiles . map ( async file => {
329326 const input = replaceVersion ( file . input , ref ) . replace (
330327 '{release}/' ,
331328 '' ,
@@ -367,7 +364,7 @@ export async function install({
367364 }
368365
369366 const inputOutput = Array . isArray ( output )
370- ? output . map ( ( o ) => [ o , o ] )
367+ ? output . map ( o => [ o , o ] )
371368 : Object . entries ( output ) ;
372369
373370 // move files
0 commit comments