Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

chore(deps): update dependency @types/node to ~10.12.0 #546

Merged
merged 7 commits into from
Nov 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 3 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/node": "~10.12.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": {
Expand All @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/agent/debuglet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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' +
Expand Down
4 changes: 2 additions & 2 deletions src/agent/io/sourcemapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
17 changes: 15 additions & 2 deletions src/agent/state/legacy-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ export function evaluate(expression: string, frame: v8.FrameMirror):
}
}

interface ScopeType {
Global: {};
Script: {};
Closure: {};
Local: {};
}

interface LegacyVm {
runInDebugContext: (context: string) => ScopeType;
}

class StateResolver {
private state: v8.ExecutionState;
private expressions: string[];
Expand All @@ -77,7 +88,7 @@ class StateResolver {
private messageTable: stackdriver.Variable[];
private resolvedVariableTable: stackdriver.Variable[];
private rawVariableTable: Array<v8.ValueMirror|null>;
private scopeType: {Global: {}, Script: {}, Closure: {}, Local: {}};
private scopeType: ScopeType;
/**
* @param {!Object} execState
* @param {Array<string>} expressions
Expand Down Expand Up @@ -126,7 +137,9 @@ class StateResolver {
return null;
});

this.scopeType = vm.runInDebugContext('ScopeType');
// This constructor is only used in situations where the legacy vm
// interface is used that has the `runInDebugContext` method.
this.scopeType = (vm as {} as LegacyVm).runInDebugContext('ScopeType');
}


Expand Down
2 changes: 1 addition & 1 deletion src/agent/util/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export function setErrorStatusAndCallback(
fn: (err: Error|null) => void, breakpoint: stackdriver.Breakpoint,
refersTo: stackdriver.Reference, message: string): void {
const error = new Error(message);
return setImmediate(() => {
setImmediate(() => {
if (breakpoint && !breakpoint.status) {
breakpoint.status = new StatusMessage(refersTo, message, true);
}
Expand Down
10 changes: 8 additions & 2 deletions src/agent/v8/legacy-debugapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export class V8BreakpointData {
public compile: null|((src: string) => string)) {}
}

interface LegacyVm {
runInDebugContext: (context: string) => v8.Debug;
}

export class V8DebugApi implements debugapi.DebugApi {
breakpoints: {[id: string]: V8BreakpointData} = {};
sourcemapper: SourceMapper;
Expand All @@ -63,7 +67,9 @@ export class V8DebugApi implements debugapi.DebugApi {
logger: consoleLogLevel.Logger, config: ResolvedDebugAgentConfig,
jsFiles: ScanStats, sourcemapper: SourceMapper) {
this.sourcemapper = sourcemapper;
this.v8 = vm.runInDebugContext('Debug');
// This constructor is only used in situations where the legacy vm
// interface is used that has the `runInDebugContext` method.
this.v8 = (vm as {} as LegacyVm).runInDebugContext('Debug');
this.config = config;
this.fileStats = jsFiles;
this.v8Version = /(\d+\.\d+\.\d+)\.\d+/.exec(process.versions.v8);
Expand Down Expand Up @@ -158,7 +164,7 @@ export class V8DebugApi implements debugapi.DebugApi {
this.logger.info('deactivating v8 breakpoint listener');
this.v8.setListener(null);
}
return setImmediate(() => {
setImmediate(() => {
cb(null);
});
}
Expand Down