@@ -5,9 +5,6 @@ const dirGlob = require('dir-glob');
5
5
const globby = require ( 'globby' ) ;
6
6
const debug = require ( 'debug' ) ( 'semantic-release:github' ) ;
7
7
8
- const filesTransform = ( files , cwd , transform ) =>
9
- files . map ( file => `${ file . startsWith ( '!' ) ? '!' : '' } ${ transform ( cwd , file . startsWith ( '!' ) ? file . slice ( 1 ) : file ) } ` ) ;
10
-
11
8
module . exports = async ( { cwd} , assets ) =>
12
9
uniqWith (
13
10
[ ]
@@ -16,11 +13,9 @@ module.exports = async ({cwd}, assets) =>
16
13
assets . map ( async asset => {
17
14
// Wrap single glob definition in Array
18
15
let glob = castArray ( isPlainObject ( asset ) ? asset . path : asset ) ;
19
- // TODO Temporary workaround for https://github.com/kevva/dir-glob/issues/7 and https://github.com/mrmlnc/fast-glob/issues/47
20
- glob = uniq ( [
21
- ...filesTransform ( await dirGlob ( filesTransform ( glob , cwd , path . resolve ) ) , cwd , path . relative ) ,
22
- ...glob ,
23
- ] ) ;
16
+
17
+ // TODO Temporary workaround for https://github.com/mrmlnc/fast-glob/issues/47
18
+ glob = uniq ( [ ...( await dirGlob ( glob , { cwd} ) ) , ...glob ] ) ;
24
19
25
20
// Skip solo negated pattern (avoid to include every non js file with `!**/*.js`)
26
21
if ( glob . length <= 1 && glob [ 0 ] . startsWith ( '!' ) ) {
@@ -33,7 +28,7 @@ module.exports = async ({cwd}, assets) =>
33
28
34
29
const globbed = await globby ( glob , {
35
30
cwd,
36
- expandDirectories : true ,
31
+ expandDirectories : false , // TODO Temporary workaround for https://github.com/mrmlnc/fast-glob/issues/47
37
32
gitignore : false ,
38
33
dot : true ,
39
34
onlyFiles : false ,
0 commit comments