@strapi/database
Advanced tools
Comparing version 0.0.0-886fcc015d10e9a8067ea6c35371c7ecd361d71d to 0.0.0-8bfe6aabd18119618f2d8f83af39290ce86b696b
@@ -57,3 +57,3 @@ 'use strict'; | ||
async run(action, uid, properties, states = new Map()) { | ||
for (let i = 0; i < subscribers.length; i++) { | ||
for (let i = 0; i < subscribers.length; i += 1) { | ||
const subscriber = subscribers[i]; | ||
@@ -60,0 +60,0 @@ if (typeof subscriber === 'function') { |
@@ -74,3 +74,3 @@ 'use strict'; | ||
if (on) { | ||
for (const key in on) { | ||
for (const key of Object.keys(on)) { | ||
inner.onVal(`${alias}.${key}`, on[key]); | ||
@@ -77,0 +77,0 @@ } |
@@ -11,3 +11,3 @@ 'use strict'; | ||
for (const attributeName in meta.attributes) { | ||
for (const attributeName of Object.keys(meta.attributes)) { | ||
const attribute = meta.attributes[attributeName]; | ||
@@ -76,3 +76,3 @@ if (attribute.type === 'relation') { | ||
const finalPopulate = {}; | ||
for (const key in populateMap) { | ||
for (const key of Object.keys(populateMap)) { | ||
const attribute = meta.attributes[key]; | ||
@@ -124,3 +124,3 @@ | ||
for (const key in populate) { | ||
for (const key of Object.keys(populate)) { | ||
const attribute = meta.attributes[key]; | ||
@@ -546,3 +546,3 @@ const targetMeta = db.metadata.get(attribute.target); | ||
const map = {}; | ||
for (const type in idsByType) { | ||
for (const type of Object.keys(idsByType)) { | ||
const ids = idsByType[type]; | ||
@@ -611,3 +611,3 @@ | ||
const map = {}; | ||
for (const type in idsByType) { | ||
for (const type of Object.keys(idsByType)) { | ||
const ids = idsByType[type]; | ||
@@ -614,0 +614,0 @@ |
@@ -56,3 +56,3 @@ 'use strict'; | ||
for (const key in data) { | ||
for (const key of Object.keys(data)) { | ||
const attribute = attributes[key]; | ||
@@ -59,0 +59,0 @@ |
@@ -79,3 +79,3 @@ 'use strict'; | ||
for (const key in where) { | ||
for (const key of Object.keys(where)) { | ||
const value = where[key]; | ||
@@ -123,3 +123,3 @@ | ||
// for each key in where | ||
for (const key in where) { | ||
for (const key of Object.keys(where)) { | ||
const value = where[key]; | ||
@@ -126,0 +126,0 @@ |
@@ -30,4 +30,10 @@ 'use strict'; | ||
let counter = 0; | ||
const getAlias = () => `t${counter++}`; | ||
const getAlias = () => { | ||
const alias = `t${counter}`; | ||
counter += 1; | ||
return alias; | ||
}; | ||
return { | ||
@@ -34,0 +40,0 @@ alias: getAlias(), |
@@ -28,3 +28,3 @@ 'use strict'; | ||
for (const key in meta.attributes) { | ||
for (const key of Object.keys(meta.attributes)) { | ||
const attribute = meta.attributes[key]; | ||
@@ -31,0 +31,0 @@ |
{ | ||
"name": "@strapi/database", | ||
"version": "0.0.0-886fcc015d10e9a8067ea6c35371c7ecd361d71d", | ||
"version": "0.0.0-8bfe6aabd18119618f2d8f83af39290ce86b696b", | ||
"description": "Strapi's database layer", | ||
@@ -42,6 +42,6 @@ "homepage": "https://strapi.io", | ||
"engines": { | ||
"node": ">=14.19.1 <=16.x.x", | ||
"node": ">=14.19.1 <=18.x.x", | ||
"npm": ">=6.0.0" | ||
}, | ||
"gitHead": "886fcc015d10e9a8067ea6c35371c7ecd361d71d" | ||
"gitHead": "8bfe6aabd18119618f2d8f83af39290ce86b696b" | ||
} |
182235
66
5840