Skip to content

Commit

Permalink
javascript: dependencies update
Browse files Browse the repository at this point in the history
Update dependencies to latest versions (except marklogic client, to be
addressed separately).

Fix scss bug revealed by newer SASS compiler, include updated static
built files for CSS and browserified module.

By updating phantomjs, seems to address the Mac problem of requiring reinstall of PhantomJS (675)

TODO: fix e2e testing.

Closes marklogic-community#675
  • Loading branch information
laurelnaiad committed Jun 26, 2015
1 parent d4166b5 commit fd5a892
Show file tree
Hide file tree
Showing 5 changed files with 1,609 additions and 508 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,20 @@ define([], function () {

},{"jsonschema":9}],2:[function(require,module,exports){
(function (global){
/*! http://mths.be/punycode v1.2.4 by @mathias */
/*! https://mths.be/punycode v1.3.2 by @mathias */
;(function(root) {

/** Detect free variables */
var freeExports = typeof exports == 'object' && exports;
var freeExports = typeof exports == 'object' && exports &&
!exports.nodeType && exports;
var freeModule = typeof module == 'object' && module &&
module.exports == freeExports && module;
!module.nodeType && module;
var freeGlobal = typeof global == 'object' && global;
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
if (
freeGlobal.global === freeGlobal ||
freeGlobal.window === freeGlobal ||
freeGlobal.self === freeGlobal
) {
root = freeGlobal;
}

Expand All @@ -60,8 +65,8 @@ define([], function () {

/** Regular expressions */
regexPunycode = /^xn--/,
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators

/** Error messages */
errors = {
Expand Down Expand Up @@ -100,23 +105,37 @@ define([], function () {
*/
function map(array, fn) {
var length = array.length;
var result = [];
while (length--) {
array[length] = fn(array[length]);
result[length] = fn(array[length]);
}
return array;
return result;
}

/**
* A simple `Array#map`-like wrapper to work with domain name strings.
* A simple `Array#map`-like wrapper to work with domain name strings or email
* addresses.
* @private
* @param {String} domain The domain name.
* @param {String} domain The domain name or email address.
* @param {Function} callback The function that gets called for every
* character.
* @returns {Array} A new string of characters returned by the callback
* function.
*/
function mapDomain(string, fn) {
return map(string.split(regexSeparators), fn).join('.');
var parts = string.split('@');
var result = '';
if (parts.length > 1) {
// In email addresses, only the domain name should be punycoded. Leave
// the local part (i.e. everything up to `@`) intact.
result = parts[0] + '@';
string = parts[1];
}
// Avoid `split(regex)` for IE8 compatibility. See #17.
string = string.replace(regexSeparators, '\x2E');
var labels = string.split('.');
var encoded = map(labels, fn).join('.');
return result + encoded;
}

/**
Expand All @@ -126,7 +145,7 @@ define([], function () {
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see <http://mathiasbynens.be/notes/javascript-encoding>
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
Expand Down Expand Up @@ -335,8 +354,8 @@ define([], function () {
}

/**
* Converts a string of Unicode symbols to a Punycode string of ASCII-only
* symbols.
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
* @memberOf punycode
* @param {String} input The string of Unicode symbols.
* @returns {String} The resulting Punycode string of ASCII-only symbols.
Expand Down Expand Up @@ -449,33 +468,37 @@ define([], function () {
}

/**
* Converts a Punycode string representing a domain name to Unicode. Only the
* Punycoded parts of the domain name will be converted, i.e. it doesn't
* matter if you call it on a string that has already been converted to
* Unicode.
* Converts a Punycode string representing a domain name or an email address
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
* it doesn't matter if you call it on a string that has already been
* converted to Unicode.
* @memberOf punycode
* @param {String} domain The Punycode domain name to convert to Unicode.
* @param {String} input The Punycoded domain name or email address to
* convert to Unicode.
* @returns {String} The Unicode representation of the given Punycode
* string.
*/
function toUnicode(domain) {
return mapDomain(domain, function(string) {
function toUnicode(input) {
return mapDomain(input, function(string) {
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
: string;
});
}

/**
* Converts a Unicode string representing a domain name to Punycode. Only the
* non-ASCII parts of the domain name will be converted, i.e. it doesn't
* matter if you call it with a domain that's already in ASCII.
* Converts a Unicode string representing a domain name or an email address to
* Punycode. Only the non-ASCII parts of the domain name will be converted,
* i.e. it doesn't matter if you call it with a domain that's already in
* ASCII.
* @memberOf punycode
* @param {String} domain The domain name to convert, as a Unicode string.
* @returns {String} The Punycode representation of the given domain name.
* @param {String} input The domain name or email address to convert, as a
* Unicode string.
* @returns {String} The Punycode representation of the given domain name or
* email address.
*/
function toASCII(domain) {
return mapDomain(domain, function(string) {
function toASCII(input) {
return mapDomain(input, function(string) {
return regexNonASCII.test(string)
? 'xn--' + encode(string)
: string;
Expand All @@ -491,11 +514,11 @@ define([], function () {
* @memberOf punycode
* @type String
*/
'version': '1.2.4',
'version': '1.3.2',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to Unicode code points, and back.
* @see <http://mathiasbynens.be/notes/javascript-encoding>
* @see <https://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode
* @type Object
*/
Expand All @@ -520,8 +543,8 @@ define([], function () {
define('punycode', function() {
return punycode;
});
} else if (freeExports && !freeExports.nodeType) {
if (freeModule) { // in Node.js or RingoJS v0.8.0+
} else if (freeExports && freeModule) {
if (module.exports == freeExports) { // in Node.js or RingoJS v0.8.0+
freeModule.exports = punycode;
} else { // in Narwhal or RingoJS v0.7.0-
for (key in punycode) {
Expand Down
Loading

0 comments on commit fd5a892

Please sign in to comment.