Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Hi! I fixed some calls to "sys" for you! #7

Open
wants to merge 1 commit into from

2 participants

@node-migrator-bot

Hello substack!

I am migrationBot, an open-source bot, and I'm here to help you migrate your codebase to node v0.8!

Did you know that the "sys" module throws an error if your program tries to require it in node v0.8? To help keep your code running, I automatically replaced var sys = require('sys') with var util = require('util').

If you'd like to know more about these changes in node.js, take a look at joyent/node@1582cf#L1R51 and https://github.com/joyent/node/blob/1582cfebd6719b2d2373547994b3dca5c8c569c0/ChangeLog#L51 and http://blog.jit.su/introducing-blakmatrix-and-migratorbot .

As for myself, I was written by your friendly neighborhood node ninjas at Nodejitsu, and you can find them at #nodejitsu on irc.freenode.net or with http://webchat.jit.su .

Enjoy!

--migrationBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 23, 2012
  1. @blakmatrix
This page is out of date. Refresh to see the latest.
View
8 README.markdown
@@ -30,7 +30,7 @@ Simple Bufferlist Example
=========================
#!/usr/bin/env node
- var sys = require('sys');
+ var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist').BufferList;
@@ -41,7 +41,7 @@ Simple Bufferlist Example
b.push(buf);
});
- sys.puts(b.take(10)); // abcdexyz11
+ util.puts(b.take(10)); // abcdexyz11
Binary
======
@@ -52,7 +52,7 @@ Simple Binary Example
#!/usr/bin/env node
- var sys = require('sys');
+ var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist').BufferList;
var Binary = require('bufferlist/binary').Binary;
@@ -71,7 +71,7 @@ Simple Binary Example
buf.write('\x00\x04meow', 'binary');
bufferList.push(buf);
- sys.puts(binary.vars.moo); // xs:4:meow
+ util.puts(binary.vars.moo); // xs:4:meow
See Also
========
View
4 examples/binary.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-var sys = require('sys');
+var util = require('util');
var net = require('net');
var BufferList = require('bufferlist');
@@ -46,7 +46,7 @@ function serverSession (port, strings) {
// connect to the server and parse its output
var client = new net.Stream;
parser(client).addListener('end', function (vars) {
- sys.puts(vars.moo);
+ util.puts(vars.moo);
client.end();
});
client.connect(port);
View
8 examples/hackneyed.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-var sys = require('sys');
+var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist');
@@ -11,6 +11,6 @@ var buf3 = new Buffer(5); buf3.write('11358');
var b = new BufferList;
b.push(buf1,buf2,buf3);
-sys.puts(b.take(10)); // abcdexyz11
-sys.puts(b.take(3)); // abc
-sys.puts(b.take(100)); // abcdexyz11358
+util.puts(b.take(10)); // abcdexyz11
+util.puts(b.take(3)); // abc
+util.puts(b.take(100)); // abcdexyz11358
View
4 examples/simple_binary.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
-var sys = require('sys');
+var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist');
var Binary = require('bufferlist/binary');
@@ -19,4 +19,4 @@ var buf = new Buffer(6);
buf.write('\x00\x04meow', 'binary');
bufferList.push(buf);
-sys.puts(binary.vars.moo); // xs:4:meow
+util.puts(binary.vars.moo); // xs:4:meow
View
4 examples/simple_bufferlist.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
-var sys = require('sys');
+var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist');
@@ -10,4 +10,4 @@ var b = new BufferList;
b.push(buf);
});
-sys.puts(b.take(10)); // abcdexyz11
+util.puts(b.take(10)); // abcdexyz11
View
10 test/binary.js
@@ -2,7 +2,7 @@
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist').BufferList; // old style
var Binary = require('bufferlist/binary').Binary; // old style
-var sys = require('sys');
+var util = require('util');
var assert = require('assert');
exports.binary = function () {
@@ -53,15 +53,15 @@ exports.binary = function () {
assert.eql(
vars.xLen,
4,
- 'xLen == 4 failed (xLen == ' + sys.inspect(vars.xLen) + ')'
+ 'xLen == 4 failed (xLen == ' + util.inspect(vars.xLen) + ')'
);
var xs = vars.xs.toString();
assert.eql(
- xs, 'meow', 'xs != "meow", xs = ' + sys.inspect(xs)
+ xs, 'meow', 'xs != "meow", xs = ' + util.inspect(xs)
);
assert.eql(
- vars.moo, 100, 'moo != 100, moo == ' + sys.inspect(vars.moo)
+ vars.moo, 100, 'moo != 100, moo == ' + util.inspect(vars.moo)
);
}
);
@@ -77,7 +77,7 @@ exports.binary = function () {
assert.eql(vars.xLen, 0, 'xLen == 0 in "\\x00\\x12happy purring cats"');
assert.eql(
vars.msgLen, 18,
- 'msgLen != 18, msgLen = ' + sys.inspect(vars.msgLen)
+ 'msgLen != 18, msgLen = ' + util.inspect(vars.msgLen)
);
assert.eql(vars.moo, 42, 'moo != 42');
}
View
6 test/binary_assign.js
@@ -1,5 +1,5 @@
// Test .into and hierarchical addressing assignment
-var sys = require('sys');
+var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist');
var Binary = require('bufferlist/binary');
@@ -15,7 +15,7 @@ exports['binary assign'] = function () {
assert.eql(
vars.foo.bar.baz, 24930,
'vars.foo.bar.baz != 24930, '
- + 'vars.foo.bar.baz == ' + sys.inspect(vars.foo.bar.baz)
+ + 'vars.foo.bar.baz == ' + util.inspect(vars.foo.bar.baz)
);
tapped ++;
})
@@ -24,7 +24,7 @@ exports['binary assign'] = function () {
assert.eql(
vars.one.two.three, 1717920867,
'vars.one.two.three != 1717920867, '
- + 'vars.one.two.three == ' + sys.inspect(vars.one.two.three)
+ + 'vars.one.two.three == ' + util.inspect(vars.one.two.three)
);
tapped ++;
})
View
2  test/binary_endianness.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
// Test binary byte and endianness functions
-var sys = require('sys');
+var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist');
var Binary = require('bufferlist/binary');
View
6 test/binary_event.js
@@ -1,4 +1,4 @@
-var sys = require('sys');
+var util = require('util');
var net = require('net');
var BufferList = require('bufferlist');
var Binary = require('bufferlist/binary');
@@ -6,7 +6,7 @@ var assert = require('assert');
function parser (sock) {
var bufferList = new BufferList;
- sys.pump(sock, bufferList);
+ util.pump(sock, bufferList);
return Binary(bufferList)
.getWord16be('xLen')
@@ -45,7 +45,7 @@ exports['binary event'] = function () {
parser(client).on('end', function (vars) {
assert.eql(
moo, vars.moo,
- 'moo != ' + sys.inspect(moo) + ', moo == ' + sys.inspect(vars.moo)
+ 'moo != ' + util.inspect(moo) + ', moo == ' + util.inspect(vars.moo)
);
client.end();
});
View
2  test/binary_into.js
@@ -1,5 +1,5 @@
// Check .into(), especially for object pollution
-var sys = require('sys');
+var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist');
var Binary = require('bufferlist/binary');
View
10 test/binary_loop.js
@@ -1,5 +1,5 @@
// Test binary looping functions
-var sys = require('sys');
+var util = require('util');
var Buffer = require('buffer').Buffer;
var BufferList = require('bufferlist');
@@ -38,15 +38,15 @@ exports['binary loop'] = function () {
trickyList[i][0],
expectedTrickyList[i][0],
'trickly list is not what it should be. it should be: ' +
- sys.inspect(expectedTrickyList) + '. it is: ' +
- sys.inspect(trickyList)
+ util.inspect(expectedTrickyList) + '. it is: ' +
+ util.inspect(trickyList)
);
assert.eql(
trickyList[i][1],
expectedTrickyList[i][1],
'trickly list is not what it should be. it should be: ' +
- sys.inspect(expectedTrickyList) + '. it is: ' +
- sys.inspect(trickyList)
+ util.inspect(expectedTrickyList) + '. it is: ' +
+ util.inspect(trickyList)
);
}
})
Something went wrong with that request. Please try again.