Comparing version 1.9.9 to 1.9.10
@@ -10,2 +10,23 @@ exports.config = function(config){ | ||
deps.push(arg[1]); | ||
}else if(arg[0] == "mapPackage") { | ||
var parts = arg[1].split(":"), | ||
name = parts[0], | ||
location=parts[1], | ||
isPrexisting = false; | ||
for (var j = 0; j < config.packages.length; j++) { | ||
var pkg = config.packages[j]; | ||
if (pkg.name === name) { | ||
pkg.location = location; | ||
isPrexisting = true; | ||
break; | ||
} | ||
} | ||
if (!isPrexisting) { | ||
config.packages.push({ | ||
name: name, | ||
location: location | ||
}); | ||
} | ||
}else{ | ||
@@ -12,0 +33,0 @@ args.push(arg); |
@@ -26,2 +26,23 @@ function rhinoDojoConfig(config, baseUrl, rhinoArgs){ | ||
deps.push(arg[1]); | ||
}else if(arg[0] == "mapPackage") { | ||
var parts = arg[1].split(":"), | ||
name = parts[0], | ||
location=parts[1], | ||
isPrexisting = false; | ||
for (var j = 0; j < config.packages.length; j++) { | ||
var pkg = config.packages[j]; | ||
if (pkg.name === name) { | ||
pkg.location = location; | ||
isPrexisting = true; | ||
break; | ||
} | ||
} | ||
if (!isPrexisting) { | ||
config.packages.push({ | ||
name: name, | ||
location: location | ||
}); | ||
} | ||
} | ||
@@ -28,0 +49,0 @@ } |
@@ -797,2 +797,6 @@ define(["./kernel", "../has", "./lang"], function(dojo, has, lang){ | ||
if(superclass && superclass.prototype && superclass.prototype["-chains-"]) { | ||
chains = mix(chains || {}, superclass.prototype["-chains-"]); | ||
} | ||
// build ctor | ||
@@ -799,0 +803,0 @@ t = !chains || !chains.hasOwnProperty(cname); |
@@ -83,3 +83,3 @@ define(["../has", "./config", "require", "module"], function(has, config, require, module){ | ||
var rev = "$Rev: c8c1f6a $".match(/[0-9a-f]{7,}/); | ||
var rev = "$Rev: b073106 $".match(/[0-9a-f]{7,}/); | ||
dojo.version = { | ||
@@ -97,3 +97,3 @@ // summary: | ||
major: 1, minor: 9, patch: 9, flag: "", | ||
major: 1, minor: 9, patch: 10, flag: "", | ||
revision: rev ? rev[0] : NaN, | ||
@@ -100,0 +100,0 @@ toString: function(){ |
@@ -523,2 +523,3 @@ define([ | ||
var widthList = ['abbr', 'wide', 'narrow']; | ||
function _buildDateTimeRE(tokens, bundle, options, pattern){ | ||
@@ -545,3 +546,17 @@ pattern = regexp.escapeString(pattern); | ||
case 'L': | ||
s = (l>2) ? '\\S+?' : '1[0-2]|'+p2+'[1-9]'; | ||
if(l>2){ | ||
var months = bundle[ | ||
'months-' + | ||
(c == 'L' ? 'standAlone' : 'format') + | ||
'-' + widthList[l-3] | ||
].slice(0); | ||
s = months.join('|'); | ||
if(!options.strict){ | ||
s = s.replace(/\./g, ''); | ||
//Tolerate abbreviating period in month part | ||
s = '(?:' + s + ')\\.?'; | ||
} | ||
}else{ | ||
s = '1[0-2]|'+p2+'[1-9]'; | ||
} | ||
break; | ||
@@ -548,0 +563,0 @@ case 'D': |
@@ -86,6 +86,5 @@ define(["../_base/lang", "../sniff", "../_base/window", "../dom-geometry", "../dom-style", "../window"], | ||
var s = domStyle.getComputedStyle(n), | ||
overflow = (s.overflow.toLowerCase() in exports._validOverflow), | ||
overflowX = (s.overflowX.toLowerCase() in exports._validOverflow), | ||
overflowY = (s.overflowY.toLowerCase() in exports._validOverflow); | ||
if(overflow || overflowX || overflowY){ | ||
if(overflowX || overflowY){ | ||
b = domGeom.getContentBox(n, s); | ||
@@ -95,3 +94,3 @@ t = domGeom.position(n, true); | ||
// overflow-x | ||
if(overflow || overflowX){ | ||
if(overflowX){ | ||
w = Math.min(exports.H_TRIGGER_AUTOSCROLL, b.w / 2); | ||
@@ -117,3 +116,3 @@ rx = e.pageX - t.x; | ||
// overflow-y | ||
if(overflow || overflowY){ | ||
if(overflowY){ | ||
//console.log(b.l, b.t, t.x, t.y, n.scrollLeft, n.scrollTop); | ||
@@ -120,0 +119,0 @@ h = Math.min(exports.V_TRIGGER_AUTOSCROLL, b.h / 2); |
@@ -25,4 +25,4 @@ define([ | ||
// avatar's offset from the mouse | ||
OFFSET_X: has("touch") ? 0 : 16, | ||
OFFSET_Y: has("touch") ? -64 : 16, | ||
OFFSET_X: has("touch") ? 4 : 16, | ||
OFFSET_Y: has("touch") ? 4 : 16, | ||
@@ -29,0 +29,0 @@ // methods |
123
i18n.js
@@ -245,5 +245,20 @@ define(["./_base/kernel", "require", "./has", "./_base/array", "./_base/config", "./_base/lang", "./has!host-browser?./_base/xhr", "./json", "module"], | ||
var match = nlsRe.exec(id), | ||
bundlePath = match[1] + "/", | ||
bundleName = match[5] || match[4], | ||
bundlePathAndName = bundlePath + bundleName, | ||
localeSpecified = (match[5] && match[4]), | ||
targetLocale = localeSpecified || dojo.locale || "", | ||
loadTarget = bundlePathAndName + "/" + targetLocale, | ||
loadList = localeSpecified ? [targetLocale] : getLocalesToLoad(targetLocale), | ||
remaining = loadList.length, | ||
finish = function(){ | ||
if(!--remaining){ | ||
load(lang.delegate(cache[loadTarget])); | ||
} | ||
}, | ||
split = id.split("*"), | ||
preloadDemand = split[1] == "preload"; | ||
if(has("dojo-preload-i18n-Api")){ | ||
var split = id.split("*"), | ||
preloadDemand = split[1] == "preload"; | ||
if(preloadDemand){ | ||
@@ -259,21 +274,19 @@ if(!cache[id]){ | ||
} | ||
if(preloadDemand || waitForPreloads(id, require, load)){ | ||
if(preloadDemand || (waitForPreloads(id, require, load) && !cache[loadTarget])){ | ||
return; | ||
} | ||
} | ||
else if (preloadDemand) { | ||
// If a build is created with nls resources and 'dojo-preload-i18n-Api' has not been set to false, | ||
// the built file will include a preload in the cache (which looks about like so:) | ||
// '*now':function(r){r(['dojo/i18n!*preload*dojo/nls/dojo*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]']);} | ||
// If the consumer of the build sets 'dojo-preload-i18n-Api' to false in the Dojo config, the cached | ||
// preload will not be parsed and will result in an attempt to call 'require' passing it the unparsed | ||
// preload, which is not a valid module id. | ||
// In this case we should skip this request. | ||
load(1); | ||
var match = nlsRe.exec(id), | ||
bundlePath = match[1] + "/", | ||
bundleName = match[5] || match[4], | ||
bundlePathAndName = bundlePath + bundleName, | ||
localeSpecified = (match[5] && match[4]), | ||
targetLocale = localeSpecified || dojo.locale || "", | ||
loadTarget = bundlePathAndName + "/" + targetLocale, | ||
loadList = localeSpecified ? [targetLocale] : getLocalesToLoad(targetLocale), | ||
remaining = loadList.length, | ||
finish = function(){ | ||
if(!--remaining){ | ||
load(lang.delegate(cache[loadTarget])); | ||
} | ||
}; | ||
return; | ||
} | ||
array.forEach(loadList, function(locale){ | ||
@@ -473,47 +486,49 @@ var target = bundlePathAndName + "/" + locale; | ||
var amdValue = {}, | ||
evalBundle = | ||
// use the function ctor to keep the minifiers away (also come close to global scope, but this is secondary) | ||
new Function( | ||
"__bundle", // the bundle to evalutate | ||
"__checkForLegacyModules", // a function that checks if __bundle defined __mid in the global space | ||
"__mid", // the mid that __bundle is intended to define | ||
"__amdValue", | ||
evalBundle, | ||
// returns one of: | ||
// 1 => the bundle was an AMD bundle | ||
// a legacy bundle object that is the value of __mid | ||
// instance of Error => could not figure out how to evaluate bundle | ||
syncRequire = function(deps, callback, require){ | ||
var results = []; | ||
array.forEach(deps, function(mid){ | ||
var url = require.toUrl(mid + ".js"); | ||
// used to detect when __bundle calls define | ||
"var define = function(mid, factory){define.called = 1; __amdValue.result = factory || mid;}," | ||
+ " require = function(){define.called = 1;};" | ||
function load(text){ | ||
if (!evalBundle) { | ||
// use the function ctor to keep the minifiers away (also come close to global scope, but this is secondary) | ||
evalBundle = new Function( | ||
"__bundle", // the bundle to evalutate | ||
"__checkForLegacyModules", // a function that checks if __bundle defined __mid in the global space | ||
"__mid", // the mid that __bundle is intended to define | ||
"__amdValue", | ||
+ "try{" | ||
+ "define.called = 0;" | ||
+ "eval(__bundle);" | ||
+ "if(define.called==1)" | ||
// bundle called define; therefore signal it's an AMD bundle | ||
+ "return __amdValue;" | ||
// returns one of: | ||
// 1 => the bundle was an AMD bundle | ||
// a legacy bundle object that is the value of __mid | ||
// instance of Error => could not figure out how to evaluate bundle | ||
+ "if((__checkForLegacyModules = __checkForLegacyModules(__mid)))" | ||
// bundle was probably a v1.6- built NLS flattened NLS bundle that defined __mid in the global space | ||
+ "return __checkForLegacyModules;" | ||
// used to detect when __bundle calls define | ||
"var define = function(mid, factory){define.called = 1; __amdValue.result = factory || mid;}," | ||
+ " require = function(){define.called = 1;};" | ||
+ "}catch(e){}" | ||
// evaulating the bundle was *neither* an AMD *nor* a legacy flattened bundle | ||
// either way, re-eval *after* surrounding with parentheses | ||
+ "try{" | ||
+ "define.called = 0;" | ||
+ "eval(__bundle);" | ||
+ "if(define.called==1)" | ||
// bundle called define; therefore signal it's an AMD bundle | ||
+ "return __amdValue;" | ||
+ "try{" | ||
+ "return eval('('+__bundle+')');" | ||
+ "}catch(e){" | ||
+ "return e;" | ||
+ "}" | ||
), | ||
+ "if((__checkForLegacyModules = __checkForLegacyModules(__mid)))" | ||
// bundle was probably a v1.6- built NLS flattened NLS bundle that defined __mid in the global space | ||
+ "return __checkForLegacyModules;" | ||
syncRequire = function(deps, callback, require){ | ||
var results = []; | ||
array.forEach(deps, function(mid){ | ||
var url = require.toUrl(mid + ".js"); | ||
+ "}catch(e){}" | ||
// evaulating the bundle was *neither* an AMD *nor* a legacy flattened bundle | ||
// either way, re-eval *after* surrounding with parentheses | ||
function load(text){ | ||
+ "try{" | ||
+ "return eval('('+__bundle+')');" | ||
+ "}catch(e){" | ||
+ "return e;" | ||
+ "}" | ||
); | ||
} | ||
var result = evalBundle(text, checkForLegacyModules, mid, amdValue); | ||
@@ -520,0 +535,0 @@ if(result===amdValue){ |
@@ -251,3 +251,3 @@ define([/*===== "./_base/declare", =====*/ "./_base/lang", "./i18n", "./i18n!./cldr/nls/number", "./string", "./regexp"], | ||
groupSize = groupSize2; | ||
delete groupSize2; | ||
groupSize2 = undefined; | ||
} | ||
@@ -254,0 +254,0 @@ } |
{ | ||
"name": "dojo", | ||
"version":"1.9.9", | ||
"version": "1.9.10", | ||
"directories": { | ||
@@ -5,0 +5,0 @@ "lib": "." |
@@ -170,3 +170,4 @@ define([ | ||
var data = options.data, | ||
// IE11 treats data: undefined different than other browsers | ||
var data = typeof(options.data) === 'undefined' ? null : options.data, | ||
async = !options.sync, | ||
@@ -173,0 +174,0 @@ method = options.method; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
3875501
107897
70