Unverified Commit ad870924 authored by lauriii's avatar lauriii
Browse files

Issue #3266912 by nod_, Wim Leers, lauriii, xjm, mmjvb: Review version...

Issue #3266912 by nod_, Wim Leers, lauriii, xjm, mmjvb: Review version constraints for production yarn dependencies
parent c88351cf
This diff is collapsed.
// Backbone.js 1.4.0
// Backbone.js 1.4.1
// (c) 2010-2019 Jeremy Ashkenas and DocumentCloud
// (c) 2010-2022 Jeremy Ashkenas and DocumentCloud
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
......@@ -44,7 +44,7 @@
var slice = Array.prototype.slice;
// Current version of the library. Keep in sync with `package.json`.
Backbone.VERSION = '1.4.0';
Backbone.VERSION = '1.4.1';
// For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
// the `$` variable.
......@@ -516,7 +516,11 @@
}
// Update the `id`.
if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);
if (this.idAttribute in attrs) {
var prevId = this.id;
this.id = this.get(this.idAttribute);
this.trigger('changeId', this, prevId, options);
}
// Trigger all relevant attribute changes.
if (!silent) {
......@@ -994,7 +998,7 @@
get: function(obj) {
if (obj == null) return void 0;
return this._byId[obj] ||
this._byId[this.modelId(this._isModel(obj) ? obj.attributes : obj)] ||
this._byId[this.modelId(this._isModel(obj) ? obj.attributes : obj, obj.idAttribute)] ||
obj.cid && this._byId[obj.cid];
},
......@@ -1098,8 +1102,8 @@
},
// Define how to uniquely identify models in the collection.
modelId: function(attrs) {
return attrs[this.model.prototype.idAttribute || 'id'];
modelId: function(attrs, idAttribute) {
return attrs[idAttribute || this.model.prototype.idAttribute || 'id'];
},
// Get an iterator of all models in this collection.
......@@ -1134,7 +1138,15 @@
}
options = options ? _.clone(options) : {};
options.collection = this;
var model = new this.model(attrs, options);
var model;
if (this.model.prototype) {
model = new this.model(attrs, options);
} else {
// ES class methods didn't have prototype
model = this.model(attrs, options);
}
if (!model.validationError) return model;
this.trigger('invalid', this, model.validationError, options);
return false;
......@@ -1154,7 +1166,7 @@
// Remove references before triggering 'remove' event to prevent an
// infinite loop. #3693
delete this._byId[model.cid];
var id = this.modelId(model.attributes);
var id = this.modelId(model.attributes, model.idAttribute);
if (id != null) delete this._byId[id];
if (!options.silent) {
......@@ -1177,7 +1189,7 @@
// Internal method to create a model's ties to a collection.
_addReference: function(model, options) {
this._byId[model.cid] = model;
var id = this.modelId(model.attributes);
var id = this.modelId(model.attributes, model.idAttribute);
if (id != null) this._byId[id] = model;
model.on('all', this._onModelEvent, this);
},
......@@ -1185,7 +1197,7 @@
// Internal method to sever a model's ties to a collection.
_removeReference: function(model, options) {
delete this._byId[model.cid];
var id = this.modelId(model.attributes);
var id = this.modelId(model.attributes, model.idAttribute);
if (id != null) delete this._byId[id];
if (this === model.collection) delete model.collection;
model.off('all', this._onModelEvent, this);
......@@ -1199,13 +1211,11 @@
if (model) {
if ((event === 'add' || event === 'remove') && collection !== this) return;
if (event === 'destroy') this.remove(model, options);
if (event === 'change') {
var prevId = this.modelId(model.previousAttributes());
var id = this.modelId(model.attributes);
if (prevId !== id) {
if (prevId != null) delete this._byId[prevId];
if (id != null) this._byId[id] = model;
}
if (event === 'changeId') {
var prevId = this.modelId(model.previousAttributes(), model.idAttribute);
var id = this.modelId(model.attributes, model.idAttribute);
if (prevId != null) delete this._byId[prevId];
if (id != null) this._byId[id] = model;
}
}
this.trigger.apply(this, arguments);
......@@ -1261,7 +1271,7 @@
if (this._kind === ITERATOR_VALUES) {
value = model;
} else {
var id = this._collection.modelId(model.attributes);
var id = this._collection.modelId(model.attributes, model.idAttribute);
if (this._kind === ITERATOR_KEYS) {
value = id;
} else { // ITERATOR_KEYSVALUES
......@@ -1615,11 +1625,11 @@
// Map from CRUD to HTTP for our default `Backbone.sync` implementation.
var methodMap = {
create: 'POST',
update: 'PUT',
patch: 'PATCH',
delete: 'DELETE',
read: 'GET'
'create': 'POST',
'update': 'PUT',
'patch': 'PATCH',
'delete': 'DELETE',
'read': 'GET'
};
// Set the default implementation of `Backbone.ajax` to proxy through to `$`.
......@@ -1712,11 +1722,11 @@
// against the current location hash.
_routeToRegExp: function(route) {
route = route.replace(escapeRegExp, '\\$&')
.replace(optionalParam, '(?:$1)?')
.replace(namedParam, function(match, optional) {
return optional ? match : '([^/?]+)';
})
.replace(splatParam, '([^?]*?)');
.replace(optionalParam, '(?:$1)?')
.replace(namedParam, function(match, optional) {
return optional ? match : '([^/?]+)';
})
.replace(splatParam, '([^?]*?)');
return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
},
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -2,10 +2,10 @@
backbone:
remote: https://github.com/jashkenas/backbone
version: "1.4.0"
version: "1.4.1"
license:
name: MIT
url: https://raw.githubusercontent.com/jashkenas/backbone/1.4.0/LICENSE
url: https://raw.githubusercontent.com/jashkenas/backbone/1.4.1/LICENSE
gpl-compatible: true
js:
assets/vendor/backbone/backbone-min.js: { weight: -19, minified: true }
......@@ -20,10 +20,10 @@ internal.backbone:
# - https://www.drupal.org/project/drupal/issues/3204011
# - https://www.drupal.org/project/drupal/issues/3204015
remote: https://github.com/jashkenas/backbone
version: "1.4.0"
version: "1.4.1"
license:
name: MIT
url: https://raw.githubusercontent.com/jashkenas/backbone/1.4.0/LICENSE
url: https://raw.githubusercontent.com/jashkenas/backbone/1.4.1/LICENSE
gpl-compatible: true
js:
assets/vendor/backbone/backbone-min.js: { weight: -19, minified: true }
......@@ -1118,10 +1118,10 @@ picturefill:
assets/vendor/picturefill/picturefill.min.js: { weight: -10, minified: true }
popperjs:
version: "2.11.2"
version: "2.11.5"
license:
name: MIT
url: https://raw.githubusercontent.com/popperjs/popper-core/v2.11.2/LICENSE.md
url: https://raw.githubusercontent.com/popperjs/popper-core/v2.11.5/LICENSE.md
gpl-compatible: true
js:
assets/vendor/popperjs/popper.min.js: { minified: true }
......@@ -1163,10 +1163,10 @@ tabbable.jquery.shim:
underscore:
remote: https://github.com/jashkenas/underscore
version: "1.13.2"
version: "1.13.3"
license:
name: MIT
url: https://raw.githubusercontent.com/jashkenas/underscore/1.13.2/LICENSE
url: https://raw.githubusercontent.com/jashkenas/underscore/1.13.3/LICENSE
gpl-compatible: true
js:
assets/vendor/underscore/underscore-min.js: { weight: -20, minified: true }
......@@ -1180,10 +1180,10 @@ internal.underscore:
# - https://www.drupal.org/project/drupal/issues/3204011
# - https://www.drupal.org/project/drupal/issues/3204015
remote: https://github.com/jashkenas/underscore
version: "1.13.2"
version: "1.13.3"
license:
name: MIT
url: https://raw.githubusercontent.com/jashkenas/underscore/1.13.2/LICENSE
url: https://raw.githubusercontent.com/jashkenas/underscore/1.13.3/LICENSE
gpl-compatible: true
js:
assets/vendor/underscore/underscore-min.js: { weight: -20, minified: true }
......
......@@ -39,40 +39,40 @@
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/register": "^7.7.7",
"@ckeditor/ckeditor5-alignment": "~34.0.0",
"@ckeditor/ckeditor5-basic-styles": "~34.0.0",
"@ckeditor/ckeditor5-block-quote": "~34.0.0",
"@ckeditor/ckeditor5-code-block": "~34.0.0",
"@ckeditor/ckeditor5-dev-utils": "^30.1.1",
"@ckeditor/ckeditor5-editor-classic": "~34.0.0",
"@ckeditor/ckeditor5-editor-decoupled": "~34.0.0",
"@ckeditor/ckeditor5-essentials": "~34.0.0",
"@ckeditor/ckeditor5-heading": "~34.0.0",
"@ckeditor/ckeditor5-horizontal-line": "~34.0.0",
"@ckeditor/ckeditor5-html-support": "~34.0.0",
"@ckeditor/ckeditor5-image": "~34.0.0",
"@ckeditor/ckeditor5-indent": "~34.0.0",
"@ckeditor/ckeditor5-language": "~34.0.0",
"@ckeditor/ckeditor5-link": "~34.0.0",
"@ckeditor/ckeditor5-list": "~34.0.1",
"@ckeditor/ckeditor5-paste-from-office": "~34.0.0",
"@ckeditor/ckeditor5-remove-format": "~34.0.0",
"@ckeditor/ckeditor5-source-editing": "~34.0.0",
"@ckeditor/ckeditor5-special-characters": "~34.0.0",
"@ckeditor/ckeditor5-table": "~34.0.0",
"@drupal/once": "^1.0.1",
"@popperjs/core": "^2.9.2",
"@ckeditor/ckeditor5-alignment": "34.0.x",
"@ckeditor/ckeditor5-basic-styles": "34.0.x",
"@ckeditor/ckeditor5-block-quote": "34.0.x",
"@ckeditor/ckeditor5-code-block": "34.0.x",
"@ckeditor/ckeditor5-dev-utils": "30.1.x",
"@ckeditor/ckeditor5-editor-classic": "34.0.x",
"@ckeditor/ckeditor5-editor-decoupled": "34.0.x",
"@ckeditor/ckeditor5-essentials": "34.0.x",
"@ckeditor/ckeditor5-heading": "34.0.x",
"@ckeditor/ckeditor5-horizontal-line": "34.0.x",
"@ckeditor/ckeditor5-html-support": "34.0.x",
"@ckeditor/ckeditor5-image": "34.0.x",
"@ckeditor/ckeditor5-indent": "34.0.x",
"@ckeditor/ckeditor5-language": "34.0.x",
"@ckeditor/ckeditor5-link": "34.0.x",
"@ckeditor/ckeditor5-list": "34.0.x",
"@ckeditor/ckeditor5-paste-from-office": "34.0.x",
"@ckeditor/ckeditor5-remove-format": "34.0.x",
"@ckeditor/ckeditor5-source-editing": "34.0.x",
"@ckeditor/ckeditor5-special-characters": "34.0.x",
"@ckeditor/ckeditor5-table": "34.0.x",
"@drupal/once": "1.0.x",
"@popperjs/core": "2.11.x",
"babel-plugin-add-header-comment": "^1.0.3",
"backbone": "^1.4.0",
"backbone": "1.4.x",
"chalk": "^4.1.0",
"chokidar": "^3.3.1",
"chromedriver": "^98.0.1",
"ckeditor5": "~34.0.0",
"ckeditor5": "34.0.x",
"cross-env": "^7.0.2",
"cspell": "^5.0.0",
"css.escape": "^1.5.1",
"css.escape": "1.5.x",
"dotenv-safe": "^8.2.0",
"es6-promise": "^4.2.8",
"es6-promise": "4.2.x",
"eslint": "^8.9.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.4.0",
......@@ -83,18 +83,18 @@
"farbtastic": "https://github.com/mattfarina/farbtastic/archive/1.3u.tar.gz",
"glob": "^7.1.2",
"joyride": "https://github.com/zurb/joyride/archive/refs/heads/v2.1.tar.gz",
"jquery": "^3.6.0",
"jquery-form": "^4.3.0",
"jquery-once": "^2.2.3",
"jquery-ui": "~1.13.1",
"js-cookie": "^3.0.1",
"jquery": "3.6.x",
"jquery-form": "4.3.x",
"jquery-once": "2.2.x",
"jquery-ui": "1.13.x",
"js-cookie": "3.0.x",
"jsdom": "^19.0.0",
"loadjs": "^4.2.0",
"loadjs": "4.2.x",
"minimist": "^1.2.2",
"mkdirp": "^1.0.4",
"nightwatch": "^1.6.3",
"normalize.css": "^8.0.1",
"picturefill": "^3.0.3",
"normalize.css": "8.0.x",
"picturefill": "3.0.x",
"postcss": "^7.0.18",
"postcss-calc": "^7.0.1",
"postcss-header": "^2.0.0",
......@@ -104,16 +104,16 @@
"postcss-url": "^8.0.0",
"prettier": "^2.1.2",
"raw-loader": "^4.0.2",
"shepherd.js": "^9.0.0",
"sortablejs": "^1.13.0",
"shepherd.js": "9.0.x",
"sortablejs": "1.14.x",
"stylelint": "^14.0.1",
"stylelint-checkstyle-formatter": "^0.1.2",
"stylelint-config-standard": "^23.0.0",
"stylelint-order": "^5.0.0",
"tabbable": "^5.2.0",
"tabbable": "5.2.x",
"terser": "^5.3.4",
"terser-webpack-plugin": "^5.2.0",
"underscore": "^1.13.1",
"underscore": "1.13.x",
"webpack": "^5.51.1",
"webpack-cli": "^4.4.0"
},
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment