@@ -31,7 +31,7 @@ import {
3131 parseUserConfig ,
3232 UserConfig ,
3333} from "./config/db-config" ;
34- import { getRemoteConfig } from "./config/file" ;
34+ import { getRemoteConfig , LOCAL_PATH_PREFIX } from "./config/file" ;
3535import {
3636 parseRegistries ,
3737 type RegistryConfigNoCredentials ,
@@ -1278,13 +1278,13 @@ export async function initConfig(
12781278}
12791279
12801280/**
1281- * Determines if `configPath` is explicitly local. That is, it starts with "./" .
1282- * A configuration file path that starts with "./" is always treated as a local path.
1281+ * Determines if `configPath` is explicitly local. That is, it starts with `LOCAL_PATH_PREFIX` .
1282+ * A configuration file path that starts with `LOCAL_PATH_PREFIX` is always treated as a local path.
12831283 *
12841284 * @param configPath The path to test.
12851285 */
12861286function isRelativePath ( configPath : string ) : boolean {
1287- return configPath . startsWith ( "./" ) ;
1287+ return configPath . startsWith ( LOCAL_PATH_PREFIX ) ;
12881288}
12891289
12901290/**
@@ -1305,9 +1305,9 @@ function containsAtRef(configPath: string): boolean {
13051305 * @returns True if it is local, or false otherwise.
13061306 */
13071307function isLocal ( configPath : string ) : boolean {
1308- // If the path starts with "./" , it is explicitly local.
1308+ // If the path starts with `LOCAL_PATH_PREFIX` , it is explicitly local.
13091309 // This allows local paths that would otherwise contain '@'
1310- // to be used with a "./" prefix.
1310+ // to be used with a `LOCAL_PATH_PREFIX` prefix.
13111311 if ( isRelativePath ( configPath ) ) {
13121312 return true ;
13131313 }
0 commit comments