Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.

Commit e0c0fa5

Browse files
lachiehgregberge
authored andcommitted
fix: use correct deprecation warning (#219)
1 parent 6f46cad commit e0c0fa5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/ssh-pool/src/Connection.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { formatRawCommand } from './commands/raw'
1111
import { formatRmCommand } from './commands/rm'
1212
import { joinCommandArgs } from './commands/util'
1313
import { parseRemote, formatRemote } from './remote'
14-
import { exec, series, deprecateV3 } from './util'
14+
import { exec, series, deprecateV3, deprecateV5 } from './util'
1515

1616
const tmpName = async options =>
1717
new Promise((resolve, reject) =>
@@ -105,7 +105,7 @@ class Connection {
105105
* @throws {ExecError}
106106
*/
107107
async copy(src, dest, { direction, ...options } = {}) {
108-
deprecateV3(
108+
deprecateV5(
109109
'"copy" method is deprecated, please use "copyToRemote", "copyFromRemote", "scpCopyToRemote" or "scpCopyFromRemote".',
110110
)
111111
if (direction === 'remoteToLocal')

packages/ssh-pool/src/util.js

+4
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,7 @@ export const exec = async (cmd, options, childModifier) =>
4444
export function deprecateV3(...args) {
4545
console.warn(...args, 'It will break in v3.0.0.')
4646
}
47+
48+
export function deprecateV5(...args) {
49+
console.warn(...args, 'It will break in v5.0.0.')
50+
}

0 commit comments

Comments
 (0)