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

Commit 8a119de

Browse files
authoredMay 16, 2017
Update deps, drop support for 0.12 (#258)
This change updates google-cloud/common to a version which is no longer compatable with node v0.12. To upgrade this dependency, we must drop support for 0.12 as well. Additionally, we prune out some code paths that were only executed on node versions less than 1.6. PR-URL: #258
1 parent 022d1ba commit 8a119de

12 files changed

+137
-301
lines changed
 

‎.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: node_js
22
dist: trusty
33
node_js:
4-
- '0.12'
54
- '4'
65
- '6'
76
- '7'

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This module provides Stackdriver Debugger support for Node.js applications. [Sta
1414
[![Cloud Debugger Intro](http://img.youtube.com/vi/tyHcK_kAOpw/0.jpg)](https://www.youtube.com/watch?v=tyHcK_kAOpw)
1515

1616
## Prerequisites
17-
* Stackdriver Debugger is comptible with Node.js version 0.12 or greater. Node.js v5+ is recommended.
17+
* Stackdriver Debugger is comptible with Node.js version 4 or greater. Node.js v5+ is recommended.
1818

1919
## Quick Start
2020
```shell

‎package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
],
1919
"license": "Apache-2.0",
2020
"engines": {
21-
"node": ">=0.12"
21+
"node": ">=4"
2222
},
2323
"devDependencies": {
2424
"changelog-maker": "^2.2.2",
@@ -28,17 +28,18 @@
2828
"istanbul": "^0.4.1",
2929
"jshint": "^2.7.0",
3030
"mocha": "^3.0.0",
31-
"nock": "^9.0.0"
31+
"nock": "^9.0.0",
32+
"proxyquire": "^1.7.11",
33+
"request": "^2.81.0"
3234
},
3335
"dependencies": {
34-
"@google-cloud/common": "^0.12.0",
35-
"acorn": "^4.0.3",
36+
"@google-cloud/common": "^0.13.3",
37+
"acorn": "^5.0.3",
3638
"async": "^2.1.2",
3739
"coffee-script": "^1.9.3",
3840
"findit2": "^2.2.3",
39-
"gcp-metadata": "^0.1.0",
41+
"gcp-metadata": "^0.2.0",
4042
"lodash": "^4.12.0",
41-
"request": "^2.61.0",
4243
"semver": "^5.1.0",
4344
"source-map": "^0.5.1",
4445
"split": "^1.0.0"

‎src/agent/debuglet.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ Debuglet.prototype.start = function() {
215215
// This is ignorable.
216216
}
217217

218-
if (semver.satisfies(process.version, '5.2 || <0.12')) {
218+
if (semver.satisfies(process.version, '5.2 || <4')) {
219219
// Using an unsupported version. We report an error message about the
220220
// Node.js version, but we keep on running. The idea is that the user
221221
// may miss the error message on the console. This way we can report the
@@ -550,7 +550,7 @@ Debuglet.prototype.addBreakpoint_ = function(breakpoint, cb) {
550550
return;
551551
}
552552

553-
if (semver.satisfies(process.version, '5.2 || <0.12')) {
553+
if (semver.satisfies(process.version, '5.2 || <4')) {
554554
var message = NODE_VERSION_MESSAGE;
555555
that.logger_.error(message);
556556
breakpoint.status = new StatusMessage(StatusMessage.UNSPECIFIED,

‎src/agent/state.js

+5-98
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@ module.exports = {
2323

2424
var ScopeType = require('vm').runInDebugContext('ScopeType');
2525
var assert = require('assert');
26-
var semver = require('semver');
2726
var util = require('util');
2827
var lodash = require('lodash');
29-
var find = lodash.find;
3028
var transform = lodash.transform;
31-
var remove = lodash.remove;
3229
var flatten = lodash.flatten;
3330
var isEmpty = lodash.isEmpty;
3431

@@ -302,23 +299,13 @@ StateResolver.prototype.resolveFrame_ = function(frame, underFrameCap) {
302299
varTableIndex: ARG_LOCAL_LIMIT_MESSAGE_INDEX
303300
});
304301
} else {
305-
args = this.extractArgumentsList_(frame);
302+
// We will use the values aggregated from the ScopeMirror traversal stored
303+
// in locals which will include any applicable arguments from the invocation.
304+
args = [];
306305
locals = this.resolveLocalsList_(frame, args);
307306
if (isEmpty(locals)) {
308307
locals = [];
309308
}
310-
if (semver.satisfies(process.version, '<1.6')) {
311-
// If the node version is over 1.6 we do not read the frame arguments since
312-
// the values produced by the frame for the arguments may contain inaccurate
313-
// values. If the version is lower than 1.6, though, the frame's argument
314-
// list can be relied upon to produce accurate values for arguments.
315-
args = !isEmpty(args) ? this.resolveArgumentList_(args) : [];
316-
} else {
317-
// Otherwise, if the version is 1.6 or higher than we will use the values
318-
// aggregated from the ScopeMirror traversal stored in locals which will
319-
// include any applicable arguments from the invocation.
320-
args = [];
321-
}
322309
}
323310
return {
324311
function: this.resolveFunctionName_(frame.func()),
@@ -355,13 +342,6 @@ StateResolver.prototype.extractArgumentsList_ = function (frame) {
355342
return args;
356343
};
357344

358-
StateResolver.prototype.resolveArgumentList_ = function(args) {
359-
var resolveVariable = this.resolveVariable_.bind(this);
360-
return args.map(function (arg){
361-
return resolveVariable(arg.name, arg.value);
362-
});
363-
};
364-
365345
/**
366346
* Iterates and returns variable information for all scopes (excluding global)
367347
* in a given frame. FrameMirrors should return their scope object list with
@@ -396,34 +376,7 @@ StateResolver.prototype.resolveLocalsList_ = function (frame, args) {
396376
scope.details().object(),
397377
function (locals, value, name) {
398378
var trg = makeMirror(value);
399-
var argMatch = find(args, {name: name});
400-
if (argMatch && (semver.satisfies(process.version, '<1.6'))) {
401-
// If the version is lower than 1.6 we will use the frame's argument
402-
// list to source argument values, yet the ScopeMirror traversal for
403-
// these Node versions will also return the arguments. Therefore, on
404-
// these versions, compare the value sourced as the argument from
405-
// the FrameMirror to the argument found in the ScopeMirror locals
406-
// list with the same name and attempt to determine whether or not
407-
// they have the same value. If each of these items has the same
408-
// name and value we may assume that the ScopeMirror variable
409-
// representation is merely a duplicate of the FrameMirror's
410-
// variable representation. Otherwise, the variable may have been
411-
// redeclared or reassigned in the function and is therefore a local
412-
// triggering removal from the arguments list and insertion into the
413-
// locals list.
414-
if (argMatch.value.value() === trg.value()) {
415-
// Argument ref is the same ref as the local ref - this is an
416-
// argument do not push this into the locals list
417-
return locals;
418-
}
419-
// There is another local/scope var with the same name and it is not
420-
// the argument so this will take precedence. Remove the same-named
421-
// entry from the arguments list and push the local value onto the
422-
// locals list.
423-
remove(args, {name: name});
424-
usedNames[name] = true;
425-
locals.push(self.resolveVariable_(name, trg));
426-
} else if (!usedNames[name]) {
379+
if (!usedNames[name]) {
427380
// It's a valid variable that belongs in the locals list and wasn't
428381
// discovered at a lower-scope
429382
usedNames[name] = true;
@@ -507,55 +460,9 @@ StateResolver.prototype.storeObjectToVariableTable_ = function(obj) {
507460

508461
/**
509462
* Responsible for recursively resolving the properties on a
510-
* provided object mirror. Due to a bug in early node versions,
511-
* we maintain two implementations using the fast approach
512-
* for supported node versions.
513-
*
514-
* See https://github.com/iojs/io.js/issues/1190.
463+
* provided object mirror.
515464
*/
516465
StateResolver.prototype.resolveMirror_ = function(mirror) {
517-
if (semver.satisfies(process.version, '<1.6')) {
518-
return this.resolveMirrorSlow_(mirror);
519-
} else {
520-
return this.resolveMirrorFast_(mirror);
521-
}
522-
};
523-
524-
// A slower implementation of resolveMirror_ which is safe for all node versions
525-
StateResolver.prototype.resolveMirrorSlow_ = function(mirror) {
526-
// Instead, let's use Object.keys. This will only get the enumerable
527-
// properties. The other alternative would be Object.getOwnPropertyNames, but
528-
// I'm going with the former as that's what util.inspect does.
529-
var that = this;
530-
531-
var keys = Object.keys(mirror.value());
532-
var maxProps = that.config_.capture.maxProperties;
533-
var truncate = maxProps && keys.length > maxProps;
534-
if (truncate) {
535-
keys = keys.slice(0, maxProps);
536-
}
537-
var members = keys.map(function(prop) {
538-
return that.resolveMirrorProperty_(mirror.property(prop));
539-
});
540-
if (truncate) {
541-
members.push({name: 'Only first `config.capture.maxProperties=' +
542-
this.config_.capture.maxProperties +
543-
'` properties were captured'});
544-
}
545-
546-
var mirrorVal = mirror.value();
547-
var len = mirrorVal && mirrorVal.length;
548-
return {
549-
value: mirror.toText() +
550-
((typeof len === 'undefined') ? '' : ' of length ' + len),
551-
members: members
552-
};
553-
};
554-
555-
// A faster implementation of resolveMirror_ which segfaults in node <1.6
556-
//
557-
// See https://github.com/iojs/io.js/issues/1190.
558-
StateResolver.prototype.resolveMirrorFast_ = function(mirror) {
559466
var properties = mirror.properties();
560467
var maxProps = this.config_.capture.maxProperties;
561468
var truncate = maxProps && properties.length > maxProps;

‎test/test-debuglet.js

+5-12
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
*/
1616
'use strict';
1717

18+
var proxyquire = require('proxyquire');
19+
proxyquire('gcp-metadata', {
20+
'retry-request': require('request')
21+
});
22+
1823
var _ = require('lodash');
1924
var assert = require('assert');
2025
var DEFAULT_CONFIG = require('../src/agent/config.js');
@@ -78,15 +83,9 @@ describe('Debuglet', function() {
7883
var debug = require('../src/debug.js')();
7984
var debuglet = new Debuglet(debug, defaultConfig);
8085

81-
// The following mock is neccessary for the case when the test is running
82-
// on GCP. In that case we will get the projectId from the metadata
83-
// service.
84-
var scope = nocks.projectId(404);
85-
8686
debuglet.once('initError', function(err) {
8787
assert.ok(err);
8888
// no need to stop the debuggee.
89-
scope.done();
9089
done();
9190
});
9291
debuglet.once('started', function() { assert.fail(); });
@@ -98,14 +97,8 @@ describe('Debuglet', function() {
9897
var debug = require('../src/debug.js')();
9998
var debuglet = new Debuglet(debug, defaultConfig);
10099

101-
// The following mock is neccessary for the case when the test is running
102-
// on GCP. In that case we will get the projectId from the metadata
103-
// service.
104-
var scope = nocks.projectId(404);
105-
106100
debuglet.once('started', function() { assert.fail(); });
107101
debuglet.once('initError', function() {
108-
scope.done();
109102
done();
110103
});
111104
debuglet.start();

‎test/test-duplicate-nested-expressions.js

+18-55
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ var common = require('@google-cloud/common');
3131
var defaultConfig = require('../src/agent/config.js');
3232
var SourceMapper = require('../src/agent/sourcemapper.js');
3333
var scanner = require('../src/agent/scanner.js');
34-
var semver = require('semver');
3534

3635
function stateIsClean(api) {
3736
assert.equal(api.numBreakpoints_(), 0,
@@ -83,21 +82,12 @@ describe(__filename, function() {
8382
var frame = brk.stackFrames[0];
8483
var args = frame.arguments;
8584
var locals = frame.locals;
86-
if (semver.satisfies(process.version, '<1.6')) {
87-
assert.equal(args.length, 1, 'There should be one argument');
88-
assert.deepEqual(
89-
args[0],
90-
{name: 'a', value: '11'}
91-
);
92-
assert.equal(locals.length, 0);
93-
} else {
94-
assert.equal(args.length, 0, 'There should be zero arguments');
95-
assert.equal(locals.length, 1, 'There should be one locals');
96-
assert.deepEqual(
97-
locals[0],
98-
{name: 'a', value: 'test'}
99-
);
100-
}
85+
assert.equal(args.length, 0, 'There should be zero arguments');
86+
assert.equal(locals.length, 1, 'There should be one locals');
87+
assert.deepEqual(
88+
locals[0],
89+
{name: 'a', value: 'test'}
90+
);
10191
api.clear(brk);
10292
done();
10393
});
@@ -117,21 +107,12 @@ describe(__filename, function() {
117107
var frame = brk.stackFrames[0];
118108
var args = frame.arguments;
119109
var locals = frame.locals;
120-
if (semver.satisfies(process.version, '<1.6')) {
121-
assert.equal(args.length, 1, 'There should be one argument');
122-
assert.deepEqual(
123-
args[0],
124-
{name: 'a', value: '11'}
125-
);
126-
assert.equal(locals.length, 0);
127-
} else {
128-
assert.equal(args.length, 0, 'There should be zero arguments');
129-
assert.equal(locals.length, 1, 'There should be one local');
130-
assert.deepEqual(
131-
locals[0],
132-
{name: 'a', value: '10'}
133-
);
134-
}
110+
assert.equal(args.length, 0, 'There should be zero arguments');
111+
assert.equal(locals.length, 1, 'There should be one local');
112+
assert.deepEqual(
113+
locals[0],
114+
{name: 'a', value: '10'}
115+
);
135116
api.clear(brk);
136117
done();
137118
});
@@ -151,21 +132,12 @@ describe(__filename, function() {
151132
var frame = brk.stackFrames[0];
152133
var args = frame.arguments;
153134
var locals = frame.locals;
154-
if (semver.satisfies(process.version, '<1.6')) {
155-
assert.equal(args.length, 1, 'There should be one argument');
156-
assert.deepEqual(
157-
args[0],
158-
{name: 'a', value: '11'}
159-
);
160-
assert.equal(locals.length, 0);
161-
} else {
162-
assert.equal(args.length, 0, 'There should be zero arguments');
163-
assert.equal(locals.length, 1, 'There should be one local');
164-
assert.deepEqual(
165-
locals[0],
166-
{name: 'a', value: '11'}
167-
);
168-
}
135+
assert.equal(args.length, 0, 'There should be zero arguments');
136+
assert.equal(locals.length, 1, 'There should be one local');
137+
assert.deepEqual(
138+
locals[0],
139+
{name: 'a', value: '11'}
140+
);
169141
api.clear(brk);
170142
done();
171143
});
@@ -178,15 +150,6 @@ describe(__filename, function() {
178150
id: 'fake-id-1234',
179151
location: { path: 'test-duplicate-nested-expressions.js', line: 8 }
180152
};
181-
if (semver.satisfies(process.version, '<1.6')) {
182-
// this IIFE test does not work on 0.12. Specifically the IIFE never
183-
// executes and, therefore, the breakpoint is never hit. This will require
184-
// further investigation as to what is causing the IIFE not to execute.a
185-
// @TODO cristiancavalli - investigate why this IIFE does not execute
186-
console.log('Skipping IIFE test due to Node.JS version requirements');
187-
this.skip();
188-
return;
189-
}
190153
api.set(brk, function(err) {
191154
assert.ifError(err);
192155
api.wait(brk, function(err) {

‎test/test-fat-arrow.js

-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ var common = require('@google-cloud/common');
2222
var defaultConfig = require('../src/agent/config.js');
2323
var SourceMapper = require('../src/agent/sourcemapper.js');
2424
var scanner = require('../src/agent/scanner.js');
25-
var semver = require('semver');
2625

2726
process.env.GCLOUD_PROJECT = 0;
2827

@@ -43,13 +42,6 @@ describe(__filename, function() {
4342
var api = null;
4443
var foo;
4544
before(function () {
46-
if (semver.satisfies(process.version, '<4.0')) {
47-
// Fat arrow syntax is not recognized by these node versions - skip tests.
48-
console.log('Skipping fat-arrow syntax due to Node.JS version being ' +
49-
'lower than requirements');
50-
this.skip();
51-
return;
52-
}
5345
foo = require('./fixtures/fat-arrow.js');
5446
});
5547
beforeEach(function(done) {

‎test/test-this-context.js

+7-27
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ var common = require('@google-cloud/common');
3131
var defaultConfig = require('../src/agent/config.js');
3232
var SourceMapper = require('../src/agent/sourcemapper.js');
3333
var scanner = require('../src/agent/scanner.js');
34-
var semver = require('semver');
3534

3635
function stateIsClean(api) {
3736
assert.equal(api.numBreakpoints_(), 0,
@@ -89,20 +88,10 @@ describe(__filename, function() {
8988
assert.deepEqual(ctxMembers.length, 1,
9089
'There should be one member in the context variable value');
9190
assert.deepEqual(ctxMembers[0], {name: 'a', value: '10'});
92-
if (semver.satisfies(process.version, '<1.6')) {
93-
assert.equal(args.length, 1, 'There should be one argument');
94-
assert.equal(locals.length, 1, 'There should be one local');
95-
assert.deepEqual(
96-
args[0],
97-
{name: 'b', value: '1'}
98-
);
99-
assert.deepEqual(locals[0].name, 'context');
100-
} else {
101-
assert.equal(args.length, 0, 'There should be zero arguments');
102-
assert.equal(locals.length, 2, 'There should be two locals');
103-
assert.deepEqual(locals[0], {name: 'b', value: '1'});
104-
assert.deepEqual(locals[1].name, 'context');
105-
}
91+
assert.equal(args.length, 0, 'There should be zero arguments');
92+
assert.equal(locals.length, 2, 'There should be two locals');
93+
assert.deepEqual(locals[0], {name: 'b', value: '1'});
94+
assert.deepEqual(locals[1].name, 'context');
10695
api.clear(brk);
10796
done();
10897
});
@@ -121,18 +110,9 @@ describe(__filename, function() {
121110
var frame = brk.stackFrames[0];
122111
var args = frame.arguments;
123112
var locals = frame.locals;
124-
if (semver.satisfies(process.version, '<1.6')) {
125-
assert.equal(args.length, 1, 'There should be one argument');
126-
assert.equal(locals.length, 0);
127-
assert.deepEqual(
128-
args[0],
129-
{name: 'j', value: '1'}
130-
);
131-
} else {
132-
assert.equal(args.length, 0, 'There should be zero arguments');
133-
assert.equal(locals.length, 1, 'There should be one local');
134-
assert.deepEqual(locals[0], {name: 'j', value: '1'});
135-
}
113+
assert.equal(args.length, 0, 'There should be zero arguments');
114+
assert.equal(locals.length, 1, 'There should be one local');
115+
assert.deepEqual(locals[0], {name: 'j', value: '1'});
136116
api.clear(brk);
137117
done();
138118
});

‎test/test-try-catch.js

+11-28
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ var common = require('@google-cloud/common');
3131
var defaultConfig = require('../src/agent/config.js');
3232
var SourceMapper = require('../src/agent/sourcemapper.js');
3333
var scanner = require('../src/agent/scanner.js');
34-
var semver = require('semver');
3534

3635
function stateIsClean(api) {
3736
assert.equal(api.numBreakpoints_(), 0,
@@ -84,18 +83,10 @@ describe(__filename, function() {
8483
var args = frame.arguments;
8584
var locals = frame.locals;
8685
assert.equal(locals.length, 1, 'There should be one local');
87-
if (semver.satisfies(process.version, '<1.6')) {
88-
// Try/Catch scope-walking does not work on 0.12
89-
assert.deepEqual(
90-
locals[0],
91-
{name: 'e', value: 'undefined'}
92-
);
93-
} else {
94-
assert.equal(args.length, 0, 'There should be zero arguments');
95-
var e = locals[0];
96-
assert(e.name === 'e');
97-
assert(Number.isInteger(e.varTableIndex));
98-
}
86+
assert.equal(args.length, 0, 'There should be zero arguments');
87+
var e = locals[0];
88+
assert(e.name === 'e');
89+
assert(Number.isInteger(e.varTableIndex));
9990
assert.equal(args.length, 0, 'There should be zero arguments');
10091
api.clear(brk);
10192
done();
@@ -115,21 +106,13 @@ describe(__filename, function() {
115106
var frame = brk.stackFrames[0];
116107
var args = frame.arguments;
117108
var locals = frame.locals;
118-
if (semver.satisfies(process.version, '<1.6')) {
119-
// Try/Catch scope-walking does not work on 0.12
120-
assert.deepEqual(
121-
locals[0],
122-
{name: 'e', value: 'undefined'}
123-
);
124-
} else {
125-
assert.equal(args.length, 0, 'There should be zero arguments');
126-
assert.equal(locals.length, 1, 'There should be one local');
127-
assert.deepEqual(
128-
locals[0],
129-
{name: 'e', value: '2'}
130-
);
131-
assert.equal(args.length, 0, 'There should be zero arguments');
132-
}
109+
assert.equal(args.length, 0, 'There should be zero arguments');
110+
assert.equal(locals.length, 1, 'There should be one local');
111+
assert.deepEqual(
112+
locals[0],
113+
{name: 'e', value: '2'}
114+
);
115+
assert.equal(args.length, 0, 'There should be zero arguments');
133116
api.clear(brk);
134117
done();
135118
});

‎test/test-v8debugapi.js

+14-49
Original file line numberDiff line numberDiff line change
@@ -519,17 +519,10 @@ describe('v8debugapi', function() {
519519
var topFrame = bp.stackFrames[0];
520520
assert.ok(topFrame);
521521
assert.equal(topFrame['function'], 'foo');
522-
if (semver.satisfies(process.version, '<1.6')) {
523-
assert.equal(topFrame.arguments[0].name, 'n');
524-
assert.equal(topFrame.arguments[0].value, '2');
525-
assert.equal(topFrame.locals[0].name, 'A');
526-
assert.equal(topFrame.locals[1].name, 'B');
527-
} else {
528-
assert.equal(topFrame.locals[0].name, 'n');
529-
assert.equal(topFrame.locals[0].value, '2');
530-
assert.equal(topFrame.locals[1].name, 'A');
531-
assert.equal(topFrame.locals[2].name, 'B');
532-
}
522+
assert.equal(topFrame.locals[0].name, 'n');
523+
assert.equal(topFrame.locals[0].value, '2');
524+
assert.equal(topFrame.locals[1].name, 'A');
525+
assert.equal(topFrame.locals[2].name, 'B');
533526
api.clear(bp);
534527
done();
535528
});
@@ -587,13 +580,8 @@ describe('v8debugapi', function() {
587580
var topFrame = bp.stackFrames[0];
588581
assert.ok(topFrame);
589582
assert.equal(topFrame['function'], 'foo');
590-
if (semver.satisfies(process.version, '<1.6')) {
591-
assert.equal(topFrame.arguments[0].name, 'n');
592-
assert.equal(topFrame.arguments[0].value, '2');
593-
} else {
594-
assert.equal(topFrame.locals[0].name, 'n');
595-
assert.equal(topFrame.locals[0].value, '2');
596-
}
583+
assert.equal(topFrame.locals[0].name, 'n');
584+
assert.equal(topFrame.locals[0].value, '2');
597585
api.clear(bp);
598586
config.capture.maxFrames = oldMax;
599587
done();
@@ -623,13 +611,8 @@ describe('v8debugapi', function() {
623611

624612
var topFrame = bp.stackFrames[0];
625613
assert.equal(topFrame['function'], 'foo');
626-
if (semver.satisfies(process.version, '<1.6')) {
627-
assert.equal(topFrame.arguments[0].name, 'n');
628-
assert.equal(topFrame.arguments[0].value, '3');
629-
} else {
630-
assert.equal(topFrame.locals[0].name, 'n');
631-
assert.equal(topFrame.locals[0].value, '3');
632-
}
614+
assert.equal(topFrame.locals[0].name, 'n');
615+
assert.equal(topFrame.locals[0].value, '3');
633616

634617
var watch = bp.evaluatedExpressions[0];
635618
assert.equal(watch.name, 'process');
@@ -694,9 +677,6 @@ describe('v8debugapi', function() {
694677
});
695678

696679
it('should work with array length despite being native', function(done) {
697-
if (semver.satisfies(process.version, '<1.0')) {
698-
return done();
699-
}
700680
var bp = {
701681
id: breakpointInFoo.id,
702682
location: { path: 'test-v8debugapi.js', line: 5 },
@@ -957,13 +937,8 @@ describe('v8debugapi', function() {
957937
assert.ok(bp.stackFrames);
958938

959939
var topFrame = bp.stackFrames[0];
960-
if (semver.satisfies(process.version, '<1.6')) {
961-
assert.equal(topFrame.arguments[0].name, 'n');
962-
assert.equal(topFrame.arguments[0].value, '5');
963-
} else {
964-
assert.equal(topFrame.locals[0].name, 'n');
965-
assert.equal(topFrame.locals[0].value, '5');
966-
}
940+
assert.equal(topFrame.locals[0].name, 'n');
941+
assert.equal(topFrame.locals[0].value, '5');
967942
api.clear(bp);
968943
done();
969944
});
@@ -989,13 +964,8 @@ describe('v8debugapi', function() {
989964

990965
var topFrame = bp.stackFrames[0];
991966
assert.equal(topFrame['function'], 'foo');
992-
if (semver.satisfies(process.version, '<1.6')) {
993-
assert.equal(topFrame.arguments[0].name, 'n');
994-
assert.equal(topFrame.arguments[0].value, '3');
995-
} else {
996-
assert.equal(topFrame.locals[0].name, 'n');
997-
assert.equal(topFrame.locals[0].value, '3');
998-
}
967+
assert.equal(topFrame.locals[0].name, 'n');
968+
assert.equal(topFrame.locals[0].value, '3');
999969
api.clear(bp);
1000970
done();
1001971
});
@@ -1034,13 +1004,8 @@ describe('v8debugapi', function() {
10341004
assert.ok(bp.stackFrames);
10351005

10361006
var topFrame = bp.stackFrames[0];
1037-
if (semver.satisfies(process.version, '<1.6')) {
1038-
assert.equal(topFrame.arguments[0].name, 'j');
1039-
assert.equal(topFrame.arguments[0].value, '2');
1040-
} else {
1041-
assert.equal(topFrame.locals[0].name, 'j');
1042-
assert.equal(topFrame.locals[0].value, '2');
1043-
}
1007+
assert.equal(topFrame.locals[0].name, 'j');
1008+
assert.equal(topFrame.locals[0].value, '2');
10441009
assert.equal(topFrame['function'], 'foo');
10451010
api.clear(bp);
10461011
done();

‎yarn.lock

+67-14
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# yarn lockfile v1
33

44

5-
"@google-cloud/common@^0.12.0":
6-
version "0.12.2"
7-
resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.12.2.tgz#78c344288c4605a29f4c2899391759d7dc817c43"
5+
"@google-cloud/common@^0.13.3":
6+
version "0.13.3"
7+
resolved "https://registry.yarnpkg.com/@google-cloud/common/-/common-0.13.3.tgz#d73ee3fa511f29ffbcc44667898685709e9fec8c"
88
dependencies:
99
array-uniq "^1.0.3"
1010
arrify "^1.0.1"
@@ -13,13 +13,13 @@
1313
duplexify "^3.5.0"
1414
ent "^2.2.0"
1515
extend "^3.0.0"
16-
google-auto-auth "^0.5.2"
16+
google-auto-auth "^0.6.0"
1717
is "^3.2.0"
1818
log-driver "^1.2.5"
1919
methmeth "^1.1.0"
2020
modelo "^4.2.0"
2121
request "^2.79.0"
22-
retry-request "^1.3.2"
22+
retry-request "^2.0.0"
2323
split-array-stream "^1.0.0"
2424
stream-events "^1.0.1"
2525
string-format-obj "^1.1.0"
@@ -29,9 +29,9 @@ abbrev@1, abbrev@1.0.x:
2929
version "1.0.9"
3030
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135"
3131

32-
acorn@^4.0.3:
33-
version "4.0.11"
34-
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0"
32+
acorn@^5.0.3:
33+
version "5.0.3"
34+
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d"
3535

3636
ajv@^4.9.1:
3737
version "4.11.8"
@@ -475,6 +475,10 @@ esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1:
475475
version "2.7.3"
476476
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
477477

478+
esprima@^3.1.1:
479+
version "3.1.3"
480+
resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
481+
478482
estraverse@^1.9.1:
479483
version "1.9.3"
480484
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
@@ -499,6 +503,13 @@ fast-levenshtein@~2.0.4:
499503
version "2.0.6"
500504
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
501505

506+
fill-keys@^1.0.2:
507+
version "1.0.2"
508+
resolved "https://registry.yarnpkg.com/fill-keys/-/fill-keys-1.0.2.tgz#9a8fa36f4e8ad634e3bf6b4f3c8882551452eb20"
509+
dependencies:
510+
is-object "~1.0.1"
511+
merge-descriptors "~1.0.0"
512+
502513
findit2@^2.2.3:
503514
version "2.2.3"
504515
resolved "https://registry.yarnpkg.com/findit2/-/findit2-2.2.3.tgz#58a466697df8a6205cdfdbf395536b8bd777a5f6"
@@ -526,6 +537,13 @@ gcp-metadata@^0.1.0:
526537
extend "^3.0.0"
527538
retry-request "^1.3.2"
528539

540+
gcp-metadata@^0.2.0:
541+
version "0.2.0"
542+
resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-0.2.0.tgz#62dafca65f3a631bc8ce2ec3b77661f5f9387a0a"
543+
dependencies:
544+
extend "^3.0.0"
545+
retry-request "^2.0.0"
546+
529547
generate-function@^2.0.0:
530548
version "2.0.0"
531549
resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74"
@@ -602,11 +620,12 @@ google-auth-library@^0.10.0:
602620
lodash.noop "^3.0.1"
603621
request "^2.74.0"
604622

605-
google-auto-auth@^0.5.2:
606-
version "0.5.4"
607-
resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.5.4.tgz#1d86c7928d633e75a9c1ab034a527efcce4a40b1"
623+
google-auto-auth@^0.6.0:
624+
version "0.6.1"
625+
resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.6.1.tgz#c05d820e9454739ecf28a8892eeab3d1624f2cb3"
608626
dependencies:
609627
async "^2.1.2"
628+
gcp-metadata "^0.1.0"
610629
google-auth-library "^0.10.0"
611630
object-assign "^3.0.0"
612631
request "^2.79.0"
@@ -743,6 +762,10 @@ is-my-json-valid@^2.12.4:
743762
jsonpointer "^4.0.0"
744763
xtend "^4.0.0"
745764

765+
is-object@~1.0.1:
766+
version "1.0.1"
767+
resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
768+
746769
is-property@^1.0.0:
747770
version "1.0.2"
748771
resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
@@ -800,13 +823,20 @@ jodid25519@^1.0.0:
800823
dependencies:
801824
jsbn "~0.1.0"
802825

803-
js-yaml@3.6.1, js-yaml@3.x:
826+
js-yaml@3.6.1:
804827
version "3.6.1"
805828
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30"
806829
dependencies:
807830
argparse "^1.0.7"
808831
esprima "^2.6.0"
809832

833+
js-yaml@3.x:
834+
version "3.8.4"
835+
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6"
836+
dependencies:
837+
argparse "^1.0.7"
838+
esprima "^3.1.1"
839+
810840
jsbn@~0.1.0:
811841
version "0.1.1"
812842
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
@@ -980,6 +1010,10 @@ longest@^1.0.1:
9801010
version "1.0.1"
9811011
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
9821012

1013+
merge-descriptors@~1.0.0:
1014+
version "1.0.1"
1015+
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
1016+
9831017
methmeth@^1.1.0:
9841018
version "1.1.0"
9851019
resolved "https://registry.yarnpkg.com/methmeth/-/methmeth-1.1.0.tgz#e80a26618e52f5c4222861bb748510bd10e29089"
@@ -1038,6 +1072,10 @@ modelo@^4.2.0:
10381072
version "4.2.0"
10391073
resolved "https://registry.yarnpkg.com/modelo/-/modelo-4.2.0.tgz#3b4b420023a66ca7e32bdba16e710937e14d1b0b"
10401074

1075+
module-not-found-error@^1.0.0:
1076+
version "1.0.1"
1077+
resolved "https://registry.yarnpkg.com/module-not-found-error/-/module-not-found-error-1.0.1.tgz#cf8b4ff4f29640674d6cdd02b0e3bc523c2bbdc0"
1078+
10411079
ms@0.7.2:
10421080
version "0.7.2"
10431081
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765"
@@ -1149,6 +1187,14 @@ propagate@0.4.0:
11491187
version "0.4.0"
11501188
resolved "https://registry.yarnpkg.com/propagate/-/propagate-0.4.0.tgz#f3fcca0a6fe06736a7ba572966069617c130b481"
11511189

1190+
proxyquire@^1.7.11:
1191+
version "1.7.11"
1192+
resolved "https://registry.yarnpkg.com/proxyquire/-/proxyquire-1.7.11.tgz#13b494eb1e71fb21cc3ebe3699e637d3bec1af9e"
1193+
dependencies:
1194+
fill-keys "^1.0.2"
1195+
module-not-found-error "^1.0.0"
1196+
resolve "~1.1.7"
1197+
11521198
punycode@^1.4.1:
11531199
version "1.4.1"
11541200
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
@@ -1262,7 +1308,7 @@ request@2.79.0:
12621308
tunnel-agent "~0.4.1"
12631309
uuid "^3.0.0"
12641310

1265-
request@^2.61.0, request@^2.72.0, request@^2.74.0, request@^2.79.0:
1311+
request@^2.72.0, request@^2.74.0, request@^2.79.0, request@^2.81.0:
12661312
version "2.81.0"
12671313
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
12681314
dependencies:
@@ -1289,7 +1335,7 @@ request@^2.61.0, request@^2.72.0, request@^2.74.0, request@^2.79.0:
12891335
tunnel-agent "^0.6.0"
12901336
uuid "^3.0.0"
12911337

1292-
resolve@1.1.x:
1338+
resolve@1.1.x, resolve@~1.1.7:
12931339
version "1.1.7"
12941340
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
12951341

@@ -1300,6 +1346,13 @@ retry-request@^1.3.2:
13001346
request "2.76.0"
13011347
through2 "^2.0.0"
13021348

1349+
retry-request@^2.0.0:
1350+
version "2.0.1"
1351+
resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-2.0.1.tgz#fce3d5cc53e307c7dd1b4a6395bbfac1ea5ae664"
1352+
dependencies:
1353+
request "^2.81.0"
1354+
through2 "^2.0.0"
1355+
13031356
right-align@^0.1.1:
13041357
version "0.1.3"
13051358
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"

0 commit comments

Comments
 (0)
This repository has been archived.