Socket
Socket
Sign inDemoInstall

dojo

Package Overview
Dependencies
Maintainers
3
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.13.0 to 1.14.0-pre

tests/changes.diff

8

_base/Color.js

@@ -148,6 +148,6 @@ define(["./kernel", "./lang", "./array", "./config"], function(dojo, lang, ArrayUtil, config){

var t = obj || new Color();
ArrayUtil.forEach(["r", "g", "b", "a"], function(x){
t[x] = start[x] + (end[x] - start[x]) * weight;
if(x != "a"){ t[x] = Math.round(t[x]); }
});
t.r = Math.round(start.r + (end.r - start.r) * weight);
t.g = Math.round(start.g + (end.g - start.g) * weight);
t.b = Math.round(start.b + (end.b - start.b) * weight);
t.a = start.a + (end.a - start.a) * weight;
return t.sanitize(); // Color

@@ -154,0 +154,0 @@ };

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

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

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

major: 1, minor: 13, patch: 0, flag: "",
major: 1, minor: 14, patch: 0, flag: "-pre",
revision: rev ? rev[0] : NaN,

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

@@ -321,15 +321,7 @@ define(["./kernel", "../has", "require", "module", "../json", "./lang", "./array"], function(dojo, has, require, thisModule, json, lang, array) {

// the following regex is taken from 1.6. It is a very poor technique to remove comments and
// will fail in some cases; for example, consider the code...
// The following regex matches all comments and strings, with the strings in the capturing group.
// Replacing all matches with "$1" will remove comments and keep strings.
//
// var message = "Category-1 */* Category-2";
//
// The regex that follows will see a /* comment and trash the code accordingly. In fact, there are all
// kinds of cases like this with strings and regexs that will cause this design to fail miserably.
//
// Alternative regex designs exist that will result in less-likely failures, but will still fail in many cases.
// The only solution guaranteed 100% correct is to parse the code and that seems overkill for this
// backcompat/unbuilt-xdomain layer. In the end, since it's been this way for a while, we won't change it.
// See the opening paragraphs of Chapter 7 or ECME-262 which describes the lexical abiguity further.
removeCommentRe = /(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,
// It accounts for single quotes, double quotes, backslashes (line continuations and escaped characters), and template strings.
removeCommentRe = /\/\/.*|\/\*[\s\S]*?\*\/|("(?:\\.|[^"])*"|'(?:\\.|[^'])*'|`(?:\\.|[^`])*`)/mg,

@@ -364,8 +356,3 @@ syncLoaderApiRe = /(^|\s)dojo\.(loadInit|require|provide|requireLocalization|requireIf|requireAfterIf|platformRequire)\s*\(/mg,

// noCommentText may be provided by a build app with comments extracted by a better method than regex (hopefully)
noCommentText = noCommentText || text.replace(removeCommentRe, function(match){
// remove iff the detected comment has text that looks like a sync loader API application; this helps by
// removing as little as possible, minimizing the changes the janky regex will kill the module
syncLoaderApiRe.lastIndex = amdLoaderApiRe.lastIndex = 0;
return (syncLoaderApiRe.test(match) || amdLoaderApiRe.test(match)) ? "" : match;
});
noCommentText = noCommentText || text.replace(removeCommentRe, "$1");

@@ -372,0 +359,0 @@ // find and extract all dojo.loadInit applications

@@ -342,16 +342,16 @@ define([

// set up the query params
var miArgs = [{}];
var miArgs = {};
if(formObject){
// potentially over-ride url-provided params w/ form values
miArgs.push(formObject);
lang.mixin(miArgs, formObject);
}
if(args.content){
// stuff in content over-rides what's set by form
miArgs.push(args.content);
lang.mixin(miArgs, args.content);
}
if(args.preventCache){
miArgs.push({"dojo.preventCache": new Date().valueOf()});
miArgs["dojo.preventCache"] = new Date().valueOf();
}
ioArgs.query = ioq.objectToQuery(lang.mixin.apply(null, miArgs));
ioArgs.query = ioq.objectToQuery(miArgs);

@@ -358,0 +358,0 @@ // .. and the real work of getting the deferred in order, etc.

@@ -290,3 +290,3 @@ define(

"field-mon-relative+1": "来週の月曜日",
"dateFormat-short": "y/MM/dd",
"dateFormat-short": "y年M月d日",
"dateFormatItem-EHms": "H:mm:ss (E)",

@@ -304,3 +304,3 @@ "dateFormatItem-Ehms": "aK:mm:ss (E)",

"field-week": "週",
"dateFormat-medium": "y/MM/dd",
"dateFormat-medium": "y年M月d日",
"field-year-relative+0": "今年",

@@ -319,2 +319,2 @@ "field-week-relative+-1": "先週",

//end v1.x content
);
);

@@ -1,4 +0,4 @@

define(["../_base/lang", "../Evented", "../_base/declare", "../_base/Deferred", "../_base/array",
"../_base/connect", "../regexp"
], function(lang, Evented, declare, Deferred, array, connect, regexp){
define(["../_base/lang", "../Evented", "../_base/declare", "../_base/Deferred",
"../promise/all", "../_base/array", "../_base/connect", "../regexp"
], function(lang, Evented, declare, Deferred, all, array, connect, regexp){

@@ -9,3 +9,3 @@ // module:

function convertRegex(character){
return character == '*' ? '.*' : character == '?' ? '.' : character;
return character == '*' ? '.*' : character == '?' ? '.' : character;
}

@@ -25,7 +25,7 @@ return declare("dojo.data.ObjectStore", [Evented],{

// The object store to use as the source provider for this data store
this._dirtyObjects = [];
if(options.labelAttribute){
// accept the old labelAttribute to make it easier to switch from old data stores
options.labelProperty = options.labelAttribute;
options.labelProperty = options.labelAttribute;
}

@@ -308,3 +308,3 @@ lang.mixin(this, options);

// See dojo/data/api/Write.newItem()
if(parentInfo){

@@ -338,3 +338,3 @@ // get the previous value or any empty array

// See dojo/data/api/Write.setValue()
var old = item[attribute];

@@ -375,6 +375,6 @@ this.changing(item);

// object: Object
// Indicates that the given object is changing and should be marked as
// Indicates that the given object is changing and should be marked as
// dirty for the next save
// _deleting: [private] Boolean
object.__isDirty = true;

@@ -442,4 +442,5 @@ //if an object is already in the list of dirty objects, don't add it again

});
var transaction;
if(this.objectStore.transaction){
var transaction = this.objectStore.transaction();
transaction = this.objectStore.transaction();
}

@@ -453,25 +454,26 @@ for(var i = 0; i < dirtyObjects.length; i++){

result = this.objectStore.put(object, {overwrite: !!old});
actions.push(result);
}
else if(typeof old != "undefined"){
result = this.objectStore.remove(this.getIdentity(old));
actions.push(result);
}
savingObjects.push(dirty);
dirtyObjects.splice(i--,1);
Deferred.when(result, function(value){
if(!(--left)){
if(kwArgs.onComplete){
kwArgs.onComplete.call(kwArgs.scope, actions);
}
}
},function(value){
// on an error we want to revert, first we want to separate any changes that were made since the commit
left = -1; // first make sure that success isn't called
kwArgs.onError.call(kwArgs.scope, value);
});
}
all(actions).then(function(value){
if(kwArgs.onComplete){
kwArgs.onComplete.call(kwArgs.scope, value);
}
}, function(error){
if(kwArgs.onError) {
kwArgs.onError.call(kwArgs.scope, error);
}
});
}
if(transaction){
transaction.commit();
}
}catch(e){

@@ -546,3 +548,3 @@ kwArgs.onError.call(kwArgs.scope, value);

// summary:
// Called when a fetch occurs
// Called when a fetch occurs
}

@@ -549,0 +551,0 @@

@@ -309,3 +309,3 @@ define(["./_base/kernel", "./_base/lang", "./_base/array", "./_base/declare", "./dom", "./dom-construct", "./parser"],

}, function(e){
self._onError('Content', e, "Error parsing in _ContentSetter#" + this.id);
self._onError('Content', e, "Error parsing in _ContentSetter#" + self.id);
});

@@ -312,0 +312,0 @@ }catch(e){

{
"name": "dojo",
"version": "1.13.0",
"version": "1.14.0-pre",
"directories": {

@@ -14,3 +14,3 @@ "lib": "."

"sinon": "1.12.2",
"dojo": "1.13.0"
"dojo": "1.14.0-pre"
},

@@ -17,0 +17,0 @@ "main": "main",

define([
"../_base/array",
"../_base/lang",
"../Deferred",
"../when"
], function(array, Deferred, when){
], function(array, lang, Deferred, when){
"use strict";

@@ -30,3 +31,3 @@

var object, array;
if(objectOrArray instanceof Array){
if(lang.isArray(objectOrArray)){
array = objectOrArray;

@@ -33,0 +34,0 @@ }else if(objectOrArray && typeof objectOrArray === "object"){

@@ -14,6 +14,7 @@ define([

'../_base/window',
'../NodeList-dom'/*=====,
'../request',
'../_base/declare' =====*/
], function(module, require, watch, util, handlers, lang, ioQuery, query, has, dom, domConstruct, win/*=====, NodeList, request, declare =====*/){
// NodeList enhancement modules;
// must be loaded (but no reference needed)
'../NodeList-dom',
'../NodeList-manipulate'
], function(module, require, watch, util, handlers, lang, ioQuery, query, has, dom, domConstruct, win){
var mid = module.id.replace(/[\/\.\-]/g, '_'),

@@ -216,6 +217,12 @@ onload = mid + '_onload';

}else{
if(!formNode[x]){
// Explicitly search for nodes in the dom tree
// using formNode[x] may access attributes of the
// form node itself, e.g. formNode['action']
var n = query("input[name='"+x+"']", formNode);
// Not found if indexOf == -1
if(n.indexOf() == -1){
createInput(x, val);
}else{
formNode[x].value = val;
n.val(val);
}

@@ -222,0 +229,0 @@ }

@@ -12,14 +12,20 @@ define([

], function(exports, RequestError, CancelError, Deferred, ioQuery, array, lang, Promise, has){
exports.deepCopy = function deepCopy(target, source){
for(var name in source){
var tval = target[name],
sval = source[name];
if(tval !== sval){
if(tval && typeof tval === 'object' && sval && typeof sval === 'object'){
if(sval instanceof Date){
exports.deepCopy = function(target, source) {
for (var name in source) {
var tval = target[name],
sval = source[name];
if (tval !== sval) {
if (sval && typeof sval === 'object') {
if (Object.prototype.toString.call(sval) === '[object Date]') { // use this date test to handle crossing frame boundaries
target[name] = new Date(sval);
}else{
exports.deepCopy(tval, sval);
} else if (lang.isArray(sval)) {
target[name] = exports.deepCopyArray(sval);
} else {
if (tval && typeof tval === 'object') {
exports.deepCopy(tval, sval);
} else {
target[name] = exports.deepCopy({}, sval);
}
}
}else{
} else {
target[name] = sval;

@@ -32,2 +38,14 @@ }

exports.deepCopyArray = function(source) {
var clonedArray = [];
source.forEach(function(svalItem) {
if (typeof svalItem === 'object') {
clonedArray.push(exports.deepCopy({}, svalItem));
} else {
clonedArray.push(svalItem);
}
});
return clonedArray;
};
exports.deepCreate = function deepCreate(source, properties){

@@ -34,0 +52,0 @@ properties = properties || {};

@@ -70,9 +70,2 @@ define([

if(!error){
try{
handlers(response);
}catch(e){
error = e;
}
}
var handleError;

@@ -100,3 +93,3 @@ if(error){

' and an error in handleAs: transformation of response', response);
this.reject(error);
this.reject(error);
}

@@ -121,3 +114,3 @@ }

};
addListeners = function(_xhr, dfd, response){
addListeners = function(_xhr, dfd, response, uploadProgress){
// summary:

@@ -134,3 +127,4 @@ // Adds event listeners to the XMLHttpRequest object

function onProgress(evt){
function onProgress(transferType, evt){
response.transferType = transferType;
if(evt.lengthComputable){

@@ -146,10 +140,23 @@ response.loaded = evt.loaded;

function onDownloadProgress(evt) {
return onProgress('download', evt);
}
function onUploadProgress(evt) {
return onProgress('upload', evt);
}
_xhr.addEventListener('load', onLoad, false);
_xhr.addEventListener('error', onError, false);
_xhr.addEventListener('progress', onProgress, false);
_xhr.addEventListener('progress', onDownloadProgress, false);
if (uploadProgress && _xhr.upload) {
_xhr.upload.addEventListener('progress', onUploadProgress, false);
}
return function(){
_xhr.removeEventListener('load', onLoad, false);
_xhr.removeEventListener('error', onError, false);
_xhr.removeEventListener('progress', onProgress, false);
_xhr.removeEventListener('progress', onDownloadProgress, false);
_xhr.upload.removeEventListener('progress', onUploadProgress, false);
_xhr = null;

@@ -196,2 +203,3 @@ };

options = response.options;
var hasNoData = !options.data && options.method !== 'POST' && options.method !== 'PUT';

@@ -202,3 +210,3 @@ if(has('ie') <= 10){

}
var remover,

@@ -230,3 +238,3 @@ last = function(){

if(addListeners){
remover = addListeners(_xhr, dfd, response);
remover = addListeners(_xhr, dfd, response, options.uploadProgress);
}

@@ -252,3 +260,3 @@

var headers = options.headers,
contentType = isFormData ? false : 'application/x-www-form-urlencoded';
contentType = (isFormData || hasNoData) ? false : 'application/x-www-form-urlencoded';
if(headers){

@@ -313,2 +321,6 @@ for(var hdr in headers){

// or not.
// uploadProgress: Boolean?
// Upload progress events cause preflighted requests. This
// option enables upload progress event support but also
// causes all requests to be preflighted.
});

@@ -315,0 +327,0 @@ xhr.__MethodOptions = declare(null, {

@@ -18,6 +18,2 @@ define([

"sync,,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"sync,,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,src,./i18n-test,amd",
"sync,,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/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/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",

@@ -35,6 +31,2 @@ "sync,ab,src,./dojo,src,./i18n-test,legacy",

"sync,ab,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"sync,ab,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,src,./i18n-test,amd",
"sync,ab,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/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/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",

@@ -52,6 +44,2 @@ "sync,ab-cd,src,./dojo,src,./i18n-test,legacy",

"sync,ab-cd,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"sync,ab-cd,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,src,./i18n-test,amd",
"sync,ab-cd,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/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/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",

@@ -69,6 +57,2 @@ "sync,ab-cd-ef,src,./dojo,src,./i18n-test,legacy",

"sync,ab-cd-ef,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"sync,ab-cd-ef,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,src,./i18n-test,amd",
"sync,ab-cd-ef,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built/i18nTest,amd",
"sync,ab-cd-ef,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built-with-layers/i18nTest,amd",
"sync,ab-cd-ef,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,,src,./dojo,src,./i18n-test,amd",

@@ -82,6 +66,2 @@ "async,,src,./dojo,built,./built-i18n-test/built/i18nTest,amd",

"async,,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"async,,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,src,./i18n-test,amd",
"async,,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/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/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",

@@ -96,6 +76,2 @@ "async,ab,src,./dojo,src,./i18n-test,amd",

"async,ab,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"async,ab,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,src,./i18n-test,amd",
"async,ab,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/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/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",

@@ -110,6 +86,2 @@ "async,ab-cd,src,./dojo,src,./i18n-test,amd",

"async,ab-cd,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"async,ab-cd,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,src,./i18n-test,amd",
"async,ab-cd,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/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/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",

@@ -123,7 +95,3 @@ "async,ab-cd-ef,src,./dojo,src,./i18n-test,amd",

"async,ab-cd-ef,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers/i18nTest,amd",
"async,ab-cd-ef,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd",
"async,ab-cd-ef,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,src,./i18n-test,amd",
"async,ab-cd-ef,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built/i18nTest,amd",
"async,ab-cd-ef,cdn,http://192.168.1.114/dev/dtk/built-i18n-test/cdn/dojo,built,./built-i18n-test/built-with-layers/i18nTest,amd",
"async,ab-cd-ef,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,rel,./built-i18n-test/rel/dojo,built,./built-i18n-test/built-with-layers-and-preloads/i18nTest,amd"];

@@ -130,0 +98,0 @@ for(var i = 0; i<testParams.length; i++){

@@ -62,4 +62,4 @@ Analysis of i18n Bundle Loading in 1.7+

A unit test html page is constructed at i18n-test/unit.html. Given a query string, it will load a particular loader and
exercise a particular set of modules.
exercise a particular set of modules. Its contents must be uncommented before running the tests.
Finally, the DOH test dojo/testsDOH/_base/i18nExhaustive runs all the various combinations.

Sorry, the diff of this file is too big to display

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