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! #18

Merged
merged 1 commit into from

3 participants

@node-migrator-bot

Hello koles!

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

@koles koles merged commit 7b56213 into koles:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 24, 2012
  1. @blakmatrix
This page is out of date. Refresh to see the latest.
View
4 bin/reshuffle.js
@@ -1,11 +1,11 @@
var csv = require('../lib/ya-csv'),
- sys = require('sys');
+ util = require('util');
var reader = csv.createCsvStreamReader(process.openStdin(), { columnsFromHeader: true });
var writer = csv.createCsvStreamWriter(process.stdout);
if (process.argv.length < 3) {
- sys.error("Usage: " + process.argv[0] + " " + process.argv[1] + " <output columns>");
+ util.error("Usage: " + process.argv[0] + " " + process.argv[1] + " <output columns>");
process.exit(1);
}
View
10 test/echo.js
@@ -1,10 +1,10 @@
var csv = require('../lib/ya-csv'),
- sys = require('sys');
+ util = require('util');
-sys.debug('start');
+util.debug('start');
if (process.argv.length < 3) {
- sys.error("Usage: node " + process.argv[1] + " <csv file>");
+ util.error("Usage: node " + process.argv[1] + " <csv file>");
process.exit(1);
}
@@ -23,8 +23,8 @@ var lines = 0;
var columns = 0;
csvIn.addListener('end', function() {
- sys.debug('end');
- sys.debug(columns + ' columns, ' + lines + ' lines');
+ util.debug('end');
+ util.debug(columns + ' columns, ' + lines + ' lines');
});
csvIn.addListener('data', function(data) {
View
4 test/index.js
@@ -2,7 +2,7 @@ var sys;
try {
sys = require('util');
} catch (e) {
- sys = require('sys');
+ util = require('util');
}
var csv = require('../lib/ya-csv'),
@@ -26,7 +26,7 @@ var columns = 0;
csvIn.addListener('end', function() {
assert.strictEqual(expectedRows, lines, "Wrong number of records");
- sys.debug(columns + ' columns, ' + lines + ' lines');
+ util.debug(columns + ' columns, ' + lines + ' lines');
});
csvIn.addListener('data', function(data) {
View
16 test/stream.js
@@ -1,11 +1,11 @@
var csv = require('../lib/ya-csv'),
- sys = require('sys'),
+ util = require('util'),
fs = require('fs');
-sys.debug('start');
+util.debug('start');
if (process.argv.length < 3) {
- sys.error("Usage: node " + process.argv[1] + " <csv file>");
+ util.error("Usage: node " + process.argv[1] + " <csv file>");
process.exit(1);
}
@@ -19,13 +19,13 @@ var lines = 0;
var columns = 0;
csvIn.addListener('end', function() {
- sys.debug('end');
- sys.debug(columns + ' columns, ' + lines + ' lines');
+ util.debug('end');
+ util.debug(columns + ' columns, ' + lines + ' lines');
});
csvIn.addListener('error', function(e) {
- sys.debug('error');
- sys.debug(e);
+ util.debug('error');
+ util.debug(e);
});
csvIn.addListener('data', function(data) {
@@ -37,7 +37,7 @@ var file = process.argv[2];
var fileIn = fs.createReadStream(file, {flags: 'r', bufferSize: 10});
fileIn.setEncoding('utf8');
fileIn.on('data', function(data) {
- sys.debug(data);
+ util.debug(data);
csvIn.parse(data);
});
fileIn.on('end', function(data) {
Something went wrong with that request. Please try again.