This repository was archived by the owner on Feb 5, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 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')
22const majo = require ( 'majo' )
33const matcher = require ( 'micromatch' )
44const { glob, fs } = require ( 'majo' )
5+ const isBinaryPath = require ( 'is-binary-path' )
56const logger = require ( './logger' )
67const getGlobPatterns = require ( './utils/getGlobPatterns' )
78
@@ -47,6 +48,9 @@ module.exports = async (config, context) => {
4748 stream . use ( ( { files } ) => {
4849 let fileList = Object . keys ( stream . files )
4950
51+ // Exclude binary path
52+ fileList = fileList . filter ( fp => ! isBinaryPath ( fp ) )
53+
5054 if ( action . transformInclude ) {
5155 fileList = matcher ( fileList , action . transformInclude )
5256 }
Original file line number Diff line number Diff line change 2929 "hash-sum" : " ^1.0.2" ,
3030 "ini" : " ^1.3.5" ,
3131 "inquirer" : " ^6.2.0" ,
32+ "is-binary-path" : " ^2.0.0" ,
3233 "joycon" : " ^2.1.2" ,
3334 "jstransformer" : " ^1.0.0" ,
3435 "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:
38053805 dependencies :
38063806 binary-extensions "^1.0.0"
38073807
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+
38083815is-buffer@^1.1.4, is-buffer@^1.1.5 :
38093816 version "1.1.6"
38103817 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