Skip to content

Commit f34579b

Browse files
Remove dependency on @google-cloud/common (#165)
1 parent 00d1b07 commit f34579b

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

dialogflow/detect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
'use strict';
1717

18-
const common = require('@google-cloud/common');
18+
const util = require('util');
1919
const fs = require('fs');
2020
const structjson = require('./structjson.js');
2121
const pump = require('pump');
@@ -145,7 +145,7 @@ function detectAudioIntent(
145145
const sessionPath = sessionClient.sessionPath(projectId, sessionId);
146146

147147
// Read the content of the audio file and send it as part of the request.
148-
const readFile = common.util.promisify(fs.readFile, {singular: true});
148+
const readFile = util.promisify(fs.readFile);
149149
readFile(filename)
150150
.then(inputAudio => {
151151
// The audio query request

dialogflow/detect.v2beta1.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
const projectId = process.env.GCLOUD_PROJECT;
1919
const sessionId = require('uuid/v1')();
20-
const common = require('@google-cloud/common');
20+
const util = require('util');
2121
const structjson = require('./structjson.js');
2222

2323
function createKnowledgeBase(projectId, displayName) {
@@ -530,7 +530,7 @@ function detectIntentwithModelSelection(
530530
// Define session path
531531
const sessionPath = sessionClient.sessionPath(projectId, sessionId);
532532
// Read the content of the audio file and send it as part of the request.
533-
const readFile = common.util.promisify(fs.readFile, {singular: true});
533+
const readFile = util.promisify(fs.readFile);
534534
readFile(audioFilePath)
535535
.then(inputAudio => {
536536
// The audio query request

dialogflow/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"test": "ava system-test"
1313
},
1414
"dependencies": {
15-
"@google-cloud/common": "^0.20.0",
1615
"dialogflow": "0.6.0",
1716
"grpc": "^1.4.1",
1817
"pump": "^3.0.0",

0 commit comments

Comments
 (0)