From a2063f7240cd63252334c7bb907260eada04044d Mon Sep 17 00:00:00 2001 From: Reid Beels Date: Mon, 12 Nov 2018 10:47:40 -0500 Subject: [PATCH 1/3] Upgrade @google-cloud/storage to 2.3.x --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bd7c86a..76075a5 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "author": "Keita Urashima ", "license": "MIT", "dependencies": { - "@google-cloud/storage": "^0.4.0", + "@google-cloud/storage": "^2.3.0", "fs-promise": "^1.0.0", "mz": "^2.5.0" }, From 86cbcb15fe2d0e8a2427114dbd75b9a7cf7bde86 Mon Sep 17 00:00:00 2001 From: Reid Beels Date: Mon, 12 Nov 2018 10:49:57 -0500 Subject: [PATCH 2/3] Update GCS syntax for 2.x upgrade --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index f4e6af8..e17d296 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ -const path = require('path'); -const storage = require('@google-cloud/storage'); -const fsp = require('fs-promise'); -const {exec} = require('mz/child_process'); +const path = require('path'); +const {Storage} = require('@google-cloud/storage'); +const fsp = require('fs-promise'); +const {exec} = require('mz/child_process'); function fetchCurrentVersion(ui, configFile) { ui.writeLine(`fetching current app version from ${configFile.bucket.name}/${configFile.name}`); @@ -81,7 +81,7 @@ class GCSDownloader { return Promise.reject(new AppNotFoundError()); } - const gcs = storage(this.authentication); + const gcs = new Storage(this.authentication); const configFile = gcs.bucket(this.configBucket).file(this.configKey); return fetchCurrentVersion(this.ui, configFile).then(({bucket: appBucket, key: appKey}) => { From b2b50a1697c045aa563a3b9e79ff6016d14636a7 Mon Sep 17 00:00:00 2001 From: Reid Beels Date: Mon, 12 Nov 2018 10:56:41 -0500 Subject: [PATCH 3/3] Bump package version to 0.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 76075a5..e9b63fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fastboot-gcs-downloader", - "version": "0.1.0", + "version": "0.2.0", "description": "A FastBoot App Server downloader for Google Cloud Storage", "main": "index.js", "engines": {