[Snyk] Upgrade alpinejs from 3.13.5 to 3.13.6

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-03-27 16:12:57 +00:00
parent ae403da8c1
commit 60c678680a
4 changed files with 29 additions and 21 deletions

6
package-lock.json generated
View file

@ -2379,9 +2379,9 @@
}
},
"alpinejs": {
"version": "3.13.5",
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.5.tgz",
"integrity": "sha512-1d2XeNGN+Zn7j4mUAKXtAgdc4/rLeadyTMWeJGXF5DzwawPBxwTiBhFFm6w/Ei8eJxUZeyNWWSD9zknfdz1kEw==",
"version": "3.13.7",
"resolved": "https://registry.npmjs.org/alpinejs/-/alpinejs-3.13.7.tgz",
"integrity": "sha512-rcTyjTANbsePq1hb7eSekt3qjI94HLGeO6JaRjCssCVbIIc+qBrc7pO5S/+2JB6oojIibjM6FA+xRI3zhGPZIg==",
"requires": {
"@vue/reactivity": "~3.1.1"
}

View file

@ -33,7 +33,7 @@
"acorn-import-assertions": "^1.9.0",
"admin-lte": "^2.4.18",
"ajv": "^6.12.6",
"alpinejs": "^3.13.5",
"alpinejs": "^3.13.6",
"blueimp-file-upload": "^9.34.0",
"bootstrap": "^3.4.1",
"bootstrap-colorpicker": "^2.5.3",

View file

@ -211,8 +211,8 @@
});
});
}
function destroyTree(root) {
walk(root, (el) => {
function destroyTree(root, walker = walk) {
walker(root, (el) => {
cleanupAttributes(el);
cleanupElement(el);
});
@ -413,7 +413,7 @@
if (name == Symbol.unscopables)
return false;
return objects.some(
(obj) => Object.prototype.hasOwnProperty.call(obj, name)
(obj) => Object.prototype.hasOwnProperty.call(obj, name) || Reflect.has(obj, name)
);
},
get({ objects }, name, thisProxy) {
@ -421,7 +421,7 @@
return collapseProxies;
return Reflect.get(
objects.find(
(obj) => Object.prototype.hasOwnProperty.call(obj, name)
(obj) => Reflect.has(obj, name)
) || {},
name,
thisProxy
@ -452,6 +452,8 @@
Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, { value, enumerable }]) => {
if (enumerable === false || value === void 0)
return;
if (typeof value === "object" && value !== null && value.__v_skip)
return;
let path = basePath === "" ? key : `${basePath}.${key}`;
if (typeof value === "object" && value !== null && value._x_interceptor) {
obj[key] = value.initialize(data2, path, key);
@ -1619,7 +1621,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
get raw() {
return raw;
},
version: "3.13.5",
version: "3.13.7",
flushAndStopDeferringMutations,
dontAutoEvaluateFunctions,
disableEffectScheduling,
@ -2423,12 +2425,10 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
});
function getArrayOfRefObject(el) {
let refObjects = [];
let currentEl = el;
while (currentEl) {
if (currentEl._x_refs)
refObjects.push(currentEl._x_refs);
currentEl = currentEl.parentNode;
}
findClosest(el, (i) => {
if (i._x_refs)
refObjects.push(i._x_refs);
});
return refObjects;
}
@ -3088,13 +3088,21 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
if (isObject2(items)) {
items = Object.entries(items).map(([key, value]) => {
let scope2 = getIterationScopeVariables(iteratorNames, value, key, items);
evaluateKey((value2) => keys.push(value2), { scope: { index: key, ...scope2 } });
evaluateKey((value2) => {
if (keys.includes(value2))
warn("Duplicate key on x-for", el);
keys.push(value2);
}, { scope: { index: key, ...scope2 } });
scopes.push(scope2);
});
} else {
for (let i = 0; i < items.length; i++) {
let scope2 = getIterationScopeVariables(iteratorNames, items[i], i, items);
evaluateKey((value) => keys.push(value), { scope: { index: i, ...scope2 } });
evaluateKey((value) => {
if (keys.includes(value))
warn("Duplicate key on x-for", el);
keys.push(value);
}, { scope: { index: i, ...scope2 } });
scopes.push(scope2);
}
}
@ -3142,7 +3150,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
let marker = document.createElement("div");
mutateDom(() => {
if (!elForSpot)
warn(`x-for ":key" is undefined or invalid`, templateEl);
warn(`x-for ":key" is undefined or invalid`, templateEl, keyForSpot, lookup);
elForSpot.after(marker);
elInSpot.after(elForSpot);
elForSpot._x_currentIfEl && elForSpot.after(elForSpot._x_currentIfEl);
@ -3169,7 +3177,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
};
mutateDom(() => {
lastEl.after(clone2);
initTree(clone2);
skipDuringClone(() => initTree(clone2))();
});
if (typeof key === "object") {
warn("x-for key cannot be an object, it must be a string or an integer", templateEl);
@ -3253,7 +3261,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
addScopeToNode(clone2, {}, el);
mutateDom(() => {
el.after(clone2);
initTree(clone2);
skipDuringClone(() => initTree(clone2))();
});
el._x_currentIfEl = clone2;
el._x_undoIf = () => {

View file

@ -33,7 +33,7 @@
"/js/build/vendor.js": "/js/build/vendor.js?id=a2b971da417306a63385c8098acfe4af",
"/js/dist/bootstrap-table.js": "/js/dist/bootstrap-table.js?id=857da5daffd13e0553510e5ccd410c79",
"/js/dist/all.js": "/js/dist/all.js?id=13bdb521e0c745d7f81dae3fb110b650",
"/js/dist/all-defer.js": "/js/dist/all-defer.js?id=19ccc62a8f1ea103dede4808837384d4",
"/js/dist/all-defer.js": "/js/dist/all-defer.js?id=18d36546bdad8285c229008df799b343",
"/css/dist/skins/skin-green.min.css": "/css/dist/skins/skin-green.min.css?id=0a82a6ae6bb4e58fe62d162c4fb50397",
"/css/dist/skins/skin-green-dark.min.css": "/css/dist/skins/skin-green-dark.min.css?id=d419cb63a12dc175d71645c876bfc2ab",
"/css/dist/skins/skin-black.min.css": "/css/dist/skins/skin-black.min.css?id=76482123f6c70e866d6b971ba91de7bb",