File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 33 * Licensed under the MIT License. See License.txt in the project root for license information.
44 *--------------------------------------------------------------------------------------------*/
55// @ts -check
6- 'use strict' ;
7-
8- const fs = require ( 'fs' ) . promises ;
9- const path = require ( 'path' ) ;
6+ import { promises as fs } from 'fs' ;
7+ import { join , relative } from 'path' ;
108
119/**
1210 * @param {string } dir
@@ -17,7 +15,7 @@ async function* getPackageLockFiles(dir) {
1715 const files = await fs . readdir ( dir ) ;
1816
1917 for ( const file of files ) {
20- const fullPath = path . join ( dir , file ) ;
18+ const fullPath = join ( dir , file ) ;
2119 const stat = await fs . stat ( fullPath ) ;
2220
2321 if ( stat . isDirectory ( ) ) {
@@ -46,7 +44,7 @@ async function main(url, dir) {
4644 const root = dir ?? process . cwd ( ) ;
4745
4846 for await ( const file of getPackageLockFiles ( root ) ) {
49- console . log ( `Enabling custom NPM registry: ${ path . relative ( root , file ) } ` ) ;
47+ console . log ( `Enabling custom NPM registry: ${ relative ( root , file ) } ` ) ;
5048 await setup ( url , file ) ;
5149 }
5250}
You can’t perform that action at this time.
0 commit comments