@@ -16,7 +16,7 @@ import {handler} from "./handler.js";
1616import * as yaml from "js-yaml" ;
1717import { Parser } from "./parser.js" ;
1818import { resolveIncludeLocal , validateIncludeLocal } from "./parser-includes.js" ;
19- import globby from "globby" ;
19+ import { globbySync } from "globby" ;
2020import terminalLink from "terminal-link" ;
2121import * as crypto from "crypto" ;
2222import * as path from "path" ;
@@ -63,6 +63,8 @@ export interface Need {
6363 project ?: string ;
6464}
6565
66+ const isGlob = ( str : string ) => / [ * ? { } ( | ) [ \] ] / . test ( str ) ;
67+
6668const dateFormatter = new Intl . DateTimeFormat ( undefined , {
6769 year : undefined ,
6870 month : undefined ,
@@ -1325,11 +1327,11 @@ If you know what you're doing and would like to suppress this warning, use one o
13251327 }
13261328
13271329 let path = _path ;
1328- if ( globby . hasMagic ( path ) && ! path . endsWith ( "*" ) ) {
1330+ if ( isGlob ( path ) && ! path . endsWith ( "*" ) ) {
13291331 path = `${ path } /**` ;
13301332 }
13311333
1332- let numOfFiles = globby . sync ( path , {
1334+ let numOfFiles = globbySync ( path , {
13331335 dot : true ,
13341336 onlyFiles : false ,
13351337 cwd : `${ this . argv . cwd } /${ stateDir } /cache/${ cacheName } ` ,
@@ -1340,7 +1342,7 @@ If you know what you're doing and would like to suppress this warning, use one o
13401342 continue ;
13411343 }
13421344
1343- if ( ! globby . hasMagic ( path ) ) numOfFiles ++ ; // add one because the pattern itself is a folder
1345+ if ( ! isGlob ( path ) ) numOfFiles ++ ; // add one because the pattern itself is a folder
13441346
13451347 writeStreams . stdout ( `${ _path } : found ${ numOfFiles } artifact files and directories\n` ) ;
13461348 }
0 commit comments