Merge pull request #6457 from pmusaraj/yarn-manage-test-vendor-dependencies
DEV: Use Yarn managed test vendor dependencies
This commit is contained in:
commit
43512e9865
|
@ -1,6 +1,5 @@
|
||||||
//= require logster
|
//= require logster
|
||||||
//= require ./discourse-objects
|
//= require ./discourse-objects
|
||||||
//= require probes.js
|
|
||||||
|
|
||||||
//= require template_include.js
|
//= require template_include.js
|
||||||
//= require i18n-patches
|
//= require i18n-patches
|
||||||
|
|
|
@ -33,6 +33,8 @@
|
||||||
"pretender": "^1.6",
|
"pretender": "^1.6",
|
||||||
"prettier": "^1.13",
|
"prettier": "^1.13",
|
||||||
"puppeteer": "1.4",
|
"puppeteer": "1.4",
|
||||||
"qunit": "2.6"
|
"qunit": "2.6",
|
||||||
|
"route-recognizer": "^0.3.3",
|
||||||
|
"sinon": "^6.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -134,7 +134,7 @@ QUnit.test("selectUp calls _moveSelection with -1", assert => {
|
||||||
|
|
||||||
QUnit.test("goBack calls history.back", assert => {
|
QUnit.test("goBack calls history.back", assert => {
|
||||||
var called = false;
|
var called = false;
|
||||||
sandbox.stub(history, "back", function() {
|
sandbox.stub(history, "back").callsFake(function() {
|
||||||
called = true;
|
called = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {
|
||||||
|
|
||||||
QUnit.module("lib:computed", {
|
QUnit.module("lib:computed", {
|
||||||
beforeEach() {
|
beforeEach() {
|
||||||
sandbox.stub(I18n, "t", function(scope) {
|
sandbox.stub(I18n, "t").callsFake(function(scope) {
|
||||||
return "%@ translated: " + scope;
|
return "%@ translated: " + scope;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
/*global document, sinon, QUnit, Logster */
|
/*global document, sinon, QUnit, Logster */
|
||||||
|
|
||||||
//= require env
|
//= require env
|
||||||
//= require probes
|
|
||||||
//= require jquery.debug
|
//= require jquery.debug
|
||||||
//= require jquery.ui.widget
|
//= require jquery.ui.widget
|
||||||
//= require handlebars
|
//= require handlebars
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
//= require qunit/qunit/qunit
|
//= require qunit/qunit/qunit
|
||||||
//= require ember-qunit
|
//= require ember-qunit
|
||||||
//= require fake_xml_http_request
|
//= require fake_xml_http_request
|
||||||
//= require route-recognizer
|
//= require route-recognizer/dist/route-recognizer
|
||||||
//= require pretender/pretender
|
//= require pretender/pretender
|
||||||
//= require discourse-loader
|
//= require discourse-loader
|
||||||
//= require preload-store
|
//= require preload-store
|
||||||
|
@ -29,8 +28,7 @@
|
||||||
//= require htmlparser.js
|
//= require htmlparser.js
|
||||||
//= require admin
|
//= require admin
|
||||||
|
|
||||||
//= require sinon-1.7.1
|
//= require sinon/pkg/sinon
|
||||||
//= require sinon-qunit-1.0.0
|
|
||||||
|
|
||||||
//= require helpers/assertions
|
//= require helpers/assertions
|
||||||
//= require helpers/select-kit-helper
|
//= require helpers/select-kit-helper
|
||||||
|
@ -45,6 +43,14 @@
|
||||||
//
|
//
|
||||||
//= require jquery.magnific-popup.min.js
|
//= require jquery.magnific-popup.min.js
|
||||||
|
|
||||||
|
sinon.config = {
|
||||||
|
injectIntoThis: false,
|
||||||
|
injectInto: null,
|
||||||
|
properties: ["spy", "stub", "mock", "clock", "sandbox"],
|
||||||
|
useFakeTimers: true,
|
||||||
|
useFakeServer: false
|
||||||
|
};
|
||||||
|
|
||||||
window.inTestEnv = true;
|
window.inTestEnv = true;
|
||||||
|
|
||||||
// Stop the message bus so we don't get ajax calls
|
// Stop the message bus so we don't get ajax calls
|
||||||
|
@ -123,7 +129,7 @@ QUnit.testStart(function(ctx) {
|
||||||
var ps = require("preload-store").default;
|
var ps = require("preload-store").default;
|
||||||
ps.reset();
|
ps.reset();
|
||||||
|
|
||||||
window.sandbox = sinon.sandbox.create();
|
window.sandbox = sinon;
|
||||||
window.sandbox.stub(ScrollingDOMMethods, "screenNotFull");
|
window.sandbox.stub(ScrollingDOMMethods, "screenNotFull");
|
||||||
window.sandbox.stub(ScrollingDOMMethods, "bindOnScroll");
|
window.sandbox.stub(ScrollingDOMMethods, "bindOnScroll");
|
||||||
window.sandbox.stub(ScrollingDOMMethods, "unbindOnScroll");
|
window.sandbox.stub(ScrollingDOMMethods, "unbindOnScroll");
|
||||||
|
|
|
@ -1,176 +0,0 @@
|
||||||
/*
|
|
||||||
* JavaScript probing framework by Sam Saffron
|
|
||||||
* MIT license
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Examples:
|
|
||||||
*
|
|
||||||
* someFunction = window.probes.measure(someFunction, {
|
|
||||||
* name: "somename" // or function(args) { return "name"; },
|
|
||||||
* before: function(data, owner, args) {
|
|
||||||
* // if owner is true, we are not in a recursive function call.
|
|
||||||
* //
|
|
||||||
* // data contains the bucker of data already measuer
|
|
||||||
* // data.count >= 0
|
|
||||||
* // data.time is the total time measured till now
|
|
||||||
* //
|
|
||||||
* // arguments contains the original arguments sent to the function
|
|
||||||
* },
|
|
||||||
* after: function(data, owner, args) {
|
|
||||||
* // same format as before
|
|
||||||
* }
|
|
||||||
* });
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* // minimal
|
|
||||||
* someFunction = window.probes.measure(someFunction, "someFunction");
|
|
||||||
*
|
|
||||||
* */
|
|
||||||
(function(){
|
|
||||||
var measure, clear;
|
|
||||||
|
|
||||||
clear = function() {
|
|
||||||
window.probes = {
|
|
||||||
clear: clear,
|
|
||||||
measure: measure,
|
|
||||||
displayProbes: displayProbes
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
measure = function(fn,options) {
|
|
||||||
// start is outside so we measure time around recursive calls properly
|
|
||||||
var start = null, nameParam, before, after;
|
|
||||||
if (!options) {
|
|
||||||
options = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof options === "string") {
|
|
||||||
nameParam = options;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
nameParam = options.name;
|
|
||||||
|
|
||||||
if (nameParam === "measure" || nameParam === "clear") {
|
|
||||||
throw new Error("can not be called measure or clear");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!nameParam)
|
|
||||||
{
|
|
||||||
throw new Error("you must specify the name option measure(fn, {name: 'some name'})");
|
|
||||||
}
|
|
||||||
|
|
||||||
before = options.before;
|
|
||||||
after = options.after;
|
|
||||||
}
|
|
||||||
|
|
||||||
var now = (function(){
|
|
||||||
var perf = window.performance || {};
|
|
||||||
var time = perf.now || perf.mozNow || perf.webkitNow || perf.msNow || perf.oNow;
|
|
||||||
return time ? time.bind(perf) : function() { return new Date().getTime(); };
|
|
||||||
})();
|
|
||||||
|
|
||||||
return function() {
|
|
||||||
var name = nameParam;
|
|
||||||
if (typeof name === "function"){
|
|
||||||
name = nameParam(arguments);
|
|
||||||
}
|
|
||||||
var p = window.probes[name];
|
|
||||||
var owner = (!start);
|
|
||||||
|
|
||||||
if (before) {
|
|
||||||
// would like to avoid try catch so its optimised properly by chrome
|
|
||||||
before(p, owner, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p === undefined) {
|
|
||||||
window.probes[name] = {count: 0, time: 0, currentTime: 0};
|
|
||||||
p = window.probes[name];
|
|
||||||
}
|
|
||||||
|
|
||||||
var callStart;
|
|
||||||
if (owner) {
|
|
||||||
start = now();
|
|
||||||
callStart = start;
|
|
||||||
}
|
|
||||||
else if(after) {
|
|
||||||
callStart = now();
|
|
||||||
}
|
|
||||||
|
|
||||||
var r = fn.apply(this, arguments);
|
|
||||||
if (owner && start) {
|
|
||||||
p.time += now() - start;
|
|
||||||
start = null;
|
|
||||||
}
|
|
||||||
p.count += 1;
|
|
||||||
|
|
||||||
if (after) {
|
|
||||||
p.currentTime = now() - callStart;
|
|
||||||
// would like to avoid try catch so its optimised properly by chrome
|
|
||||||
after(p, owner, arguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
return r;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
var displayProbes = function(){
|
|
||||||
var pre;
|
|
||||||
var text = "";
|
|
||||||
var body = document.getElementsByTagName("body")[0];
|
|
||||||
|
|
||||||
for(var prop in window.probes){
|
|
||||||
var probe = window.probes[prop];
|
|
||||||
if(probe && probe.count){
|
|
||||||
text += prop + ": " + probe.time + " ( " + probe.count + " )\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pre = document.getElementById("__probes");
|
|
||||||
|
|
||||||
if(!body){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pre){
|
|
||||||
pre.textContent = text;
|
|
||||||
pre.innerText = text;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var div = document.createElement("div");
|
|
||||||
div.id = "__probes_wrapper";
|
|
||||||
div.setAttribute("style", "position: fixed; bottom: 25px; left: 50px; z-index: 99999; border: 1px solid #777; padding: 10px; background-color: rgba(255,255,255, 0.8);");
|
|
||||||
|
|
||||||
pre = document.createElement("pre");
|
|
||||||
pre.setAttribute("style", "margin:0 0 5px;");
|
|
||||||
pre.textContent = text;
|
|
||||||
pre.innerText = text;
|
|
||||||
pre.id = "__probes";
|
|
||||||
|
|
||||||
div.appendChild(pre);
|
|
||||||
|
|
||||||
var a = document.createElement('a');
|
|
||||||
a.href = "";
|
|
||||||
a.innerText = "clear";
|
|
||||||
a.addEventListener("click", function(e){
|
|
||||||
for(var prop in window.probes){
|
|
||||||
var probe = window.probes[prop];
|
|
||||||
if(probe && probe.count){
|
|
||||||
delete window.probes[prop];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
displayProbes();
|
|
||||||
e.preventDefault();
|
|
||||||
});
|
|
||||||
|
|
||||||
div.appendChild(a);
|
|
||||||
|
|
||||||
body.appendChild(div);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// setInterval(displayProbes, 1000);
|
|
||||||
clear();
|
|
||||||
|
|
||||||
})();
|
|
|
@ -1,778 +0,0 @@
|
||||||
(function(global) {
|
|
||||||
var define, requireModule, require, requirejs;
|
|
||||||
|
|
||||||
(function() {
|
|
||||||
|
|
||||||
var _isArray;
|
|
||||||
if (!Array.isArray) {
|
|
||||||
_isArray = function (x) {
|
|
||||||
return Object.prototype.toString.call(x) === "[object Array]";
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
_isArray = Array.isArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
var registry = {}, seen = {};
|
|
||||||
var FAILED = false;
|
|
||||||
|
|
||||||
var uuid = 0;
|
|
||||||
|
|
||||||
function tryFinally(tryable, finalizer) {
|
|
||||||
try {
|
|
||||||
return tryable();
|
|
||||||
} finally {
|
|
||||||
finalizer();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function Module(name, deps, callback, exports) {
|
|
||||||
var defaultDeps = ['require', 'exports', 'module'];
|
|
||||||
|
|
||||||
this.id = uuid++;
|
|
||||||
this.name = name;
|
|
||||||
this.deps = !deps.length && callback.length ? defaultDeps : deps;
|
|
||||||
this.exports = exports || { };
|
|
||||||
this.callback = callback;
|
|
||||||
this.state = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
define = function(name, deps, callback) {
|
|
||||||
if (!_isArray(deps)) {
|
|
||||||
callback = deps;
|
|
||||||
deps = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
registry[name] = new Module(name, deps, callback);
|
|
||||||
};
|
|
||||||
|
|
||||||
define.amd = {};
|
|
||||||
|
|
||||||
function reify(mod, name, seen) {
|
|
||||||
var deps = mod.deps;
|
|
||||||
var length = deps.length;
|
|
||||||
var reified = new Array(length);
|
|
||||||
var dep;
|
|
||||||
// TODO: new Module
|
|
||||||
// TODO: seen refactor
|
|
||||||
var module = { };
|
|
||||||
|
|
||||||
for (var i = 0, l = length; i < l; i++) {
|
|
||||||
dep = deps[i];
|
|
||||||
if (dep === 'exports') {
|
|
||||||
module.exports = reified[i] = seen;
|
|
||||||
} else if (dep === 'require') {
|
|
||||||
reified[i] = require;
|
|
||||||
} else if (dep === 'module') {
|
|
||||||
mod.exports = seen;
|
|
||||||
module = reified[i] = mod;
|
|
||||||
} else {
|
|
||||||
reified[i] = require(resolve(dep, name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
deps: reified,
|
|
||||||
module: module
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
requirejs = require = requireModule = function(name) {
|
|
||||||
var mod = registry[name];
|
|
||||||
if (!mod) {
|
|
||||||
throw new Error('Could not find module ' + name);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mod.state !== FAILED &&
|
|
||||||
seen.hasOwnProperty(name)) {
|
|
||||||
return seen[name];
|
|
||||||
}
|
|
||||||
|
|
||||||
var reified;
|
|
||||||
var module;
|
|
||||||
var loaded = false;
|
|
||||||
|
|
||||||
seen[name] = { }; // placeholder for run-time cycles
|
|
||||||
|
|
||||||
tryFinally(function() {
|
|
||||||
reified = reify(mod, name, seen[name]);
|
|
||||||
module = mod.callback.apply(this, reified.deps);
|
|
||||||
loaded = true;
|
|
||||||
}, function() {
|
|
||||||
if (!loaded) {
|
|
||||||
mod.state = FAILED;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (module === undefined && reified.module.exports) {
|
|
||||||
return (seen[name] = reified.module.exports);
|
|
||||||
} else {
|
|
||||||
return (seen[name] = module);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function resolve(child, name) {
|
|
||||||
if (child.charAt(0) !== '.') { return child; }
|
|
||||||
|
|
||||||
var parts = child.split('/');
|
|
||||||
var nameParts = name.split('/');
|
|
||||||
var parentBase = nameParts.slice(0, -1);
|
|
||||||
|
|
||||||
for (var i = 0, l = parts.length; i < l; i++) {
|
|
||||||
var part = parts[i];
|
|
||||||
|
|
||||||
if (part === '..') { parentBase.pop(); }
|
|
||||||
else if (part === '.') { continue; }
|
|
||||||
else { parentBase.push(part); }
|
|
||||||
}
|
|
||||||
|
|
||||||
return parentBase.join('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
requirejs.entries = requirejs._eak_seen = registry;
|
|
||||||
requirejs.clear = function(){
|
|
||||||
requirejs.entries = requirejs._eak_seen = registry = {};
|
|
||||||
seen = state = {};
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
define("route-recognizer",
|
|
||||||
["route-recognizer/dsl","exports"],
|
|
||||||
function(__dependency1__, __exports__) {
|
|
||||||
"use strict";
|
|
||||||
var map = __dependency1__["default"];
|
|
||||||
|
|
||||||
var specials = [
|
|
||||||
'/', '.', '*', '+', '?', '|',
|
|
||||||
'(', ')', '[', ']', '{', '}', '\\'
|
|
||||||
];
|
|
||||||
|
|
||||||
var escapeRegex = new RegExp('(\\' + specials.join('|\\') + ')', 'g');
|
|
||||||
|
|
||||||
function isArray(test) {
|
|
||||||
return Object.prototype.toString.call(test) === "[object Array]";
|
|
||||||
}
|
|
||||||
|
|
||||||
// A Segment represents a segment in the original route description.
|
|
||||||
// Each Segment type provides an `eachChar` and `regex` method.
|
|
||||||
//
|
|
||||||
// The `eachChar` method invokes the callback with one or more character
|
|
||||||
// specifications. A character specification consumes one or more input
|
|
||||||
// characters.
|
|
||||||
//
|
|
||||||
// The `regex` method returns a regex fragment for the segment. If the
|
|
||||||
// segment is a dynamic of star segment, the regex fragment also includes
|
|
||||||
// a capture.
|
|
||||||
//
|
|
||||||
// A character specification contains:
|
|
||||||
//
|
|
||||||
// * `validChars`: a String with a list of all valid characters, or
|
|
||||||
// * `invalidChars`: a String with a list of all invalid characters
|
|
||||||
// * `repeat`: true if the character specification can repeat
|
|
||||||
|
|
||||||
function StaticSegment(string) { this.string = string; }
|
|
||||||
StaticSegment.prototype = {
|
|
||||||
eachChar: function(callback) {
|
|
||||||
var string = this.string, ch;
|
|
||||||
|
|
||||||
for (var i=0, l=string.length; i<l; i++) {
|
|
||||||
ch = string.charAt(i);
|
|
||||||
callback({ validChars: ch });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
regex: function() {
|
|
||||||
return this.string.replace(escapeRegex, '\\$1');
|
|
||||||
},
|
|
||||||
|
|
||||||
generate: function() {
|
|
||||||
return this.string;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function DynamicSegment(name) { this.name = name; }
|
|
||||||
DynamicSegment.prototype = {
|
|
||||||
eachChar: function(callback) {
|
|
||||||
callback({ invalidChars: "/", repeat: true });
|
|
||||||
},
|
|
||||||
|
|
||||||
regex: function() {
|
|
||||||
return "([^/]+)";
|
|
||||||
},
|
|
||||||
|
|
||||||
generate: function(params) {
|
|
||||||
return params[this.name];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function StarSegment(name) { this.name = name; }
|
|
||||||
StarSegment.prototype = {
|
|
||||||
eachChar: function(callback) {
|
|
||||||
callback({ invalidChars: "", repeat: true });
|
|
||||||
},
|
|
||||||
|
|
||||||
regex: function() {
|
|
||||||
return "(.+)";
|
|
||||||
},
|
|
||||||
|
|
||||||
generate: function(params) {
|
|
||||||
return params[this.name];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function EpsilonSegment() {}
|
|
||||||
EpsilonSegment.prototype = {
|
|
||||||
eachChar: function() {},
|
|
||||||
regex: function() { return ""; },
|
|
||||||
generate: function() { return ""; }
|
|
||||||
};
|
|
||||||
|
|
||||||
function parse(route, names, types) {
|
|
||||||
// normalize route as not starting with a "/". Recognition will
|
|
||||||
// also normalize.
|
|
||||||
if (route.charAt(0) === "/") { route = route.substr(1); }
|
|
||||||
|
|
||||||
var segments = route.split("/"), results = [];
|
|
||||||
|
|
||||||
for (var i=0, l=segments.length; i<l; i++) {
|
|
||||||
var segment = segments[i], match;
|
|
||||||
|
|
||||||
if (match = segment.match(/^:([^\/]+)$/)) {
|
|
||||||
results.push(new DynamicSegment(match[1]));
|
|
||||||
names.push(match[1]);
|
|
||||||
types.dynamics++;
|
|
||||||
} else if (match = segment.match(/^\*([^\/]+)$/)) {
|
|
||||||
results.push(new StarSegment(match[1]));
|
|
||||||
names.push(match[1]);
|
|
||||||
types.stars++;
|
|
||||||
} else if(segment === "") {
|
|
||||||
results.push(new EpsilonSegment());
|
|
||||||
} else {
|
|
||||||
results.push(new StaticSegment(segment));
|
|
||||||
types.statics++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
// A State has a character specification and (`charSpec`) and a list of possible
|
|
||||||
// subsequent states (`nextStates`).
|
|
||||||
//
|
|
||||||
// If a State is an accepting state, it will also have several additional
|
|
||||||
// properties:
|
|
||||||
//
|
|
||||||
// * `regex`: A regular expression that is used to extract parameters from paths
|
|
||||||
// that reached this accepting state.
|
|
||||||
// * `handlers`: Information on how to convert the list of captures into calls
|
|
||||||
// to registered handlers with the specified parameters
|
|
||||||
// * `types`: How many static, dynamic or star segments in this route. Used to
|
|
||||||
// decide which route to use if multiple registered routes match a path.
|
|
||||||
//
|
|
||||||
// Currently, State is implemented naively by looping over `nextStates` and
|
|
||||||
// comparing a character specification against a character. A more efficient
|
|
||||||
// implementation would use a hash of keys pointing at one or more next states.
|
|
||||||
|
|
||||||
function State(charSpec) {
|
|
||||||
this.charSpec = charSpec;
|
|
||||||
this.nextStates = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
State.prototype = {
|
|
||||||
get: function(charSpec) {
|
|
||||||
var nextStates = this.nextStates;
|
|
||||||
|
|
||||||
for (var i=0, l=nextStates.length; i<l; i++) {
|
|
||||||
var child = nextStates[i];
|
|
||||||
|
|
||||||
var isEqual = child.charSpec.validChars === charSpec.validChars;
|
|
||||||
isEqual = isEqual && child.charSpec.invalidChars === charSpec.invalidChars;
|
|
||||||
|
|
||||||
if (isEqual) { return child; }
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
put: function(charSpec) {
|
|
||||||
var state;
|
|
||||||
|
|
||||||
// If the character specification already exists in a child of the current
|
|
||||||
// state, just return that state.
|
|
||||||
if (state = this.get(charSpec)) { return state; }
|
|
||||||
|
|
||||||
// Make a new state for the character spec
|
|
||||||
state = new State(charSpec);
|
|
||||||
|
|
||||||
// Insert the new state as a child of the current state
|
|
||||||
this.nextStates.push(state);
|
|
||||||
|
|
||||||
// If this character specification repeats, insert the new state as a child
|
|
||||||
// of itself. Note that this will not trigger an infinite loop because each
|
|
||||||
// transition during recognition consumes a character.
|
|
||||||
if (charSpec.repeat) {
|
|
||||||
state.nextStates.push(state);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Return the new state
|
|
||||||
return state;
|
|
||||||
},
|
|
||||||
|
|
||||||
// Find a list of child states matching the next character
|
|
||||||
match: function(ch) {
|
|
||||||
// DEBUG "Processing `" + ch + "`:"
|
|
||||||
var nextStates = this.nextStates,
|
|
||||||
child, charSpec, chars;
|
|
||||||
|
|
||||||
// DEBUG " " + debugState(this)
|
|
||||||
var returned = [];
|
|
||||||
|
|
||||||
for (var i=0, l=nextStates.length; i<l; i++) {
|
|
||||||
child = nextStates[i];
|
|
||||||
|
|
||||||
charSpec = child.charSpec;
|
|
||||||
|
|
||||||
if (typeof (chars = charSpec.validChars) !== 'undefined') {
|
|
||||||
if (chars.indexOf(ch) !== -1) { returned.push(child); }
|
|
||||||
} else if (typeof (chars = charSpec.invalidChars) !== 'undefined') {
|
|
||||||
if (chars.indexOf(ch) === -1) { returned.push(child); }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returned;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** IF DEBUG
|
|
||||||
, debug: function() {
|
|
||||||
var charSpec = this.charSpec,
|
|
||||||
debug = "[",
|
|
||||||
chars = charSpec.validChars || charSpec.invalidChars;
|
|
||||||
|
|
||||||
if (charSpec.invalidChars) { debug += "^"; }
|
|
||||||
debug += chars;
|
|
||||||
debug += "]";
|
|
||||||
|
|
||||||
if (charSpec.repeat) { debug += "+"; }
|
|
||||||
|
|
||||||
return debug;
|
|
||||||
}
|
|
||||||
END IF **/
|
|
||||||
};
|
|
||||||
|
|
||||||
/** IF DEBUG
|
|
||||||
function debug(log) {
|
|
||||||
console.log(log);
|
|
||||||
}
|
|
||||||
|
|
||||||
function debugState(state) {
|
|
||||||
return state.nextStates.map(function(n) {
|
|
||||||
if (n.nextStates.length === 0) { return "( " + n.debug() + " [accepting] )"; }
|
|
||||||
return "( " + n.debug() + " <then> " + n.nextStates.map(function(s) { return s.debug() }).join(" or ") + " )";
|
|
||||||
}).join(", ")
|
|
||||||
}
|
|
||||||
END IF **/
|
|
||||||
|
|
||||||
// This is a somewhat naive strategy, but should work in a lot of cases
|
|
||||||
// A better strategy would properly resolve /posts/:id/new and /posts/edit/:id.
|
|
||||||
//
|
|
||||||
// This strategy generally prefers more static and less dynamic matching.
|
|
||||||
// Specifically, it
|
|
||||||
//
|
|
||||||
// * prefers fewer stars to more, then
|
|
||||||
// * prefers using stars for less of the match to more, then
|
|
||||||
// * prefers fewer dynamic segments to more, then
|
|
||||||
// * prefers more static segments to more
|
|
||||||
function sortSolutions(states) {
|
|
||||||
return states.sort(function(a, b) {
|
|
||||||
if (a.types.stars !== b.types.stars) { return a.types.stars - b.types.stars; }
|
|
||||||
|
|
||||||
if (a.types.stars) {
|
|
||||||
if (a.types.statics !== b.types.statics) { return b.types.statics - a.types.statics; }
|
|
||||||
if (a.types.dynamics !== b.types.dynamics) { return b.types.dynamics - a.types.dynamics; }
|
|
||||||
}
|
|
||||||
|
|
||||||
if (a.types.dynamics !== b.types.dynamics) { return a.types.dynamics - b.types.dynamics; }
|
|
||||||
if (a.types.statics !== b.types.statics) { return b.types.statics - a.types.statics; }
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function recognizeChar(states, ch) {
|
|
||||||
var nextStates = [];
|
|
||||||
|
|
||||||
for (var i=0, l=states.length; i<l; i++) {
|
|
||||||
var state = states[i];
|
|
||||||
|
|
||||||
nextStates = nextStates.concat(state.match(ch));
|
|
||||||
}
|
|
||||||
|
|
||||||
return nextStates;
|
|
||||||
}
|
|
||||||
|
|
||||||
var oCreate = Object.create || function(proto) {
|
|
||||||
function F() {}
|
|
||||||
F.prototype = proto;
|
|
||||||
return new F();
|
|
||||||
};
|
|
||||||
|
|
||||||
function RecognizeResults(queryParams) {
|
|
||||||
this.queryParams = queryParams || {};
|
|
||||||
}
|
|
||||||
RecognizeResults.prototype = oCreate({
|
|
||||||
splice: Array.prototype.splice,
|
|
||||||
slice: Array.prototype.slice,
|
|
||||||
push: Array.prototype.push,
|
|
||||||
length: 0,
|
|
||||||
queryParams: null
|
|
||||||
});
|
|
||||||
|
|
||||||
function findHandler(state, path, queryParams) {
|
|
||||||
var handlers = state.handlers, regex = state.regex;
|
|
||||||
var captures = path.match(regex), currentCapture = 1;
|
|
||||||
var result = new RecognizeResults(queryParams);
|
|
||||||
|
|
||||||
for (var i=0, l=handlers.length; i<l; i++) {
|
|
||||||
var handler = handlers[i], names = handler.names, params = {};
|
|
||||||
|
|
||||||
for (var j=0, m=names.length; j<m; j++) {
|
|
||||||
params[names[j]] = captures[currentCapture++];
|
|
||||||
}
|
|
||||||
|
|
||||||
result.push({ handler: handler.handler, params: params, isDynamic: !!names.length });
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function addSegment(currentState, segment) {
|
|
||||||
segment.eachChar(function(ch) {
|
|
||||||
var state;
|
|
||||||
|
|
||||||
currentState = currentState.put(ch);
|
|
||||||
});
|
|
||||||
|
|
||||||
return currentState;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The main interface
|
|
||||||
|
|
||||||
var RouteRecognizer = function() {
|
|
||||||
this.rootState = new State();
|
|
||||||
this.names = {};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
RouteRecognizer.prototype = {
|
|
||||||
add: function(routes, options) {
|
|
||||||
var currentState = this.rootState, regex = "^",
|
|
||||||
types = { statics: 0, dynamics: 0, stars: 0 },
|
|
||||||
handlers = [], allSegments = [], name;
|
|
||||||
|
|
||||||
var isEmpty = true;
|
|
||||||
|
|
||||||
for (var i=0, l=routes.length; i<l; i++) {
|
|
||||||
var route = routes[i], names = [];
|
|
||||||
|
|
||||||
var segments = parse(route.path, names, types);
|
|
||||||
|
|
||||||
allSegments = allSegments.concat(segments);
|
|
||||||
|
|
||||||
for (var j=0, m=segments.length; j<m; j++) {
|
|
||||||
var segment = segments[j];
|
|
||||||
|
|
||||||
if (segment instanceof EpsilonSegment) { continue; }
|
|
||||||
|
|
||||||
isEmpty = false;
|
|
||||||
|
|
||||||
// Add a "/" for the new segment
|
|
||||||
currentState = currentState.put({ validChars: "/" });
|
|
||||||
regex += "/";
|
|
||||||
|
|
||||||
// Add a representation of the segment to the NFA and regex
|
|
||||||
currentState = addSegment(currentState, segment);
|
|
||||||
regex += segment.regex();
|
|
||||||
}
|
|
||||||
|
|
||||||
var handler = { handler: route.handler, names: names };
|
|
||||||
handlers.push(handler);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isEmpty) {
|
|
||||||
currentState = currentState.put({ validChars: "/" });
|
|
||||||
regex += "/";
|
|
||||||
}
|
|
||||||
|
|
||||||
currentState.handlers = handlers;
|
|
||||||
currentState.regex = new RegExp(regex + "$");
|
|
||||||
currentState.types = types;
|
|
||||||
|
|
||||||
if (name = options && options.as) {
|
|
||||||
this.names[name] = {
|
|
||||||
segments: allSegments,
|
|
||||||
handlers: handlers
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
handlersFor: function(name) {
|
|
||||||
var route = this.names[name], result = [];
|
|
||||||
if (!route) { throw new Error("There is no route named " + name); }
|
|
||||||
|
|
||||||
for (var i=0, l=route.handlers.length; i<l; i++) {
|
|
||||||
result.push(route.handlers[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
},
|
|
||||||
|
|
||||||
hasRoute: function(name) {
|
|
||||||
return !!this.names[name];
|
|
||||||
},
|
|
||||||
|
|
||||||
generate: function(name, params) {
|
|
||||||
var route = this.names[name], output = "";
|
|
||||||
if (!route) { throw new Error("There is no route named " + name); }
|
|
||||||
|
|
||||||
var segments = route.segments;
|
|
||||||
|
|
||||||
for (var i=0, l=segments.length; i<l; i++) {
|
|
||||||
var segment = segments[i];
|
|
||||||
|
|
||||||
if (segment instanceof EpsilonSegment) { continue; }
|
|
||||||
|
|
||||||
output += "/";
|
|
||||||
output += segment.generate(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (output.charAt(0) !== '/') { output = '/' + output; }
|
|
||||||
|
|
||||||
if (params && params.queryParams) {
|
|
||||||
output += this.generateQueryString(params.queryParams, route.handlers);
|
|
||||||
}
|
|
||||||
|
|
||||||
return output;
|
|
||||||
},
|
|
||||||
|
|
||||||
generateQueryString: function(params, handlers) {
|
|
||||||
var pairs = [];
|
|
||||||
var keys = [];
|
|
||||||
for(var key in params) {
|
|
||||||
if (params.hasOwnProperty(key)) {
|
|
||||||
keys.push(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
keys.sort();
|
|
||||||
for (var i = 0, len = keys.length; i < len; i++) {
|
|
||||||
key = keys[i];
|
|
||||||
var value = params[key];
|
|
||||||
if (value == null) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
var pair = encodeURIComponent(key);
|
|
||||||
if (isArray(value)) {
|
|
||||||
for (var j = 0, l = value.length; j < l; j++) {
|
|
||||||
var arrayPair = key + '[]' + '=' + encodeURIComponent(value[j]);
|
|
||||||
pairs.push(arrayPair);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
pair += "=" + encodeURIComponent(value);
|
|
||||||
pairs.push(pair);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pairs.length === 0) { return ''; }
|
|
||||||
|
|
||||||
return "?" + pairs.join("&");
|
|
||||||
},
|
|
||||||
|
|
||||||
parseQueryString: function(queryString) {
|
|
||||||
var pairs = queryString.split("&"), queryParams = {};
|
|
||||||
for(var i=0; i < pairs.length; i++) {
|
|
||||||
var pair = pairs[i].split('='),
|
|
||||||
key = decodeURIComponent(pair[0]),
|
|
||||||
keyLength = key.length,
|
|
||||||
isArray = false,
|
|
||||||
value;
|
|
||||||
if (pair.length === 1) {
|
|
||||||
value = 'true';
|
|
||||||
} else {
|
|
||||||
//Handle arrays
|
|
||||||
if (keyLength > 2 && key.slice(keyLength -2) === '[]') {
|
|
||||||
isArray = true;
|
|
||||||
key = key.slice(0, keyLength - 2);
|
|
||||||
if(!queryParams[key]) {
|
|
||||||
queryParams[key] = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
value = pair[1] ? decodeURIComponent(pair[1]) : '';
|
|
||||||
}
|
|
||||||
if (isArray) {
|
|
||||||
queryParams[key].push(value);
|
|
||||||
} else {
|
|
||||||
queryParams[key] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return queryParams;
|
|
||||||
},
|
|
||||||
|
|
||||||
recognize: function(path) {
|
|
||||||
var states = [ this.rootState ],
|
|
||||||
pathLen, i, l, queryStart, queryParams = {},
|
|
||||||
isSlashDropped = false;
|
|
||||||
|
|
||||||
path = decodeURI(path);
|
|
||||||
|
|
||||||
queryStart = path.indexOf('?');
|
|
||||||
if (queryStart !== -1) {
|
|
||||||
var queryString = path.substr(queryStart + 1, path.length);
|
|
||||||
path = path.substr(0, queryStart);
|
|
||||||
queryParams = this.parseQueryString(queryString);
|
|
||||||
}
|
|
||||||
|
|
||||||
// DEBUG GROUP path
|
|
||||||
|
|
||||||
if (path.charAt(0) !== "/") { path = "/" + path; }
|
|
||||||
|
|
||||||
pathLen = path.length;
|
|
||||||
if (pathLen > 1 && path.charAt(pathLen - 1) === "/") {
|
|
||||||
path = path.substr(0, pathLen - 1);
|
|
||||||
isSlashDropped = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0, l=path.length; i<l; i++) {
|
|
||||||
states = recognizeChar(states, path.charAt(i));
|
|
||||||
if (!states.length) { break; }
|
|
||||||
}
|
|
||||||
|
|
||||||
// END DEBUG GROUP
|
|
||||||
|
|
||||||
var solutions = [];
|
|
||||||
for (i=0, l=states.length; i<l; i++) {
|
|
||||||
if (states[i].handlers) { solutions.push(states[i]); }
|
|
||||||
}
|
|
||||||
|
|
||||||
states = sortSolutions(solutions);
|
|
||||||
|
|
||||||
var state = solutions[0];
|
|
||||||
|
|
||||||
if (state && state.handlers) {
|
|
||||||
// if a trailing slash was dropped and a star segment is the last segment
|
|
||||||
// specified, put the trailing slash back
|
|
||||||
if (isSlashDropped && state.regex.source.slice(-5) === "(.+)$") {
|
|
||||||
path = path + "/";
|
|
||||||
}
|
|
||||||
return findHandler(state, path, queryParams);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
RouteRecognizer.prototype.map = map;
|
|
||||||
|
|
||||||
__exports__["default"] = RouteRecognizer;
|
|
||||||
});
|
|
||||||
define("route-recognizer/dsl",
|
|
||||||
["exports"],
|
|
||||||
function(__exports__) {
|
|
||||||
"use strict";
|
|
||||||
function Target(path, matcher, delegate) {
|
|
||||||
this.path = path;
|
|
||||||
this.matcher = matcher;
|
|
||||||
this.delegate = delegate;
|
|
||||||
}
|
|
||||||
|
|
||||||
Target.prototype = {
|
|
||||||
to: function(target, callback) {
|
|
||||||
var delegate = this.delegate;
|
|
||||||
|
|
||||||
if (delegate && delegate.willAddRoute) {
|
|
||||||
target = delegate.willAddRoute(this.matcher.target, target);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.matcher.add(this.path, target);
|
|
||||||
|
|
||||||
if (callback) {
|
|
||||||
if (callback.length === 0) { throw new Error("You must have an argument in the function passed to `to`"); }
|
|
||||||
this.matcher.addChild(this.path, target, callback, this.delegate);
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function Matcher(target) {
|
|
||||||
this.routes = {};
|
|
||||||
this.children = {};
|
|
||||||
this.target = target;
|
|
||||||
}
|
|
||||||
|
|
||||||
Matcher.prototype = {
|
|
||||||
add: function(path, handler) {
|
|
||||||
this.routes[path] = handler;
|
|
||||||
},
|
|
||||||
|
|
||||||
addChild: function(path, target, callback, delegate) {
|
|
||||||
var matcher = new Matcher(target);
|
|
||||||
this.children[path] = matcher;
|
|
||||||
|
|
||||||
var match = generateMatch(path, matcher, delegate);
|
|
||||||
|
|
||||||
if (delegate && delegate.contextEntered) {
|
|
||||||
delegate.contextEntered(target, match);
|
|
||||||
}
|
|
||||||
|
|
||||||
callback(match);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function generateMatch(startingPath, matcher, delegate) {
|
|
||||||
return function(path, nestedCallback) {
|
|
||||||
var fullPath = startingPath + path;
|
|
||||||
|
|
||||||
if (nestedCallback) {
|
|
||||||
nestedCallback(generateMatch(fullPath, matcher, delegate));
|
|
||||||
} else {
|
|
||||||
return new Target(startingPath + path, matcher, delegate);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function addRoute(routeArray, path, handler) {
|
|
||||||
var len = 0;
|
|
||||||
for (var i=0, l=routeArray.length; i<l; i++) {
|
|
||||||
len += routeArray[i].path.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
path = path.substr(len);
|
|
||||||
var route = { path: path, handler: handler };
|
|
||||||
routeArray.push(route);
|
|
||||||
}
|
|
||||||
|
|
||||||
function eachRoute(baseRoute, matcher, callback, binding) {
|
|
||||||
var routes = matcher.routes;
|
|
||||||
|
|
||||||
for (var path in routes) {
|
|
||||||
if (routes.hasOwnProperty(path)) {
|
|
||||||
var routeArray = baseRoute.slice();
|
|
||||||
addRoute(routeArray, path, routes[path]);
|
|
||||||
|
|
||||||
if (matcher.children[path]) {
|
|
||||||
eachRoute(routeArray, matcher.children[path], callback, binding);
|
|
||||||
} else {
|
|
||||||
callback.call(binding, routeArray);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
__exports__["default"] = function(callback, addRouteCallback) {
|
|
||||||
var matcher = new Matcher();
|
|
||||||
|
|
||||||
callback(generateMatch("", matcher, this.delegate));
|
|
||||||
|
|
||||||
eachRoute([], matcher, function(route) {
|
|
||||||
if (addRouteCallback) { addRouteCallback(this, route); }
|
|
||||||
else { this.add(route); }
|
|
||||||
}, this);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
global.RouteRecognizer = require("route-recognizer")["default"];
|
|
||||||
})(window);
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,49 +0,0 @@
|
||||||
/**
|
|
||||||
* sinon-qunit 1.0.0, 2010/12/09
|
|
||||||
*
|
|
||||||
* @author Christian Johansen (christian@cjohansen.no)
|
|
||||||
*
|
|
||||||
* (The BSD License)
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010-2011, Christian Johansen, christian@cjohansen.no
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
|
||||||
* are permitted provided that the following conditions are met:
|
|
||||||
*
|
|
||||||
* * Redistributions of source code must retain the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer.
|
|
||||||
* * Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
* this list of conditions and the following disclaimer in the documentation
|
|
||||||
* and/or other materials provided with the distribution.
|
|
||||||
* * Neither the name of Christian Johansen nor the names of his contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
/*global sinon, QUnit, test*/
|
|
||||||
sinon.assert.fail = function (msg) {
|
|
||||||
QUnit.ok(false, msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
sinon.assert.pass = function (assertion) {
|
|
||||||
QUnit.ok(true, assertion);
|
|
||||||
};
|
|
||||||
|
|
||||||
sinon.config = {
|
|
||||||
injectIntoThis: false,
|
|
||||||
injectInto: null,
|
|
||||||
properties: ["spy", "stub", "mock", "clock", "sandbox"],
|
|
||||||
useFakeTimers: true,
|
|
||||||
useFakeServer: false
|
|
||||||
};
|
|
111
yarn.lock
111
yarn.lock
|
@ -87,6 +87,32 @@
|
||||||
lodash "^4.2.0"
|
lodash "^4.2.0"
|
||||||
to-fast-properties "^2.0.0"
|
to-fast-properties "^2.0.0"
|
||||||
|
|
||||||
|
"@sinonjs/commons@^1.0.2":
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.0.2.tgz#3e0ac737781627b8844257fadc3d803997d0526e"
|
||||||
|
integrity sha512-WR3dlgqJP4QNrLC4iXN/5/2WaLQQ0VijOOkmflqFGVJ6wLEpbSjo7c0ZeGIdtY8Crk7xBBp87sM6+Mkerz7alw==
|
||||||
|
dependencies:
|
||||||
|
type-detect "4.0.8"
|
||||||
|
|
||||||
|
"@sinonjs/formatio@3.0.0", "@sinonjs/formatio@^3.0.0":
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sinonjs/formatio/-/formatio-3.0.0.tgz#9d282d81030a03a03fa0c5ce31fd8786a4da311a"
|
||||||
|
integrity sha512-vdjoYLDptCgvtJs57ULshak3iJe4NW3sJ3g36xVDGff5AE8P30S6A093EIEPjdi2noGhfuNOEkbxt3J3awFW1w==
|
||||||
|
dependencies:
|
||||||
|
"@sinonjs/samsam" "2.1.0"
|
||||||
|
|
||||||
|
"@sinonjs/samsam@2.1.0":
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-2.1.0.tgz#b8b8f5b819605bd63601a6ede459156880f38ea3"
|
||||||
|
integrity sha512-5x2kFgJYupaF1ns/RmharQ90lQkd2ELS8A9X0ymkAAdemYHGtI2KiUHG8nX2WU0T1qgnOU5YMqnBM2V7NUanNw==
|
||||||
|
dependencies:
|
||||||
|
array-from "^2.1.1"
|
||||||
|
|
||||||
|
"@sinonjs/samsam@^2.1.2":
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-2.1.2.tgz#16947fce5f57258d01f1688fdc32723093c55d3f"
|
||||||
|
integrity sha512-ZwTHAlC9akprWDinwEPD4kOuwaYZlyMwVJIANsKNC3QVp0AHB04m7RnB4eqeWfgmxw8MGTzS9uMaw93Z3QcZbw==
|
||||||
|
|
||||||
"@types/core-js@^0.9.41":
|
"@types/core-js@^0.9.41":
|
||||||
version "0.9.43"
|
version "0.9.43"
|
||||||
resolved "https://registry.yarnpkg.com/@types/core-js/-/core-js-0.9.43.tgz#65d646c5e8c0cd1bdee37065799f9d3d48748253"
|
resolved "https://registry.yarnpkg.com/@types/core-js/-/core-js-0.9.43.tgz#65d646c5e8c0cd1bdee37065799f9d3d48748253"
|
||||||
|
@ -240,6 +266,11 @@ arr-union@^3.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
|
resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4"
|
||||||
integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
|
integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=
|
||||||
|
|
||||||
|
array-from@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-from/-/array-from-2.1.1.tgz#cfe9d8c26628b9dc5aecc62a9f5d8f1f352c1195"
|
||||||
|
integrity sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=
|
||||||
|
|
||||||
array-union@^1.0.1:
|
array-union@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
|
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
|
||||||
|
@ -712,6 +743,11 @@ detect-libc@^1.0.2:
|
||||||
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
|
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
|
||||||
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
|
integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
|
||||||
|
|
||||||
|
diff@^3.5.0:
|
||||||
|
version "3.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
|
||||||
|
integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==
|
||||||
|
|
||||||
doctrine@^2.1.0:
|
doctrine@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
|
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
|
||||||
|
@ -1142,6 +1178,11 @@ has-flag@^2.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51"
|
||||||
integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=
|
integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=
|
||||||
|
|
||||||
|
has-flag@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
||||||
|
integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
|
||||||
|
|
||||||
has-unicode@^2.0.0:
|
has-unicode@^2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
|
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
|
||||||
|
@ -1411,6 +1452,11 @@ is-wsl@^1.1.0:
|
||||||
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
|
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
|
||||||
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
|
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
|
||||||
|
|
||||||
|
isarray@0.0.1:
|
||||||
|
version "0.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
|
||||||
|
integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=
|
||||||
|
|
||||||
isarray@1.0.0, isarray@~1.0.0:
|
isarray@1.0.0, isarray@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
@ -1501,6 +1547,11 @@ json-stable-stringify-without-jsonify@^1.0.1:
|
||||||
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
|
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
|
||||||
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
|
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
|
||||||
|
|
||||||
|
just-extend@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-3.0.0.tgz#cee004031eaabf6406da03a7b84e4fe9d78ef288"
|
||||||
|
integrity sha512-Fu3T6pKBuxjWT/p4DkqGHFRsysc8OauWr4ZRTY9dIx07Y9O0RkoR5jcv28aeD1vuAwhm3nLkDurwLXoALp4DpQ==
|
||||||
|
|
||||||
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
|
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
|
||||||
version "3.2.2"
|
version "3.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
|
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
|
||||||
|
@ -1552,11 +1603,21 @@ linkify-it@^2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
uc.micro "^1.0.1"
|
uc.micro "^1.0.1"
|
||||||
|
|
||||||
|
lodash.get@^4.4.2:
|
||||||
|
version "4.4.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
|
||||||
|
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
|
||||||
|
|
||||||
lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0:
|
lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0:
|
||||||
version "4.17.4"
|
version "4.17.4"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
|
||||||
integrity sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=
|
integrity sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=
|
||||||
|
|
||||||
|
lolex@^2.3.2, lolex@^2.7.5:
|
||||||
|
version "2.7.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.7.5.tgz#113001d56bfc7e02d56e36291cc5c413d1aa0733"
|
||||||
|
integrity sha512-l9x0+1offnKKIzYVjyXU2SiwhXDLekRzKyhnbyldPHvC7BvLPVpdNUNR2KeMAiCN2D/kLNttZgQD5WjSxuBx3Q==
|
||||||
|
|
||||||
longest@^1.0.1:
|
longest@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
|
resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
|
||||||
|
@ -1765,6 +1826,17 @@ needle@^2.2.1:
|
||||||
iconv-lite "^0.4.4"
|
iconv-lite "^0.4.4"
|
||||||
sax "^1.2.4"
|
sax "^1.2.4"
|
||||||
|
|
||||||
|
nise@^1.4.5:
|
||||||
|
version "1.4.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/nise/-/nise-1.4.5.tgz#979a97a19c48d627bb53703726ae8d53ce8d4b3e"
|
||||||
|
integrity sha512-OHRVvdxKgwZELf2DTgsJEIA4MOq8XWvpSUzoOXyxJ2mY0mMENWC66+70AShLR2z05B1dzrzWlUQJmJERlOUpZw==
|
||||||
|
dependencies:
|
||||||
|
"@sinonjs/formatio" "3.0.0"
|
||||||
|
just-extend "^3.0.0"
|
||||||
|
lolex "^2.3.2"
|
||||||
|
path-to-regexp "^1.7.0"
|
||||||
|
text-encoding "^0.6.4"
|
||||||
|
|
||||||
node-int64@^0.4.0:
|
node-int64@^0.4.0:
|
||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
||||||
|
@ -1934,6 +2006,13 @@ path-parse@^1.0.5:
|
||||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
|
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c"
|
||||||
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
|
integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==
|
||||||
|
|
||||||
|
path-to-regexp@^1.7.0:
|
||||||
|
version "1.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.7.0.tgz#59fde0f435badacba103a84e9d3bc64e96b9937d"
|
||||||
|
integrity sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=
|
||||||
|
dependencies:
|
||||||
|
isarray "0.0.1"
|
||||||
|
|
||||||
pend@~1.2.0:
|
pend@~1.2.0:
|
||||||
version "1.2.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
||||||
|
@ -2291,6 +2370,21 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
|
||||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
||||||
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
|
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
|
||||||
|
|
||||||
|
sinon@^6.3.5:
|
||||||
|
version "6.3.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/sinon/-/sinon-6.3.5.tgz#0f6d6a5b4ebaad1f6e8e019395542d1d02c144a0"
|
||||||
|
integrity sha512-xgoZ2gKjyVRcF08RrIQc+srnSyY1JDJtxu3Nsz07j1ffjgXoY6uPLf/qja6nDBZgzYYEovVkFryw2+KiZz11xQ==
|
||||||
|
dependencies:
|
||||||
|
"@sinonjs/commons" "^1.0.2"
|
||||||
|
"@sinonjs/formatio" "^3.0.0"
|
||||||
|
"@sinonjs/samsam" "^2.1.2"
|
||||||
|
diff "^3.5.0"
|
||||||
|
lodash.get "^4.4.2"
|
||||||
|
lolex "^2.7.5"
|
||||||
|
nise "^1.4.5"
|
||||||
|
supports-color "^5.5.0"
|
||||||
|
type-detect "^4.0.8"
|
||||||
|
|
||||||
slice-ansi@1.0.0:
|
slice-ansi@1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d"
|
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d"
|
||||||
|
@ -2443,6 +2537,13 @@ supports-color@^4.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
has-flag "^2.0.0"
|
has-flag "^2.0.0"
|
||||||
|
|
||||||
|
supports-color@^5.5.0:
|
||||||
|
version "5.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
||||||
|
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
|
||||||
|
dependencies:
|
||||||
|
has-flag "^3.0.0"
|
||||||
|
|
||||||
table@4.0.2:
|
table@4.0.2:
|
||||||
version "4.0.2"
|
version "4.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36"
|
resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36"
|
||||||
|
@ -2468,6 +2569,11 @@ tar@^4:
|
||||||
safe-buffer "^5.1.2"
|
safe-buffer "^5.1.2"
|
||||||
yallist "^3.0.2"
|
yallist "^3.0.2"
|
||||||
|
|
||||||
|
text-encoding@^0.6.4:
|
||||||
|
version "0.6.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"
|
||||||
|
integrity sha1-45mpgiV6J22uQou5KEXLcb3CbRk=
|
||||||
|
|
||||||
text-table@~0.2.0:
|
text-table@~0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||||
|
@ -2532,6 +2638,11 @@ type-check@~0.3.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
prelude-ls "~1.1.2"
|
prelude-ls "~1.1.2"
|
||||||
|
|
||||||
|
type-detect@4.0.8, type-detect@^4.0.8:
|
||||||
|
version "4.0.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
|
||||||
|
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==
|
||||||
|
|
||||||
typedarray@^0.0.6:
|
typedarray@^0.0.6:
|
||||||
version "0.0.6"
|
version "0.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||||
|
|
Loading…
Reference in New Issue