Skip to content

Commit 0f1f862

Browse files
committed
Add use strict to every file
1 parent 49c5976 commit 0f1f862

File tree

104 files changed

+124
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+124
-17
lines changed

lib/client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/connection-parameters.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/connection.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/defaults.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/native/client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/native/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
"use strict";
12
module.exports = require('./client')

lib/native/query.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/native/result.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/query.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/result.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/type-overrides.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

lib/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
/**
23
* Copyright (c) 2010-2017 Brian Carlson (brian.m.carlson@gmail.com)
34
* All rights reserved.

script/create-test-tables.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var args = require(__dirname + '/../test/cli');
23
var pg = require(__dirname + '/../lib');
34

script/dump-db-types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var pg = require(__dirname + '/../lib');
23
var args = require(__dirname + '/../test/cli');
34

script/list-db-types.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + "/../test/integration/test-helper");
23
var pg = helper.pg;
34
pg.connect(helper.config, assert.success(function(client) {

test/buffer-list.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
BufferList = function() {
1+
"use strict";
2+
global.BufferList = function() {
23
this.buffers = [];
34
};
45
var p = BufferList.prototype;

test/cli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var ConnectionParameters = require(__dirname + '/../lib/connection-parameters');
23
var config = new ConnectionParameters(process.argv[2]);
34

test/integration/client/api-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + "/../test-helper");
23
var pg = helper.pg;
34

test/integration/client/appname-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
var Client = helper.Client;
34

test/integration/client/array-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + "/test-helper");
23
var pg = helper.pg;
34

test/integration/client/big-simple-query-tests.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/integration/client/configuration-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
var pg = helper.pg;
34

test/integration/client/custom-types-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
const helper = require('./test-helper');
23
const Client = helper.pg.Client;
34
const suite = new helper.Suite()

test/integration/client/empty-query-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
const suite = new helper.Suite()
34

test/integration/client/error-handling-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"use strict";
2+
"use strict";
23

34
var helper = require('./test-helper');
45
var util = require('util');

test/integration/client/huge-numeric-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
const pool = new helper.pg.Pool()
34

test/integration/client/json-type-parsing-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
var assert = require('assert');
34

test/integration/client/network-partition-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var buffers = require('../../test-buffers')
23
var helper = require('./test-helper')
34
var suite = new helper.Suite()

test/integration/client/no-data-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
const suite = new helper.Suite()
34

test/integration/client/no-row-result-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require("./test-helper");
23
var pg = helper.pg;
34
const suite = new helper.Suite();

test/integration/client/notice-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
const suite = new helper.Suite()
34

test/integration/client/parse-int-8-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12

23
var helper = require('../test-helper');
34
var pg = helper.pg;

test/integration/client/prepared-statement-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
var Query = helper.pg.Query;
34

test/integration/client/promise-api-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
'use strict';
23

34
const helper = require('./test-helper')

test/integration/client/query-as-promise-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + '/../test-helper');
23
var pg = helper.pg;
34

test/integration/client/query-column-names-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + '/../test-helper');
23
var pg = helper.pg;
34

test/integration/client/query-error-handling-prepared-statement-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
var Query = helper.pg.Query;
34
var util = require('util');

test/integration/client/query-error-handling-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
var util = require('util');
34
var Query = helper.pg.Query;

test/integration/client/quick-disconnect-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
//test for issue #320
23
//
34
var helper = require('./test-helper');

test/integration/client/result-metadata-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require("./test-helper");
23
var pg = helper.pg;
34

test/integration/client/results-as-array-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var util = require('util');
23
var helper = require('./test-helper');
34

test/integration/client/row-description-on-results-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23

34
var Client = helper.Client;

test/integration/client/simple-query-tests.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require("./test-helper");
23
var Query = helper.pg.Query;
34

@@ -18,7 +19,7 @@ test("simple query interface", function() {
1819
query.once('row', function(row) {
1920
test('Can iterate through columns', function () {
2021
var columnCount = 0;
21-
for (column in row) {
22+
for (var column in row) {
2223
columnCount++;
2324
}
2425
if ('length' in row) {

test/integration/client/ssl-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var pg = require(__dirname + '/../../../lib');
23
var config = require(__dirname + '/test-helper').config;
34
test('can connect with ssl', function() {
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
var helper = require(__dirname+'/../test-helper');
1+
"use strict";
2+
var helper = require('./../test-helper');
23

34
module.exports = helper;

test/integration/client/timezone-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./../test-helper');
23
var exec = require('child_process').exec;
34

test/integration/client/transaction-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23
const suite = new helper.Suite()
34
const pg = helper.pg

test/integration/client/type-coercion-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + '/test-helper');
23
var pg = helper.pg;
34
var sink;

test/integration/client/type-parser-override-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23

34
function testTypeParser(client, expectedResult, done) {

test/integration/connection-pool/connection-pool-size-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require("./test-helper")
23

34
helper.testPoolSize(1);

test/integration/connection-pool/error-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require("./test-helper");
23
const pg = helper.pg
34

test/integration/connection-pool/idle-timeout-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper');
23

34

test/integration/connection-pool/native-instance-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require("./../test-helper")
23
var pg = helper.pg
34
var native = helper.args.native

test/integration/connection-pool/test-helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require("./../test-helper");
23

34
const suite = new helper.Suite()

test/integration/connection-pool/yield-support-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./test-helper')
23
var co = require('co')
34

test/integration/connection/bound-command-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + '/test-helper');
23
//http://developer.postgresql.org/pgdocs/postgres/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
34

test/integration/connection/copy-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname+"/test-helper");
23
var assert = require('assert');
34

test/integration/connection/notification-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + '/test-helper');
23
//http://www.postgresql.org/docs/8.3/static/libpq-notify.html
34
test('recieves notification from same connection with no payload', function() {

test/integration/connection/query-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname+"/test-helper");
23
var assert = require('assert');
34

test/integration/connection/test-helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var net = require('net');
23
var helper = require(__dirname+'/../test-helper');
34
var Connection = require(__dirname + '/../../../lib/connection');

test/integration/domain-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var async = require('async')
23

34
var helper = require('./test-helper')

test/integration/gh-issues/130-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + '/../test-helper');
23
var exec = require('child_process').exec;
34

test/integration/gh-issues/131-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('../test-helper');
23
var pg = helper.pg;
34

test/integration/gh-issues/199-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('../test-helper');
23
var client = helper.client();
34

test/integration/gh-issues/507-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + "/../test-helper");
23
var pg = helper.pg;
34

test/integration/gh-issues/600-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var async = require('async');
23
var helper = require('../test-helper');
34
const suite = new helper.Suite()

test/integration/gh-issues/675-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('../test-helper');
23
var assert = require('assert');
34

test/integration/gh-issues/699-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('../test-helper');
23
var assert = require('assert');
34
var copyFrom = require('pg-copy-streams').from;

test/integration/gh-issues/787-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('../test-helper');
23
const pool = new helper.pg.Pool()
34

test/integration/gh-issues/882-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
//client should not hang on an empty query
23
var helper = require('../test-helper');
34
var client = helper.client();

test/integration/gh-issues/981-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require('./../test-helper');
23

34
//native bindings are only installed for native tests

test/integration/test-helper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + '/../test-helper');
23

34
if(helper.args.native) {

test/native/callback-api-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var domain = require('domain');
23
var helper = require("./../test-helper");
34
var Client = require("./../../lib/native");

test/native/error-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require(__dirname + "/../test-helper");
23
var Client = require(__dirname + "/../../lib/native");
34

test/native/evented-api-tests.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
var helper = require("../test-helper");
23
var Client = require("../../lib/native");
34
var Query = Client.Query;

test/native/missing-native.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"use strict";
12
//this test assumes it has been run from the Makefile
23
//and that node_modules/pg-native has been deleted
34

0 commit comments

Comments
 (0)