Skip to content

Commit 709fd49

Browse files
authored
chore: fix test for postcss-scss v4.0.7 (#398)
1 parent a4d31f0 commit 709fd49

10 files changed

+183
-103
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"eslint-visitor-keys": "^3.0.0",
5858
"espree": "^9.0.0",
5959
"postcss": "^8.4.28",
60-
"postcss-scss": "^4.0.6"
60+
"postcss-scss": "^4.0.7"
6161
},
6262
"devDependencies": {
6363
"@changesets/changelog-github": "^0.4.8",

tests/fixtures/parser/style-context/empty-style-element-output.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
"nodes": [],
1010
"source": {
1111
"end": {
12-
"column": 8,
1312
"line": 7,
13+
"column": 8,
1414
"offset": 52
1515
},
1616
"inputId": 0,
1717
"start": {
18-
"column": 8,
1918
"line": 7,
19+
"column": 8,
2020
"offset": 52
2121
}
2222
},

tests/fixtures/parser/style-context/one-line-css-output.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -23,51 +23,51 @@
2323
"between": ": "
2424
},
2525
"type": "decl",
26+
"prop": "color",
27+
"value": "red",
2628
"source": {
2729
"end": {
28-
"column": 30,
2930
"line": 7,
31+
"column": 30,
3032
"offset": 99
3133
},
3234
"inputId": 0,
3335
"start": {
34-
"column": 20,
3536
"line": 7,
37+
"column": 20,
3638
"offset": 89
3739
}
38-
},
39-
"prop": "color",
40-
"value": "red"
40+
}
4141
}
4242
],
43+
"selector": ".myClass",
4344
"source": {
4445
"end": {
45-
"column": 32,
4646
"line": 7,
47+
"column": 32,
4748
"offset": 101
4849
},
4950
"inputId": 0,
5051
"start": {
51-
"column": 9,
5252
"line": 7,
53+
"column": 9,
5354
"offset": 78
5455
}
5556
},
56-
"selector": ".myClass",
5757
"lastEach": 1,
5858
"indexes": {}
5959
}
6060
],
6161
"source": {
6262
"end": {
63-
"column": 34,
6463
"line": 7,
64+
"column": 34,
6565
"offset": 103
6666
},
6767
"inputId": 0,
6868
"start": {
69-
"column": 8,
7069
"line": 7,
70+
"column": 8,
7171
"offset": 77
7272
}
7373
},

tests/fixtures/parser/style-context/parse-error-output.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
"endLine": 4,
1111
"endColumn": 24,
1212
"input": {
13+
"line": 4,
1314
"column": 11,
14-
"endColumn": 24,
1515
"endLine": 4,
16-
"line": 4,
16+
"endColumn": 24,
1717
"source": "\n // This syntax is intentionally invalid CSS - this is to be used to test resiliency against invalid input\n .container {\n class .div-class/35\n # Weird comment\n color: red;\n\n .span-class begin\n font-weight: bold;\n end\n }\n"
1818
}
1919
}

tests/fixtures/parser/style-context/simple-css-output.json

+18-18
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,37 @@
2323
"between": ": "
2424
},
2525
"type": "decl",
26+
"prop": "color",
27+
"value": "red",
2628
"source": {
2729
"end": {
28-
"column": 15,
2930
"line": 11,
31+
"column": 15,
3032
"offset": 117
3133
},
3234
"inputId": 0,
3335
"start": {
34-
"column": 5,
3536
"line": 11,
37+
"column": 5,
3638
"offset": 107
3739
}
38-
},
39-
"prop": "color",
40-
"value": "red"
40+
}
4141
}
4242
],
43+
"selector": ".myClass",
4344
"source": {
4445
"end": {
45-
"column": 3,
4646
"line": 12,
47+
"column": 3,
4748
"offset": 121
4849
},
4950
"inputId": 0,
5051
"start": {
51-
"column": 3,
5252
"line": 10,
53+
"column": 3,
5354
"offset": 92
5455
}
5556
},
56-
"selector": ".myClass",
5757
"lastEach": 1,
5858
"indexes": {}
5959
},
@@ -72,51 +72,51 @@
7272
"between": ": "
7373
},
7474
"type": "decl",
75+
"prop": "font-size",
76+
"value": "xx-large",
7577
"source": {
7678
"end": {
77-
"column": 24,
7879
"line": 15,
80+
"column": 24,
7981
"offset": 153
8082
},
8183
"inputId": 0,
8284
"start": {
83-
"column": 5,
8485
"line": 15,
86+
"column": 5,
8587
"offset": 134
8688
}
87-
},
88-
"prop": "font-size",
89-
"value": "xx-large"
89+
}
9090
}
9191
],
92+
"selector": "b",
9293
"source": {
9394
"end": {
94-
"column": 3,
9595
"line": 16,
96+
"column": 3,
9697
"offset": 157
9798
},
9899
"inputId": 0,
99100
"start": {
100-
"column": 3,
101101
"line": 14,
102+
"column": 3,
102103
"offset": 126
103104
}
104105
},
105-
"selector": "b",
106106
"lastEach": 1,
107107
"indexes": {}
108108
}
109109
],
110110
"source": {
111111
"end": {
112-
"column": 1,
113112
"line": 17,
113+
"column": 1,
114114
"offset": 159
115115
},
116116
"inputId": 0,
117117
"start": {
118-
"column": 8,
119118
"line": 9,
119+
"column": 8,
120120
"offset": 89
121121
}
122122
},

