Skip to content

Commit 819de77

Browse files
authored
Updated content-tag to 4.1.0 (soft-breaking) (#241)
* soft-breaking: Updated content-tag to 4.1.0 * chore: Updated test assertions (find-template-tags) * soft-breaking: Updated test assertions (to-ecma) * chore: Updated test assertions (to-template-tag) * soft-breaking: Updated test assertions (update-javascript) * chore: Added changeset
1 parent 4dddc4f commit 819de77

Some content is hidden

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

43 files changed

+633
-666
lines changed

.changeset/social-baths-serve.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@codemod-utils/ast-template-tag": minor
3+
---
4+
5+
Updated content-tag to 4.1.0 (soft-breaking)

packages/ast/template-tag/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
},
5050
"dependencies": {
5151
"@codemod-utils/ast-javascript": "workspace:^",
52-
"content-tag": "^4.0.0"
52+
"content-tag": "^4.1.0"
5353
},
5454
"devDependencies": {
5555
"@codemod-utils/ast-template": "workspace:*",

packages/ast/template-tag/tests/find-template-tags/class-2.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ testOnPosix('find-template-tags > class (2)', function () {
2626
contentRange: {
2727
endByte: 222,
2828
endChar: 222,
29+
endUtf16Codepoint: 222,
2930
startByte: 152,
3031
startChar: 152,
32+
startUtf16Codepoint: 152,
3133
},
3234
contents: normalizeFile([
3335
``,
@@ -39,20 +41,26 @@ testOnPosix('find-template-tags > class (2)', function () {
3941
endRange: {
4042
endByte: 233,
4143
endChar: 233,
44+
endUtf16Codepoint: 233,
4245
startByte: 222,
4346
startChar: 222,
47+
startUtf16Codepoint: 222,
4448
},
4549
range: {
4650
endByte: 233,
4751
endChar: 233,
52+
endUtf16Codepoint: 233,
4853
startByte: 142,
4954
startChar: 142,
55+
startUtf16Codepoint: 142,
5056
},
5157
startRange: {
5258
endByte: 152,
5359
endChar: 152,
60+
endUtf16Codepoint: 152,
5461
startByte: 142,
5562
startChar: 142,
63+
startUtf16Codepoint: 142,
5664
},
5765
tagName: 'template',
5866
type: 'class-member',

packages/ast/template-tag/tests/find-template-tags/class-3.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ testOnPosix('find-template-tags > class (3)', function () {
4444
contentRange: {
4545
endByte: 287,
4646
endChar: 275,
47+
endUtf16Codepoint: 279,
4748
startByte: 156,
4849
startChar: 156,
50+
startUtf16Codepoint: 156,
4951
},
5052
contents: normalizeFile([
5153
``,
@@ -60,20 +62,26 @@ testOnPosix('find-template-tags > class (3)', function () {
6062
endRange: {
6163
endByte: 298,
6264
endChar: 286,
65+
endUtf16Codepoint: 290,
6366
startByte: 287,
6467
startChar: 275,
68+
startUtf16Codepoint: 279,
6569
},
6670
range: {
6771
endByte: 298,
6872
endChar: 286,
73+
endUtf16Codepoint: 290,
6974
startByte: 146,
7075
startChar: 146,
76+
startUtf16Codepoint: 146,
7177
},
7278
startRange: {
7379
endByte: 156,
7480
endChar: 156,
81+
endUtf16Codepoint: 156,
7582
startByte: 146,
7683
startChar: 146,
84+
startUtf16Codepoint: 146,
7785
},
7886
tagName: 'template',
7987
type: 'expression',
@@ -82,8 +90,10 @@ testOnPosix('find-template-tags > class (3)', function () {
8290
contentRange: {
8391
endByte: 608,
8492
endChar: 578,
93+
endUtf16Codepoint: 588,
8594
startByte: 423,
8695
startChar: 411,
96+
startUtf16Codepoint: 415,
8797
},
8898
contents: normalizeFile([
8999
``,
@@ -100,20 +110,26 @@ testOnPosix('find-template-tags > class (3)', function () {
100110
endRange: {
101111
endByte: 619,
102112
endChar: 589,
113+
endUtf16Codepoint: 599,
103114
startByte: 608,
104115
startChar: 578,
116+
startUtf16Codepoint: 588,
105117
},
106118
range: {
107119
endByte: 619,
108120
endChar: 589,
121+
endUtf16Codepoint: 599,
109122
startByte: 413,
110123
startChar: 401,
124+
startUtf16Codepoint: 405,
111125
},
112126
startRange: {
113127
endByte: 423,
114128
endChar: 411,
129+
endUtf16Codepoint: 415,
115130
startByte: 413,
116131
startChar: 401,
132+
startUtf16Codepoint: 405,
117133
},
118134
tagName: 'template',
119135
type: 'class-member',

packages/ast/template-tag/tests/find-template-tags/class-4.test.ts

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,14 @@ testOnPosix('find-template-tags > class (4)', function () {
108108

109109
assert.deepStrictEqual(templateTags, [
110110
{
111-
type: 'class-member',
112-
tagName: 'template',
111+
contentRange: {
112+
endByte: 2407,
113+
endChar: 2407,
114+
endUtf16Codepoint: 2407,
115+
startByte: 1551,
116+
startChar: 1551,
117+
startUtf16Codepoint: 1551,
118+
},
113119
contents: normalizeFile([
114120
``,
115121
` <UiFormField @errorMessage={{this.errorMessage}} @isWide={{@isWide}}>`,
@@ -146,30 +152,32 @@ testOnPosix('find-template-tags > class (4)', function () {
146152
` </UiFormField>`,
147153
` `,
148154
]),
155+
endRange: {
156+
endByte: 2418,
157+
endChar: 2418,
158+
endUtf16Codepoint: 2418,
159+
startByte: 2407,
160+
startChar: 2407,
161+
startUtf16Codepoint: 2407,
162+
},
149163
range: {
150-
startByte: 1541,
151164
endByte: 2418,
152-
startChar: 1541,
153165
endChar: 2418,
166+
endUtf16Codepoint: 2418,
167+
startByte: 1541,
168+
startChar: 1541,
169+
startUtf16Codepoint: 1541,
154170
},
155171
startRange: {
156-
startByte: 1541,
157172
endByte: 1551,
158-
startChar: 1541,
159173
endChar: 1551,
174+
endUtf16Codepoint: 1551,
175+
startByte: 1541,
176+
startChar: 1541,
177+
startUtf16Codepoint: 1541,
160178
},
161-
contentRange: {
162-
startByte: 1551,
163-
endByte: 2407,
164-
startChar: 1551,
165-
endChar: 2407,
166-
},
167-
endRange: {
168-
startByte: 2407,
169-
endByte: 2418,
170-
startChar: 2407,
171-
endChar: 2418,
172-
},
179+
tagName: 'template',
180+
type: 'class-member',
173181
},
174182
]);
175183
});

packages/ast/template-tag/tests/find-template-tags/rendering-test-2.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,35 @@ testOnPosix('find-template-tags > rendering test (2)', function () {
5454
contentRange: {
5555
endByte: 799,
5656
endChar: 799,
57+
endUtf16Codepoint: 799,
5758
startByte: 787,
5859
startChar: 787,
60+
startUtf16Codepoint: 787,
5961
},
6062
contents: '<Example1 />',
6163
endRange: {
6264
endByte: 810,
6365
endChar: 810,
66+
endUtf16Codepoint: 810,
6467
startByte: 799,
6568
startChar: 799,
69+
startUtf16Codepoint: 799,
6670
},
6771
range: {
6872
endByte: 810,
6973
endChar: 810,
74+
endUtf16Codepoint: 810,
7075
startByte: 777,
7176
startChar: 777,
77+
startUtf16Codepoint: 777,
7278
},
7379
startRange: {
7480
endByte: 787,
7581
endChar: 787,
82+
endUtf16Codepoint: 787,
7683
startByte: 777,
7784
startChar: 777,
85+
startUtf16Codepoint: 777,
7886
},
7987
tagName: 'template',
8088
type: 'expression',
@@ -83,8 +91,10 @@ testOnPosix('find-template-tags > rendering test (2)', function () {
8391
contentRange: {
8492
endByte: 995,
8593
endChar: 995,
94+
endUtf16Codepoint: 995,
8695
startByte: 950,
8796
startChar: 950,
97+
startUtf16Codepoint: 950,
8898
},
8999
contents: normalizeFile([
90100
``,
@@ -94,20 +104,26 @@ testOnPosix('find-template-tags > rendering test (2)', function () {
94104
endRange: {
95105
endByte: 1006,
96106
endChar: 1006,
107+
endUtf16Codepoint: 1006,
97108
startByte: 995,
98109
startChar: 995,
110+
startUtf16Codepoint: 995,
99111
},
100112
range: {
101113
endByte: 1006,
102114
endChar: 1006,
115+
endUtf16Codepoint: 1006,
103116
startByte: 940,
104117
startChar: 940,
118+
startUtf16Codepoint: 940,
105119
},
106120
startRange: {
107121
endByte: 950,
108122
endChar: 950,
123+
endUtf16Codepoint: 950,
109124
startByte: 940,
110125
startChar: 940,
126+
startUtf16Codepoint: 940,
111127
},
112128
tagName: 'template',
113129
type: 'expression',

packages/ast/template-tag/tests/find-template-tags/rendering-test-3.test.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,27 +64,35 @@ testOnPosix('find-template-tags > rendering test (3)', function () {
6464
contentRange: {
6565
endByte: 806,
6666
endChar: 806,
67+
endUtf16Codepoint: 806,
6768
startByte: 794,
6869
startChar: 794,
70+
startUtf16Codepoint: 794,
6971
},
7072
contents: '<Example1 />',
7173
endRange: {
7274
endByte: 817,
7375
endChar: 817,
76+
endUtf16Codepoint: 817,
7477
startByte: 806,
7578
startChar: 806,
79+
startUtf16Codepoint: 806,
7680
},
7781
range: {
7882
endByte: 817,
7983
endChar: 817,
84+
endUtf16Codepoint: 817,
8085
startByte: 784,
8186
startChar: 784,
87+
startUtf16Codepoint: 784,
8288
},
8389
startRange: {
8490
endByte: 794,
8591
endChar: 794,
92+
endUtf16Codepoint: 794,
8693
startByte: 784,
8794
startChar: 784,
95+
startUtf16Codepoint: 784,
8896
},
8997
tagName: 'template',
9098
type: 'expression',
@@ -93,8 +101,10 @@ testOnPosix('find-template-tags > rendering test (3)', function () {
93101
contentRange: {
94102
endByte: 1040,
95103
endChar: 1040,
104+
endUtf16Codepoint: 1040,
96105
startByte: 991,
97106
startChar: 991,
107+
startUtf16Codepoint: 991,
98108
},
99109
contents: normalizeFile([
100110
``,
@@ -104,20 +114,26 @@ testOnPosix('find-template-tags > rendering test (3)', function () {
104114
endRange: {
105115
endByte: 1051,
106116
endChar: 1051,
117+
endUtf16Codepoint: 1051,
107118
startByte: 1040,
108119
startChar: 1040,
120+
startUtf16Codepoint: 1040,
109121
},
110122
range: {
111123
endByte: 1051,
112124
endChar: 1051,
125+
endUtf16Codepoint: 1051,
113126
startByte: 981,
114127
startChar: 981,
128+
startUtf16Codepoint: 981,
115129
},
116130
startRange: {
117131
endByte: 991,
118132
endChar: 991,
133+
endUtf16Codepoint: 991,
119134
startByte: 981,
120135
startChar: 981,
136+
startUtf16Codepoint: 981,
121137
},
122138
tagName: 'template',
123139
type: 'expression',
@@ -126,27 +142,35 @@ testOnPosix('find-template-tags > rendering test (3)', function () {
126142
contentRange: {
127143
endByte: 1220,
128144
endChar: 1220,
145+
endUtf16Codepoint: 1220,
129146
startByte: 1191,
130147
startChar: 1191,
148+
startUtf16Codepoint: 1191,
131149
},
132150
contents: '<Example1 class="my-style" />',
133151
endRange: {
134152
endByte: 1231,
135153
endChar: 1231,
154+
endUtf16Codepoint: 1231,
136155
startByte: 1220,
137156
startChar: 1220,
157+
startUtf16Codepoint: 1220,
138158
},
139159
range: {
140160
endByte: 1231,
141161
endChar: 1231,
162+
endUtf16Codepoint: 1231,
142163
startByte: 1181,
143164
startChar: 1181,
165+
startUtf16Codepoint: 1181,
144166
},
145167
startRange: {
146168
endByte: 1191,
147169
endChar: 1191,
170+
endUtf16Codepoint: 1191,
148171
startByte: 1181,
149172
startChar: 1181,
173+
startUtf16Codepoint: 1181,
150174
},
151175
tagName: 'template',
152176
type: 'expression',

0 commit comments

Comments
 (0)