@domql/element 2.5.63 → 2.5.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/create.js CHANGED
@@ -263,7 +263,7 @@ const applyContext = (element, parent, options) => {
263
263
  const createScope = (element, parent) => {
264
264
  const { __ref: ref } = element
265
265
  // If the element doesn't have a scope, initialize it using the parent's scope or the root's scope.
266
- if (!element.scope) element.scope = parent.scope || ref.__root.scope || {}
266
+ if (!element.scope) element.scope = parent.scope || ref.root.scope || {}
267
267
  }
268
268
 
269
269
  const createIfConditionFlag = (element, parent) => {
@@ -303,7 +303,7 @@ const addCaching = (element, parent) => {
303
303
 
304
304
  // Add _root element property
305
305
  const hasRoot = parent && parent.key === ':root'
306
- if (!ref.__root) ref.__root = hasRoot ? element : parentRef.__root
306
+ if (!ref.root) ref.root = hasRoot ? element : parentRef.root
307
307
 
308
308
  // set the PATH array
309
309
  if (ENV === 'test' || ENV === 'development') {
@@ -341,9 +341,9 @@ const onlyResolveExtends = (element, parent, key, options) => {
341
341
  // enable CHANGES storing
342
342
  if (!ref.__children) ref.__children = []
343
343
 
344
- // Add __root element property
344
+ // Add root element property
345
345
  // const hasRoot = parent && parent.key === ':root'
346
- // if (!ref.__root) ref.__root = hasRoot ? element : parentRef.__root
346
+ // if (!ref.root) ref.root = hasRoot ? element : parentRef.root
347
347
 
348
348
  addMethods(element, parent)
349
349
 
@@ -201,7 +201,7 @@ const applyContext = (element, parent, options) => {
201
201
  const createScope = (element, parent) => {
202
202
  const { __ref: ref } = element;
203
203
  if (!element.scope)
204
- element.scope = parent.scope || ref.__root.scope || {};
204
+ element.scope = parent.scope || ref.root.scope || {};
205
205
  };
206
206
  const createIfConditionFlag = (element, parent) => {
207
207
  const { __ref: ref } = element;
@@ -232,8 +232,8 @@ const addCaching = (element, parent) => {
232
232
  if (!ref.__children)
233
233
  ref.__children = [];
234
234
  const hasRoot = parent && parent.key === ":root";
235
- if (!ref.__root)
236
- ref.__root = hasRoot ? element : parentRef.__root;
235
+ if (!ref.root)
236
+ ref.root = hasRoot ? element : parentRef.root;
237
237
  if (ENV === "test" || ENV === "development") {
238
238
  if (!parentRef)
239
239
  parentRef = parent.ref = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/element",
3
- "version": "2.5.63",
3
+ "version": "2.5.65",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -31,7 +31,7 @@
31
31
  "@domql/state": "latest",
32
32
  "@domql/utils": "latest"
33
33
  },
34
- "gitHead": "318bb5d6c6b3989cc97b2a2f12c0169599786ffa",
34
+ "gitHead": "473e5569815c8e062b8e584549889557330c249a",
35
35
  "devDependencies": {
36
36
  "@babel/core": "^7.12.0"
37
37
  }
@@ -46,9 +46,9 @@ export const onlyResolveExtends = (element, parent, key, options) => {
46
46
  // enable CHANGES storing
47
47
  if (!ref.__children) ref.__children = []
48
48
 
49
- // Add __root element property
49
+ // Add root element property
50
50
  // const hasRoot = parent && parent.key === ':root'
51
- // if (!ref.__root) ref.__root = hasRoot ? element : parentRef.__root
51
+ // if (!ref.root) ref.root = hasRoot ? element : parentRef.root
52
52
  }
53
53
 
54
54
  addMethods(element, parent)