Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dojo

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dojo - npm Package Compare versions

Comparing version 1.9.2 to 1.9.3

nls/id/colors.js

4

_base/kernel.js

@@ -82,3 +82,3 @@ define(["../has", "./config", "require", "module"], function(has, config, require, module){

var rev = "$Rev: f774568 $".match(/[0-9a-f]{7,}/);
var rev = "$Rev: fd52c96 $".match(/[0-9a-f]{7,}/);
dojo.version = {

@@ -96,3 +96,3 @@ // summary:

major: 1, minor: 9, patch: 2, flag: "",
major: 1, minor: 9, patch: 3, flag: "",
revision: rev ? rev[0] : NaN,

@@ -99,0 +99,0 @@ toString: function(){

@@ -93,2 +93,4 @@ define(["require", "module"], function(require, module){

has.add("host-browser", isBrowser);
has.add("host-node", (typeof process == "object" && process.versions && process.versions.node && process.versions.v8));
has.add("host-rhino", (typeof load == "function" && (typeof Packages == "function" || typeof Packages == "object")));
has.add("dom", isBrowser);

@@ -95,0 +97,0 @@ has.add("dojo-dom-ready-api", 1);

@@ -346,23 +346,106 @@ define(["./_base/kernel", "require", "./has", "./_base/array", "./_base/config", "./_base/lang", "./has!host-browser?./_base/xhr", "./json", "module"],

function preload(locale){
locale = normalizeLocale(locale);
forEachLocale(locale, function(loc){
if(array.indexOf(localesGenerated, loc)>=0){
var mid = bundlePrefix.replace(/\./g, "/")+"_"+loc;
preloading++;
doRequire(mid, function(rollup){
for(var p in rollup){
cache[require.toAbsMid(p) + "/" + loc] = rollup[p];
}
--preloading;
while(!preloading && preloadWaitQueue.length){
load.apply(null, preloadWaitQueue.shift());
}
});
return true;
function preloadingAddLock(){
preloading++;
}
function preloadingRelLock(){
--preloading;
while(!preloading && preloadWaitQueue.length){
load.apply(null, preloadWaitQueue.shift());
}
return false;
});
}
}
function cacheId(path, name, loc, require){
// path is assumed to have a trailing "/"
return require.toAbsMid(path + name + "/" + loc)
}
function preload(locale){
locale = normalizeLocale(locale);
forEachLocale(locale, function(loc){
if(array.indexOf(localesGenerated, loc) >= 0){
var mid = bundlePrefix.replace(/\./g, "/") + "_" + loc;
preloadingAddLock();
doRequire(mid, function(rollup){
for(var p in rollup){
var bundle = rollup[p],
match = p.match(/(.+)\/([^\/]+)$/),
bundleName, bundlePath;
// If there is no match, the bundle is not a regular bundle from an AMD layer.
if (!match){continue;}
bundleName = match[2];
bundlePath = match[1] + "/";
// backcompat
bundle._localized = bundle._localized || {};
var localized;
if(loc === "ROOT"){
var root = localized = bundle._localized;
delete bundle._localized;
root.root = bundle;
cache[require.toAbsMid(p)] = root;
}else{
localized = bundle._localized;
cache[cacheId(bundlePath, bundleName, loc, require)] = bundle;
}
if(loc !== locale){
// capture some locale variables
function improveBundle(bundlePath, bundleName, bundle, localized){
// locale was not flattened and we've fallen back to a less-specific locale that was flattened
// for example, we had a flattened 'fr', a 'fr-ca' is available for at least this bundle, and
// locale==='fr-ca'; therefore, we must improve the bundle as retrieved from the rollup by
// manually loading the fr-ca version of the bundle and mixing this into the already-retrieved 'fr'
// version of the bundle.
//
// Remember, different bundles may have different sets of locales available.
//
// we are really falling back on the regular algorithm here, but--hopefully--starting with most
// of the required bundles already on board as given by the rollup and we need to "manually" load
// only one locale from a few bundles...or even better...we won't find anything better to load.
// This algorithm ensures there is nothing better to load even when we can only load a less-specific rollup.
//
// note: this feature is only available in async mode
// inspect the loaded bundle that came from the rollup to see if something better is available
// for any bundle in a rollup, more-specific available locales are given at localized.
var requiredBundles = [],
cacheIds = [];
forEachLocale(locale, function(loc){
if(localized[loc]){
requiredBundles.push(require.toAbsMid(bundlePath + loc + "/" + bundleName));
cacheIds.push(cacheId(bundlePath, bundleName, loc, require));
}
});
if(requiredBundles.length){
preloadingAddLock();
contextRequire(requiredBundles, function(){
for(var i = 0; i < requiredBundles.length; i++){
bundle = lang.mixin(lang.clone(bundle), arguments[i]);
cache[cacheIds[i]] = bundle;
}
// this is the best possible (maybe a perfect match, maybe not), accept it
cache[cacheId(bundlePath, bundleName, locale, require)] = lang.clone(bundle);
preloadingRelLock();
});
}else{
// this is the best possible (definitely not a perfect match), accept it
cache[cacheId(bundlePath, bundleName, locale, require)] = bundle;
}
}
improveBundle(bundlePath, bundleName, bundle, localized);
}
}
preloadingRelLock();
});
return true;
}
return false;
});
}
preload();

@@ -369,0 +452,0 @@ array.forEach(dojo.config.extraLocale, preload);

@@ -179,2 +179,3 @@ define({ root:

"it": true,
"id": true,
"hu": true,

@@ -181,0 +182,0 @@ "hr": true,

@@ -10,22 +10,3 @@ define(["./has!dom-addeventlistener?:./aspect", "./_base/kernel", "./sniff"], function(aspect, dojo, has){

has.add("event-focusin", function(global, doc, element){
return 'onfocusin' in element || (element.addEventListener && (function () {
var hasFocusInEvent = false;
function testFocus() {
hasFocusInEvent = true;
}
try {
var element = doc.createElement('input'),
activeElement = doc.activeElement;
element.style.position = 'fixed';
element.addEventListener('focusin', testFocus, false);
doc.body.appendChild(element);
element.focus();
doc.body.removeChild(element);
element.removeEventListener('focusin', testFocus, false);
activeElement.focus();
} catch (e) {}
return hasFocusInEvent;
})());
return 'onfocusin' in element;
});

@@ -333,3 +314,4 @@ }

// easy to have events look like the ones created with specific initializers
var nativeEvent = target.ownerDocument.createEvent("HTMLEvents");
var ownerDocument = target.ownerDocument || document;
var nativeEvent = ownerDocument.createEvent("HTMLEvents");
nativeEvent.initEvent(type, !!event.bubbles, !!event.cancelable);

@@ -336,0 +318,0 @@ // and copy all our properties over

{
"name": "dojo",
"version":"1.9.2",
"version":"1.9.3",
"directories": {

@@ -5,0 +5,0 @@ "lib": "."

@@ -223,3 +223,5 @@ define([

destroy: function(){
this._hashchangeHandle.remove();
if(this._hashchangeHandle){
this._hashchangeHandle.remove();
}
this._routes = null;

@@ -226,0 +228,0 @@ this._routeIndex = null;

@@ -33,21 +33,29 @@ define(["../../_base/array", "../../_base/lang", "../../when"

}
var isPromise = !!results.then;
// if it is a promise it may be frozen
if(results.then){
if(isPromise){
results = lang.delegate(results);
}
function addIterativeMethod(method){
if(!results[method]){
results[method] = function(){
var args = arguments;
return when(results, function(results){
Array.prototype.unshift.call(args, results);
return QueryResults(array[method].apply(array, args));
});
};
}
// Always add the iterative methods so a QueryResults is
// returned whether the environment is ES3 or ES5
results[method] = function(){
var args = arguments;
var result = when(results, function(results){
Array.prototype.unshift.call(args, results);
return QueryResults(array[method].apply(array, args));
});
// forEach should only return the result of when()
// when we're wrapping a promise
if(method !== "forEach" || isPromise){
return result;
}
};
}
addIterativeMethod("forEach");
addIterativeMethod("filter");
addIterativeMethod("map");
if(!results.total){
if(results.total == null){
results.total = when(results, function(results){

@@ -54,0 +62,0 @@ return results.length;

@@ -7,2 +7,5 @@ define([

var testParams = [
"sync,,src,./dojo,src,./i18n-test,legacy",
"sync,,src,./dojo,legacy-built,./built-i18n-test/152-build,legacy",
"sync,,src,./dojo,legacy-built-layer,./built-i18n-test/152-build-with-layers-and-preloads,legacy",
"sync,,src,./dojo,src,./i18n-test,amd",

@@ -20,2 +23,6 @@ "sync,,src,./dojo,built,./built-i18n-test/built/i18nTest,amd",

"sync,,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"sync,ab,src,./dojo,src,./i18n-test,legacy",
"sync,ab,src,./dojo,legacy-built,./built-i18n-test/152-build,legacy",
"sync,ab,src,./dojo,legacy-built-layer,./built-i18n-test/152-build-with-layers-and-preloads,legacy",
"sync,ab,src,./dojo,src,./i18n-test,amd",

@@ -33,2 +40,6 @@ "sync,ab,src,./dojo,built,./built-i18n-test/built/i18nTest,amd",

"sync,ab,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"sync,ab-cd,src,./dojo,src,./i18n-test,legacy",
"sync,ab-cd,src,./dojo,legacy-built,./built-i18n-test/152-build,legacy",
"sync,ab-cd,src,./dojo,legacy-built-layer,./built-i18n-test/152-build-with-layers-and-preloads,legacy",
"sync,ab-cd,src,./dojo,src,./i18n-test,amd",

@@ -46,2 +57,6 @@ "sync,ab-cd,src,./dojo,built,./built-i18n-test/built/i18nTest,amd",

"sync,ab-cd,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"sync,ab-cd-ef,src,./dojo,src,./i18n-test,legacy",
"sync,ab-cd-ef,src,./dojo,legacy-built,./built-i18n-test/152-build,legacy",
"sync,ab-cd-ef,src,./dojo,legacy-built-layer,./built-i18n-test/152-build-with-layers-and-preloads,legacy",
"sync,ab-cd-ef,src,./dojo,src,./i18n-test,amd",

@@ -71,2 +86,3 @@ "sync,ab-cd-ef,src,./dojo,built,./built-i18n-test/built/i18nTest,amd",

"async,,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"async,ab,src,./dojo,src,./i18n-test,amd",

@@ -84,2 +100,3 @@ "async,ab,src,./dojo,built,./built-i18n-test/built/i18nTest,amd",

"async,ab,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"async,ab-cd,src,./dojo,src,./i18n-test,amd",

@@ -97,2 +114,3 @@ "async,ab-cd,src,./dojo,built,./built-i18n-test/built/i18nTest,amd",

"async,ab-cd,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"async,ab-cd-ef,src,./dojo,src,./i18n-test,amd",

@@ -99,0 +117,0 @@ "async,ab-cd-ef,src,./dojo,built,./built-i18n-test/built/i18nTest,amd",

@@ -155,2 +155,14 @@ define([

// make sure 'document' and 'window' can also emit events
var eventEmitted;
var globalObjects = [document, window];
for(var i = 0, len = globalObjects.length; i < len; i++) {
eventEmitted = false;
on(globalObjects[i], 'custom-test-event', function () {
eventEmitted = true;
});
on.emit(globalObjects[i], 'custom-test-event', {});
t.is(true, eventEmitted);
}
// test out event delegation

@@ -157,0 +169,0 @@ if(query){

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc