@domql/utils 2.5.187 → 2.5.203

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/component.js CHANGED
@@ -157,7 +157,7 @@ export const applyComponentFromContext = (element, parent, options) => {
157
157
  const componentExists = components[execExtend] || components['smbls.' + execExtend]
158
158
  if (componentExists) element.extend = componentExists
159
159
  else {
160
- if ((ENV === 'test' || ENV === 'development') && options.verbose) {
160
+ if ((ENV === 'testing' || ENV === 'development') && options.verbose) {
161
161
  console.warn(execExtend, 'is not in library', components, element)
162
162
  console.warn('replacing with ', {})
163
163
  }
@@ -184,7 +184,7 @@ const applyComponentFromContext = (element, parent, options) => {
184
184
  if (componentExists)
185
185
  element.extend = componentExists;
186
186
  else {
187
- if ((ENV === "test" || ENV === "development") && options.verbose) {
187
+ if ((ENV === "testing" || ENV === "development") && options.verbose) {
188
188
  console.warn(execExtend, "is not in library", components, element);
189
189
  console.warn("replacing with ", {});
190
190
  }
@@ -618,7 +618,7 @@ const createNestedObject = (arr, lastValue) => {
618
618
  if (!obj[value]) {
619
619
  obj[value] = {};
620
620
  }
621
- if (index === arr.length - 1 && lastValue) {
621
+ if (index === arr.length - 1 && lastValue !== void 0) {
622
622
  obj[value] = lastValue;
623
623
  }
624
624
  return obj[value];
@@ -684,7 +684,7 @@ const detectInfiniteLoop = (arr) => {
684
684
  repeatCount = 1;
685
685
  }
686
686
  if (repeatCount >= maxRepeats * 2) {
687
- if (ENV === "test" || ENV === "development") {
687
+ if (ENV === "testing" || ENV === "development") {
688
688
  console.warn("Warning: Potential infinite loop detected due to repeated sequence:", pattern);
689
689
  }
690
690
  return true;
@@ -165,7 +165,7 @@ const applyComponentFromContext = (element, parent, options) => {
165
165
  if (componentExists)
166
166
  element.extend = componentExists;
167
167
  else {
168
- if ((ENV === "test" || ENV === "development") && options.verbose) {
168
+ if ((ENV === "testing" || ENV === "development") && options.verbose) {
169
169
  console.warn(execExtend, "is not in library", components, element);
170
170
  console.warn("replacing with ", {});
171
171
  }
@@ -586,7 +586,7 @@ const createNestedObject = (arr, lastValue) => {
586
586
  if (!obj[value]) {
587
587
  obj[value] = {};
588
588
  }
589
- if (index === arr.length - 1 && lastValue) {
589
+ if (index === arr.length - 1 && lastValue !== void 0) {
590
590
  obj[value] = lastValue;
591
591
  }
592
592
  return obj[value];
@@ -652,7 +652,7 @@ const detectInfiniteLoop = (arr) => {
652
652
  repeatCount = 1;
653
653
  }
654
654
  if (repeatCount >= maxRepeats * 2) {
655
- if (ENV === "test" || ENV === "development") {
655
+ if (ENV === "testing" || ENV === "development") {
656
656
  console.warn("Warning: Potential infinite loop detected due to repeated sequence:", pattern);
657
657
  }
658
658
  return true;
package/object.js CHANGED
@@ -727,7 +727,7 @@ export const createNestedObject = (arr, lastValue) => {
727
727
  if (!obj[value]) {
728
728
  obj[value] = {}
729
729
  }
730
- if (index === arr.length - 1 && lastValue) {
730
+ if (index === arr.length - 1 && lastValue !== undefined) {
731
731
  obj[value] = lastValue
732
732
  }
733
733
  return obj[value]
@@ -815,7 +815,7 @@ export const detectInfiniteLoop = arr => {
815
815
 
816
816
  // If the pattern repeats more than `maxRepeats`, throw a warning
817
817
  if (repeatCount >= maxRepeats * 2) {
818
- if (ENV === 'test' || ENV === 'development') {
818
+ if (ENV === 'testing' || ENV === 'development') {
819
819
  console.warn('Warning: Potential infinite loop detected due to repeated sequence:', pattern)
820
820
  }
821
821
  return true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@domql/utils",
3
- "version": "2.5.187",
3
+ "version": "2.5.203",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "index.js",
@@ -21,10 +21,10 @@
21
21
  "copy:package:cjs": "cp ../../build/package-cjs.json dist/cjs/package.json",
22
22
  "build:esm": "npx esbuild *.js --target=es2017 --format=esm --outdir=dist/esm",
23
23
  "build:cjs": "npx esbuild *.js --target=node16 --format=cjs --outdir=dist/cjs",
24
- "build": "rimraf -I dist; npm run build:cjs; npm run build:esm",
24
+ "build": "npx rimraf -I dist; npm run build:cjs; npm run build:esm",
25
25
  "prepublish": "npm run build; npm run copy:package:cjs"
26
26
  },
27
- "gitHead": "c150bfbbdd51b19d25c93f10334d54175cea9d1d",
27
+ "gitHead": "f8c712416647ab3789253b7176eaa762627fc677",
28
28
  "devDependencies": {
29
29
  "@babel/core": "^7.12.0"
30
30
  }