@openrewrite/rewrite 0.28.2 → 0.30.0
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/src/java/remote/receiver.d.ts.map +1 -1
- package/dist/src/java/remote/receiver.js +27 -3
- package/dist/src/java/remote/receiver.js.map +1 -1
- package/dist/src/java/remote/sender.d.ts.map +1 -1
- package/dist/src/java/remote/sender.js +19 -1
- package/dist/src/java/remote/sender.js.map +1 -1
- package/dist/src/java/tree/support_types.d.ts +5 -3
- package/dist/src/java/tree/support_types.d.ts.map +1 -1
- package/dist/src/java/tree/support_types.js +2 -1
- package/dist/src/java/tree/support_types.js.map +1 -1
- package/dist/src/java/tree/tree.d.ts +99 -9
- package/dist/src/java/tree/tree.d.ts.map +1 -1
- package/dist/src/java/tree/tree.js +150 -31
- package/dist/src/java/tree/tree.js.map +1 -1
- package/dist/src/java/visitor.d.ts +3 -1
- package/dist/src/java/visitor.d.ts.map +1 -1
- package/dist/src/java/visitor.js +24 -1
- package/dist/src/java/visitor.js.map +1 -1
- package/dist/src/javascript/parser.d.ts +2 -0
- package/dist/src/javascript/parser.d.ts.map +1 -1
- package/dist/src/javascript/parser.js +68 -17
- package/dist/src/javascript/parser.js.map +1 -1
- package/dist/src/javascript/remote/receiver.d.ts.map +1 -1
- package/dist/src/javascript/remote/receiver.js +43 -6
- package/dist/src/javascript/remote/receiver.js.map +1 -1
- package/dist/src/javascript/remote/sender.d.ts.map +1 -1
- package/dist/src/javascript/remote/sender.js +30 -2
- package/dist/src/javascript/remote/sender.js.map +1 -1
- package/dist/src/javascript/tree/support_types.d.ts +8 -3
- package/dist/src/javascript/tree/support_types.d.ts.map +1 -1
- package/dist/src/javascript/tree/support_types.js +5 -0
- package/dist/src/javascript/tree/support_types.js.map +1 -1
- package/dist/src/javascript/tree/tree.d.ts +61 -5
- package/dist/src/javascript/tree/tree.d.ts.map +1 -1
- package/dist/src/javascript/tree/tree.js +108 -24
- package/dist/src/javascript/tree/tree.js.map +1 -1
- package/dist/src/javascript/visitor.d.ts +2 -1
- package/dist/src/javascript/visitor.d.ts.map +1 -1
- package/dist/src/javascript/visitor.js +10 -1
- package/dist/src/javascript/visitor.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receiver.d.ts","sourceRoot":"","sources":["../../../../src/javascript/remote/receiver.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,IAAI,EAAC,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAkB,QAAQ,EAAE,eAAe,EAA6B,MAAM,6BAA6B,CAAC;AAEnH,OAAO,EAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"receiver.d.ts","sourceRoot":"","sources":["../../../../src/javascript/remote/receiver.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,IAAI,EAAC,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAkB,QAAQ,EAAE,eAAe,EAA6B,MAAM,6BAA6B,CAAC;AAEnH,OAAO,EAAC,EAAE,EAAiiC,MAAM,SAAS,CAAC;AAI3jC,qBAAa,kBAAmB,YAAW,QAAQ,CAAC,EAAE,CAAC;IAC5C,IAAI,CAAC,GAAG,EAAE,eAAe,GAAG,eAAe;IAI3C,OAAO,CAAC,MAAM,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,eAAe,GAAG,IAAI;CAIhE"}
|
|
@@ -185,7 +185,7 @@ class Visitor extends __1.JavaScriptVisitor {
|
|
|
185
185
|
importType = importType.withPrefix(ctx.receiveNode(importType.prefix, receiveSpace));
|
|
186
186
|
importType = importType.withMarkers(ctx.receiveNode(importType.markers, ctx.receiveMarkers));
|
|
187
187
|
importType = importType.padding.withHasTypeof(ctx.receiveNode(importType.padding.hasTypeof, rightPaddedValueReceiver(1)));
|
|
188
|
-
importType = importType.
|
|
188
|
+
importType = importType.padding.withArgumentAndAttributes(ctx.receiveNode(importType.padding.argumentAndAttributes, receiveContainer));
|
|
189
189
|
importType = importType.padding.withQualifier(ctx.receiveNode(importType.padding.qualifier, receiveLeftPaddedTree));
|
|
190
190
|
importType = importType.padding.withTypeArguments(ctx.receiveNode(importType.padding.typeArguments, receiveContainer));
|
|
191
191
|
importType = importType.withType(ctx.receiveValue(importType.type, 5));
|
|
@@ -235,6 +235,15 @@ class Visitor extends __1.JavaScriptVisitor {
|
|
|
235
235
|
importAttributes = importAttributes.padding.withElements(ctx.receiveNode(importAttributes.padding.elements, receiveContainer));
|
|
236
236
|
return importAttributes;
|
|
237
237
|
}
|
|
238
|
+
visitImportTypeAttributes(importTypeAttributes, ctx) {
|
|
239
|
+
importTypeAttributes = importTypeAttributes.withId(ctx.receiveValue(importTypeAttributes.id, 0));
|
|
240
|
+
importTypeAttributes = importTypeAttributes.withPrefix(ctx.receiveNode(importTypeAttributes.prefix, receiveSpace));
|
|
241
|
+
importTypeAttributes = importTypeAttributes.withMarkers(ctx.receiveNode(importTypeAttributes.markers, ctx.receiveMarkers));
|
|
242
|
+
importTypeAttributes = importTypeAttributes.padding.withToken(ctx.receiveNode(importTypeAttributes.padding.token, receiveRightPaddedTree));
|
|
243
|
+
importTypeAttributes = importTypeAttributes.padding.withElements(ctx.receiveNode(importTypeAttributes.padding.elements, receiveContainer));
|
|
244
|
+
importTypeAttributes = importTypeAttributes.withEnd(ctx.receiveNode(importTypeAttributes.end, receiveSpace));
|
|
245
|
+
return importTypeAttributes;
|
|
246
|
+
}
|
|
238
247
|
visitImportAttribute(importAttribute, ctx) {
|
|
239
248
|
importAttribute = importAttribute.withId(ctx.receiveValue(importAttribute.id, 0));
|
|
240
249
|
importAttribute = importAttribute.withPrefix(ctx.receiveNode(importAttribute.prefix, receiveSpace));
|
|
@@ -617,6 +626,7 @@ class Visitor extends __1.JavaScriptVisitor {
|
|
|
617
626
|
exportDeclaration = exportDeclaration.padding.withTypeOnly(ctx.receiveNode(exportDeclaration.padding.typeOnly, leftPaddedValueReceiver(1)));
|
|
618
627
|
exportDeclaration = exportDeclaration.withExportClause(ctx.receiveNode(exportDeclaration.exportClause, ctx.receiveTree));
|
|
619
628
|
exportDeclaration = exportDeclaration.padding.withModuleSpecifier(ctx.receiveNode(exportDeclaration.padding.moduleSpecifier, receiveLeftPaddedTree));
|
|
629
|
+
exportDeclaration = exportDeclaration.withAttributes(ctx.receiveNode(exportDeclaration.attributes, ctx.receiveTree));
|
|
620
630
|
return exportDeclaration;
|
|
621
631
|
}
|
|
622
632
|
visitExportAssignment(exportAssignment, ctx) {
|
|
@@ -772,9 +782,10 @@ class Visitor extends __1.JavaScriptVisitor {
|
|
|
772
782
|
_case = _case.withPrefix(ctx.receiveNode(_case.prefix, receiveSpace));
|
|
773
783
|
_case = _case.withMarkers(ctx.receiveNode(_case.markers, ctx.receiveMarkers));
|
|
774
784
|
_case = _case.withType(ctx.receiveValue(_case.type, 3));
|
|
775
|
-
_case = _case.padding.
|
|
785
|
+
_case = _case.padding.withCaseLabels(ctx.receiveNode(_case.padding.caseLabels, receiveContainer));
|
|
776
786
|
_case = _case.padding.withStatements(ctx.receiveNode(_case.padding.statements, receiveContainer));
|
|
777
787
|
_case = _case.padding.withBody(ctx.receiveNode(_case.padding.body, receiveRightPaddedTree));
|
|
788
|
+
_case = _case.withGuard(ctx.receiveNode(_case.guard, ctx.receiveTree));
|
|
778
789
|
return _case;
|
|
779
790
|
}
|
|
780
791
|
visitClassDeclaration(classDeclaration, ctx) {
|
|
@@ -935,6 +946,15 @@ class Visitor extends __1.JavaScriptVisitor {
|
|
|
935
946
|
instanceOf = instanceOf.withType(ctx.receiveValue(instanceOf.type, 5));
|
|
936
947
|
return instanceOf;
|
|
937
948
|
}
|
|
949
|
+
visitDeconstructionPattern(deconstructionPattern, ctx) {
|
|
950
|
+
deconstructionPattern = deconstructionPattern.withId(ctx.receiveValue(deconstructionPattern.id, 0));
|
|
951
|
+
deconstructionPattern = deconstructionPattern.withPrefix(ctx.receiveNode(deconstructionPattern.prefix, receiveSpace));
|
|
952
|
+
deconstructionPattern = deconstructionPattern.withMarkers(ctx.receiveNode(deconstructionPattern.markers, ctx.receiveMarkers));
|
|
953
|
+
deconstructionPattern = deconstructionPattern.withDeconstructor(ctx.receiveNode(deconstructionPattern.deconstructor, ctx.receiveTree));
|
|
954
|
+
deconstructionPattern = deconstructionPattern.padding.withNested(ctx.receiveNode(deconstructionPattern.padding.nested, receiveContainer));
|
|
955
|
+
deconstructionPattern = deconstructionPattern.withType(ctx.receiveValue(deconstructionPattern.type, 5));
|
|
956
|
+
return deconstructionPattern;
|
|
957
|
+
}
|
|
938
958
|
visitIntersectionType(intersectionType, ctx) {
|
|
939
959
|
intersectionType = intersectionType.withId(ctx.receiveValue(intersectionType.id, 0));
|
|
940
960
|
intersectionType = intersectionType.withPrefix(ctx.receiveNode(intersectionType.prefix, receiveSpace));
|
|
@@ -1129,6 +1149,7 @@ class Visitor extends __1.JavaScriptVisitor {
|
|
|
1129
1149
|
switchExpression = switchExpression.withMarkers(ctx.receiveNode(switchExpression.markers, ctx.receiveMarkers));
|
|
1130
1150
|
switchExpression = switchExpression.withSelector(ctx.receiveNode(switchExpression.selector, ctx.receiveTree));
|
|
1131
1151
|
switchExpression = switchExpression.withCases(ctx.receiveNode(switchExpression.cases, ctx.receiveTree));
|
|
1152
|
+
switchExpression = switchExpression.withType(ctx.receiveValue(switchExpression.type, 5));
|
|
1132
1153
|
return switchExpression;
|
|
1133
1154
|
}
|
|
1134
1155
|
visitSynchronized(synchronized, ctx) {
|
|
@@ -1277,6 +1298,13 @@ class Visitor extends __1.JavaScriptVisitor {
|
|
|
1277
1298
|
source = source.withText(ctx.receiveValue(source.text, 1));
|
|
1278
1299
|
return source;
|
|
1279
1300
|
}
|
|
1301
|
+
visitErroneous(erroneous, ctx) {
|
|
1302
|
+
erroneous = erroneous.withId(ctx.receiveValue(erroneous.id, 0));
|
|
1303
|
+
erroneous = erroneous.withPrefix(ctx.receiveNode(erroneous.prefix, receiveSpace));
|
|
1304
|
+
erroneous = erroneous.withMarkers(ctx.receiveNode(erroneous.markers, ctx.receiveMarkers));
|
|
1305
|
+
erroneous = erroneous.withText(ctx.receiveValue(erroneous.text, 1));
|
|
1306
|
+
return erroneous;
|
|
1307
|
+
}
|
|
1280
1308
|
}
|
|
1281
1309
|
class Factory {
|
|
1282
1310
|
create(type, ctx) {
|
|
@@ -1320,7 +1348,7 @@ class Factory {
|
|
|
1320
1348
|
return new tree_1.InferType(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, receiveLeftPaddedTree), ctx.receiveValue(null, 5));
|
|
1321
1349
|
}
|
|
1322
1350
|
if (type === "org.openrewrite.javascript.tree.JS$ImportType") {
|
|
1323
|
-
return new tree_1.ImportType(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, rightPaddedValueReceiver(1)), ctx.receiveNode(null,
|
|
1351
|
+
return new tree_1.ImportType(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, rightPaddedValueReceiver(1)), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveLeftPaddedTree), ctx.receiveNode(null, receiveContainer), ctx.receiveValue(null, 5));
|
|
1324
1352
|
}
|
|
1325
1353
|
if (type === "org.openrewrite.javascript.tree.JS$JsImport") {
|
|
1326
1354
|
return new tree_1.JsImport(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNodes(null, ctx.receiveTree), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, receiveLeftPaddedTree), ctx.receiveNode(null, ctx.receiveTree));
|
|
@@ -1337,6 +1365,9 @@ class Factory {
|
|
|
1337
1365
|
if (type === "org.openrewrite.javascript.tree.JS$ImportAttributes") {
|
|
1338
1366
|
return new tree_1.ImportAttributes(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveValue(null, 3), ctx.receiveNode(null, receiveContainer));
|
|
1339
1367
|
}
|
|
1368
|
+
if (type === "org.openrewrite.javascript.tree.JS$ImportTypeAttributes") {
|
|
1369
|
+
return new tree_1.ImportTypeAttributes(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, receiveRightPaddedTree), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveSpace));
|
|
1370
|
+
}
|
|
1340
1371
|
if (type === "org.openrewrite.javascript.tree.JS$ImportAttribute") {
|
|
1341
1372
|
return new tree_1.ImportAttribute(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, receiveLeftPaddedTree));
|
|
1342
1373
|
}
|
|
@@ -1461,7 +1492,7 @@ class Factory {
|
|
|
1461
1492
|
return new tree_1.BindingElement(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, receiveRightPaddedTree), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, receiveLeftPaddedTree), ctx.receiveValue(null, 5));
|
|
1462
1493
|
}
|
|
1463
1494
|
if (type === "org.openrewrite.javascript.tree.JS$ExportDeclaration") {
|
|
1464
|
-
return new tree_1.ExportDeclaration(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNodes(null, ctx.receiveTree), ctx.receiveNode(null, leftPaddedValueReceiver(1)), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, receiveLeftPaddedTree));
|
|
1495
|
+
return new tree_1.ExportDeclaration(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNodes(null, ctx.receiveTree), ctx.receiveNode(null, leftPaddedValueReceiver(1)), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, receiveLeftPaddedTree), ctx.receiveNode(null, ctx.receiveTree));
|
|
1465
1496
|
}
|
|
1466
1497
|
if (type === "org.openrewrite.javascript.tree.JS$ExportAssignment") {
|
|
1467
1498
|
return new tree_1.ExportAssignment(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNodes(null, ctx.receiveTree), ctx.receiveNode(null, leftPaddedValueReceiver(1)), ctx.receiveNode(null, ctx.receiveTree));
|
|
@@ -1515,7 +1546,7 @@ class Factory {
|
|
|
1515
1546
|
return new Java.Break(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, ctx.receiveTree));
|
|
1516
1547
|
}
|
|
1517
1548
|
if (type === "org.openrewrite.java.tree.J$Case") {
|
|
1518
|
-
return new Java.Case(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveValue(null, 3), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveRightPaddedTree));
|
|
1549
|
+
return new Java.Case(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveValue(null, 3), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveRightPaddedTree), ctx.receiveNode(null, ctx.receiveTree));
|
|
1519
1550
|
}
|
|
1520
1551
|
if (type === "org.openrewrite.java.tree.J$ClassDeclaration") {
|
|
1521
1552
|
return new Java.ClassDeclaration(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNodes(null, ctx.receiveTree), ctx.receiveNodes(null, ctx.receiveTree), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveLeftPaddedTree), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, receiveContainer), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveValue(null, 5));
|
|
@@ -1571,6 +1602,9 @@ class Factory {
|
|
|
1571
1602
|
if (type === "org.openrewrite.java.tree.J$InstanceOf") {
|
|
1572
1603
|
return new Java.InstanceOf(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, receiveRightPaddedTree), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveValue(null, 5));
|
|
1573
1604
|
}
|
|
1605
|
+
if (type === "org.openrewrite.java.tree.J$DeconstructionPattern") {
|
|
1606
|
+
return new Java.DeconstructionPattern(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, receiveContainer), ctx.receiveValue(null, 5));
|
|
1607
|
+
}
|
|
1574
1608
|
if (type === "org.openrewrite.java.tree.J$IntersectionType") {
|
|
1575
1609
|
return new Java.IntersectionType(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, receiveContainer));
|
|
1576
1610
|
}
|
|
@@ -1635,7 +1669,7 @@ class Factory {
|
|
|
1635
1669
|
return new Java.Switch(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, ctx.receiveTree));
|
|
1636
1670
|
}
|
|
1637
1671
|
if (type === "org.openrewrite.java.tree.J$SwitchExpression") {
|
|
1638
|
-
return new Java.SwitchExpression(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, ctx.receiveTree));
|
|
1672
|
+
return new Java.SwitchExpression(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveValue(null, 5));
|
|
1639
1673
|
}
|
|
1640
1674
|
if (type === "org.openrewrite.java.tree.J$Synchronized") {
|
|
1641
1675
|
return new Java.Synchronized(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveNode(null, ctx.receiveTree), ctx.receiveNode(null, ctx.receiveTree));
|
|
@@ -1688,6 +1722,9 @@ class Factory {
|
|
|
1688
1722
|
if (type === "org.openrewrite.java.tree.J$Unknown$Source") {
|
|
1689
1723
|
return new Java.Unknown.Source(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveValue(null, 1));
|
|
1690
1724
|
}
|
|
1725
|
+
if (type === "org.openrewrite.java.tree.J$Erroneous") {
|
|
1726
|
+
return new Java.Erroneous(ctx.receiveValue(null, 0), ctx.receiveNode(null, receiveSpace), ctx.receiveNode(null, ctx.receiveMarkers), ctx.receiveValue(null, 1));
|
|
1727
|
+
}
|
|
1691
1728
|
throw new Error("No factory method for type: " + type);
|
|
1692
1729
|
}
|
|
1693
1730
|
}
|