Skip to content

Commit d0531c2

Browse files
author
Ace Nassri
authored
chore: update (most) dependencies + (some) samples (#583)
* Move update-dependencies script from yarn to npm * Update dependencies * Update KMS samples * Update dependencies + fix lint errors (round 2) * Update pub/sub GAE sample * Shorten comment * Update MongoDB GAE sample * Update dependencies + fix lint (round 3) * Update loopback sample * Update cloud tasks sample * Update storage transfer samples * Update dependencies + fix lint (round 4) * Fix lint * Fix lint - missed a few spots
1 parent f3239b5 commit d0531c2

File tree

65 files changed

+823
-637
lines changed

Some content is hidden

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

65 files changed

+823
-637
lines changed

appengine/analytics/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function trackEvent (category, action, label, value, cb) {
5353
}
5454

5555
app.get('/', (req, res, next) => {
56-
// Event value must be numeric.
56+
// Event value must be numeric.
5757
trackEvent('Example category', 'Example action', 'Example label', '100')
5858
.then(() => {
5959
res.status(200).send('Event tracked.').end();

appengine/analytics/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
"e2e-test": "repo-tools test deploy"
2323
},
2424
"dependencies": {
25-
"express": "4.16.0",
26-
"got": "7.1.0"
25+
"express": "4.16.2",
26+
"got": "8.2.0"
2727
},
2828
"devDependencies": {
29-
"@google-cloud/nodejs-repo-tools": "2.0.4"
29+
"@google-cloud/nodejs-repo-tools": "2.2.1"
3030
},
3131
"cloud-repo-tools": {
3232
"test": {

appengine/cloudsql/createTables.js

+16-15
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,21 @@ prompt.get(FIELDS, (err, config) => {
3434
const knex = Knex({ client: 'mysql', connection: config });
3535

3636
// Create the "visits" table
37-
knex.schema.createTable('visits', (table) => {
38-
table.increments();
39-
table.timestamp('timestamp');
40-
table.string('userIp');
41-
})
42-
.then(() => {
43-
console.log(`Successfully created 'visits' table.`);
44-
return knex.destroy();
45-
})
46-
.catch((err) => {
47-
console.error(`Failed to create 'visits' table:`, err);
48-
if (knex) {
49-
knex.destroy();
50-
}
51-
});
37+
knex.schema.createTable('visits',
38+
(table) => {
39+
table.increments();
40+
table.timestamp('timestamp');
41+
table.string('userIp');
42+
})
43+
.then(() => {
44+
console.log(`Successfully created 'visits' table.`);
45+
return knex.destroy();
46+
})
47+
.catch((err) => {
48+
console.error(`Failed to create 'visits' table:`, err);
49+
if (knex) {
50+
knex.destroy();
51+
}
52+
});
5253
});
5354
// [END createTables]

appengine/cloudsql/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@
1414
},
1515
"scripts": {
1616
"deploy": "gcloud app deploy",
17-
"lint": "samples lint",
17+
"lint": "repo-tools lint",
1818
"pretest": "npm run lint",
1919
"unit-test": "ava --verbose test/*.test.js",
2020
"start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &",
21-
"system-test": "samples test app",
21+
"system-test": "repo-tools test app -- server.js",
2222
"system-test-proxy": "npm run start-proxy; npm run system-test",
2323
"all-test": "npm run unit-test && npm run system-test",
24-
"test": "samples test run --cmd npm -- run all-test",
25-
"e2e-test": "samples test deploy"
24+
"test": "repo-tools test run --cmd npm -- run all-test",
25+
"e2e-test": "repo-tools test deploy"
2626
},
2727
"dependencies": {
28-
"async": "2.5.0",
29-
"express": "4.15.4",
30-
"knex": "0.13.0",
31-
"mysql": "2.14.1",
28+
"async": "2.6.0",
29+
"express": "4.16.3",
30+
"knex": "0.14.4",
31+
"mysql": "2.15.0",
3232
"prompt": "1.0.0"
3333
},
3434
"devDependencies": {
35-
"@google-cloud/nodejs-repo-tools": "1.4.17",
36-
"ava": "0.22.0"
35+
"@google-cloud/nodejs-repo-tools": "2.2.5",
36+
"ava": "0.25.0"
3737
},
3838
"cloud-repo-tools": {
3939
"requiresKeyFile": true,

appengine/cloudsql_postgresql/createTables.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ prompt.get(FIELDS, (err, config) => {
3939
table.timestamp('timestamp');
4040
table.string('userIp');
4141
})
42-
.then(() => {
43-
console.log(`Successfully created 'visits' table.`);
44-
return knex.destroy();
45-
})
46-
.catch((err) => {
47-
console.error(`Failed to create 'visits' table:`, err);
48-
if (knex) {
49-
knex.destroy();
50-
}
51-
});
42+
.then(() => {
43+
console.log(`Successfully created 'visits' table.`);
44+
return knex.destroy();
45+
})
46+
.catch((err) => {
47+
console.error(`Failed to create 'visits' table:`, err);
48+
if (knex) {
49+
knex.destroy();
50+
}
51+
});
5252
});
5353
// [END createTables]

appengine/cloudsql_postgresql/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@
1414
},
1515
"scripts": {
1616
"deploy": "gcloud app deploy",
17-
"lint": "samples lint",
17+
"lint": "repo-tools lint",
1818
"pretest": "npm run lint",
1919
"unit-test": "ava --verbose test/*.test.js",
2020
"start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -instances=$INSTANCE_CONNECTION_NAME=tcp:$SQL_PORT &",
21-
"system-test": "samples test app",
21+
"system-test": "repo-tools test app -- server.js",
2222
"system-test-proxy": "npm run start-proxy; npm run system-test",
2323
"all-test": "npm run unit-test && npm run system-test",
24-
"test": "samples test run --cmd npm -- run all-test",
25-
"e2e-test": "samples test deploy"
24+
"test": "repo-tools test run --cmd npm -- run all-test",
25+
"e2e-test": "repo-tools test deploy"
2626
},
2727
"dependencies": {
28-
"async": "2.5.0",
29-
"express": "4.15.4",
30-
"knex": "0.13.0",
31-
"pg": "7.3.0",
28+
"async": "2.6.0",
29+
"express": "4.16.2",
30+
"knex": "0.14.4",
31+
"pg": "7.4.1",
3232
"prompt": "1.0.0"
3333
},
3434
"devDependencies": {
35-
"@google-cloud/nodejs-repo-tools": "1.4.17",
36-
"ava": "0.22.0"
35+
"@google-cloud/nodejs-repo-tools": "2.2.1",
36+
"ava": "0.25.0"
3737
},
3838
"cloud-repo-tools": {
3939
"requiresKeyFile": true,

appengine/cloudtasks/createTask.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function createTask (project, location, queue, options) {
4040
}
4141

4242
const request = {
43-
parent: `projects/${project}/locations/${location}/queues/${queue}`, // TODO: Update placeholder value.
43+
parent: `projects/${project}/locations/${location}/queues/${queue}`, // TODO: Update placeholder value.
4444
resource: {
4545
task: task
4646
},

appengine/cloudtasks/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
"dependencies": {
2323
"body-parser": "1.18.2",
2424
"express": "4.16.2",
25-
"googleapis": "22.2.0",
26-
"yargs": "10.0.3"
25+
"googleapis": "27.0.0",
26+
"yargs": "11.0.0"
2727
},
2828
"devDependencies": {
29-
"@google-cloud/nodejs-repo-tools": "2.1.1",
30-
"proxyquire": "1.8.0",
31-
"sinon": "4.0.2"
29+
"@google-cloud/nodejs-repo-tools": "2.2.1",
30+
"proxyquire": "2.0.0",
31+
"sinon": "4.4.2"
3232
},
3333
"cloud-repo-tools": {
3434
"requiresKeyFile": true,

appengine/datastore/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
"scripts": {
1616
"deploy": "gcloud app deploy",
1717
"start": "node app.js",
18-
"lint": "samples lint",
18+
"lint": "repo-tools lint",
1919
"pretest": "npm run lint",
20-
"system-test": "samples test app",
20+
"system-test": "repo-tools test app",
2121
"test": "npm run system-test",
22-
"e2e-test": "samples test deploy"
22+
"e2e-test": "repo-tools test deploy"
2323
},
2424
"dependencies": {
25-
"@google-cloud/datastore": "1.1.0",
26-
"express": "4.15.4"
25+
"@google-cloud/datastore": "1.3.4",
26+
"express": "4.16.2"
2727
},
2828
"devDependencies": {
29-
"@google-cloud/nodejs-repo-tools": "1.4.17"
29+
"@google-cloud/nodejs-repo-tools": "2.2.1"
3030
},
3131
"cloud-repo-tools": {
3232
"test": {

appengine/endpoints/package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
"scripts": {
1616
"deploy": "gcloud app deploy",
1717
"start": "node app.js",
18-
"lint": "samples lint",
18+
"lint": "repo-tools lint",
1919
"pretest": "npm run lint",
2020
"unit-test": "ava --verbose test/*.test.js",
21-
"system-test": "samples test app",
21+
"system-test": "repo-tools test app",
2222
"all-test": "npm run unit-test && npm run system-test",
23-
"test": "samples test run --cmd npm -- run all-test",
24-
"e2e-test": "samples test deploy"
23+
"test": "repo-tools test run --cmd npm -- run all-test",
24+
"e2e-test": "repo-tools test deploy"
2525
},
2626
"dependencies": {
27-
"body-parser": "1.17.2",
28-
"express": "4.15.4",
27+
"body-parser": "1.18.2",
28+
"express": "4.16.2",
2929
"safe-buffer": "5.1.1"
3030
},
3131
"devDependencies": {
32-
"@google-cloud/nodejs-repo-tools": "1.4.17",
33-
"ava": "0.21.0"
32+
"@google-cloud/nodejs-repo-tools": "2.2.1",
33+
"ava": "0.25.0"
3434
},
3535
"cloud-repo-tools": {
3636
"test": {

appengine/errorreporting/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@
1515
"scripts": {
1616
"deploy": "gcloud app deploy",
1717
"start": "node app.js",
18-
"lint": "samples lint",
18+
"lint": "repo-tools lint",
1919
"pretest": "npm run lint",
2020
"unit-test": "ava --verbose test/*.test.js",
21-
"system-test": "samples test app",
21+
"system-test": "repo-tools test app",
2222
"test": "npm run unit-test && npm run system-test",
23-
"e2e-test": "samples test deploy"
23+
"e2e-test": "repo-tools test deploy"
2424
},
2525
"dependencies": {
26-
"@google-cloud/error-reporting": "0.2.1",
27-
"express": "4.15.4"
26+
"@google-cloud/error-reporting": "0.2.3",
27+
"express": "4.16.2"
2828
},
2929
"devDependencies": {
30-
"@google-cloud/nodejs-repo-tools": "1.4.17",
31-
"ava": "0.21.0",
32-
"proxyquire": "1.8.0",
33-
"sinon": "3.2.0"
30+
"@google-cloud/nodejs-repo-tools": "2.2.1",
31+
"ava": "0.25.0",
32+
"proxyquire": "2.0.0",
33+
"sinon": "4.4.2"
3434
},
3535
"cloud-repo-tools": {
3636
"test": {

appengine/grunt/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
"postinstall": "grunt build"
1414
},
1515
"dependencies": {
16-
"body-parser": "1.15.2",
16+
"body-parser": "1.18.2",
1717
"cookie-parser": "1.4.3",
18-
"debug": "2.6.0",
19-
"express": "4.14.0",
20-
"grunt": "1.0.1",
18+
"debug": "3.1.0",
19+
"express": "4.16.2",
20+
"grunt": "1.0.2",
2121
"grunt-cli": "1.2.0",
22-
"grunt-contrib-clean": "1.0.0",
23-
"grunt-contrib-cssmin": "2.0.0",
22+
"grunt-contrib-clean": "1.1.0",
23+
"grunt-contrib-cssmin": "2.2.1",
2424
"grunt-contrib-jshint": "1.1.0",
2525
"grunt-contrib-watch": "1.0.0",
26-
"morgan": "1.8.0",
27-
"pug": "2.0.0-beta6",
28-
"serve-favicon": "2.3.2"
26+
"morgan": "1.9.0",
27+
"pug": "2.0.0",
28+
"serve-favicon": "2.4.5"
2929
}
3030
}

appengine/hello-world/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
"scripts": {
1616
"deploy": "gcloud app deploy",
1717
"start": "node app.js",
18-
"lint": "samples lint",
18+
"lint": "repo-tools lint",
1919
"pretest": "npm run lint",
20-
"system-test": "samples test app",
20+
"system-test": "repo-tools test app",
2121
"test": "npm run system-test",
22-
"e2e-test": "samples test deploy"
22+
"e2e-test": "repo-tools test deploy"
2323
},
2424
"dependencies": {
25-
"express": "4.15.4"
25+
"express": "4.16.2"
2626
},
2727
"devDependencies": {
28-
"@google-cloud/nodejs-repo-tools": "1.4.17"
28+
"@google-cloud/nodejs-repo-tools": "2.2.1"
2929
},
3030
"cloud-repo-tools": {
3131
"test": {

appengine/loopback/common/models/message.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = function(Message) {
24
Message.greet = function(msg, cb) {
35
process.nextTick(function() {

appengine/loopback/package.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,23 @@
1212
"scripts": {
1313
"lint": "eslint .",
1414
"start": "node .",
15+
"test": "repo-tools test app -- .",
1516
"posttest": "npm run lint && nsp check"
1617
},
1718
"dependencies": {
18-
"compression": "1.0.3",
19-
"cors": "2.5.2",
20-
"helmet": "1.3.0",
21-
"loopback-boot": "2.6.5",
22-
"loopback-component-explorer": "2.4.0",
23-
"serve-favicon": "2.3.2",
24-
"strong-error-handler": "1.0.1",
25-
"loopback-datasource-juggler": "2.39.0",
26-
"loopback": "2.22.0"
19+
"compression": "1.7.2",
20+
"cors": "2.8.4",
21+
"helmet": "3.12.0",
22+
"loopback-boot": "2.27.1",
23+
"loopback-component-explorer": "5.3.0",
24+
"serve-favicon": "2.4.5",
25+
"strong-error-handler": "2.3.2",
26+
"loopback-datasource-juggler": "3.15.4",
27+
"loopback": "3.18.2"
2728
},
2829
"devDependencies": {
29-
"eslint": "2.13.1",
30-
"eslint-config-loopback": "4.0.0",
31-
"nsp": "2.1.0"
30+
"eslint": "4.18.2",
31+
"eslint-config-loopback": "10.0.0",
32+
"nsp": "3.2.1"
3233
}
3334
}

appengine/mailjet/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@
1515
"scripts": {
1616
"deploy": "gcloud app deploy",
1717
"start": "node app.js",
18-
"lint": "samples lint",
18+
"lint": "repo-tools lint",
1919
"pretest": "npm run lint",
20-
"system-test": "samples test app",
20+
"system-test": "repo-tools test app",
2121
"test": "npm run system-test",
22-
"e2e-test": "samples test deploy"
22+
"e2e-test": "repo-tools test deploy"
2323
},
2424
"dependencies": {
25-
"body-parser": "1.17.2",
26-
"express": "4.15.4",
25+
"body-parser": "1.18.2",
26+
"express": "4.16.2",
2727
"jade": "1.11.0",
2828
"node-mailjet": "3.2.1"
2929
},
3030
"devDependencies": {
31-
"@google-cloud/nodejs-repo-tools": "1.4.17"
31+
"@google-cloud/nodejs-repo-tools": "2.2.1"
3232
},
3333
"cloud-repo-tools": {
3434
"test": {

0 commit comments

Comments
 (0)