Skip to content

Commit

Permalink
chore: update isbinaryfile to 4.x
Browse files Browse the repository at this point in the history
(cherry picked from commit 649b564)
  • Loading branch information
sodatea committed May 25, 2019
1 parent 78bc1db commit 04148dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/@vue/cli/lib/GeneratorAPI.js
Expand Up @@ -3,7 +3,7 @@ const ejs = require('ejs')
const path = require('path')
const merge = require('deepmerge')
const resolve = require('resolve')
const isBinary = require('isbinaryfile')
const { isBinaryFileSync } = require('isbinaryfile')
const mergeDeps = require('./util/mergeDeps')
const stringifyJS = require('./util/stringifyJS')
const ConfigTransform = require('./ConfigTransform')
Expand Down Expand Up @@ -308,7 +308,7 @@ function extractCallDir () {
const replaceBlockRE = /<%# REPLACE %>([^]*?)<%# END_REPLACE %>/g

function renderFile (name, data, ejsOptions) {
if (isBinary.sync(name)) {
if (isBinaryFileSync(name)) {
return fs.readFileSync(name) // return buffer
}
const template = fs.readFileSync(name, 'utf-8')
Expand Down
4 changes: 2 additions & 2 deletions packages/@vue/cli/lib/invoke.js
Expand Up @@ -4,7 +4,7 @@ const execa = require('execa')
const chalk = require('chalk')
const globby = require('globby')
const inquirer = require('inquirer')
const isBinary = require('isbinaryfile')
const { isBinaryFileSync } = require('isbinaryfile')
const Generator = require('./Generator')
const { loadOptions } = require('./options')
const { installDeps } = require('./util/installDeps')
Expand Down Expand Up @@ -32,7 +32,7 @@ async function readFiles (context) {
const res = {}
for (const file of files) {
const name = path.resolve(context, file)
res[file] = isBinary.sync(name)
res[file] = isBinaryFileSync(name)
? fs.readFileSync(name)
: fs.readFileSync(name, 'utf-8')
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli/package.json
Expand Up @@ -42,7 +42,7 @@
"globby": "^9.2.0",
"import-global": "^0.1.0",
"inquirer": "^6.0.0",
"isbinaryfile": "^3.0.2",
"isbinaryfile": "^4.0.0",
"javascript-stringify": "^1.6.0",
"js-yaml": "^3.13.1",
"jscodeshift": "^0.6.4",
Expand Down

0 comments on commit 04148dd

Please sign in to comment.