diff --git a/package.json b/package.json index 48fda90a..5f343cb5 100644 --- a/package.json +++ b/package.json @@ -26,46 +26,33 @@ "@types/console-log-level": "^1.4.0", "@types/estree": "0.0.39", "@types/extend": "^3.0.0", - "@types/glob": "^7.0.0", "@types/lodash": "^4.14.69", "@types/mkdirp": "^0.5.1", "@types/mocha": "^5.0.0", "@types/ncp": "^2.0.1", "@types/nock": "^9.1.0", "@types/node": "~10.10.0", - "@types/once": "^1.4.0", "@types/p-limit": "^2.0.0", "@types/pify": "^3.0.2", "@types/proxyquire": "^1.3.28", "@types/request": "^2.47.1", - "@types/rimraf": "^2.0.2", "@types/semver": "^5.3.32", - "@types/tmp": "0.0.33", "changelog-maker": "^2.2.2", - "closure-npc": "*", "codecov": "^3.0.4", - "coveralls": "^3.0.0", "cross-env": "^5.2.0", - "glob": "^7.1.2", "gts": "^0.9.0", "intelli-espower-loader": "^1.0.1", - "istanbul": "^0.4.1", "js-green-licenses": "^0.5.0", "mkdirp": "^0.5.1", "mocha": "^5.0.0", "ncp": "^2.0.0", "nock": "^10.0.0", "nyc": "^13.1.0", - "once": "^1.4.0", - "pify": "^4.0.0", "post-install-check": "0.0.1", "proxyquire": "^2.0.0", "request": "^2.88.0", "require-inject": "^1.4.3", - "rimraf": "^2.6.2", "source-map-support": "^0.5.6", - "tmp": "0.0.33", - "tslint": "^5.4.3", "typescript": "~3.1.0" }, "dependencies": { @@ -78,11 +65,11 @@ "gcp-metadata": "^0.9.0", "lodash": "^4.12.0", "p-limit": "^2.0.0", + "pify": "^4.0.1", "semver": "^5.5.0", "source-map": "^0.6.1", "split": "^1.0.0", - "teeny-request": "^3.6.0", - "util.promisify": "^1.0.0" + "teeny-request": "^3.6.0" }, "scripts": { "changelog": "npm run compile && ./bin/run-changelog.sh", diff --git a/src/agent/debuglet.ts b/src/agent/debuglet.ts index f125deec..5aa70fc9 100644 --- a/src/agent/debuglet.ts +++ b/src/agent/debuglet.ts @@ -23,6 +23,7 @@ import * as fs from 'fs'; import * as metadata from 'gcp-metadata'; import * as _ from 'lodash'; import * as path from 'path'; +import * as promisify from 'pify'; import * as util from 'util'; import {Debug, PackageInfo} from '../client/stackdriver/debug'; @@ -39,8 +40,6 @@ import * as utils from './util/utils'; import * as debugapi from './v8/debugapi'; import {DebugApi} from './v8/debugapi'; -const promisify = require('util.promisify'); - const readFilep = promisify(fs.readFile); const ALLOW_EXPRESSIONS_MESSAGE = 'Expressions and conditions are not allowed' + diff --git a/src/agent/io/sourcemapper.ts b/src/agent/io/sourcemapper.ts index 1a8975dc..7200394f 100644 --- a/src/agent/io/sourcemapper.ts +++ b/src/agent/io/sourcemapper.ts @@ -17,12 +17,12 @@ import * as fs from 'fs'; import * as _ from 'lodash'; import * as path from 'path'; +import * as promisify from 'pify'; import * as sourceMap from 'source-map'; import {findScriptsFuzzy} from '../util/utils'; -const promisify = require('util.promisify'); -const pLimit = require('p-limit'); +import pLimit = require('p-limit'); const CONCURRENCY = 10; const readFilep = promisify(fs.readFile);