Skip to content

Commit

Permalink
Fix Buffer deprecation warning and update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
davedoesdev committed May 4, 2019
1 parent 7bea27e commit 02391e3
Show file tree
Hide file tree
Showing 7 changed files with 1,764 additions and 2,315 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ sudo: required
dist: trusty
language: node_js
node_js:
- 4
- 6
- 8
- 10
- 12
env:
- PYVER=2.7
- PYVER=3.6
Expand Down
2 changes: 1 addition & 1 deletion cp-remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
env = dict(os.environ)
env['NODE_CHANNEL_FD'] = str(s2.fileno())

p2 = subprocess.Popen(['node', '-e', 'process.argv = [process.argv[0], process.argv[1]].concat(JSON.parse(new Buffer(process.argv[2], "hex"))); setImmediate(function () { require(require("path").resolve(process.argv[1])); })', sys.argv[1], args], env=env, stdin=subprocess.PIPE, stdout=2, close_fds=False)
p2 = subprocess.Popen(['node', '-e', 'process.argv = [process.argv[0], process.argv[1]].concat(JSON.parse(Buffer.from(process.argv[2], "hex"))); setImmediate(function () { require(require("path").resolve(process.argv[1])); })', sys.argv[1], args], env=env, stdin=subprocess.PIPE, stdout=2, close_fds=False)
p2.stdin.close()

#s1.close()
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function run(host, module_path)
{ stdio: [0, 1, 2, 'ipc'] });

child.send(packed.toString());
child.send(new Buffer(JSON.stringify(
child.send(Buffer.from(JSON.stringify(
Array.prototype.slice.call(arguments, 2))).toString('hex'));

return child;
Expand Down

0 comments on commit 02391e3

Please sign in to comment.