This repository was archived by the owner on Feb 5, 2022. It is now read-only.
File tree 3 files changed +12
-0
lines changed
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const path = require('path')
2
2
const majo = require ( 'majo' )
3
3
const matcher = require ( 'micromatch' )
4
4
const { glob, fs } = require ( 'majo' )
5
+ const isBinaryPath = require ( 'is-binary-path' )
5
6
const logger = require ( './logger' )
6
7
const getGlobPatterns = require ( './utils/getGlobPatterns' )
7
8
@@ -47,6 +48,9 @@ module.exports = async (config, context) => {
47
48
stream . use ( ( { files } ) => {
48
49
let fileList = Object . keys ( stream . files )
49
50
51
+ // Exclude binary path
52
+ fileList = fileList . filter ( fp => ! isBinaryPath ( fp ) )
53
+
50
54
if ( action . transformInclude ) {
51
55
fileList = matcher ( fileList , action . transformInclude )
52
56
}
Original file line number Diff line number Diff line change 29
29
"hash-sum" : " ^1.0.2" ,
30
30
"ini" : " ^1.3.5" ,
31
31
"inquirer" : " ^6.2.0" ,
32
+ "is-binary-path" : " ^2.0.0" ,
32
33
"joycon" : " ^2.1.2" ,
33
34
"jstransformer" : " ^1.0.0" ,
34
35
"jstransformer-ejs" : " ^0.2.0" ,
Original file line number Diff line number Diff line change @@ -3805,6 +3805,13 @@ is-binary-path@^1.0.0:
3805
3805
dependencies :
3806
3806
binary-extensions "^1.0.0"
3807
3807
3808
+ is-binary-path@^2.0.0 :
3809
+ version "2.0.0"
3810
+ resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.0.0.tgz#0e61cea6974b24dda8bcc8366ce58a69265d1a36"
3811
+ integrity sha1-DmHOppdLJN2ovMg2bOWKaSZdGjY=
3812
+ dependencies :
3813
+ binary-extensions "^1.0.0"
3814
+
3808
3815
is-buffer@^1.1.4, is-buffer@^1.1.5 :
3809
3816
version "1.1.6"
3810
3817
resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
You can’t perform that action at this time.
0 commit comments