Repository navigation
Added
- Support for Xcode 27's JSON project format.
parseXcprojreads any JSON5project.xcprojinto plain JSON values, accepting comments, unquoted keys, and single-quoted strings the way Xcode reads hand-edited files.buildXcprojwrites them back in the exact layout Xcode uses, deriving the key order of each record kind, the sorting of settings and sets, and the choice between single-line and multi-line containers from the project schema. A file Xcode wrote rebuilds byte for byte, and any other input reaches the same bytes in one build. Malformed input fails with the newXcprojParseErrorcarrying line and column, and values Xcode could not read back, such as U+0000 and unpaired surrogates, fail with the newXcprojBuildErrorand the path of the offending value. Xcprojis the object model over the format, with the document-first design ofXcodeProject.getBuildSettingandresolveBuildSettingread per configuration through the target's settings, the target's xcconfig, the project's settings, and the project's xcconfig, and list settings read as arrays.setBuildSettingandremoveBuildSettingwork for every configuration or for one, folding values into plain and[config=Name]keys the way Xcode saves them.files(),references(), andfindReferencewalk the file tree by name path, andfindTargetandfindMainAppTargetfind targets.renameTargetandremoveTargetonXcprojfollow every place the format names a target, which covers dependencies, test hosts, build-phase references in file memberships, folder memberships and exception sets, the product and the target's path to it, and theTEST_TARGET_NAME,TEST_HOST, andBUNDLE_LOADERsettings. Name paths switch between their string and array encodings as names gain or lose a/, and a rename the format cannot represent is refused without changing anything. Both reproduce Xcode's own saves of the same edits byte for byte.- The views
XcprojTargetandXcprojReference, the value typesXcprojValue,XcprojObject,XcprojArray, andXcprojBuildSettingValue, and the optionsXcprojBuildSettingOptionsandXcprojResolveBuildSettingOptionsship as public API.
Changed
- The corpus sweep (
pnpm corpus) auditsproject.xcprojfiles next to the other formats, and caps each format at the limit on its own, so a root rich in one format no longer hides the others.
Full Changelog: 0.12.0...0.13.0