Skip to content

Commit 4089c7d

Browse files
committed
Build: update front-end dependencies
1 parent 79c0732 commit 4089c7d

File tree

5 files changed

+83
-51
lines changed

5 files changed

+83
-51
lines changed

external/requirejs/require.js

Lines changed: 52 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** vim: et:ts=4:sw=4:sts=4
2-
* @license RequireJS 2.1.10 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
2+
* @license RequireJS 2.1.14 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -12,7 +12,7 @@ var requirejs, require, define;
1212
(function (global) {
1313
var req, s, head, baseElement, dataMain, src,
1414
interactiveScript, currentlyAddingScript, mainScript, subPath,
15-
version = '2.1.10',
15+
version = '2.1.14',
1616
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
1717
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
1818
jsSuffixRegExp = /\.js$/,
@@ -141,7 +141,7 @@ var requirejs, require, define;
141141
throw err;
142142
}
143143

144-
//Allow getting a global that expressed in
144+
//Allow getting a global that is expressed in
145145
//dot notation, like 'a.b.c'.
146146
function getGlobal(value) {
147147
if (!value) {
@@ -180,7 +180,7 @@ var requirejs, require, define;
180180

181181
if (typeof requirejs !== 'undefined') {
182182
if (isFunction(requirejs)) {
183-
//Do not overwrite and existing requirejs instance.
183+
//Do not overwrite an existing requirejs instance.
184184
return;
185185
}
186186
cfg = requirejs;
@@ -232,21 +232,20 @@ var requirejs, require, define;
232232
* @param {Array} ary the array of path segments.
233233
*/
234234
function trimDots(ary) {
235-
var i, part, length = ary.length;
236-
for (i = 0; i < length; i++) {
235+
var i, part;
236+
for (i = 0; i < ary.length; i++) {
237237
part = ary[i];
238238
if (part === '.') {
239239
ary.splice(i, 1);
240240
i -= 1;
241241
} else if (part === '..') {
242-
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
243-
//End of the line. Keep at least one non-dot
244-
//path segment at the front so it can be mapped
245-
//correctly to disk. Otherwise, there is likely
246-
//no path mapping for a path starting with '..'.
247-
//This can still fail, but catches the most reasonable
248-
//uses of ..
249-
break;
242+
// If at the start, or previous value is still ..,
243+
// keep them so that when converted to a path it may
244+
// still work when converted to a path, even though
245+
// as an ID it is less than ideal. In larger point
246+
// releases, may be better to just kick out an error.
247+
if (i === 0 || (i == 1 && ary[2] === '..') || ary[i - 1] === '..') {
248+
continue;
250249
} else if (i > 0) {
251250
ary.splice(i - 1, 2);
252251
i -= 2;
@@ -267,43 +266,37 @@ var requirejs, require, define;
267266
*/
268267
function normalize(name, baseName, applyMap) {
269268
var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
270-
foundMap, foundI, foundStarMap, starI,
271-
baseParts = baseName && baseName.split('/'),
272-
normalizedBaseParts = baseParts,
269+
foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
270+
baseParts = (baseName && baseName.split('/')),
273271
map = config.map,
274272
starMap = map && map['*'];
275273

276274
//Adjust any relative paths.
277-
if (name && name.charAt(0) === '.') {
278-
//If have a base name, try to normalize against it,
279-
//otherwise, assume it is a top-level require that will
280-
//be relative to baseUrl in the end.
281-
if (baseName) {
275+
if (name) {
276+
name = name.split('/');
277+
lastIndex = name.length - 1;
278+
279+
// If wanting node ID compatibility, strip .js from end
280+
// of IDs. Have to do this here, and not in nameToUrl
281+
// because node allows either .js or non .js to map
282+
// to same file.
283+
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
284+
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
285+
}
286+
287+
// Starts with a '.' so need the baseName
288+
if (name[0].charAt(0) === '.' && baseParts) {
282289
//Convert baseName to array, and lop off the last part,
283290
//so that . matches that 'directory' and not name of the baseName's
284291
//module. For instance, baseName of 'one/two/three', maps to
285292
//'one/two/three.js', but we want the directory, 'one/two' for
286293
//this normalization.
287294
normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
288-
name = name.split('/');
289-
lastIndex = name.length - 1;
290-
291-
// If wanting node ID compatibility, strip .js from end
292-
// of IDs. Have to do this here, and not in nameToUrl
293-
// because node allows either .js or non .js to map
294-
// to same file.
295-
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
296-
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
297-
}
298-
299295
name = normalizedBaseParts.concat(name);
300-
trimDots(name);
301-
name = name.join('/');
302-
} else if (name.indexOf('./') === 0) {
303-
// No baseName, so this is ID is resolved relative
304-
// to baseUrl, pull off the leading dot.
305-
name = name.substring(2);
306296
}
297+
298+
trimDots(name);
299+
name = name.join('/');
307300
}
308301

309302
//Apply map config if available.
@@ -379,7 +372,13 @@ var requirejs, require, define;
379372
//retry
380373
pathConfig.shift();
381374
context.require.undef(id);
382-
context.require([id]);
375+
376+
//Custom require that does not do map translation, since
377+
//ID is "absolute", already mapped/resolved.
378+
context.makeRequire(null, {
379+
skipMap: true
380+
})([id]);
381+
383382
return true;
384383
}
385384
}
@@ -445,7 +444,16 @@ var requirejs, require, define;
445444
return normalize(name, parentName, applyMap);
446445
});
447446
} else {
448-
normalizedName = normalize(name, parentName, applyMap);
447+
// If nested plugin references, then do not try to
448+
// normalize, as it will not normalize correctly. This
449+
// places a restriction on resourceIds, and the longer
450+
// term solution is not to normalize until plugins are
451+
// loaded and all normalizations to allow for async
452+
// loading of a loader plugin. But for now, fixes the
453+
// common uses. Details in #1131
454+
normalizedName = name.indexOf('!') === -1 ?
455+
normalize(name, parentName, applyMap) :
456+
name;
449457
}
450458
} else {
451459
//A regular module.
@@ -567,7 +575,7 @@ var requirejs, require, define;
567575
mod.usingExports = true;
568576
if (mod.map.isDefine) {
569577
if (mod.exports) {
570-
return mod.exports;
578+
return (defined[mod.map.id] = mod.exports);
571579
} else {
572580
return (mod.exports = defined[mod.map.id] = {});
573581
}
@@ -583,7 +591,7 @@ var requirejs, require, define;
583591
config: function () {
584592
return getOwn(config.config, mod.map.id) || {};
585593
},
586-
exports: handlers.exports(mod)
594+
exports: mod.exports || (mod.exports = {})
587595
});
588596
}
589597
}
@@ -1502,7 +1510,7 @@ var requirejs, require, define;
15021510
/**
15031511
* Called to enable a module if it is still in the registry
15041512
* awaiting enablement. A second arg, parent, the parent module,
1505-
* is passed in for context, when this method is overriden by
1513+
* is passed in for context, when this method is overridden by
15061514
* the optimizer. Not shown here to keep code compact.
15071515
*/
15081516
enable: function (depMap) {

external/sinon/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(The BSD License)
22

3-
Copyright (c) 2010-2013, Christian Johansen, christian@cjohansen.no
3+
Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without modification,

external/sinon/fake_timers.js

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ if (typeof sinon == "undefined") {
2424
}
2525

2626
(function (global) {
27+
// node expects setTimeout/setInterval to return a fn object w/ .ref()/.unref()
28+
// browsers, a number.
29+
// see https://github.com/cjohansen/Sinon.JS/pull/436
30+
var timeoutResult = setTimeout(function() {}, 0);
31+
var addTimerReturnsObject = typeof timeoutResult === 'object';
32+
clearTimeout(timeoutResult);
33+
2734
var id = 1;
2835

2936
function addTimer(args, recurring) {
@@ -53,7 +60,16 @@ if (typeof sinon == "undefined") {
5360
this.timeouts[toId].interval = delay;
5461
}
5562

56-
return toId;
63+
if (addTimerReturnsObject) {
64+
return {
65+
id: toId,
66+
ref: function() {},
67+
unref: function() {}
68+
};
69+
}
70+
else {
71+
return toId;
72+
}
5773
}
5874

5975
function parseTime(str) {
@@ -119,10 +135,18 @@ if (typeof sinon == "undefined") {
119135
},
120136

121137
clearTimeout: function clearTimeout(timerId) {
138+
if (!timerId) {
139+
// null appears to be allowed in most browsers, and appears to be relied upon by some libraries, like Bootstrap carousel
140+
return;
141+
}
122142
if (!this.timeouts) {
123143
this.timeouts = [];
124144
}
125-
145+
// in Node, timerId is an object with .ref()/.unref(), and
146+
// its .id field is the actual timer id.
147+
if (typeof timerId === 'object') {
148+
timerId = timerId.id
149+
}
126150
if (timerId in this.timeouts) {
127151
delete this.timeouts[timerId];
128152
}

external/sizzle/dist/sizzle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*!
2-
* Sizzle CSS Selector Engine v1.11.1
2+
* Sizzle CSS Selector Engine v2.0.0
33
* http://sizzlejs.com/
44
*
5-
* Copyright 2013 jQuery Foundation, Inc. and other contributors
5+
* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
66
* Released under the MIT license
77
* http://jquery.org/license
88
*
9-
* Date: 2014-06-25
9+
* Date: 2014-07-01
1010
*/
1111
(function( window ) {
1212

0 commit comments

Comments
 (0)