@oddo/lang 0.0.5 → 0.0.7

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/dist/index.js CHANGED
@@ -4165,6 +4165,15 @@ function collectOddoIdentifiers(node, names = /* @__PURE__ */ new Set()) {
4165
4165
  currentScope = parentScope;
4166
4166
  return names;
4167
4167
  }
4168
+ if (node.type === "property") {
4169
+ if (node.computed && node.key) {
4170
+ collectOddoIdentifiers(node.key, names);
4171
+ }
4172
+ if (node.value) {
4173
+ collectOddoIdentifiers(node.value, names);
4174
+ }
4175
+ return names;
4176
+ }
4168
4177
  for (const key of Object.keys(node)) {
4169
4178
  if (key === "type") continue;
4170
4179
  const val = node[key];
@@ -4531,7 +4540,7 @@ function convertArrowFunction2(expr) {
4531
4540
  body = null;
4532
4541
  }
4533
4542
  currentScope = savedScope;
4534
- if (reactiveDepsForBody.length > 0) {
4543
+ if (reactiveDepsForBody.length > 0 || params.length > 0) {
4535
4544
  usedModifiers.add("liftFn");
4536
4545
  const depParams = reactiveDepsForBody.map((id) => t.identifier(id));
4537
4546
  const allParams = [...depParams, ...params];
@@ -4549,6 +4558,15 @@ function collectOddoIdentifiersOnly(node, names = /* @__PURE__ */ new Set()) {
4549
4558
  if (node.type === "identifier") {
4550
4559
  names.add(node.name);
4551
4560
  }
4561
+ if (node.type === "property") {
4562
+ if (node.computed && node.key) {
4563
+ collectOddoIdentifiersOnly(node.key, names);
4564
+ }
4565
+ if (node.value) {
4566
+ collectOddoIdentifiersOnly(node.value, names);
4567
+ }
4568
+ return Array.from(names);
4569
+ }
4552
4570
  for (const key of Object.keys(node)) {
4553
4571
  if (key === "type") continue;
4554
4572
  const val = node[key];