Skip to content

Commit 0fa5865

Browse files
committed
remove estree compatibility from default parser, use default parser in test
1 parent 008a162 commit 0fa5865

File tree

85 files changed

+254
-263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+254
-263
lines changed

packages/codemod-utils/src/jscodeshift/parser.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,9 @@ export const defaultJSCodeshiftOptions: ParserOptions = {
2828
["pipelineOperator", { proposal: "minimal" }],
2929
"throwExpressions",
3030
"typescript",
31-
"estree",
31+
// "estree",
3232
"jsx",
33-
"asyncGenerators",
34-
"classProperties",
35-
"doExpressions",
36-
"functionBind",
37-
"functionSent",
38-
"objectRestSpread",
3933
"importAttributes",
40-
"dynamicImport",
41-
"nullishCoalescingOperator",
42-
"optionalChaining",
4334
["decorators", { decoratorsBeforeExport: false }],
4435
],
4536
};

packages/codemods/Feature Flags/remove-unused-feature-flags/test/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("remove-unused-feature-flags", () => {
1717
source: INPUT,
1818
};
1919

20-
const actualOutput = transform(fileInfo, buildApi("tsx"), {});
20+
const actualOutput = transform(fileInfo, buildApi(), {});
2121

2222
assert.deepEqual(actualOutput, undefined);
2323
});
@@ -47,7 +47,7 @@ describe("remove-unused-feature-flags", () => {
4747
source: INPUT,
4848
};
4949

50-
const actualOutput = transform(fileInfo, buildApi("tsx"), {});
50+
const actualOutput = transform(fileInfo, buildApi(), {});
5151

5252
assert.deepEqual(
5353
actualOutput?.replace(/\s/gm, ""),

packages/codemods/devcycle/launchdarkly-to-devcycle/test/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe("launchdarkly-to-devcycle", () => {
2222
path: "index.js",
2323
source: INPUT,
2424
},
25-
buildApi("tsx"),
25+
buildApi(),
2626
);
2727

2828
assert.deepEqual(
@@ -46,7 +46,7 @@ describe("launchdarkly-to-devcycle", () => {
4646
path: "index.js",
4747
source: INPUT,
4848
},
49-
buildApi("tsx"),
49+
buildApi(),
5050
);
5151

5252
assert.deepEqual(

packages/codemods/ember/5/app-controller-router-props/test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe("ember 5 app-controller-router-props", () => {
5252
source: INPUT,
5353
};
5454

55-
const actualOutput = transform(fileInfo, buildApi("js"));
55+
const actualOutput = transform(fileInfo, buildApi());
5656

5757
assert.deepEqual(
5858
actualOutput?.replace(/\W/gm, ""),

packages/codemods/ember/5/array-wrapper/test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe("ember 5 array-wrapper", () => {
2121
source: INPUT,
2222
};
2323

24-
const actualOutput = transform(fileInfo, buildApi("js"));
24+
const actualOutput = transform(fileInfo, buildApi());
2525

2626
assert.deepEqual(
2727
actualOutput?.replace(/\W/gm, ""),

packages/codemods/ember/5/convert-module-for-to-setup-test/test/test.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
194194
source: INPUT,
195195
};
196196

197-
const actualOutput = transform(fileInfo, buildApi("js"));
197+
const actualOutput = transform(fileInfo, buildApi());
198198

199199
assert.deepEqual(
200200
actualOutput?.replace(/\W/gm, ""),
@@ -234,7 +234,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
234234
source: INPUT,
235235
};
236236

237-
const actualOutput = transform(fileInfo, buildApi("js"));
237+
const actualOutput = transform(fileInfo, buildApi());
238238

239239
assert.deepEqual(
240240
actualOutput?.replace(/\W/gm, ""),
@@ -366,7 +366,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
366366
source: INPUT,
367367
};
368368

369-
const actualOutput = transform(fileInfo, buildApi("js"));
369+
const actualOutput = transform(fileInfo, buildApi());
370370

371371
assert.deepEqual(
372372
actualOutput?.replace(/\W/gm, ""),
@@ -408,7 +408,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
408408
source: INPUT,
409409
};
410410

411-
const actualOutput = transform(fileInfo, buildApi("js"));
411+
const actualOutput = transform(fileInfo, buildApi());
412412

413413
assert.deepEqual(
414414
actualOutput?.replace(/\W/gm, ""),
@@ -466,7 +466,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
466466
source: INPUT,
467467
};
468468

469-
const actualOutput = transform(fileInfo, buildApi("js"));
469+
const actualOutput = transform(fileInfo, buildApi());
470470

471471
assert.deepEqual(
472472
actualOutput?.replace(/\W/gm, ""),
@@ -525,7 +525,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
525525
source: INPUT,
526526
};
527527

528-
const actualOutput = transform(fileInfo, buildApi("js"));
528+
const actualOutput = transform(fileInfo, buildApi());
529529

530530
assert.deepEqual(
531531
actualOutput?.replace(/\W/gm, ""),
@@ -549,7 +549,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
549549
source: INPUT,
550550
};
551551

552-
const actualOutput = transform(fileInfo, buildApi("js"));
552+
const actualOutput = transform(fileInfo, buildApi());
553553

554554
assert.deepEqual(
555555
actualOutput?.replace(/\W/gm, ""),
@@ -875,7 +875,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
875875
source: INPUT,
876876
};
877877

878-
const actualOutput = transform(fileInfo, buildApi("js"));
878+
const actualOutput = transform(fileInfo, buildApi());
879879

880880
assert.deepEqual(
881881
actualOutput?.replace(/\W/gm, ""),
@@ -940,7 +940,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
940940
source: INPUT,
941941
};
942942

943-
const actualOutput = transform(fileInfo, buildApi("js"));
943+
const actualOutput = transform(fileInfo, buildApi());
944944

945945
assert.deepEqual(
946946
actualOutput?.replace(/\W/gm, ""),
@@ -1113,7 +1113,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
11131113
source: INPUT,
11141114
};
11151115

1116-
const actualOutput = transform(fileInfo, buildApi("js"));
1116+
const actualOutput = transform(fileInfo, buildApi());
11171117

11181118
assert.deepEqual(
11191119
actualOutput?.replace(/\W/gm, ""),
@@ -1168,7 +1168,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
11681168
source: INPUT,
11691169
};
11701170

1171-
const actualOutput = transform(fileInfo, buildApi("js"));
1171+
const actualOutput = transform(fileInfo, buildApi());
11721172

11731173
assert.deepEqual(
11741174
actualOutput?.replace(/\W/gm, ""),
@@ -1283,7 +1283,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
12831283
source: INPUT,
12841284
};
12851285

1286-
const actualOutput = transform(fileInfo, buildApi("js"));
1286+
const actualOutput = transform(fileInfo, buildApi());
12871287

12881288
assert.deepEqual(
12891289
actualOutput?.replace(/\W/gm, ""),
@@ -1320,7 +1320,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
13201320
source: INPUT,
13211321
};
13221322

1323-
const actualOutput = transform(fileInfo, buildApi("js"));
1323+
const actualOutput = transform(fileInfo, buildApi());
13241324

13251325
assert.deepEqual(
13261326
actualOutput?.replace(/\W/gm, ""),
@@ -1371,7 +1371,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
13711371
source: INPUT,
13721372
};
13731373

1374-
const actualOutput = transform(fileInfo, buildApi("js"));
1374+
const actualOutput = transform(fileInfo, buildApi());
13751375

13761376
assert.deepEqual(
13771377
actualOutput?.replace(/\W/gm, ""),
@@ -1415,7 +1415,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
14151415
source: INPUT,
14161416
};
14171417

1418-
const actualOutput = transform(fileInfo, buildApi("js"));
1418+
const actualOutput = transform(fileInfo, buildApi());
14191419

14201420
assert.deepEqual(
14211421
actualOutput?.replace(/\W/gm, ""),
@@ -1496,7 +1496,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
14961496
source: INPUT,
14971497
};
14981498

1499-
const actualOutput = transform(fileInfo, buildApi("js"));
1499+
const actualOutput = transform(fileInfo, buildApi());
15001500

15011501
assert.deepEqual(
15021502
actualOutput?.replace(/\W/gm, ""),
@@ -1532,7 +1532,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
15321532
source: INPUT,
15331533
};
15341534

1535-
const actualOutput = transform(fileInfo, buildApi("js"));
1535+
const actualOutput = transform(fileInfo, buildApi());
15361536

15371537
assert.deepEqual(
15381538
actualOutput?.replace(/\W/gm, ""),
@@ -1566,7 +1566,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
15661566
source: INPUT,
15671567
};
15681568

1569-
const actualOutput = transform(fileInfo, buildApi("js"));
1569+
const actualOutput = transform(fileInfo, buildApi());
15701570

15711571
assert.deepEqual(
15721572
actualOutput?.replace(/\W/gm, ""),
@@ -1665,7 +1665,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
16651665
source: INPUT,
16661666
};
16671667

1668-
const actualOutput = transform(fileInfo, buildApi("js"));
1668+
const actualOutput = transform(fileInfo, buildApi());
16691669

16701670
assert.deepEqual(
16711671
actualOutput?.replace(/\W/gm, ""),
@@ -1730,7 +1730,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
17301730
source: INPUT,
17311731
};
17321732

1733-
const actualOutput = transform(fileInfo, buildApi("js"));
1733+
const actualOutput = transform(fileInfo, buildApi());
17341734

17351735
assert.deepEqual(
17361736
actualOutput?.replace(/\W/gm, ""),
@@ -1752,7 +1752,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
17521752
source: INPUT,
17531753
};
17541754

1755-
const actualOutput = transform(fileInfo, buildApi("js"));
1755+
const actualOutput = transform(fileInfo, buildApi());
17561756

17571757
assert.deepEqual(
17581758
actualOutput?.replace(/\W/gm, ""),
@@ -1842,7 +1842,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
18421842
source: INPUT,
18431843
};
18441844

1845-
const actualOutput = transform(fileInfo, buildApi("js"));
1845+
const actualOutput = transform(fileInfo, buildApi());
18461846

18471847
assert.deepEqual(
18481848
actualOutput?.replace(/\W/gm, ""),
@@ -1865,7 +1865,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
18651865
source: INPUT,
18661866
};
18671867

1868-
const actualOutput = transform(fileInfo, buildApi("js"));
1868+
const actualOutput = transform(fileInfo, buildApi());
18691869

18701870
assert.deepEqual(
18711871
actualOutput?.replace(/\W/gm, ""),
@@ -1924,7 +1924,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
19241924
source: INPUT,
19251925
};
19261926

1927-
const actualOutput = transform(fileInfo, buildApi("js"));
1927+
const actualOutput = transform(fileInfo, buildApi());
19281928

19291929
assert.deepEqual(
19301930
actualOutput?.replace(/\W/gm, ""),
@@ -2139,7 +2139,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
21392139
source: INPUT,
21402140
};
21412141

2142-
const actualOutput = transform(fileInfo, buildApi("js"));
2142+
const actualOutput = transform(fileInfo, buildApi());
21432143

21442144
assert.deepEqual(
21452145
actualOutput?.replace(/\W/gm, ""),
@@ -2162,7 +2162,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
21622162
source: INPUT,
21632163
};
21642164

2165-
const actualOutput = transform(fileInfo, buildApi("js"));
2165+
const actualOutput = transform(fileInfo, buildApi());
21662166

21672167
assert.deepEqual(
21682168
actualOutput?.replace(/\W/gm, ""),
@@ -2196,7 +2196,7 @@ describe("ember 5 convert-module-for-to-setup-test", () => {
21962196
source: INPUT,
21972197
};
21982198

2199-
const actualOutput = transform(fileInfo, buildApi("js"));
2199+
const actualOutput = transform(fileInfo, buildApi());
22002200

22012201
assert.deepEqual(
22022202
actualOutput?.replace(/\W/gm, ""),

packages/codemods/ember/5/cp-property-map/test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("ember 5 cp-property-map", () => {
2727
source: INPUT,
2828
};
2929

30-
const actualOutput = transform(fileInfo, buildApi("js"));
30+
const actualOutput = transform(fileInfo, buildApi());
3131

3232
assert.deepEqual(
3333
actualOutput?.replace(/\W/gm, ""),

packages/codemods/ember/5/cp-property/test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("ember 5 cp-property", () => {
2727
source: INPUT,
2828
};
2929

30-
const actualOutput = transform(fileInfo, buildApi("js"));
30+
const actualOutput = transform(fileInfo, buildApi());
3131

3232
assert.deepEqual(
3333
actualOutput?.replace(/\W/gm, ""),

packages/codemods/ember/5/cp-volatile/test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("ember 5 cp-volatile", () => {
2727
source: INPUT,
2828
};
2929

30-
const actualOutput = transform(fileInfo, buildApi("js"));
30+
const actualOutput = transform(fileInfo, buildApi());
3131

3232
assert.deepEqual(
3333
actualOutput?.replace(/\W/gm, ""),

packages/codemods/ember/5/deprecate-merge/test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("ember 5 deprecate-merge", () => {
2727
source: INPUT,
2828
};
2929

30-
const actualOutput = transform(fileInfo, buildApi("js"));
30+
const actualOutput = transform(fileInfo, buildApi());
3131

3232
assert.deepEqual(
3333
actualOutput?.replace(/\W/gm, ""),

packages/codemods/ember/5/deprecate-router-events/test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe("ember 5 deprecate-router-events", () => {
6161
source: INPUT,
6262
};
6363

64-
const actualOutput = transform(fileInfo, buildApi("js"));
64+
const actualOutput = transform(fileInfo, buildApi());
6565

6666
assert.deepEqual(
6767
actualOutput?.replace(/\W/gm, ""),

packages/codemods/ember/5/ember-jquery-legacy/test/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe("ember 5 ember-jquery-legacy", () => {
2828
source: INPUT,
2929
};
3030

31-
const actualOutput = transform(fileInfo, buildApi("js"));
31+
const actualOutput = transform(fileInfo, buildApi());
3232

3333
assert.deepEqual(
3434
actualOutput?.replace(/\W/gm, ""),

0 commit comments

Comments
 (0)