From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/fs-extra/lib/fs/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'node_modules/fs-extra/lib/fs/index.js') diff --git a/node_modules/fs-extra/lib/fs/index.js b/node_modules/fs-extra/lib/fs/index.js index 551ca6a09..1821fd000 100644 --- a/node_modules/fs-extra/lib/fs/index.js +++ b/node_modules/fs-extra/lib/fs/index.js @@ -9,6 +9,7 @@ const api = [ 'chmod', 'chown', 'close', + 'copyFile', 'fchmod', 'fchown', 'fdatasync', @@ -20,6 +21,7 @@ const api = [ 'link', 'lstat', 'mkdir', + 'mkdtemp', 'open', 'readFile', 'readdir', @@ -33,9 +35,13 @@ const api = [ 'unlink', 'utimes', 'writeFile' -] -// fs.mkdtemp() was added in Node.js v5.10.0, so check if it exists -typeof fs.mkdtemp === 'function' && api.push('mkdtemp') +].filter(key => { + // Some commands are not available on some systems. Ex: + // fs.copyFile was added in Node.js v8.5.0 + // fs.mkdtemp was added in Node.js v5.10.0 + // fs.lchown is not available on at least some Linux + return typeof fs[key] === 'function' +}) // Export all keys: Object.keys(fs).forEach(key => { -- cgit v1.2.3