...
, { a: 3, b: 4, c: [ 5, 6, [ 7, [ 8, [Object] ] ] ] } ]'
- );
-});
diff --git a/js/node/node_modules/qs/node_modules/object-inspect/test/circular.js b/js/node/node_modules/qs/node_modules/object-inspect/test/circular.js
deleted file mode 100644
index 5df4233cb202..000000000000
--- a/js/node/node_modules/qs/node_modules/object-inspect/test/circular.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var inspect = require('../');
-var test = require('tape');
-
-test('circular', function (t) {
- t.plan(2);
- var obj = { a: 1, b: [3, 4] };
- obj.c = obj;
- t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }');
-
- var double = {};
- double.a = [double];
- double.b = {};
- double.b.inner = double.b;
- double.b.obj = double;
- t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }');
-});
diff --git a/js/node/node_modules/qs/node_modules/object-inspect/test/deep.js b/js/node/node_modules/qs/node_modules/object-inspect/test/deep.js
deleted file mode 100644
index 99ce32a088f9..000000000000
--- a/js/node/node_modules/qs/node_modules/object-inspect/test/deep.js
+++ /dev/null
@@ -1,12 +0,0 @@
-var inspect = require('../');
-var test = require('tape');
-
-test('deep', function (t) {
- t.plan(4);
- var obj = [[[[[[500]]]]]];
- t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]');
- t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]');
- t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]');
-
- t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]');
-});
diff --git a/js/node/node_modules/qs/node_modules/object-inspect/test/element.js b/js/node/node_modules/qs/node_modules/object-inspect/test/element.js
deleted file mode 100644
index 47fa9e240029..000000000000
--- a/js/node/node_modules/qs/node_modules/object-inspect/test/element.js
+++ /dev/null
@@ -1,53 +0,0 @@
-var inspect = require('../');
-var test = require('tape');
-
-test('element', function (t) {
- t.plan(3);
- var elem = {
- nodeName: 'div',
- attributes: [{ name: 'class', value: 'row' }],
- getAttribute: function (key) { return key; },
- childNodes: []
- };
- var obj = [1, elem, 3];
- t.deepEqual(inspect(obj), '[ 1, ...
, 3 ]');
-});
-
-test('element instance', function (t) {
- t.plan(1);
- var h = global.HTMLElement;
- global.HTMLElement = function (name, attr) {
- this.nodeName = name;
- this.attributes = attr;
- };
- global.HTMLElement.prototype.getAttribute = function () {};
-
- var elem = new global.HTMLElement('div', []);
- var obj = [1, elem, 3];
- t.deepEqual(inspect(obj), '[ 1, <\/div>/);
- assert.match(str, /class="hey there"/);
- assert.match(str, /id="ohyeah"/);
- },
-
- "formats dom element with content": function () {
- var element = document.createElement("div");
- element.innerHTML = "Oh hi!";
-
- assert.equals(formatio.ascii(element), "
Oh hi!
");
- },
-
- "truncates dom element content": function () {
- var element = document.createElement("div");
- element.innerHTML = "Oh hi! I'm Christian, and this " +
- "is a lot of content";
-
- assert.equals(formatio.ascii(element),
- "
Oh hi! I'm Christian[...]
");
- },
-
- "includes attributes and truncated content": function () {
- var element = document.createElement("div");
- element.id = "anid";
- element.lang = "en";
- element.innerHTML = "Oh hi! I'm Christian, and this " +
- "is a lot of content";
- var str = formatio.ascii(element);
-
- assert.match(str,
- /
Oh hi! I'm Christian\[\.\.\.\]<\/div>/);
- assert.match(str, /lang="en"/);
- assert.match(str, /id="anid"/);
- },
-
- "formats document object as toString": function () {
- var str;
- buster.assertions.refute.exception(function () {
- str = formatio.ascii(document);
- });
-
- assert.equals(str, "[object HTMLDocument]");
- },
-
- "formats window object as toString": function () {
- var str;
- buster.assertions.refute.exception(function () {
- str = formatio.ascii(window);
- });
-
- assert.equals(str, "[object Window]");
- }
- },
-
- "global object": {
- requiresSupportFor: { "global": typeof global !== "undefined" },
-
- "formats global object as toString": function () {
- var str;
- buster.assertions.refute.exception(function () {
- str = formatio.ascii(global);
- });
-
- assert.equals(str, "[object global]");
- }
- }
- });
-});
diff --git a/js/node/node_modules/sinon/node_modules/lolex/.editorconfig b/js/node/node_modules/sinon/node_modules/lolex/.editorconfig
deleted file mode 100644
index bdfa15e495f8..000000000000
--- a/js/node/node_modules/sinon/node_modules/lolex/.editorconfig
+++ /dev/null
@@ -1,17 +0,0 @@
-; EditorConfig file: http://EditorConfig.org
-; Install the "EditorConfig" plugin into your editor to use
-
-root = true
-
-[*]
-charset = utf-8
-end_of_line = lf
-insert_final_newline = true
-indent_style = space
-indent_size = 4
-trim_trailing_whitespace = true
-
-# Matches the exact files either package.json or .travis.yml
-[{package.json, .travis.yml}]
-indent_style = space
-indent_size = 2
diff --git a/js/node/node_modules/sinon/node_modules/lolex/.jslintrc b/js/node/node_modules/sinon/node_modules/lolex/.jslintrc
deleted file mode 100644
index fdb799f47176..000000000000
--- a/js/node/node_modules/sinon/node_modules/lolex/.jslintrc
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "evil":true,
- "vars":true,
- "plusplus":true
-}
diff --git a/js/node/node_modules/sinon/node_modules/lolex/.min-wd b/js/node/node_modules/sinon/node_modules/lolex/.min-wd
deleted file mode 100644
index 40f963f1167f..000000000000
--- a/js/node/node_modules/sinon/node_modules/lolex/.min-wd
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "sauceLabs": true,
- "browsers": [{
- "name": "chrome"
- }, {
- "name": "internet explorer",
- "version": "9",
- "url": "http://maxantoni.de/doctype.html"
- }, {
- "name": "internet explorer",
- "version": "10"
- }]
-}
diff --git a/js/node/node_modules/sinon/node_modules/lolex/.npmignore b/js/node/node_modules/sinon/node_modules/lolex/.npmignore
deleted file mode 100644
index 07e6e472cc75..000000000000
--- a/js/node/node_modules/sinon/node_modules/lolex/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-/node_modules
diff --git a/js/node/node_modules/sinon/node_modules/lolex/.travis.yml b/js/node/node_modules/sinon/node_modules/lolex/.travis.yml
deleted file mode 100644
index c28affebd2c9..000000000000
--- a/js/node/node_modules/sinon/node_modules/lolex/.travis.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-language: node_js
-
-sudo: false
-
-node_js:
- - "0.10"
- - "0.12"
-script:
- - "./script/ci-test.sh"
-
diff --git a/js/node/node_modules/sinon/node_modules/lolex/test/lolex-test.js b/js/node/node_modules/sinon/node_modules/lolex/test/lolex-test.js
deleted file mode 100644
index a1ef996fc722..000000000000
--- a/js/node/node_modules/sinon/node_modules/lolex/test/lolex-test.js
+++ /dev/null
@@ -1,1260 +0,0 @@
-/*global
- describe,
- beforeEach,
- afterEach,
- it,
- assert
-*/
-/**
- * @author Christian Johansen (christian@cjohansen.no)
- * @license BSD
- *
- * Copyright (c) 2010-2014 Christian Johansen
- */
-"use strict";
-
-if (typeof require === "function" && typeof module === "object") {
- var referee = require("referee");
- var lolex = require("../src/lolex");
- var sinon = require("sinon");
-
- global.lolex = lolex; // For testing eval
-}
-
-var assert = referee.assert;
-var refute = referee.refute;
-var GlobalDate = Date;
-var NOOP = function NOOP() { return undefined; };
-
-describe("lolex", function () {
-
- describe("setTimeout", function () {
-
- beforeEach(function () {
- this.clock = lolex.createClock();
- lolex.evalCalled = false;
- });
-
- afterEach(function () {
- delete lolex.evalCalled;
- });
-
- it("throws if no arguments", function () {
- var clock = this.clock;
-
- assert.exception(function () { clock.setTimeout(); });
- });
-
- it("returns numeric id or object with numeric id", function () {
- var result = this.clock.setTimeout("");
-
- if (typeof result === 'object') {
- assert.isNumber(result.id);
- } else {
- assert.isNumber(result);
- }
- });
-
- it("returns unique id", function () {
- var id1 = this.clock.setTimeout("");
- var id2 = this.clock.setTimeout("");
-
- refute.equals(id2, id1);
- });
-
- it("sets timers on instance", function () {
- var clock1 = lolex.createClock();
- var clock2 = lolex.createClock();
- var stubs = [sinon.stub(), sinon.stub()];
-
- clock1.setTimeout(stubs[0], 100);
- clock2.setTimeout(stubs[1], 100);
- clock2.tick(200);
-
- assert.isFalse(stubs[0].called);
- assert(stubs[1].called);
- });
-
- it("evals non-function callbacks", function () {
- this.clock.setTimeout("lolex.evalCalled = true", 10);
- this.clock.tick(10);
-
- assert(lolex.evalCalled);
- });
-
- it("passes setTimeout parameters", function () {
- var clock = lolex.createClock();
- var stub = sinon.stub();
-
- clock.setTimeout(stub, 2, "the first", "the second");
-
- clock.tick(3);
-
- assert.isTrue(stub.calledWithExactly("the first", "the second"));
- });
-
- it("calls correct timeout on recursive tick", function () {
- var clock = lolex.createClock();
- var stub = sinon.stub();
- var recurseCallback = function () { clock.tick(100); };
-
- clock.setTimeout(recurseCallback, 50);
- clock.setTimeout(stub, 100);
-
- clock.tick(50);
- assert(stub.called);
- });
-
- it("does not depend on this", function () {
- var clock = lolex.createClock();
- var stub = sinon.stub();
- var setTimeout = clock.setTimeout;
-
- setTimeout(stub, 100);
-
- clock.tick(100);
- assert(stub.called);
- });
-
- it("is not influenced by forward system clock changes", function () {
- var stub = sinon.stub();
- this.clock.setTimeout(stub, 5000);
- this.clock.tick(1000);
- this.clock.setSystemTime((new this.clock.Date()).getTime() + 1000);
- this.clock.tick(3990);
- assert.equals(stub.callCount, 0);
- this.clock.tick(20);
- assert.equals(stub.callCount, 1);
- });
-
- it("is not influenced by backward system clock changes", function () {
- var stub = sinon.stub();
- this.clock.setTimeout(stub, 5000);
- this.clock.tick(1000);
- this.clock.setSystemTime((new this.clock.Date()).getTime() - 1000);
- this.clock.tick(3990);
- assert.equals(stub.callCount, 0);
- this.clock.tick(20);
- assert.equals(stub.callCount, 1);
- });
- });
-
- describe("setImmediate", function () {
-
- beforeEach(function () {
- this.clock = lolex.createClock();
- });
-
- it("returns numeric id or object with numeric id", function () {
- var result = this.clock.setImmediate(NOOP);
-
- if (typeof result === 'object') {
- assert.isNumber(result.id);
- } else {
- assert.isNumber(result);
- }
- });
-
- it("calls the given callback immediately", function () {
- var stub = sinon.stub();
-
- this.clock.setImmediate(stub);
- this.clock.tick(0);
-
- assert(stub.called);
- });
-
- it("throws if no arguments", function () {
- var clock = this.clock;
-
- assert.exception(function () {
- clock.setImmediate();
- });
- });
-
- it("manages separate timers per clock instance", function () {
- var clock1 = lolex.createClock();
- var clock2 = lolex.createClock();
- var stubs = [sinon.stub(), sinon.stub()];
-
- clock1.setImmediate(stubs[0]);
- clock2.setImmediate(stubs[1]);
- clock2.tick(0);
-
- assert.isFalse(stubs[0].called);
- assert(stubs[1].called);
- });
-
- it("passes extra parameters through to the callback", function () {
- var stub = sinon.stub();
-
- this.clock.setImmediate(stub, 'value1', 2);
- this.clock.tick(1);
-
- assert(stub.calledWithExactly('value1', 2));
- });
-
- it("calls the given callback before setTimeout", function () {
- var stub1 = sinon.stub.create();
- var stub2 = sinon.stub.create();
-
- this.clock.setTimeout(stub1, 0);
- this.clock.setImmediate(stub2);
- this.clock.tick(0);
-
- assert(stub1.calledOnce);
- assert(stub2.calledOnce);
- assert(stub2.calledBefore(stub1));
- });
-
- it("does not stuck next tick even if nested", function () {
- var clock = this.clock;
-
- clock.setImmediate(function f() {
- clock.setImmediate(f);
- });
-
- clock.tick(0);
- });
- });
-
- describe("clearImmediate", function () {
-
- beforeEach(function () {
- this.clock = lolex.createClock();
- });
-
- it("removes immediate callbacks", function () {
- var callback = sinon.stub();
-
- var id = this.clock.setImmediate(callback);
- this.clock.clearImmediate(id);
- this.clock.tick(1);
-
- assert.isFalse(callback.called);
- });
-
- it("does not remove timeout", function () {
- var callback = sinon.stub();
-
- var id = this.clock.setTimeout(callback, 50);
- assert.exception(function() {
- this.clock.clearImmediate(id);
- });
- this.clock.tick(55);
-
- assert.isTrue(callback.called);
- });
-
- it("does not remove interval", function () {
- var callback = sinon.stub();
-
- var id = this.clock.setInterval(callback, 50);
- assert.exception(function() {
- this.clock.clearImmediate(id);
- });
- this.clock.tick(55);
-
- assert.isTrue(callback.called);
- });
-
- });
-
- describe("tick", function () {
-
- beforeEach(function () {
- this.clock = lolex.install(0);
- });
-
- afterEach(function () {
- this.clock.uninstall();
- });
-
- it("triggers immediately without specified delay", function () {
- var stub = sinon.stub();
- this.clock.setTimeout(stub);
-
- this.clock.tick(0);
-
- assert(stub.called);
- });
-
- it("does not trigger without sufficient delay", function () {
- var stub = sinon.stub();
- this.clock.setTimeout(stub, 100);
- this.clock.tick(10);
-
- assert.isFalse(stub.called);
- });
-
- it("triggers after sufficient delay", function () {
- var stub = sinon.stub();
- this.clock.setTimeout(stub, 100);
- this.clock.tick(100);
-
- assert(stub.called);
- });
-
- it("triggers simultaneous timers", function () {
- var spies = [sinon.spy(), sinon.spy()];
- this.clock.setTimeout(spies[0], 100);
- this.clock.setTimeout(spies[1], 100);
-
- this.clock.tick(100);
-
- assert(spies[0].called);
- assert(spies[1].called);
- });
-
- it("triggers multiple simultaneous timers", function () {
- var spies = [sinon.spy(), sinon.spy(), sinon.spy(), sinon.spy()];
- this.clock.setTimeout(spies[0], 100);
- this.clock.setTimeout(spies[1], 100);
- this.clock.setTimeout(spies[2], 99);
- this.clock.setTimeout(spies[3], 100);
-
- this.clock.tick(100);
-
- assert(spies[0].called);
- assert(spies[1].called);
- assert(spies[2].called);
- assert(spies[3].called);
- });
-
- it("triggers multiple simultaneous timers with zero callAt", function () {
- var test = this;
- var spies = [
- sinon.spy(function () {
- test.clock.setTimeout(spies[1], 0);
- }),
- sinon.spy(),
- sinon.spy()
- ];
-
- // First spy calls another setTimeout with delay=0
- this.clock.setTimeout(spies[0], 0);
- this.clock.setTimeout(spies[2], 10);
-
- this.clock.tick(10);
-
- assert(spies[0].called);
- assert(spies[1].called);
- assert(spies[2].called);
- });
-
- it("waits after setTimeout was called", function () {
- this.clock.tick(100);
- var stub = sinon.stub();
- this.clock.setTimeout(stub, 150);
- this.clock.tick(50);
-
- assert.isFalse(stub.called);
- this.clock.tick(100);
- assert(stub.called);
- });
-
- it("mini integration test", function () {
- var stubs = [sinon.stub(), sinon.stub(), sinon.stub()];
- this.clock.setTimeout(stubs[0], 100);
- this.clock.setTimeout(stubs[1], 120);
- this.clock.tick(10);
- this.clock.tick(89);
- assert.isFalse(stubs[0].called);
- assert.isFalse(stubs[1].called);
- this.clock.setTimeout(stubs[2], 20);
- this.clock.tick(1);
- assert(stubs[0].called);
- assert.isFalse(stubs[1].called);
- assert.isFalse(stubs[2].called);
- this.clock.tick(19);
- assert.isFalse(stubs[1].called);
- assert(stubs[2].called);
- this.clock.tick(1);
- assert(stubs[1].called);
- });
-
- it("triggers even when some throw", function () {
- var clock = this.clock;
- var stubs = [sinon.stub().throws(), sinon.stub()];
-
- clock.setTimeout(stubs[0], 100);
- clock.setTimeout(stubs[1], 120);
-
- assert.exception(function () {
- clock.tick(120);
- });
-
- assert(stubs[0].called);
- assert(stubs[1].called);
- });
-
- it("calls function with global object or null (strict mode) as this", function () {
- var clock = this.clock;
- var stub = sinon.stub().throws();
- clock.setTimeout(stub, 100);
-
- assert.exception(function () {
- clock.tick(100);
- });
-
- assert(stub.calledOn(global) || stub.calledOn(null));
- });
-
- it("triggers in the order scheduled", function () {
- var spies = [sinon.spy(), sinon.spy()];
- this.clock.setTimeout(spies[0], 13);
- this.clock.setTimeout(spies[1], 11);
-
- this.clock.tick(15);
-
- assert(spies[1].calledBefore(spies[0]));
- });
-
- it("creates updated Date while ticking", function () {
- var spy = sinon.spy();
-
- this.clock.setInterval(function () {
- spy(new Date().getTime());
- }, 10);
-
- this.clock.tick(100);
-
- assert.equals(spy.callCount, 10);
- assert(spy.calledWith(10));
- assert(spy.calledWith(20));
- assert(spy.calledWith(30));
- assert(spy.calledWith(40));
- assert(spy.calledWith(50));
- assert(spy.calledWith(60));
- assert(spy.calledWith(70));
- assert(spy.calledWith(80));
- assert(spy.calledWith(90));
- assert(spy.calledWith(100));
- });
-
- it("fires timer in intervals of 13", function () {
- var spy = sinon.spy();
- this.clock.setInterval(spy, 13);
-
- this.clock.tick(500);
-
- assert.equals(spy.callCount, 38);
- });
-
- it("fires timers in correct order", function () {
- var spy13 = sinon.spy();
- var spy10 = sinon.spy();
-
- this.clock.setInterval(function () {
- spy13(new Date().getTime());
- }, 13);
-
- this.clock.setInterval(function () {
- spy10(new Date().getTime());
- }, 10);
-
- this.clock.tick(500);
-
- assert.equals(spy13.callCount, 38);
- assert.equals(spy10.callCount, 50);
-
- assert(spy13.calledWith(416));
- assert(spy10.calledWith(320));
-
- assert(spy10.getCall(0).calledBefore(spy13.getCall(0)));
- assert(spy10.getCall(4).calledBefore(spy13.getCall(3)));
- });
-
- it("triggers timeouts and intervals in the order scheduled", function () {
- var spies = [sinon.spy(), sinon.spy()];
- this.clock.setInterval(spies[0], 10);
- this.clock.setTimeout(spies[1], 50);
-
- this.clock.tick(100);
-
- assert(spies[0].calledBefore(spies[1]));
- assert.equals(spies[0].callCount, 10);
- assert.equals(spies[1].callCount, 1);
- });
-
- it("does not fire canceled intervals", function () {
- var id;
- var callback = sinon.spy(function () {
- if (callback.callCount === 3) {
- clearInterval(id);
- }
- });
-
- id = this.clock.setInterval(callback, 10);
- this.clock.tick(100);
-
- assert.equals(callback.callCount, 3);
- });
-
- it("passes 6 seconds", function () {
- var spy = sinon.spy();
- this.clock.setInterval(spy, 4000);
-
- this.clock.tick("08");
-
- assert.equals(spy.callCount, 2);
- });
-
- it("passes 1 minute", function () {
- var spy = sinon.spy();
- this.clock.setInterval(spy, 6000);
-
- this.clock.tick("01:00");
-
- assert.equals(spy.callCount, 10);
- });
-
- it("passes 2 hours, 34 minutes and 12 seconds", function () {
- var spy = sinon.spy();
- this.clock.setInterval(spy, 10000);
-
- this.clock.tick("02:34:10");
-
- assert.equals(spy.callCount, 925);
- });
-
- it("throws for invalid format", function () {
- var spy = sinon.spy();
- this.clock.setInterval(spy, 10000);
- var test = this;
-
- assert.exception(function () {
- test.clock.tick("12:02:34:10");
- });
-
- assert.equals(spy.callCount, 0);
- });
-
- it("throws for invalid minutes", function () {
- var spy = sinon.spy();
- this.clock.setInterval(spy, 10000);
- var test = this;
-
- assert.exception(function () {
- test.clock.tick("67:10");
- });
-
- assert.equals(spy.callCount, 0);
- });
-
- it("throws for negative minutes", function () {
- var spy = sinon.spy();
- this.clock.setInterval(spy, 10000);
- var test = this;
-
- assert.exception(function () {
- test.clock.tick("-7:10");
- });
-
- assert.equals(spy.callCount, 0);
- });
-
- it("treats missing argument as 0", function () {
- this.clock.tick();
-
- assert.equals(this.clock.now, 0);
- });
-
- it("fires nested setTimeout calls properly", function () {
- var i = 0;
- var clock = this.clock;
-
- var callback = function () {
- ++i;
- clock.setTimeout(function () {
- callback();
- }, 100);
- };
-
- callback();
-
- clock.tick(1000);
-
- assert.equals(i, 11);
- });
-
- it("does not silently catch errors", function () {
- var clock = this.clock;
-
- clock.setTimeout(function () {
- throw new Error("oh no!");
- }, 1000);
-
- assert.exception(function () {
- clock.tick(1000);
- });
- });
-
- it("returns the current now value", function () {
- var clock = this.clock;
- var value = clock.tick(200);
- assert.equals(clock.now, value);
- });
- });
-
- describe("clearTimeout", function () {
-
- beforeEach(function () {
- this.clock = lolex.createClock();
- });
-
- it("removes timeout", function () {
- var stub = sinon.stub();
- var id = this.clock.setTimeout(stub, 50);
- this.clock.clearTimeout(id);
- this.clock.tick(50);
-
- assert.isFalse(stub.called);
- });
-
- it("does not remove interval", function () {
- var stub = sinon.stub();
- var id = this.clock.setInterval(stub, 50);
- assert.exception(function() {
- this.clock.clearTimeout(id);
- });
- this.clock.tick(50);
-
- assert.isTrue(stub.called);
- });
-
- it("does not remove immediate", function () {
- var stub = sinon.stub();
- var id = this.clock.setImmediate(stub);
- assert.exception(function() {
- this.clock.clearTimeout(id);
- });
- this.clock.tick(50);
-
- assert.isTrue(stub.called);
- });
-
- it("ignores null argument", function () {
- this.clock.clearTimeout(null);
- assert(true); // doesn't fail
- });
- });
-
- describe("reset", function () {
-
- beforeEach(function () {
- this.clock = lolex.createClock();
- });
-
- it("empties timeouts queue", function () {
- var stub = sinon.stub();
- this.clock.setTimeout(stub);
- this.clock.reset();
- this.clock.tick(0);
-
- assert.isFalse(stub.called);
- });
- });
-
- describe("setInterval", function () {
-
- beforeEach(function () {
- this.clock = lolex.createClock();
- });
-
- it("throws if no arguments", function () {
- var clock = this.clock;
-
- assert.exception(function () {
- clock.setInterval();
- });
- });
-
- it("returns numeric id or object with numeric id", function () {
- var result = this.clock.setInterval("");
-
- if (typeof result === 'object') {
- assert.isNumber(result.id);
- } else {
- assert.isNumber(result);
- }
- });
-
- it("returns unique id", function () {
- var id1 = this.clock.setInterval("");
- var id2 = this.clock.setInterval("");
-
- refute.equals(id2, id1);
- });
-
- it("schedules recurring timeout", function () {
- var stub = sinon.stub();
- this.clock.setInterval(stub, 10);
- this.clock.tick(99);
-
- assert.equals(stub.callCount, 9);
- });
-
- it("is not influenced by forward system clock changes", function () {
- var stub = sinon.stub();
- this.clock.setInterval(stub, 10);
- this.clock.tick(11);
- assert.equals(stub.callCount, 1);
- this.clock.setSystemTime((new this.clock.Date()).getTime() + 1000);
- this.clock.tick(8);
- assert.equals(stub.callCount, 1);
- this.clock.tick(3);
- assert.equals(stub.callCount, 2);
- });
-
- it("is not influenced by backward system clock changes", function () {
- var stub = sinon.stub();
- this.clock.setInterval(stub, 10);
- this.clock.tick(5);
- this.clock.setSystemTime((new this.clock.Date()).getTime() - 1000);
- this.clock.tick(6);
- assert.equals(stub.callCount, 1);
- this.clock.tick(10);
- assert.equals(stub.callCount, 2);
- });
-
- it("does not schedule recurring timeout when cleared", function () {
- var clock = this.clock;
- var id;
- var stub = sinon.spy(function () {
- if (stub.callCount === 3) {
- clock.clearInterval(id);
- }
- });
-
- id = this.clock.setInterval(stub, 10);
- this.clock.tick(100);
-
- assert.equals(stub.callCount, 3);
- });
-
- it("passes setTimeout parameters", function () {
- var clock = lolex.createClock();
- var stub = sinon.stub();
-
- clock.setInterval(stub, 2, "the first", "the second");
-
- clock.tick(3);
-
- assert.isTrue(stub.calledWithExactly("the first", "the second"));
- });
- });
-
- describe("clearInterval", function () {
-
- beforeEach(function () {
- this.clock = lolex.createClock();
- });
-
- it("removes interval", function () {
- var stub = sinon.stub();
- var id = this.clock.setInterval(stub, 50);
- this.clock.clearInterval(id);
- this.clock.tick(50);
-
- assert.isFalse(stub.called);
- });
-
- it("does not remove timeout", function () {
- var stub = sinon.stub();
- var id = this.clock.setTimeout(stub, 50);
- assert.exception(function() {
- this.clock.clearInterval(id);
- });
- this.clock.tick(50);
- assert.isTrue(stub.called);
- });
-
- it("does not remove immediate", function () {
- var stub = sinon.stub();
- var id = this.clock.setImmediate(stub);
- assert.exception(function() {
- this.clock.clearInterval(id);
- });
- this.clock.tick(50);
-
- assert.isTrue(stub.called);
- });
-
- it("ignores null argument", function () {
- this.clock.clearInterval(null);
- assert(true); // doesn't fail
- });
- });
-
- describe("date", function () {
-
- beforeEach(function () {
- this.now = new GlobalDate().getTime() - 3000;
- this.clock = lolex.createClock(this.now);
- this.Date = global.Date;
- });
-
- afterEach(function () {
- global.Date = this.Date;
- });
-
- it("provides date constructor", function () {
- assert.isFunction(this.clock.Date);
- });
-
- it("creates real Date objects", function () {
- var date = new this.clock.Date();
-
- assert(Date.prototype.isPrototypeOf(date));
- });
-
- it("creates real Date objects when called as function", function () {
- var date = this.clock.Date();
-
- assert(Date.prototype.isPrototypeOf(date));
- });
-
- it("creates real Date objects when Date constructor is gone", function () {
- var realDate = new Date();
- Date = NOOP;
- global.Date = NOOP;
-
- var date = new this.clock.Date();
-
- assert.same(date.constructor.prototype, realDate.constructor.prototype);
- });
-
- it("creates Date objects representing clock time", function () {
- var date = new this.clock.Date();
-
- assert.equals(date.getTime(), new Date(this.now).getTime());
- });
-
- it("returns Date object representing clock time", function () {
- var date = this.clock.Date();
-
- assert.equals(date.getTime(), new Date(this.now).getTime());
- });
-
- it("listens to ticking clock", function () {
- var date1 = new this.clock.Date();
- this.clock.tick(3);
- var date2 = new this.clock.Date();
-
- assert.equals(date2.getTime() - date1.getTime(), 3);
- });
-
- it("listens to system clock changes", function () {
- var date1 = new this.clock.Date();
- this.clock.setSystemTime(date1.getTime() + 1000);
- var date2 = new this.clock.Date();
-
- assert.equals(date2.getTime() - date1.getTime(), 1000);
- });
-
- it("creates regular date when passing timestamp", function () {
- var date = new Date();
- var fakeDate = new this.clock.Date(date.getTime());
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("returns regular date when calling with timestamp", function () {
- var date = new Date();
- var fakeDate = this.clock.Date(date.getTime());
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("creates regular date when passing year, month", function () {
- var date = new Date(2010, 4);
- var fakeDate = new this.clock.Date(2010, 4);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("returns regular date when calling with year, month", function () {
- var date = new Date(2010, 4);
- var fakeDate = this.clock.Date(2010, 4);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("creates regular date when passing y, m, d", function () {
- var date = new Date(2010, 4, 2);
- var fakeDate = new this.clock.Date(2010, 4, 2);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("returns regular date when calling with y, m, d", function () {
- var date = new Date(2010, 4, 2);
- var fakeDate = this.clock.Date(2010, 4, 2);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("creates regular date when passing y, m, d, h", function () {
- var date = new Date(2010, 4, 2, 12);
- var fakeDate = new this.clock.Date(2010, 4, 2, 12);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("returns regular date when calling with y, m, d, h", function () {
- var date = new Date(2010, 4, 2, 12);
- var fakeDate = this.clock.Date(2010, 4, 2, 12);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("creates regular date when passing y, m, d, h, m", function () {
- var date = new Date(2010, 4, 2, 12, 42);
- var fakeDate = new this.clock.Date(2010, 4, 2, 12, 42);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("returns regular date when calling with y, m, d, h, m", function () {
- var date = new Date(2010, 4, 2, 12, 42);
- var fakeDate = this.clock.Date(2010, 4, 2, 12, 42);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("creates regular date when passing y, m, d, h, m, s", function () {
- var date = new Date(2010, 4, 2, 12, 42, 53);
- var fakeDate = new this.clock.Date(2010, 4, 2, 12, 42, 53);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("returns regular date when calling with y, m, d, h, m, s", function () {
- var date = new Date(2010, 4, 2, 12, 42, 53);
- var fakeDate = this.clock.Date(2010, 4, 2, 12, 42, 53);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("creates regular date when passing y, m, d, h, m, s, ms", function () {
- var date = new Date(2010, 4, 2, 12, 42, 53, 498);
- var fakeDate = new this.clock.Date(2010, 4, 2, 12, 42, 53, 498);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("returns regular date when calling with y, m, d, h, m, s, ms", function () {
- var date = new Date(2010, 4, 2, 12, 42, 53, 498);
- var fakeDate = this.clock.Date(2010, 4, 2, 12, 42, 53, 498);
-
- assert.equals(fakeDate.getTime(), date.getTime());
- });
-
- it("mirrors native Date.prototype", function () {
- assert.same(this.clock.Date.prototype, Date.prototype);
- });
-
- it("supports now method if present", function () {
- assert.same(typeof this.clock.Date.now, typeof Date.now);
- });
-
- if (Date.now) {
- describe("now", function () {
- it("returns clock.now", function () {
- var clock_now = this.clock.Date.now();
- var global_now = GlobalDate.now();
-
- assert(this.now <= clock_now && clock_now <= global_now);
- });
- });
- } else {
- describe("unsupported now", function () {
- it("is undefined", function () {
- refute.defined(this.clock.Date.now);
- });
- });
- }
-
- it("mirrors parse method", function () {
- assert.same(this.clock.Date.parse, Date.parse);
- });
-
- it("mirrors UTC method", function () {
- assert.same(this.clock.Date.UTC, Date.UTC);
- });
-
- it("mirrors toUTCString method", function () {
- assert.same(this.clock.Date.prototype.toUTCString, Date.prototype.toUTCString);
- });
-
- if (Date.toSource) {
- describe("toSource", function () {
-
- it("is mirrored", function () {
- assert.same(this.clock.Date.toSource(), Date.toSource());
- });
-
- });
- } else {
- describe("unsupported toSource", function () {
-
- it("is undefined", function () {
- refute.defined(this.clock.Date.toSource);
- });
-
- });
- }
-
- it("mirrors toString", function () {
- assert.same(this.clock.Date.toString(), Date.toString());
- });
- });
-
- describe("stubTimers", function () {
-
- beforeEach(function () {
- this.dateNow = global.Date.now;
- });
-
- afterEach(function () {
- if (this.clock) {
- this.clock.uninstall();
- }
-
- clearTimeout(this.timer);
- if (this.dateNow === undefined) {
- delete global.Date.now;
- } else {
- global.Date.now = this.dateNow;
- }
- });
-
- it("returns clock object", function () {
- this.clock = lolex.install();
-
- assert.isObject(this.clock);
- assert.isFunction(this.clock.tick);
- });
-
- it("has clock property", function () {
- this.clock = lolex.install();
-
- assert.same(setTimeout.clock, this.clock);
- assert.same(clearTimeout.clock, this.clock);
- assert.same(setInterval.clock, this.clock);
- assert.same(clearInterval.clock, this.clock);
- assert.same(Date.clock, this.clock);
- });
-
- it("sets initial timestamp", function () {
- this.clock = lolex.install(1400);
-
- assert.equals(this.clock.now, 1400);
- });
-
- it("replaces global setTimeout", function () {
- this.clock = lolex.install();
- var stub = sinon.stub();
-
- setTimeout(stub, 1000);
- this.clock.tick(1000);
-
- assert(stub.called);
- });
-
- it("global fake setTimeout should return id", function () {
- this.clock = lolex.install();
- var stub = sinon.stub();
-
- var to = setTimeout(stub, 1000);
-
- if (typeof (setTimeout(NOOP, 0)) === 'object') {
- assert.isNumber(to.id);
- assert.isFunction(to.ref);
- assert.isFunction(to.unref);
- } else {
- assert.isNumber(to);
- }
- });
-
- it("replaces global clearTimeout", function () {
- this.clock = lolex.install();
- var stub = sinon.stub();
-
- clearTimeout(setTimeout(stub, 1000));
- this.clock.tick(1000);
-
- assert.isFalse(stub.called);
- });
-
- it("uninstalls global setTimeout", function () {
- this.clock = lolex.install();
- var stub = sinon.stub();
- this.clock.uninstall();
-
- this.timer = setTimeout(stub, 1000);
- this.clock.tick(1000);
-
- assert.isFalse(stub.called);
- assert.same(setTimeout, lolex.timers.setTimeout);
- });
-
- it("uninstalls global clearTimeout", function () {
- this.clock = lolex.install();
- sinon.stub();
- this.clock.uninstall();
-
- assert.same(clearTimeout, lolex.timers.clearTimeout);
- });
-
- it("replaces global setInterval", function () {
- this.clock = lolex.install();
- var stub = sinon.stub();
-
- setInterval(stub, 500);
- this.clock.tick(1000);
-
- assert(stub.calledTwice);
- });
-
- it("replaces global clearInterval", function () {
- this.clock = lolex.install();
- var stub = sinon.stub();
-
- clearInterval(setInterval(stub, 500));
- this.clock.tick(1000);
-
- assert.isFalse(stub.called);
- });
-
- it("uninstalls global setInterval", function () {
- this.clock = lolex.install();
- var stub = sinon.stub();
- this.clock.uninstall();
-
- this.timer = setInterval(stub, 1000);
- this.clock.tick(1000);
-
- assert.isFalse(stub.called);
- assert.same(setInterval, lolex.timers.setInterval);
- });
-
- it("uninstalls global clearInterval", function () {
- this.clock = lolex.install();
- sinon.stub();
- this.clock.uninstall();
-
- assert.same(clearInterval, lolex.timers.clearInterval);
- });
-
- if (global.__proto__) {
- delete global.hasOwnPropertyTest;
- global.__proto__.hasOwnPropertyTest = function() {};
-
- if (!global.hasOwnProperty("hasOwnPropertyTest")) {
- it("deletes global property on uninstall if it was inherited onto the global object", function () {
- // Give the global object an inherited 'tick' method
- delete global.tick;
- global.__proto__.tick = function() { };
-
- this.clock = lolex.install(0, ['tick']);
- assert.isTrue(global.hasOwnProperty("tick"));
- this.clock.uninstall();
-
- assert.isFalse(global.hasOwnProperty("tick"));
- delete global.__proto__.tick;
- });
- }
-
- delete global.__proto__.hasOwnPropertyTest;
- }
-
- it("uninstalls global property on uninstall if it is present on the global object itself", function () {
- // Directly give the global object a tick method
- global.tick = NOOP;
-
- this.clock = lolex.install(0, ['tick']);
- assert.isTrue(global.hasOwnProperty("tick"));
- this.clock.uninstall();
-
- assert.isTrue(global.hasOwnProperty("tick"));
- delete global.tick;
- });
-
- it("fakes Date constructor", function () {
- this.clock = lolex.install(0);
- var now = new Date();
-
- refute.same(Date, lolex.timers.Date);
- assert.equals(now.getTime(), 0);
- });
-
- it("fake Date constructor should mirror Date's properties", function () {
- this.clock = lolex.install(0);
-
- assert(!!Date.parse);
- assert(!!Date.UTC);
- });
-
- it("decide on Date.now support at call-time when supported", function () {
- global.Date.now = NOOP;
- this.clock = lolex.install(0);
-
- assert.equals(typeof Date.now, "function");
- });
-
- it("decide on Date.now support at call-time when unsupported", function () {
- global.Date.now = undefined;
- this.clock = lolex.install(0);
-
- refute.defined(Date.now);
- });
-
- // TODO: The following tests causes test suite instability
-
- it("mirrors custom Date properties", function () {
- var f = function () { };
- global.Date.format = f;
- this.clock = lolex.install();
-
- assert.equals(Date.format, f);
- });
-
- it("uninstalls Date constructor", function () {
- this.clock = lolex.install(0);
- this.clock.uninstall();
-
- assert.same(GlobalDate, lolex.timers.Date);
- });
-
- it("fakes provided methods", function () {
- this.clock = lolex.install(0, ["setTimeout", "Date", "setImmediate"]);
-
- refute.same(setTimeout, lolex.timers.setTimeout);
- refute.same(Date, lolex.timers.Date);
- });
-
- it("resets faked methods", function () {
- this.clock = lolex.install(0, ["setTimeout", "Date", "setImmediate"]);
- this.clock.uninstall();
-
- assert.same(setTimeout, lolex.timers.setTimeout);
- assert.same(Date, lolex.timers.Date);
- });
-
- it("does not fake methods not provided", function () {
- this.clock = lolex.install(0, ["setTimeout", "Date", "setImmediate"]);
-
- assert.same(clearTimeout, lolex.timers.clearTimeout);
- assert.same(setInterval, lolex.timers.setInterval);
- assert.same(clearInterval, lolex.timers.clearInterval);
- });
-
- it("does not be able to use date object for now", function () {
- assert.exception(function () {
- lolex.install(new Date(2011, 9, 1));
- });
- });
- });
-});
diff --git a/js/node/node_modules/sinon/node_modules/samsam/.npmignore b/js/node/node_modules/sinon/node_modules/samsam/.npmignore
deleted file mode 100644
index 07e6e472cc75..000000000000
--- a/js/node/node_modules/sinon/node_modules/samsam/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-/node_modules
diff --git a/js/node/node_modules/sinon/node_modules/samsam/.travis.yml b/js/node/node_modules/sinon/node_modules/samsam/.travis.yml
deleted file mode 100644
index 587bd3e031f8..000000000000
--- a/js/node/node_modules/sinon/node_modules/samsam/.travis.yml
+++ /dev/null
@@ -1 +0,0 @@
-language: node_js
diff --git a/js/node/node_modules/sinon/node_modules/samsam/test/samsam-test.js b/js/node/node_modules/sinon/node_modules/samsam/test/samsam-test.js
deleted file mode 100644
index a55f9a28f3ea..000000000000
--- a/js/node/node_modules/sinon/node_modules/samsam/test/samsam-test.js
+++ /dev/null
@@ -1,386 +0,0 @@
-if (typeof module === "object" && typeof require === "function") {
- var buster = require("buster");
- var samsam = require("../lib/samsam");
-}
-
-(function () {
-
- var assert = buster.assert;
-
- function tests(method, body) {
- var tc = {};
-
- function pass(name) {
- var args = Array.prototype.slice.call(arguments, 1);
- tc["should return true for " + name] = function () {
- assert(samsam[method].apply(samsam, args));
- };
- }
-
- function fail(name) {
- var args = Array.prototype.slice.call(arguments, 1);
- tc["should return false for " + name] = function () {
- assert(!samsam[method].apply(samsam, args));
- };
- }
-
- function shouldThrow(name) {
- var args = Array.prototype.slice.call(arguments, 1);
- try {
- samsam[method].apply(samsam, args);
- buster.assertion.fail("Expected to throw");
- } catch (e) {
- assert(true);
- }
- }
-
- function add(name, func) {
- tc[name] = func;
- }
-
- body(pass, fail, shouldThrow, add);
- buster.testCase(method, tc);
- }
-
- tests("isElement", function (pass, fail) {
- if (typeof document !== "undefined") {
- pass("DOM element node", document.createElement("div"));
- fail("DOM text node", document.createTextNode("Hello"));
- }
-
- fail("primitive", 42);
- fail("object", {});
- fail("node-like object", { nodeType: 1 });
- });
-
- tests("isNegZero", function (pass, fail) {
- pass("-0", -0);
- fail("0", 0);
- fail("object", {});
- });
-
- tests("identical", function (pass, fail) {
- var object = { id: 42 };
- pass("same object", object, object);
- pass("same primitive", 42, 42);
- fail("-0 and 0", -0, 0);
- pass("NaN and NaN", NaN, NaN);
- });
-
- tests("deepEqual", function (pass, fail) {
- var func = function () {};
- var obj = {};
- var arr = [];
- var date = new Date();
- var sameDate = new Date(date.getTime());
- var anotherDate = new Date(date.getTime() - 10);
- var sameDateWithProp = new Date(date.getTime());
- sameDateWithProp.prop = 42;
-
- pass("object to itself", obj, obj);
- pass("strings", "Hey", "Hey");
- pass("numbers", 32, 32);
- pass("booleans", false, false);
- pass("null", null, null);
- pass("undefined", undefined, undefined);
- pass("function to itself", func, func);
- fail("functions", function () {}, function () {});
- pass("array to itself", arr, arr);
- pass("date objects with same date", date, sameDate);
- fail("date objects with different dates", date, anotherDate);
- fail("date objects to null", date, null);
- fail("date with different custom properties", date, sameDateWithProp);
- fail("strings and numbers with coercion", "4", 4);
- fail("numbers and strings with coercion", 4, "4");
- fail("number object with coercion", 32, new Number(32));
- fail("number object reverse with coercion", new Number(32), 32);
- fail("falsy values with coercion", 0, "");
- fail("falsy values reverse with coercion", "", 0);
- fail("string boxing with coercion", "4", new String("4"));
- fail("string boxing reverse with coercion", new String("4"), "4");
- pass("NaN to NaN", NaN, NaN);
- fail("-0 to +0", -0, +0);
- fail("-0 to 0", -0, 0);
- fail("objects with different own properties",
- { id: 42 }, { id: 42, di: 24 });
- fail("objects with different own properties #2",
- { id: undefined }, { di: 24 });
- fail("objects with different own properties #3",
- { id: 24 }, { di: undefined });
- pass("objects with one property", { id: 42 }, { id: 42 });
- pass("objects with one object property",
- { obj: { id: 42 } }, { obj: { id: 42 } });
- fail("objects with one property with different values",
- { id: 42 }, { id: 24 });
-
- var deepObject = {
- id: 42,
- name: "Hey",
- sayIt: function () {
- return this.name;
- },
-
- child: {
- speaking: function () {}
- }
- };
-
- pass("complex objects", deepObject, {
- sayIt: deepObject.sayIt,
- child: { speaking: deepObject.child.speaking },
- id: 42,
- name: "Hey"
- });
-
- pass("arrays",
- [1, 2, "Hey there", func, { id: 42, prop: [2, 3] }],
- [1, 2, "Hey there", func, { id: 42, prop: [2, 3] }]);
-
- fail("nested array with shallow array", [["hey"]], ["hey"]);
-
- var arr1 = [1, 2, 3];
- var arr2 = [1, 2, 3];
- arr1.prop = 42;
- fail("arrays with different custom properties", arr1, arr2);
-
- pass("regexp literals", /a/, /a/);
- pass("regexp objects", new RegExp("[a-z]+"), new RegExp("[a-z]+"));
-
- var re1 = new RegExp("[a-z]+");
- var re2 = new RegExp("[a-z]+");
- re2.id = 42;
-
- fail("regexp objects with custom properties", re1, re2);
- fail("different objects", { id: 42 }, {});
- fail("object to null", {}, null);
- fail("object to undefined", {}, undefined);
- fail("object to false", {}, false);
- fail("false to object", false, {});
- fail("object to true", {}, true);
- fail("true to object", true, {});
- fail("'empty' object to date", {}, new Date());
- fail("'empty' object to string object", {}, String());
- fail("'empty' object to number object", {}, Number());
- fail("'empty' object to empty array", {}, []);
-
- function gather() { return arguments; }
- var arrayLike = { length: 4, "0": 1, "1": 2, "2": {}, "3": [] };
-
- pass("arguments to array", [1, 2, {}, []], gather(1, 2, {}, []));
- pass("array to arguments", gather(), []);
-
- pass("arguments to array like object",
- arrayLike, gather(1, 2, {}, []));
- });
-
- /**
- * Tests for cyclic objects.
- */
- tests("deepEqual", function (pass, fail) {
-
- (function () {
- var cyclic1 = {}, cyclic2 = {};
- cyclic1.ref = cyclic1;
- cyclic2.ref = cyclic2;
- pass("equal cyclic objects (cycle on 2nd level)", cyclic1, cyclic2);
- }());
-
- (function () {
- var cyclic1 = {}, cyclic2 = {};
- cyclic1.ref = cyclic1;
- cyclic2.ref = cyclic2;
- cyclic2.ref2 = cyclic2;
- fail("different cyclic objects (cycle on 2nd level)",
- cyclic1, cyclic2);
- }());
-
- (function () {
- var cyclic1 = {}, cyclic2 = {};
- cyclic1.ref = {};
- cyclic1.ref.ref = cyclic1;
- cyclic2.ref = {};
- cyclic2.ref.ref = cyclic2;
- pass("equal cyclic objects (cycle on 3rd level)", cyclic1, cyclic2);
- }());
-
- (function () {
- var cyclic1 = {}, cyclic2 = {};
- cyclic1.ref = {};
- cyclic1.ref.ref = cyclic1;
- cyclic2.ref = {};
- cyclic2.ref.ref = cyclic2;
- cyclic2.ref.ref2 = cyclic2;
- fail("different cyclic objects (cycle on 3rd level)",
- cyclic1, cyclic2);
- }());
-
- (function () {
- var cyclic1 = {}, cyclic2 = {};
- cyclic1.ref = cyclic1;
- cyclic2.ref = cyclic1;
- pass("equal objects even though only one object is cyclic",
- cyclic1, cyclic2);
- }());
-
- (function () {
- var cyclic1 = {}, cyclic2 = {};
- cyclic1.ref = {
- ref: cyclic1
- };
- cyclic2.ref = {};
- cyclic2.ref.ref = cyclic2.ref;
- pass("referencing different but equal cyclic objects",
- cyclic1, cyclic2);
- }());
-
- (function () {
- var cyclic1 = {a: "a"}, cyclic2 = {a: "a"};
- cyclic1.ref = {
- b: "b",
- ref: cyclic1
- };
- cyclic2.ref = {
- b: "b"
- };
- cyclic2.ref.ref = cyclic2.ref;
- fail("referencing different and unequal cyclic objects",
- cyclic1, cyclic2);
- }());
- });
-
- tests("match", function (pass, fail, shouldThrow, add) {
- pass("matching regexp", "Assertions", /[a-z]/);
- pass("generic object and test method returning true", "Assertions", {
- test: function () { return true; }
- });
- fail("non-matching regexp", "Assertions 123", /^[a-z]$/);
- pass("matching boolean", true, true);
- fail("mismatching boolean", true, false);
- fail("generic object with test method returning false", "Assertions", {
- test: function () { return false; }
- });
- shouldThrow("match object === null", "Assertions 123", null);
- fail("match object === false", "Assertions 123", false);
- fail("matching number against string", "Assertions 123", 23);
- fail("matching number against similar string", "23", 23);
- pass("matching number against itself", 23, 23);
- pass("matcher function returns true",
- "Assertions 123", function (obj) { return true; });
- fail("matcher function returns false",
- "Assertions 123", function (obj) { return false; });
- fail("matcher function returns falsy",
- "Assertions 123", function () {});
- fail("matcher does not return explicit true",
- "Assertions 123", function () { return "Hey"; });
-
- add("should call matcher with object", function () {
- var spy = this.spy();
- samsam.match("Assertions 123", spy);
- assert.calledWith(spy, "Assertions 123");
- });
-
- pass("matcher is substring of matchee", "Diskord", "or");
- pass("matcher is string equal to matchee", "Diskord", "Diskord");
- pass("strings ignoring case", "Look ma, case-insensitive",
- "LoOk Ma, CaSe-InSenSiTiVe");
- fail("match string is not substring of matchee", "Vim", "Emacs");
- fail("match string is not substring of object", {}, "Emacs");
- fail("matcher is not substring of object.toString", {
- toString: function () { return "Vim"; }
- }, "Emacs");
- fail("null and empty string", null, "");
- fail("undefined and empty string", undefined, "");
- fail("false and empty string", false, "");
- fail("0 and empty string", 0, "");
- fail("NaN and empty string", NaN, "");
-
- var object = {
- id: 42,
- name: "Christian",
- doIt: "yes",
-
- speak: function () {
- return this.name;
- }
- };
-
- pass("object containing all properties in matcher", object, {
- id: 42,
- doIt: "yes"
- });
-
- var object2 = {
- id: 42,
- name: "Christian",
- doIt: "yes",
- owner: {
- someDude: "Yes",
- hello: "ok"
- },
-
- speak: function () {
- return this.name;
- }
- };
-
- pass("nested matcher", object2, {
- owner: {
- someDude: "Yes",
- hello: function (value) {
- return value == "ok";
- }
- }
- });
-
- pass("empty strings", "", "");
- pass("empty strings as object properties", { foo: "" }, { foo: "" });
- pass("similar arrays", [1, 2, 3], [1, 2, 3]);
- pass("array subset", [1, 2, 3], [2, 3]);
- pass("single-element array subset", [1, 2, 3], [1]);
- pass("matching array subset", [1, 2, 3, { id: 42 }], [{ id: 42 }]);
- fail("mis-matching array 'subset'", [1, 2, 3], [2, 3, 4]);
- fail("mis-ordered array 'subset'", [1, 2, 3], [1, 3]);
- pass("empty arrays", [], []);
- pass("objects with empty arrays", { xs: [] }, { xs: [] });
- fail("nested objects with different depth", { a: 1 }, { b: { c: 2 } });
- pass("dom elements with matching data attributes", {
- getAttribute: function (name) {
- if (name === "data-path") {
- return "foo.bar";
- }
- }
- }, { "data-path": "foo.bar" });
- fail("dom elements with not matching data attributes", {
- getAttribute: function (name) {
- if (name === "data-path") {
- return "foo.foo";
- }
- }
- }, { "data-path": "foo.bar" });
-
- pass("equal null properties", { foo: null }, { foo: null });
- fail("unmatched null property", {}, { foo: null });
- fail("matcher with unmatched null property", { foo: 'arbitrary' }, { foo: null });
- pass("equal undefined properties", { foo: undefined }, { foo: undefined });
- fail("matcher with unmatched undefined property", { foo: 'arbitrary' }, { foo: undefined });
- pass('unmatched undefined property', {}, { foo: undefined });
-
- var obj = { foo: undefined };
- pass("same object matches self", obj, obj);
-
- pass("null matches null", null, null);
- fail("null does not match undefined", null, undefined);
-
- pass("undefined matches undefined", undefined, undefined);
- fail("undefined does not match null", undefined, null);
-
- });
-
- tests("isArguments", function (pass, fail) {
- pass("arguments object", arguments);
- fail("primitive", 42);
- fail("object", {});
- pass("arguments object from strict-mode function",
- (function () { "use strict"; return arguments; }()));
- });
-}());
diff --git a/js/node/node_modules/sinon/node_modules/util/.npmignore b/js/node/node_modules/sinon/node_modules/util/.npmignore
deleted file mode 100644
index 3c3629e647f5..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/js/node/node_modules/sinon/node_modules/util/.travis.yml b/js/node/node_modules/sinon/node_modules/util/.travis.yml
deleted file mode 100644
index ded625ce9382..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: node_js
-node_js:
-- '0.8'
-- '0.10'
-env:
- global:
- - secure: AdUubswCR68/eGD+WWjwTHgFbelwQGnNo81j1IOaUxKw+zgFPzSnFEEtDw7z98pWgg7p9DpCnyzzSnSllP40wq6AG19OwyUJjSLoZK57fp+r8zwTQwWiSqUgMu2YSMmKJPIO/aoSGpRQXT+L1nRrHoUJXgFodyIZgz40qzJeZjc=
- - secure: heQuxPVsQ7jBbssoVKimXDpqGjQFiucm6W5spoujmspjDG7oEcHD9ANo9++LoRPrsAmNx56SpMK5fNfVmYediw6SvhXm4Mxt56/fYCrLDBtgGG+1neCeffAi8z1rO8x48m77hcQ6YhbUL5R9uBimUjMX92fZcygAt8Rg804zjFo=
diff --git a/js/node/node_modules/sinon/node_modules/util/.zuul.yml b/js/node/node_modules/sinon/node_modules/util/.zuul.yml
deleted file mode 100644
index 210501052acb..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/.zuul.yml
+++ /dev/null
@@ -1,10 +0,0 @@
-ui: mocha-qunit
-browsers:
- - name: chrome
- version: 27..latest
- - name: firefox
- version: latest
- - name: safari
- version: latest
- - name: ie
- version: 9..latest
diff --git a/js/node/node_modules/sinon/node_modules/util/test/browser/inspect.js b/js/node/node_modules/sinon/node_modules/util/test/browser/inspect.js
deleted file mode 100644
index 91af3b02de9b..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/test/browser/inspect.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-var assert = require('assert');
-var util = require('../../');
-
-suite('inspect');
-
-test('util.inspect - test for sparse array', function () {
- var a = ['foo', 'bar', 'baz'];
- assert.equal(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]');
- delete a[1];
- assert.equal(util.inspect(a), '[ \'foo\', , \'baz\' ]');
- assert.equal(util.inspect(a, true), '[ \'foo\', , \'baz\', [length]: 3 ]');
- assert.equal(util.inspect(new Array(5)), '[ , , , , ]');
-});
-
-test('util.inspect - exceptions should print the error message, not \'{}\'', function () {
- assert.equal(util.inspect(new Error()), '[Error]');
- assert.equal(util.inspect(new Error('FAIL')), '[Error: FAIL]');
- assert.equal(util.inspect(new TypeError('FAIL')), '[TypeError: FAIL]');
- assert.equal(util.inspect(new SyntaxError('FAIL')), '[SyntaxError: FAIL]');
-});
diff --git a/js/node/node_modules/sinon/node_modules/util/test/browser/is.js b/js/node/node_modules/sinon/node_modules/util/test/browser/is.js
deleted file mode 100644
index f63bff9a941f..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/test/browser/is.js
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-var assert = require('assert');
-
-var util = require('../../');
-
-suite('is');
-
-test('util.isArray', function () {
- assert.equal(true, util.isArray([]));
- assert.equal(true, util.isArray(Array()));
- assert.equal(true, util.isArray(new Array()));
- assert.equal(true, util.isArray(new Array(5)));
- assert.equal(true, util.isArray(new Array('with', 'some', 'entries')));
- assert.equal(false, util.isArray({}));
- assert.equal(false, util.isArray({ push: function() {} }));
- assert.equal(false, util.isArray(/regexp/));
- assert.equal(false, util.isArray(new Error()));
- assert.equal(false, util.isArray(Object.create(Array.prototype)));
-});
-
-test('util.isRegExp', function () {
- assert.equal(true, util.isRegExp(/regexp/));
- assert.equal(true, util.isRegExp(RegExp()));
- assert.equal(true, util.isRegExp(new RegExp()));
- assert.equal(false, util.isRegExp({}));
- assert.equal(false, util.isRegExp([]));
- assert.equal(false, util.isRegExp(new Date()));
- assert.equal(false, util.isRegExp(Object.create(RegExp.prototype)));
-});
-
-test('util.isDate', function () {
- assert.equal(true, util.isDate(new Date()));
- assert.equal(true, util.isDate(new Date(0)));
- assert.equal(false, util.isDate(Date()));
- assert.equal(false, util.isDate({}));
- assert.equal(false, util.isDate([]));
- assert.equal(false, util.isDate(new Error()));
- assert.equal(false, util.isDate(Object.create(Date.prototype)));
-});
-
-test('util.isError', function () {
- assert.equal(true, util.isError(new Error()));
- assert.equal(true, util.isError(new TypeError()));
- assert.equal(true, util.isError(new SyntaxError()));
- assert.equal(false, util.isError({}));
- assert.equal(false, util.isError({ name: 'Error', message: '' }));
- assert.equal(false, util.isError([]));
- assert.equal(true, util.isError(Object.create(Error.prototype)));
-});
-
-test('util._extend', function () {
- assert.deepEqual(util._extend({a:1}), {a:1});
- assert.deepEqual(util._extend({a:1}, []), {a:1});
- assert.deepEqual(util._extend({a:1}, null), {a:1});
- assert.deepEqual(util._extend({a:1}, true), {a:1});
- assert.deepEqual(util._extend({a:1}, false), {a:1});
- assert.deepEqual(util._extend({a:1}, {b:2}), {a:1, b:2});
- assert.deepEqual(util._extend({a:1, b:2}, {b:3}), {a:1, b:3});
-});
-
-test('util.isBuffer', function () {
- assert.equal(true, util.isBuffer(new Buffer(4)));
- assert.equal(true, util.isBuffer(Buffer(4)));
- assert.equal(true, util.isBuffer(new Buffer(4)));
- assert.equal(true, util.isBuffer(new Buffer([1, 2, 3, 4])));
- assert.equal(false, util.isBuffer({}));
- assert.equal(false, util.isBuffer([]));
- assert.equal(false, util.isBuffer(new Error()));
- assert.equal(false, util.isRegExp(new Date()));
- assert.equal(true, util.isBuffer(Object.create(Buffer.prototype)));
-});
diff --git a/js/node/node_modules/sinon/node_modules/util/test/node/debug.js b/js/node/node_modules/sinon/node_modules/util/test/node/debug.js
deleted file mode 100644
index ef5f69fb1d73..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/test/node/debug.js
+++ /dev/null
@@ -1,86 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-var assert = require('assert');
-var util = require('../../');
-
-if (process.argv[2] === 'child')
- child();
-else
- parent();
-
-function parent() {
- test('foo,tud,bar', true);
- test('foo,tud', true);
- test('tud,bar', true);
- test('tud', true);
- test('foo,bar', false);
- test('', false);
-}
-
-function test(environ, shouldWrite) {
- var expectErr = '';
- if (shouldWrite) {
- expectErr = 'TUD %PID%: this { is: \'a\' } /debugging/\n' +
- 'TUD %PID%: number=1234 string=asdf obj={"foo":"bar"}\n';
- }
- var expectOut = 'ok\n';
- var didTest = false;
-
- var spawn = require('child_process').spawn;
- var child = spawn(process.execPath, [__filename, 'child'], {
- env: { NODE_DEBUG: environ }
- });
-
- expectErr = expectErr.split('%PID%').join(child.pid);
-
- var err = '';
- child.stderr.setEncoding('utf8');
- child.stderr.on('data', function(c) {
- err += c;
- });
-
- var out = '';
- child.stdout.setEncoding('utf8');
- child.stdout.on('data', function(c) {
- out += c;
- });
-
- child.on('close', function(c) {
- assert(!c);
- assert.equal(err, expectErr);
- assert.equal(out, expectOut);
- didTest = true;
- console.log('ok %j %j', environ, shouldWrite);
- });
-
- process.on('exit', function() {
- assert(didTest);
- });
-}
-
-
-function child() {
- var debug = util.debuglog('tud');
- debug('this', { is: 'a' }, /debugging/);
- debug('number=%d string=%s obj=%j', 1234, 'asdf', { foo: 'bar' });
- console.log('ok');
-}
diff --git a/js/node/node_modules/sinon/node_modules/util/test/node/format.js b/js/node/node_modules/sinon/node_modules/util/test/node/format.js
deleted file mode 100644
index f2d18621e193..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/test/node/format.js
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-
-var assert = require('assert');
-var util = require('../../');
-
-assert.equal(util.format(), '');
-assert.equal(util.format(''), '');
-assert.equal(util.format([]), '[]');
-assert.equal(util.format({}), '{}');
-assert.equal(util.format(null), 'null');
-assert.equal(util.format(true), 'true');
-assert.equal(util.format(false), 'false');
-assert.equal(util.format('test'), 'test');
-
-// CHECKME this is for console.log() compatibility - but is it *right*?
-assert.equal(util.format('foo', 'bar', 'baz'), 'foo bar baz');
-
-assert.equal(util.format('%d', 42.0), '42');
-assert.equal(util.format('%d', 42), '42');
-assert.equal(util.format('%s', 42), '42');
-assert.equal(util.format('%j', 42), '42');
-
-assert.equal(util.format('%d', '42.0'), '42');
-assert.equal(util.format('%d', '42'), '42');
-assert.equal(util.format('%s', '42'), '42');
-assert.equal(util.format('%j', '42'), '"42"');
-
-assert.equal(util.format('%%s%s', 'foo'), '%sfoo');
-
-assert.equal(util.format('%s'), '%s');
-assert.equal(util.format('%s', undefined), 'undefined');
-assert.equal(util.format('%s', 'foo'), 'foo');
-assert.equal(util.format('%s:%s'), '%s:%s');
-assert.equal(util.format('%s:%s', undefined), 'undefined:%s');
-assert.equal(util.format('%s:%s', 'foo'), 'foo:%s');
-assert.equal(util.format('%s:%s', 'foo', 'bar'), 'foo:bar');
-assert.equal(util.format('%s:%s', 'foo', 'bar', 'baz'), 'foo:bar baz');
-assert.equal(util.format('%%%s%%', 'hi'), '%hi%');
-assert.equal(util.format('%%%s%%%%', 'hi'), '%hi%%');
-
-(function() {
- var o = {};
- o.o = o;
- assert.equal(util.format('%j', o), '[Circular]');
-})();
-
-// Errors
-assert.equal(util.format(new Error('foo')), '[Error: foo]');
-function CustomError(msg) {
- Error.call(this);
- Object.defineProperty(this, 'message', { value: msg, enumerable: false });
- Object.defineProperty(this, 'name', { value: 'CustomError', enumerable: false });
-}
-util.inherits(CustomError, Error);
-assert.equal(util.format(new CustomError('bar')), '[CustomError: bar]');
diff --git a/js/node/node_modules/sinon/node_modules/util/test/node/inspect.js b/js/node/node_modules/sinon/node_modules/util/test/node/inspect.js
deleted file mode 100644
index f766d1170769..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/test/node/inspect.js
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-
-
-var assert = require('assert');
-var util = require('../../');
-
-// test the internal isDate implementation
-var Date2 = require('vm').runInNewContext('Date');
-var d = new Date2();
-var orig = util.inspect(d);
-Date2.prototype.foo = 'bar';
-var after = util.inspect(d);
-assert.equal(orig, after);
-
-// test for sparse array
-var a = ['foo', 'bar', 'baz'];
-assert.equal(util.inspect(a), '[ \'foo\', \'bar\', \'baz\' ]');
-delete a[1];
-assert.equal(util.inspect(a), '[ \'foo\', , \'baz\' ]');
-assert.equal(util.inspect(a, true), '[ \'foo\', , \'baz\', [length]: 3 ]');
-assert.equal(util.inspect(new Array(5)), '[ , , , , ]');
-
-// test for property descriptors
-var getter = Object.create(null, {
- a: {
- get: function() { return 'aaa'; }
- }
-});
-var setter = Object.create(null, {
- b: {
- set: function() {}
- }
-});
-var getterAndSetter = Object.create(null, {
- c: {
- get: function() { return 'ccc'; },
- set: function() {}
- }
-});
-assert.equal(util.inspect(getter, true), '{ [a]: [Getter] }');
-assert.equal(util.inspect(setter, true), '{ [b]: [Setter] }');
-assert.equal(util.inspect(getterAndSetter, true), '{ [c]: [Getter/Setter] }');
-
-// exceptions should print the error message, not '{}'
-assert.equal(util.inspect(new Error()), '[Error]');
-assert.equal(util.inspect(new Error('FAIL')), '[Error: FAIL]');
-assert.equal(util.inspect(new TypeError('FAIL')), '[TypeError: FAIL]');
-assert.equal(util.inspect(new SyntaxError('FAIL')), '[SyntaxError: FAIL]');
-try {
- undef();
-} catch (e) {
- assert.equal(util.inspect(e), '[ReferenceError: undef is not defined]');
-}
-var ex = util.inspect(new Error('FAIL'), true);
-assert.ok(ex.indexOf('[Error: FAIL]') != -1);
-assert.ok(ex.indexOf('[stack]') != -1);
-assert.ok(ex.indexOf('[message]') != -1);
-
-// GH-1941
-// should not throw:
-assert.equal(util.inspect(Object.create(Date.prototype)), '{}');
-
-// GH-1944
-assert.doesNotThrow(function() {
- var d = new Date();
- d.toUTCString = null;
- util.inspect(d);
-});
-
-assert.doesNotThrow(function() {
- var r = /regexp/;
- r.toString = null;
- util.inspect(r);
-});
-
-// bug with user-supplied inspect function returns non-string
-assert.doesNotThrow(function() {
- util.inspect([{
- inspect: function() { return 123; }
- }]);
-});
-
-// GH-2225
-var x = { inspect: util.inspect };
-assert.ok(util.inspect(x).indexOf('inspect') != -1);
-
-// util.inspect.styles and util.inspect.colors
-function test_color_style(style, input, implicit) {
- var color_name = util.inspect.styles[style];
- var color = ['', ''];
- if(util.inspect.colors[color_name])
- color = util.inspect.colors[color_name];
-
- var without_color = util.inspect(input, false, 0, false);
- var with_color = util.inspect(input, false, 0, true);
- var expect = '\u001b[' + color[0] + 'm' + without_color +
- '\u001b[' + color[1] + 'm';
- assert.equal(with_color, expect, 'util.inspect color for style '+style);
-}
-
-test_color_style('special', function(){});
-test_color_style('number', 123.456);
-test_color_style('boolean', true);
-test_color_style('undefined', undefined);
-test_color_style('null', null);
-test_color_style('string', 'test string');
-test_color_style('date', new Date);
-test_color_style('regexp', /regexp/);
-
-// an object with "hasOwnProperty" overwritten should not throw
-assert.doesNotThrow(function() {
- util.inspect({
- hasOwnProperty: null
- });
-});
-
-// new API, accepts an "options" object
-var subject = { foo: 'bar', hello: 31, a: { b: { c: { d: 0 } } } };
-Object.defineProperty(subject, 'hidden', { enumerable: false, value: null });
-
-assert(util.inspect(subject, { showHidden: false }).indexOf('hidden') === -1);
-assert(util.inspect(subject, { showHidden: true }).indexOf('hidden') !== -1);
-assert(util.inspect(subject, { colors: false }).indexOf('\u001b[32m') === -1);
-assert(util.inspect(subject, { colors: true }).indexOf('\u001b[32m') !== -1);
-assert(util.inspect(subject, { depth: 2 }).indexOf('c: [Object]') !== -1);
-assert(util.inspect(subject, { depth: 0 }).indexOf('a: [Object]') !== -1);
-assert(util.inspect(subject, { depth: null }).indexOf('{ d: 0 }') !== -1);
-
-// "customInspect" option can enable/disable calling inspect() on objects
-subject = { inspect: function() { return 123; } };
-
-assert(util.inspect(subject, { customInspect: true }).indexOf('123') !== -1);
-assert(util.inspect(subject, { customInspect: true }).indexOf('inspect') === -1);
-assert(util.inspect(subject, { customInspect: false }).indexOf('123') === -1);
-assert(util.inspect(subject, { customInspect: false }).indexOf('inspect') !== -1);
-
-// custom inspect() functions should be able to return other Objects
-subject.inspect = function() { return { foo: 'bar' }; };
-
-assert.equal(util.inspect(subject), '{ foo: \'bar\' }');
-
-subject.inspect = function(depth, opts) {
- assert.strictEqual(opts.customInspectOptions, true);
-};
-
-util.inspect(subject, { customInspectOptions: true });
-
-// util.inspect with "colors" option should produce as many lines as without it
-function test_lines(input) {
- var count_lines = function(str) {
- return (str.match(/\n/g) || []).length;
- }
-
- var without_color = util.inspect(input);
- var with_color = util.inspect(input, {colors: true});
- assert.equal(count_lines(without_color), count_lines(with_color));
-}
-
-test_lines([1, 2, 3, 4, 5, 6, 7]);
-test_lines(function() {
- var big_array = [];
- for (var i = 0; i < 100; i++) {
- big_array.push(i);
- }
- return big_array;
-}());
-test_lines({foo: 'bar', baz: 35, b: {a: 35}});
-test_lines({
- foo: 'bar',
- baz: 35,
- b: {a: 35},
- very_long_key: 'very_long_value',
- even_longer_key: ['with even longer value in array']
-});
diff --git a/js/node/node_modules/sinon/node_modules/util/test/node/log.js b/js/node/node_modules/sinon/node_modules/util/test/node/log.js
deleted file mode 100644
index 6bd96d1f1c6a..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/test/node/log.js
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-var assert = require('assert');
-var util = require('../../');
-
-assert.ok(process.stdout.writable);
-assert.ok(process.stderr.writable);
-
-var stdout_write = global.process.stdout.write;
-var strings = [];
-global.process.stdout.write = function(string) {
- strings.push(string);
-};
-console._stderr = process.stdout;
-
-var tests = [
- {input: 'foo', output: 'foo'},
- {input: undefined, output: 'undefined'},
- {input: null, output: 'null'},
- {input: false, output: 'false'},
- {input: 42, output: '42'},
- {input: function(){}, output: '[Function]'},
- {input: parseInt('not a number', 10), output: 'NaN'},
- {input: {answer: 42}, output: '{ answer: 42 }'},
- {input: [1,2,3], output: '[ 1, 2, 3 ]'}
-];
-
-// test util.log()
-tests.forEach(function(test) {
- util.log(test.input);
- var result = strings.shift().trim(),
- re = (/[0-9]{1,2} [A-Z][a-z]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} - (.+)$/),
- match = re.exec(result);
- assert.ok(match);
- assert.equal(match[1], test.output);
-});
-
-global.process.stdout.write = stdout_write;
diff --git a/js/node/node_modules/sinon/node_modules/util/test/node/util.js b/js/node/node_modules/sinon/node_modules/util/test/node/util.js
deleted file mode 100644
index 633ba69060ff..000000000000
--- a/js/node/node_modules/sinon/node_modules/util/test/node/util.js
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-var assert = require('assert');
-var context = require('vm').runInNewContext;
-
-var util = require('../../');
-
-// isArray
-assert.equal(true, util.isArray([]));
-assert.equal(true, util.isArray(Array()));
-assert.equal(true, util.isArray(new Array()));
-assert.equal(true, util.isArray(new Array(5)));
-assert.equal(true, util.isArray(new Array('with', 'some', 'entries')));
-assert.equal(true, util.isArray(context('Array')()));
-assert.equal(false, util.isArray({}));
-assert.equal(false, util.isArray({ push: function() {} }));
-assert.equal(false, util.isArray(/regexp/));
-assert.equal(false, util.isArray(new Error));
-assert.equal(false, util.isArray(Object.create(Array.prototype)));
-
-// isRegExp
-assert.equal(true, util.isRegExp(/regexp/));
-assert.equal(true, util.isRegExp(RegExp()));
-assert.equal(true, util.isRegExp(new RegExp()));
-assert.equal(true, util.isRegExp(context('RegExp')()));
-assert.equal(false, util.isRegExp({}));
-assert.equal(false, util.isRegExp([]));
-assert.equal(false, util.isRegExp(new Date()));
-assert.equal(false, util.isRegExp(Object.create(RegExp.prototype)));
-
-// isDate
-assert.equal(true, util.isDate(new Date()));
-assert.equal(true, util.isDate(new Date(0)));
-assert.equal(true, util.isDate(new (context('Date'))));
-assert.equal(false, util.isDate(Date()));
-assert.equal(false, util.isDate({}));
-assert.equal(false, util.isDate([]));
-assert.equal(false, util.isDate(new Error));
-assert.equal(false, util.isDate(Object.create(Date.prototype)));
-
-// isError
-assert.equal(true, util.isError(new Error));
-assert.equal(true, util.isError(new TypeError));
-assert.equal(true, util.isError(new SyntaxError));
-assert.equal(true, util.isError(new (context('Error'))));
-assert.equal(true, util.isError(new (context('TypeError'))));
-assert.equal(true, util.isError(new (context('SyntaxError'))));
-assert.equal(false, util.isError({}));
-assert.equal(false, util.isError({ name: 'Error', message: '' }));
-assert.equal(false, util.isError([]));
-assert.equal(true, util.isError(Object.create(Error.prototype)));
-
-// isObject
-assert.ok(util.isObject({}) === true);
-
-// _extend
-assert.deepEqual(util._extend({a:1}), {a:1});
-assert.deepEqual(util._extend({a:1}, []), {a:1});
-assert.deepEqual(util._extend({a:1}, null), {a:1});
-assert.deepEqual(util._extend({a:1}, true), {a:1});
-assert.deepEqual(util._extend({a:1}, false), {a:1});
-assert.deepEqual(util._extend({a:1}, {b:2}), {a:1, b:2});
-assert.deepEqual(util._extend({a:1, b:2}, {b:3}), {a:1, b:3});
diff --git a/js/node/node_modules/underscore/modules/.eslintrc b/js/node/node_modules/underscore/modules/.eslintrc
deleted file mode 100644
index b0802cb0df81..000000000000
--- a/js/node/node_modules/underscore/modules/.eslintrc
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "parserOptions": {
- "ecmaVersion": 6,
- "sourceType": "module",
- },
- "plugins": [
- "import"
- ],
- "extends": [
- "plugin:import/errors"
- ]
-}
diff --git a/js/node/node_modules/xmldom/lib/.eslintrc.yml b/js/node/node_modules/xmldom/lib/.eslintrc.yml
deleted file mode 100644
index 3eb98abcf18d..000000000000
--- a/js/node/node_modules/xmldom/lib/.eslintrc.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-extends:
- - 'plugin:es5/no-es2015'
diff --git a/js/node/package-lock.json b/js/node/package-lock.json
index 589f440ad3cf..fae84f7271f6 100644
--- a/js/node/package-lock.json
+++ b/js/node/package-lock.json
@@ -11,7 +11,7 @@
"aqb": "2.1.0",
"babel-code-frame": "6.26.0",
"chai": "3.5.0",
- "chalk": "4.1.1",
+ "chalk": "1.1.3",
"content-disposition": "0.5.3",
"content-type": "1.0.4",
"dedent": "0.7.0",
@@ -100,45 +100,6 @@
"js-tokens": "^3.0.2"
}
},
- "node_modules/babel-code-frame/node_modules/ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/babel-code-frame/node_modules/ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/babel-code-frame/node_modules/chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "dependencies": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/babel-code-frame/node_modules/escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "engines": {
- "node": ">=0.8.0"
- }
- },
"node_modules/babel-code-frame/node_modules/esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
@@ -147,41 +108,11 @@
"node": ">=0.10.0"
}
},
- "node_modules/babel-code-frame/node_modules/has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
- "dependencies": {
- "ansi-regex": "^2.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/babel-code-frame/node_modules/js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
},
- "node_modules/babel-code-frame/node_modules/strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "dependencies": {
- "ansi-regex": "^2.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/babel-code-frame/node_modules/supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
- "engines": {
- "node": ">=0.8.0"
- }
- },
"node_modules/chai": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/chai/-/chai-3.5.0.tgz",
@@ -231,67 +162,72 @@
}
},
"node_modules/chalk": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
- "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
+ "ansi-styles": "^2.2.1",
+ "escape-string-regexp": "^1.0.2",
+ "has-ansi": "^2.0.0",
+ "strip-ansi": "^3.0.0",
+ "supports-color": "^2.0.0"
},
"engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/chalk/node_modules/ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "engines": {
+ "node": ">=0.10.0"
}
},
"node_modules/chalk/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
"engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ "node": ">=0.10.0"
}
},
- "node_modules/chalk/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "node_modules/chalk/node_modules/escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/chalk/node_modules/has-ansi": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dependencies": {
- "color-name": "~1.1.4"
+ "ansi-regex": "^2.0.0"
},
"engines": {
- "node": ">=7.0.0"
+ "node": ">=0.10.0"
}
},
- "node_modules/chalk/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/chalk/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "node_modules/chalk/node_modules/strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "dependencies": {
+ "ansi-regex": "^2.0.0"
+ },
"engines": {
- "node": ">=8"
+ "node": ">=0.10.0"
}
},
"node_modules/chalk/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
"engines": {
- "node": ">=8"
+ "node": ">=0.8.0"
}
},
"node_modules/content-disposition": {
@@ -2862,63 +2798,15 @@
"js-tokens": "^3.0.2"
},
"dependencies": {
- "ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
- },
- "ansi-styles": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
- "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
- },
- "chalk": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
- "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
- "requires": {
- "ansi-styles": "^2.2.1",
- "escape-string-regexp": "^1.0.2",
- "has-ansi": "^2.0.0",
- "strip-ansi": "^3.0.0",
- "supports-color": "^2.0.0"
- }
- },
- "escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
- },
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
},
- "has-ansi": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
- "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
- },
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "requires": {
- "ansi-regex": "^2.0.0"
- }
- },
- "supports-color": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
- "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
},
@@ -2960,47 +2848,52 @@
}
},
"chalk": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
- "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
+ "ansi-styles": "^2.2.1",
+ "escape-string-regexp": "^1.0.2",
+ "has-ansi": "^2.0.0",
+ "strip-ansi": "^3.0.0",
+ "supports-color": "^2.0.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+ "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
+ },
"ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+ "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
+ },
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
+ },
+ "has-ansi": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+ "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"requires": {
- "color-convert": "^2.0.1"
+ "ansi-regex": "^2.0.0"
}
},
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "strip-ansi": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+ "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
- "color-name": "~1.1.4"
+ "ansi-regex": "^2.0.0"
}
},
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
- },
"supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "requires": {
- "has-flag": "^4.0.0"
- }
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+ "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
},
diff --git a/js/node/package.json b/js/node/package.json
index d3a9959e079b..b5e7c20520ea 100644
--- a/js/node/package.json
+++ b/js/node/package.json
@@ -6,7 +6,7 @@
"aqb": "2.1.0",
"babel-code-frame": "6.26.0",
"chai": "3.5.0",
- "chalk": "4.1.1",
+ "chalk": "1.1.3",
"content-disposition": "0.5.3",
"content-type": "1.0.4",
"dedent": "0.7.0",