pasika 0.10.66 → 0.10.68

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.
@@ -301,6 +301,15 @@ function propertyName(node) {
301
301
  if (ts.isIdentifier(node) || ts.isStringLiteral(node) || ts.isNumericLiteral(node)) return node.text;
302
302
  return void 0;
303
303
  }
304
+ function bindingIdentifiers(name) {
305
+ if (ts.isIdentifier(name)) return [name];
306
+ const identifiers = [];
307
+ for (const element of name.elements) {
308
+ if (ts.isOmittedExpression(element)) continue;
309
+ identifiers.push(...bindingIdentifiers(element.name));
310
+ }
311
+ return identifiers;
312
+ }
304
313
  function returnsJsx(node) {
305
314
  let found = false;
306
315
  const visit = (child) => {
@@ -417,12 +426,21 @@ function parseModule(file) {
417
426
  }
418
427
  if (ts.isVariableStatement(statement)) {
419
428
  for (const declaration of statement.declarationList.declarations) {
420
- if (!ts.isIdentifier(declaration.name)) continue;
421
- exports.push({
422
- name: declaration.name.text,
423
- kind: classifyValue(declaration.name.text, declaration.initializer, isTsx),
424
- line: lineOf(sourceFile, declaration)
425
- });
429
+ if (ts.isIdentifier(declaration.name)) {
430
+ exports.push({
431
+ name: declaration.name.text,
432
+ kind: classifyValue(declaration.name.text, declaration.initializer, isTsx),
433
+ line: lineOf(sourceFile, declaration)
434
+ });
435
+ continue;
436
+ }
437
+ for (const identifier of bindingIdentifiers(declaration.name)) {
438
+ exports.push({
439
+ name: identifier.text,
440
+ kind: classifyValue(identifier.text, void 0, isTsx),
441
+ line: lineOf(sourceFile, identifier)
442
+ });
443
+ }
426
444
  }
427
445
  continue;
428
446
  }
@@ -5728,9 +5746,8 @@ function directPropertyBinding(context, declarator) {
5728
5746
  if (declarator.id.type !== "Identifier" || hasTypeAnnotation(declarator.id)) return void 0;
5729
5747
  if (declarator.init?.type !== "MemberExpression") return void 0;
5730
5748
  const member = declarator.init;
5731
- if (member.computed || member.optional || member.property.type !== "Identifier" || member.object.type === "Super") {
5732
- return void 0;
5733
- }
5749
+ if (member.computed || member.optional || member.property.type !== "Identifier") return void 0;
5750
+ if (!canGroupSource(member.object)) return void 0;
5734
5751
  if (context.sourceCode.getCommentsInside(declarator).length > 0) return void 0;
5735
5752
  const propertyName4 = member.property.name;
5736
5753
  const localName = declarator.id.name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pasika",
3
- "version": "0.10.66",
3
+ "version": "0.10.68",
4
4
  "description": "Reusable agent setup package",
5
5
  "repository": {
6
6
  "type": "git",