tests/fixtures/parser/style-context/simple-scss-output.json

+26-26
Original file line numberDiff line numberDiff line change
@@ -35,58 +35,58 @@
3535
"text": "This is an inline comment"
3636
},
3737
"type": "comment",
38+
"text": "This is an inline comment",
3839
"source": {
3940
"end": {
40-
"offset": 196,
4141
"line": 10,
42-
"column": 34
42+
"column": 34,
43+
"offset": 196
4344
},
4445
"inputId": 0,
4546
"start": {
46-
"column": 7,
4747
"line": 10,
48+
"column": 7,
4849
"offset": 169
4950
}
50-
},
51-
"text": "This is an inline comment"
51+
}
5252
},
5353
{
5454
"raws": {
5555
"before": "\n ",
5656
"between": ": "
5757
},
5858
"type": "decl",
59+
"prop": "color",
60+
"value": "red",
5961
"source": {
6062
"end": {
61-
"column": 17,
6263
"line": 11,
64+
"column": 17,
6365
"offset": 214
6466
},
6567
"inputId": 0,
6668
"start": {
67-
"column": 7,
6869
"line": 11,
70+
"column": 7,
6971
"offset": 204
7072
}
71-
},
72-
"prop": "color",
73-
"value": "red"
73+
}
7474
}
7575
],
76+
"selector": ".div-class",
7677
"source": {
7778
"end": {
78-
"column": 5,
7979
"line": 12,
80+
"column": 5,
8081
"offset": 220
8182
},
8283
"inputId": 0,
8384
"start": {
84-
"column": 5,
8585
"line": 9,
86+
"column": 5,
8687
"offset": 150
8788
}
8889
},
89-
"selector": ".div-class",
9090
"lastEach": 1,
9191
"indexes": {}
9292
},
@@ -105,69 +105,69 @@
105105
"between": ": "
106106
},
107107
"type": "decl",
108+
"prop": "font-weight",
109+
"value": "bold",
108110
"source": {
109111
"end": {
110-
"column": 24,
111112
"line": 15,
113+
"column": 24,
112114
"offset": 264
113115
},
114116
"inputId": 0,
115117
"start": {
116-
"column": 7,
117118
"line": 15,
119+
"column": 7,
118120
"offset": 247
119121
}
120-
},
121-
"prop": "font-weight",
122-
"value": "bold"
122+
}
123123
}
124124
],
125+
"selector": ".span-class",
125126
"source": {
126127
"end": {
127-
"column": 5,
128128
"line": 16,
129+
"column": 5,
129130
"offset": 270
130131
},
131132
"inputId": 0,
132133
"start": {
133-
"column": 5,
134134
"line": 14,
135+
"column": 5,
135136
"offset": 227
136137
}
137138
},
138-
"selector": ".span-class",
139139
"lastEach": 1,
140140
"indexes": {}
141141
}
142142
],
143+
"selector": ".container",
143144
"source": {
144145
"end": {
145-
"column": 3,
146146
"line": 17,
147+
"column": 3,
147148
"offset": 274
148149
},
149150
"inputId": 0,
150151
"start": {
151-
"column": 3,
152152
"line": 8,
153+
"column": 3,
153154
"offset": 133
154155
}
155156
},
156-
"selector": ".container",
157157
"lastEach": 1,
158158
"indexes": {}
159159
}
160160
],
161161
"source": {
162162
"end": {
163-
"column": 1,
164163
"line": 18,
164+
"column": 1,
165165
"offset": 276
166166
},
167167
"inputId": 0,
168168
"start": {
169-
"column": 20,
170169
"line": 7,
170+
"column": 20,
171171
"offset": 130
172172
}
173173
},

0 commit comments

Comments
 (0)