Commit a2ca454
Fix pbxproj output differences (keys not sorted, extra properties) (#46)
* Avoid default file props; stable JSON key ordering
Stop auto-populating PBXFileReference defaults (fileEncoding, includeInIndex) and avoid initializing empty input/output path arrays in PBX build phases so the library doesn't add properties Xcode omits when round-tripping projects. Add deterministic JSON writer ordering (case-sensitive ASCII with "isa" first) for stable output. Update tests to reflect the removed defaults and to skip fixtures that rely on original non-sorted key order.
* Update fixtures with sorted keys instead of skipping tests
Re-process project.pbxproj and project-with-entitlements.pbxproj
through the parser/writer to normalize key ordering, then restore
them in inOutFixtures array.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent d9ea6c3 commit a2ca454
File tree
6 files changed
+33
-59
lines changed- src
- api
- __tests__
- json
- __tests__/fixtures
6 files changed
+33
-59
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
112 | 109 | | |
113 | 110 | | |
114 | 111 | | |
| |||
118 | 115 | | |
119 | 116 | | |
120 | 117 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | 118 | | |
126 | 119 | | |
127 | 120 | | |
| |||
132 | 125 | | |
133 | 126 | | |
134 | 127 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | 128 | | |
141 | 129 | | |
142 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
261 | 252 | | |
262 | 253 | | |
263 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
93 | 89 | | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 90 | + | |
98 | 91 | | |
99 | 92 | | |
100 | 93 | | |
101 | 94 | | |
102 | 95 | | |
103 | | - | |
| 96 | + | |
104 | 97 | | |
105 | 98 | | |
106 | | - | |
| 99 | + | |
107 | 100 | | |
108 | 101 | | |
109 | | - | |
| 102 | + | |
110 | 103 | | |
111 | 104 | | |
112 | 105 | | |
| |||
141 | 134 | | |
142 | 135 | | |
143 | 136 | | |
144 | | - | |
145 | | - | |
146 | 137 | | |
147 | 138 | | |
148 | 139 | | |
| |||
157 | 148 | | |
158 | 149 | | |
159 | 150 | | |
160 | | - | |
161 | | - | |
162 | 151 | | |
163 | 152 | | |
164 | 153 | | |
| |||
173 | 162 | | |
174 | 163 | | |
175 | 164 | | |
176 | | - | |
177 | | - | |
178 | 165 | | |
179 | 166 | | |
180 | 167 | | |
| |||
189 | 176 | | |
190 | 177 | | |
191 | 178 | | |
192 | | - | |
193 | | - | |
194 | 179 | | |
195 | 180 | | |
196 | 181 | | |
| |||
205 | 190 | | |
206 | 191 | | |
207 | 192 | | |
208 | | - | |
209 | | - | |
210 | 193 | | |
211 | 194 | | |
212 | 195 | | |
| |||
221 | 204 | | |
222 | 205 | | |
223 | 206 | | |
224 | | - | |
225 | | - | |
226 | 207 | | |
227 | 208 | | |
228 | 209 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
279 | 280 | | |
280 | 281 | | |
281 | 282 | | |
| |||
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
293 | | - | |
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
| |||
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
317 | | - | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | 355 | | |
357 | 356 | | |
358 | 357 | | |
| |||
378 | 377 | | |
379 | 378 | | |
380 | 379 | | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
421 | 421 | | |
422 | 422 | | |
423 | 423 | | |
424 | | - | |
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
| |||
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
| 433 | + | |
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
180 | 187 | | |
181 | 188 | | |
182 | 189 | | |
| |||
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
284 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
285 | 299 | | |
286 | 300 | | |
287 | 301 | | |
| |||
0 commit comments