From 4ef26cdedd81a0b82d667ac2c4c1b3fb4e4bc1e4 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Sun, 12 Jan 2020 07:12:05 +0100 Subject: [PATCH] refactor: removes format option (#1218) BREAKING CHANGE: `format` option is no longer supported as everything is `dag-pb` all of the time. Follows on from https://github.com/ipfs/js-ipfs-mfs/pull/69 --- src/files/chmod.js | 1 - src/files/cp.js | 1 - src/files/mkdir.js | 1 - src/files/mv.js | 1 - src/files/touch.js | 1 - 5 files changed, 5 deletions(-) diff --git a/src/files/chmod.js b/src/files/chmod.js index b4c0a11dd..3979d4622 100644 --- a/src/files/chmod.js +++ b/src/files/chmod.js @@ -10,7 +10,6 @@ module.exports = configure(({ ky }) => { const searchParams = new URLSearchParams(options.searchParams) searchParams.append('arg', path) searchParams.append('mode', modeToString(mode)) - if (options.format) searchParams.set('format', options.format) if (options.flush != null) searchParams.set('flush', options.flush) if (options.hashAlg) searchParams.set('hash', options.hashAlg) if (options.parents != null) searchParams.set('parents', options.parents) diff --git a/src/files/cp.js b/src/files/cp.js index 812c8b7d7..f9ed0bb20 100644 --- a/src/files/cp.js +++ b/src/files/cp.js @@ -10,7 +10,6 @@ module.exports = configure(({ ky }) => { const searchParams = new URLSearchParams(options.searchParams) sources.forEach(src => searchParams.append('arg', CID.isCID(src) ? `/ipfs/${src}` : src)) - if (options.format) searchParams.set('format', options.format) if (options.flush != null) searchParams.set('flush', options.flush) if (options.hashAlg) searchParams.set('hash', options.hashAlg) if (options.parents != null) searchParams.set('parents', options.parents) diff --git a/src/files/mkdir.js b/src/files/mkdir.js index 3a50c7728..382c62b22 100644 --- a/src/files/mkdir.js +++ b/src/files/mkdir.js @@ -12,7 +12,6 @@ module.exports = configure(({ ky }) => { const searchParams = new URLSearchParams(options.searchParams) searchParams.append('arg', path) if (options.cidVersion != null) searchParams.set('cid-version', options.cidVersion) - if (options.format) searchParams.set('format', options.format) if (options.flush != null) searchParams.set('flush', options.flush) if (options.hashAlg) searchParams.set('hash', options.hashAlg) if (options.parents != null) searchParams.set('parents', options.parents) diff --git a/src/files/mv.js b/src/files/mv.js index fadf0c34c..78560dfeb 100644 --- a/src/files/mv.js +++ b/src/files/mv.js @@ -10,7 +10,6 @@ module.exports = configure(({ ky }) => { const searchParams = new URLSearchParams(options.searchParams) sources.forEach(src => searchParams.append('arg', CID.isCID(src) ? `/ipfs/${src}` : src)) - if (options.format) searchParams.set('format', options.format) if (options.flush != null) searchParams.set('flush', options.flush) if (options.hashAlg) searchParams.set('hash', options.hashAlg) if (options.parents != null) searchParams.set('parents', options.parents) diff --git a/src/files/touch.js b/src/files/touch.js index b38aca905..c4189ecab 100644 --- a/src/files/touch.js +++ b/src/files/touch.js @@ -14,7 +14,6 @@ module.exports = configure(({ ky }) => { searchParams.set('mtime', mtime.secs) searchParams.set('mtimeNsecs', mtime.nsecs) } - if (options.format) searchParams.set('format', options.format) if (options.flush != null) searchParams.set('flush', options.flush) if (options.hashAlg) searchParams.set('hash', options.hashAlg) if (options.parents != null) searchParams.set('parents', options.parents)