{"_id":"tree-sorter-ts","_rev":"17-bf32f22fc038969e09399a1a9abca8f0","name":"tree-sorter-ts","dist-tags":{"latest":"1.3.4"},"versions":{"1.0.5":{"name":"tree-sorter-ts","version":"1.0.5","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.0.5","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts.js"},"cpu":["x64","arm64"],"dist":{"shasum":"9634a26d6cdd01658d04b79c6f1723fad4397159","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.0.5.tgz","fileCount":6,"integrity":"sha512-poS7HVZY9xUuE8/BvAE58Nchisu8/T6ympYgRlsyHwMhxIMo1kqCO8X0FyaK7zkFAtPCEU/b1/BdOiA0oObn6A==","signatures":[{"sig":"MEUCIQDrSc76VxOBIx0nhf1QVV9thGpKGMIRCh6z+UkygCxcRwIgLRWHousDvJmZevu7V1xLENvmhw14e23lATCmTj0ZINQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14312},"engines":{"node":">=14.0.0"},"gitHead":"542037fa852dc6e8ed4c3f9a8fedb6685c067ed6","scripts":{"postinstall":"node scripts/postinstall.js","preuninstall":"node scripts/preuninstall.js"},"_npmUser":{"name":"evanrichards","email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.0.5_1747979673450_0.6646491509856107","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"tree-sorter-ts","version":"1.0.6","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.0.6","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts.js"},"cpu":["x64","arm64"],"dist":{"shasum":"80c626dacfbb461366e253ffe081e1e1f2b8391d","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.0.6.tgz","fileCount":6,"integrity":"sha512-m1FwmCqaxq98pjzQTLOZ513ACqaIsJj5HQFkLzYFDt2pRkvTkCCUipqpV/OHyp28xSB6JKzxwhgAJSN3FaobEQ==","signatures":[{"sig":"MEQCIGIjtS3UZnNwgbZptGLKpIdxTVwM5ej96gmehKzTlOwjAiBq0i1HrvJ+z1tO8N+SHkE6k+7Td1VmkAQgKb53aCsdgg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14439},"engines":{"node":">=14.0.0"},"gitHead":"95db780ce00ee703d1c21d252cbf0f9bd2a32c41","scripts":{"postinstall":"node scripts/postinstall.js","preuninstall":"node scripts/preuninstall.js"},"_npmUser":{"name":"evanrichards","email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.0.6_1747982967803_0.2394989309981086","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"tree-sorter-ts","version":"1.1.0","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.1.0","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts.js"},"cpu":["x64","arm64"],"dist":{"shasum":"a5d2d2326f7f81f11b0cf1843b91286538e260b1","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.1.0.tgz","fileCount":6,"integrity":"sha512-HUk4FIROKDIFGlqC4+h7ov/FZJ0Xj4EMrclpUcD1NfjOdVgfohVfa3HuzTWNEeL7cLPuzflxfrYp+ojGXeiiOw==","signatures":[{"sig":"MEUCIFERKy0nqud94NLJn7aS5fExKnSaO2mKiwBVQAwraNRsAiEAqOPgHlmBnb9f46xgeTCsVSi7a7h7LYbfy3VLPPDH35s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17098},"engines":{"node":">=14.0.0"},"gitHead":"af84a20d83ece785f9b21e67401bbb75ece3211c","scripts":{"postinstall":"node scripts/postinstall.js","preuninstall":"node scripts/preuninstall.js"},"_npmUser":{"name":"evanrichards","email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.1.0_1748039454632_0.7722941136101675","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"tree-sorter-ts","version":"1.2.0","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.2.0","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts.js"},"cpu":["x64","arm64"],"dist":{"shasum":"fa8939751c9363e031111c416ed4a4e55a5f2a9e","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.2.0.tgz","fileCount":6,"integrity":"sha512-UaQYN29i+3j71eceyyXk6y+/Zz1bf/urGwniAfQtGfLksC3DjGHf9BCYSgJ8QB2Myro9KRNoz2BiRIi5PEx9qA==","signatures":[{"sig":"MEUCIQC6wg1l5SyDcCxnqftiqfCUmuxHKCL+y/Sj+885hvKZLwIgIChOmzm2KhkBC4K8KXcCSR1frKoWzgVs1+31kS7D0B0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19445},"engines":{"node":">=14.0.0"},"gitHead":"52b3fe783dcba777534f4fb98e99aa10ba3d6871","scripts":{"postinstall":"node scripts/postinstall.js","preuninstall":"node scripts/preuninstall.js"},"_npmUser":{"name":"evanrichards","email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.2.0_1749063470361_0.2671735197495009","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"tree-sorter-ts","version":"1.2.1","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.2.1","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts.js"},"cpu":["x64","arm64"],"dist":{"shasum":"f9220f1651e223cd2972eaf09401b1242844d544","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.2.1.tgz","fileCount":6,"integrity":"sha512-mdgzjRDyHm1X82B7m6X+Jkqt76eJ2bEX3cXnzFw/73vkqX/Q3ID9WnUBsHe+kljjzHyyYFZ13m2boZHiPWtqhg==","signatures":[{"sig":"MEUCICQ8WKE8AhU9zrpVv69pChOGbJipRh3jfJu15L5rIyX0AiEA/UZVo/ZuSLkUFwGlnQ+yVJPvoJJ8VpyfAhQm+ssZnRE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19958},"engines":{"node":">=14.0.0"},"gitHead":"6dc0cd7b4ef85863c258270cc49ba8c5f2aae4db","scripts":{"postinstall":"node scripts/postinstall.js","preuninstall":"node scripts/preuninstall.js"},"_npmUser":{"name":"evanrichards","email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.2.1_1749064510745_0.03796752238811263","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"tree-sorter-ts","version":"1.3.0","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.3.0","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts.js"},"cpu":["x64","arm64"],"dist":{"shasum":"1867727c374f06822fe40630e3e9070437349754","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.3.0.tgz","fileCount":6,"integrity":"sha512-0hKl3WLcP/DvTH2Vf4jw37BxYUNuCh5EFHyAhQHl3MK3/Ay80IU/UMxMCTd8SPj2Bp0DN8fD4C3RTTfkwOIHRg==","signatures":[{"sig":"MEUCIQCT96so1SucVgL5M3mAqYAGzYJHtfaTTLwjdw1nzFHoOQIgdMv5pV6Gaw0navSfDJ1PBAjHMZiB+NTslc+Roy2Ijgg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24833},"engines":{"node":">=14.0.0"},"gitHead":"23690203fc0f8ceb00c324fc51dded156270b20b","scripts":{"postinstall":"node scripts/postinstall.js","preuninstall":"node scripts/preuninstall.js"},"_npmUser":{"name":"evanrichards","email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.3.0_1749075251615_0.31341573232845676","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"tree-sorter-ts","version":"1.3.1","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.3.1","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts.js"},"cpu":["x64","arm64"],"dist":{"shasum":"8463a54197c95b4ad5b5dada0a9083d47c5fc61f","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.3.1.tgz","fileCount":6,"integrity":"sha512-21JYkzfdF4IlExcLfzGxHScpG1wFGGhVb8MusPNUX48OATuDo4fT/3Ss2lZB2qcJDa/DZkjSdZdhVEuH4wciSA==","signatures":[{"sig":"MEUCIFy+KC/NwQoKbMdS15XHGIb6F3kQe4tCu+PWh2Dp3YtkAiEA/7trvf/2J/LJMX1Zjd+EKaGm3myvcJevLaN31lwg48M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25652},"engines":{"node":">=14.0.0"},"gitHead":"1f16f89b9c6032976f4f8e784e09a8f1cd4009c5","scripts":{"postinstall":"node scripts/postinstall.js","preuninstall":"node scripts/preuninstall.js"},"_npmUser":{"name":"evanrichards","actor":{"name":"evanrichards","type":"user","email":"tevanrichards@gmail.com"},"email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","dependencies":{"tar":"^6.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.3.1_1750186896161_0.6701670206264361","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"tree-sorter-ts","version":"1.3.2","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.3.2","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts.js"},"cpu":["x64","arm64"],"dist":{"shasum":"349b4f9e83485ea79bcc61a8c524ad52fbc91e29","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.3.2.tgz","fileCount":6,"integrity":"sha512-O5/UN3eJ+4Ccoi404MbLchCJwne4B9ieb65Nobi7tL+obAkbw+TStd/8r5he13vd7+qbfG97njQqMG96kg6m9g==","signatures":[{"sig":"MEYCIQDzJWNNpP1TJzkPZxqCkWfbSp3UuoMwOFgmACy2VZJjpgIhALQTiDT0OS05coEtmY0qNn5u827hComPzQBXWaqfRAH/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26810},"engines":{"node":">=14.0.0"},"gitHead":"d7de95df807744634ae2b8cb0a2c2f451235800a","scripts":{"postinstall":"node scripts/postinstall.js","preuninstall":"node scripts/preuninstall.js"},"_npmUser":{"name":"evanrichards","actor":{"name":"evanrichards","type":"user","email":"tevanrichards@gmail.com"},"email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","dependencies":{"tar":"^6.2.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.3.2_1751913357595_0.5844641200822676","host":"s3://npm-registry-packages-npm-production"}},"1.3.3-test.4":{"name":"tree-sorter-ts","version":"1.3.3-test.4","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.3.3-test.4","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts-wrapper.js"},"cpu":["x64","arm64"],"dist":{"shasum":"ede02c84bdf1f51d655742e904298e490408566f","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.3.3-test.4.tgz","fileCount":4,"integrity":"sha512-raoXArXCoEYANs8nDcSNKa5X4OPLyV6Mc85HjTaQyRGAiJYEdhVd4fS/NT2HMTzLZ/TpywHhVCjEmwezUyXX7w==","signatures":[{"sig":"MEYCIQDAPqidcrNilJOFeZx0ipydjrDAfEn3+TlRXPmXbcXudAIhALrjBkvW8aDKOv8KI3vXMru4N5+z4DdPBYfQl3wF6iJg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22377},"engines":{"node":">=14.0.0"},"gitHead":"5892e37262baeb9ab7aa03558b02f50d461d9e11","scripts":{},"_npmUser":{"name":"evanrichards","actor":{"name":"evanrichards","type":"user","email":"tevanrichards@gmail.com"},"email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"optionalDependencies":{"tree-sorter-ts-linux-x64":"1.3.3-test.4","tree-sorter-ts-win32-x64":"1.3.3-test.4","tree-sorter-ts-darwin-x64":"1.3.3-test.4","tree-sorter-ts-darwin-arm64":"1.3.3-test.4"},"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.3.3-test.4_1751920728106_0.06133415813878962","host":"s3://npm-registry-packages-npm-production"}},"1.3.3-test.6":{"name":"tree-sorter-ts","version":"1.3.3-test.6","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"author":{"name":"Evan Richards"},"license":"MIT","_id":"tree-sorter-ts@1.3.3-test.6","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"os":["darwin","linux","win32"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts-wrapper.js"},"cpu":["x64","arm64"],"dist":{"shasum":"360a9d709e7c6af3b5fe49991069e1aea3d4d572","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.3.3-test.6.tgz","fileCount":4,"integrity":"sha512-K+kbvbEwTffxMtwmAv94I3FC32oAJpRVBLRjYBlOPrxsvlsMYXewYzv0vnAzOQhblOr2cZPRriSJZYW8g2EuCw==","signatures":[{"sig":"MEUCIBOh03ifPCBZNm/owduwiUCogpwh2kmYNxmjo/28K6KNAiEAt17la+3g6li6L9IyWgT6hFLyeHcmmgLKElGucwVyglE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22437},"engines":{"node":">=14.0.0"},"gitHead":"731fe2ff3d236f7357f5f834429ec7fcbe1c3d7e","scripts":{},"_npmUser":{"name":"evanrichards","actor":{"name":"evanrichards","type":"user","email":"tevanrichards@gmail.com"},"email":"tevanrichards@gmail.com"},"repository":{"url":"git+https://github.com/evanrichards/tree-sorter-ts.git","type":"git"},"_npmVersion":"10.8.2","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","directories":{},"_nodeVersion":"18.20.8","_hasShrinkwrap":false,"optionalDependencies":{"tree-sorter-ts-linux-x64":"1.3.3-test.6","tree-sorter-ts-darwin-x64":"1.3.3-test.6","tree-sorter-ts-windows-x64":"1.3.3-test.6","tree-sorter-ts-darwin-arm64":"1.3.3-test.6"},"_npmOperationalInternal":{"tmp":"tmp/tree-sorter-ts_1.3.3-test.6_1751921960780_0.7015513927395243","host":"s3://npm-registry-packages-npm-production"}},"1.3.4":{"name":"tree-sorter-ts","version":"1.3.4","description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"bin":{"tree-sorter-ts":"bin/tree-sorter-ts-wrapper.js"},"scripts":{},"repository":{"type":"git","url":"git+https://github.com/evanrichards/tree-sorter-ts.git"},"author":{"name":"Evan Richards"},"license":"MIT","bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","engines":{"node":">=14.0.0"},"os":["darwin","linux","win32"],"cpu":["x64","arm64"],"optionalDependencies":{"tree-sorter-ts-darwin-x64":"1.3.4","tree-sorter-ts-darwin-arm64":"1.3.4","tree-sorter-ts-linux-x64":"1.3.4","tree-sorter-ts-windows-x64":"1.3.4"},"_id":"tree-sorter-ts@1.3.4","gitHead":"c99f47d47a395d419898c2664e99cbea26f7c2c8","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ayqkt5vzj5Cvs90fKwWfkzTDp+RTSt4Cv2oYK53lxEhDXDvbjouS1/D+CNM9fbF9+EG0g3VUmDhgWxyJrP0gmA==","shasum":"9957e50792ba5873ee09225be1feb1decb082853","tarball":"https://registry.npmjs.org/tree-sorter-ts/-/tree-sorter-ts-1.3.4.tgz","fileCount":4,"unpackedSize":22402,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEo1JOIpVZ76ufcXgWnBvrEP2qT+Pn8LLXC1iAuRwEiRAiBqD7zqu2yyRVQA+T4yR7DUoHULYNNXOZB9uKpp6CveUQ=="}]},"_npmUser":{"name":"evanrichards","email":"tevanrichards@gmail.com","actor":{"name":"evanrichards","email":"tevanrichards@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tree-sorter-ts_1.3.4_1751923161676_0.7159075451499661"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-23T05:28:12.183Z","modified":"2025-07-07T21:19:22.041Z","1.0.4-test":"2025-05-23T05:28:12.374Z","1.0.4-test.2":"2025-05-23T05:39:31.847Z","1.0.4-test.3":"2025-05-23T05:45:27.990Z","1.0.5":"2025-05-23T05:54:33.631Z","1.0.6":"2025-05-23T06:49:27.972Z","1.1.0":"2025-05-23T22:30:54.852Z","1.2.0":"2025-06-04T18:57:50.524Z","1.2.1":"2025-06-04T19:15:10.941Z","1.3.0":"2025-06-04T22:14:11.839Z","1.3.1":"2025-06-17T19:01:36.356Z","1.3.2":"2025-07-07T18:35:57.768Z","1.3.3-test.4":"2025-07-07T20:38:48.280Z","1.3.3-test.6":"2025-07-07T20:59:20.951Z","1.3.4":"2025-07-07T21:19:21.872Z"},"bugs":{"url":"https://github.com/evanrichards/tree-sorter-ts/issues"},"author":{"name":"Evan Richards"},"license":"MIT","homepage":"https://github.com/evanrichards/tree-sorter-ts#readme","keywords":["typescript","sorter","ast","tree-sitter","cli","formatter","linter"],"repository":{"type":"git","url":"git+https://github.com/evanrichards/tree-sorter-ts.git"},"description":"A CLI tool that automatically sorts TypeScript object literals marked with special comments","maintainers":[{"name":"evanrichards","email":"tevanrichards@gmail.com"}],"readme":"# tree-sorter-ts\n\nA Go CLI tool that automatically sorts TypeScript object literals, arrays, and function parameters marked with special comments. It uses Tree-sitter for accurate AST parsing while preserving exact formatting, comments, and structure.\n\n## Features\n\n- 🔧 Sorts object properties alphabetically\n- 📊 Sorts array elements with customizable sorting keys\n- 🏗️ Sorts constructor/function parameters by name (ignoring modifiers)\n- 🎯 Only touches objects/arrays/parameters marked with `/** tree-sorter-ts: keep-sorted **/`\n- 💬 Preserves all comments (inline and block)\n- 🔑 Handles computed property keys like `[EnumName.VALUE]`\n- 📁 Processes files in parallel for performance\n- ✨ Supports TypeScript and TSX files\n- 🔍 Dry-run mode by default (see changes before applying)\n- ✅ Check mode for CI/CD pipelines\n- 📐 Optional `with-new-line` formatting for extra spacing\n- 🚨 Optional `deprecated-at-end` to move `@deprecated` properties to the bottom\n\n## Installation\n\n### Using npm or yarn (Recommended)\n```bash\n# Using npm\nnpm install --save-dev tree-sorter-ts\n\n# Using yarn\nyarn add -D tree-sorter-ts\n\n# Run the installed binary\nnpx tree-sorter-ts --help\n# or\nyarn tree-sorter-ts --help\n```\n\n### Using Go\n```bash\n# Using go install\ngo install github.com/evanrichards/tree-sorter-ts/cmd/tree-sorter-ts@latest\n\n# Using go run\ngo run github.com/evanrichards/tree-sorter-ts@latest --help\n```\n\n### Building from source\n```bash\ngit clone https://github.com/evanrichards/tree-sorter-ts.git\ncd tree-sorter-ts\nmake build\n\n# Binary will be in ./bin/tree-sorter-ts\n./bin/tree-sorter-ts --help\n```\n\n## Usage\n\n### Basic usage\n```bash\n# Dry-run mode (default) - shows what would change\ntree-sorter-ts src/\n\n# Write changes to files\ntree-sorter-ts --write src/\n\n# Check mode - exits with code 1 if files need sorting\ntree-sorter-ts --check src/\n\n# Check mode with detailed output\ntree-sorter-ts --check --verbose src/\n\n# Process a single file\ntree-sorter-ts --write src/config.ts\n\n# Process only .ts files (not .tsx)\ntree-sorter-ts --extensions=\".ts\" src/\n```\n\n### Marking objects for sorting\n\nAdd the magic comment before any object literal you want to keep sorted:\n\n```typescript\nconst config = {\n  /** tree-sorter-ts: keep-sorted **/\n  zebra: \"last\",\n  alpha: \"first\", \n  beta: \"second\",\n};\n```\n\nAfter running with `--write`, it becomes:\n\n```typescript\nconst config = {\n  /** tree-sorter-ts: keep-sorted **/\n  alpha: \"first\",\n  beta: \"second\", \n  zebra: \"last\",\n};\n```\n\n### Advanced: with-new-line option\n\nFor objects that need extra spacing between properties:\n\n```typescript\nconst config = {\n  /** tree-sorter-ts: keep-sorted with-new-line **/\n  zebra: \"last\",\n  alpha: \"first\",\n  beta: \"second\",\n};\n```\n\nAfter sorting:\n\n```typescript\nconst config = {\n  /** tree-sorter-ts: keep-sorted with-new-line **/\n  alpha: \"first\",\n\n  beta: \"second\",\n\n  zebra: \"last\",\n};\n```\n\n### Advanced: deprecated-at-end option\n\nMove properties with `@deprecated` annotations to the bottom of the object:\n\n```typescript\nconst config = {\n  /** tree-sorter-ts: keep-sorted deprecated-at-end **/\n  activeFeature: true,\n  /** @deprecated Use newApiUrl instead */\n  oldApiUrl: \"https://old.example.com\",\n  newApiUrl: \"https://api.example.com\",\n  legacyMode: true, // @deprecated Will be removed in v2.0\n};\n```\n\nAfter sorting:\n\n```typescript\nconst config = {\n  /** tree-sorter-ts: keep-sorted deprecated-at-end **/\n  activeFeature: true,\n  newApiUrl: \"https://api.example.com\",\n  legacyMode: true, // @deprecated Will be removed in v2.0\n  /** @deprecated Use newApiUrl instead */\n  oldApiUrl: \"https://old.example.com\",\n};\n```\n\nYou can also combine it with `with-new-line`:\n\n```typescript\nconst config = {\n  /** tree-sorter-ts: keep-sorted deprecated-at-end with-new-line **/\n  alpha: \"first\",\n\n  beta: \"second\",\n\n  /** @deprecated */\n  oldValue: \"deprecated\",\n};\n```\n\n### Multiline magic comments\n\nFor better readability, you can split the magic comment across multiple lines:\n\n```typescript\nconst config = {\n  /**\n   * tree-sorter-ts: keep-sorted\n   *   with-new-line\n   *   deprecated-at-end\n   */\n  activeFeature: true,\n  beta: \"second\",\n  /** @deprecated */\n  oldFeature: false,\n};\n\n// Also works without asterisks on each line:\nconst config2 = {\n  /** tree-sorter-ts: keep-sorted\n      deprecated-at-end\n      with-new-line **/\n  gamma: true,\n  alpha: \"first\",\n};\n```\n\n### Sorting constructor parameters\n\nConstructor parameters (and function parameters) can be sorted alphabetically by parameter name, ignoring access modifiers:\n\n```typescript\nclass UserService {\n  constructor(\n    /** tree-sorter-ts: keep-sorted **/\n    private readonly userRepository: UserRepository,\n    private readonly logger: Logger,\n    private readonly cache: CacheService,\n    private readonly eventBus: EventBus,\n  ) {}\n}\n```\n\nAfter running with `--write`, it becomes:\n\n```typescript\nclass UserService {\n  constructor(\n    /** tree-sorter-ts: keep-sorted **/\n    private readonly cache: CacheService,\n    private readonly eventBus: EventBus,\n    private readonly logger: Logger,\n    private readonly userRepository: UserRepository,\n  ) {}\n}\n```\n\n**Features:**\n- Sorts by parameter name, ignoring modifiers like `private`, `readonly`, `public`, `protected`\n- Works with regular functions, arrow functions, methods, and constructors\n- Supports optional parameters (`param?: Type`)\n- Handles destructured parameters (`{ name }: { name: string }`)\n- Preserves parameter types and default values\n- Supports all sorting options (`with-new-line`, `deprecated-at-end`)\n\n**Examples:**\n\nMixed access modifiers:\n```typescript\nclass Service {\n  constructor(\n    /** tree-sorter-ts: keep-sorted **/\n    protected readonly zService: ZService,\n    public aService: AService,\n    private bService: BService,\n  ) {}\n}\n// Sorts to: aService, bService, zService\n```\n\nWith comments and deprecated parameters:\n```typescript\nclass Service {\n  constructor(\n    /** tree-sorter-ts: keep-sorted deprecated-at-end **/\n    private readonly newService: NewService,\n    /** @deprecated Use newService instead */\n    private readonly oldService: OldService,\n    private readonly activeService: ActiveService,\n  ) {}\n}\n// Sorts to: activeService, newService, then oldService (deprecated last)\n```\n\nArrow functions and regular functions:\n```typescript\nconst handler = (\n  /** tree-sorter-ts: keep-sorted **/\n  zParam: string,\n  aParam: number,\n  mParam: boolean,\n) => {}\n// Sorts to: aParam, mParam, zParam\n```\n\n### Sorting arrays\n\nArrays can also be sorted by placing the magic comment inside the array:\n\n```typescript\nconst users = [\n  /** tree-sorter-ts: keep-sorted key=\"name\" **/\n  { name: \"Zoe\", age: 30 },\n  { name: \"Alice\", age: 25 },\n  { name: \"Bob\", age: 28 },\n];\n```\n\nAfter sorting:\n\n```typescript\nconst users = [\n  /** tree-sorter-ts: keep-sorted key=\"name\" **/\n  { name: \"Alice\", age: 25 },\n  { name: \"Bob\", age: 28 },\n  { name: \"Zoe\", age: 30 },\n];\n```\n\n#### Array sorting options\n\n**Sort by object property:**\n```typescript\nconst items = [\n  /** tree-sorter-ts: keep-sorted key=\"priority\" **/\n  { name: \"Task C\", priority: 3 },\n  { name: \"Task A\", priority: 1 },\n  { name: \"Task B\", priority: 2 },\n];\n```\n\n**Sort by array index (for tuples):**\n```typescript\nconst data = [\n  /** tree-sorter-ts: keep-sorted key=\"1\" **/\n  [\"apple\", 5, true],\n  [\"banana\", 2, false],\n  [\"cherry\", 8, true]\n];\n// Sorts by the second element (index 1): 2, 5, 8\n```\n\n**Sort scalar arrays (no key needed):**\n```typescript\nconst numbers = [\n  /** tree-sorter-ts: keep-sorted **/\n  5, 2, 8, 1, 9\n];\n// Result: [1, 2, 5, 8, 9]\n\nconst words = [\n  /** tree-sorter-ts: keep-sorted **/\n  \"banana\", \"apple\", \"cherry\"\n];\n// Result: [\"apple\", \"banana\", \"cherry\"]\n```\n\n**Nested property access:**\n```typescript\nconst users = [\n  /** tree-sorter-ts: keep-sorted key=\"profile.firstName\" **/\n  { profile: { firstName: \"Charlie\", lastName: \"Brown\" } },\n  { profile: { firstName: \"Alice\", lastName: \"Smith\" } },\n  { profile: { firstName: \"Bob\", lastName: \"Jones\" } }\n];\n```\n\n**With options (with-new-line and deprecated-at-end):**\n```typescript\nconst features = [\n  /** tree-sorter-ts: keep-sorted key=\"name\" deprecated-at-end with-new-line **/\n  { name: \"Feature C\", enabled: true },\n  /** @deprecated */\n  { name: \"Feature A\", enabled: false },\n  { name: \"Feature B\", enabled: true },\n];\n```\n\nResults in:\n```typescript\nconst features = [\n  /** tree-sorter-ts: keep-sorted key=\"name\" deprecated-at-end with-new-line **/\n  { name: \"Feature B\", enabled: true },\n\n  { name: \"Feature C\", enabled: true },\n\n  /** @deprecated */\n  { name: \"Feature A\", enabled: false },\n];\n```\n\n**Graceful handling of missing keys:**\nElements without the specified key are sorted to the end:\n```typescript\nconst mixed = [\n  /** tree-sorter-ts: keep-sorted key=\"id\" **/\n  { id: 3, name: \"Three\" },\n  { name: \"No ID\" },  // Missing 'id' - will sort to end\n  { id: 1, name: \"One\" },\n];\n// Result: elements with 'id' first (sorted), then elements without 'id'\n```\n\n### Sorting by comment content\n\nBoth arrays and objects can be sorted by their associated comment content using the `sort-by-comment` option:\n\n```typescript\nconst userIds = [\n  /** tree-sorter-ts: keep-sorted sort-by-comment **/\n  \"u_8234\", // Bob Smith\n  \"u_9823\", // Alice Johnson\n  \"u_1234\", // David Lee\n  \"u_4521\", // Carol White\n];\n```\n\nAfter sorting:\n```typescript\nconst userIds = [\n  /** tree-sorter-ts: keep-sorted sort-by-comment **/\n  \"u_9823\", // Alice Johnson\n  \"u_8234\", // Bob Smith\n  \"u_4521\", // Carol White\n  \"u_1234\", // David Lee\n];\n```\n\n**Features:**\n- Works with inline comments (`// comment` or `/* comment */`)\n- Works with preceding comments (comments on lines before the element)\n- Supports multiline comments\n- Compatible with `deprecated-at-end` option\n- Cannot be used together with `key` option (will show an error)\n\n**Examples:**\n\nPreceding comments:\n```typescript\nconst items = [\n  /** tree-sorter-ts: keep-sorted sort-by-comment **/\n  // B\n  \"first\",\n  /**\n   * A\n   */\n  \"second\",\n  // C\n  \"third\"\n];\n// Sorts to: second (A), first (B), third (C)\n```\n\nMixed comment positions:\n```typescript\nconst mixed = [\n  /** tree-sorter-ts: keep-sorted sort-by-comment **/\n  // Delta (before)\n  \"item1\",\n  \"item2\", // Beta (after)\n  /**\n   * Alpha (before multiline)\n   */\n  \"item3\",\n  \"item4\" /* Charlie (after block) */\n];\n// Sorts by: Alpha, Beta, Charlie, Delta\n```\n\nObjects with comment sorting:\n```typescript\nconst config = {\n  /** tree-sorter-ts: keep-sorted sort-by-comment **/\n  // Production settings\n  prodUrl: \"https://api.example.com\",\n  // Development settings  \n  devUrl: \"http://localhost:3000\",\n  // Staging settings\n  stagingUrl: \"https://staging.example.com\",\n};\n// Sorts by: Development, Production, Staging\n```\n\n**Known limitation:** Object sorting with inline comments (after property values) currently has a bug where the last property may get a duplicated comment. As a workaround, use preceding comments for objects or use the default property-name sorting.\n\n## Flags\n\n- `--check` - Check if files are sorted (exit 1 if not)\n- `--write` - Write changes to files (default: dry-run)\n- `--recursive` - Process directories recursively (default: true)\n- `--extensions` - File extensions to process (default: \".ts,.tsx\")\n- `--workers` - Number of parallel workers (default: number of CPUs)\n- `--verbose` - Show detailed output (default: false)\n\n## Examples\n\n### CI/CD Integration\n\nThe `--check` mode provides clear, CI-friendly output that shows exactly which files need sorting:\n\n```bash\n# When files need sorting:\n$ tree-sorter-ts --check src/\n✗ src/config.ts needs sorting (3 items)\n✗ src/services/user.ts needs sorting (1 items)\n\nProcessed 15 files\n❌ 2 file(s) need sorting\n   4 item(s) need to be sorted\nError: some files are not properly sorted\n```\n\n```yaml\n# GitHub Actions example\n- name: Install tree-sorter-ts\n  run: npm install --save-dev tree-sorter-ts\n\n- name: Check TypeScript objects are sorted\n  run: npx tree-sorter-ts --check src/\n```\n\nThe tool exits with code 1 and provides specific file paths when sorting is needed, making it easy to identify issues in CI logs.\n\n### Pre-commit Hook\n```bash\n#!/bin/sh\n# .git/hooks/pre-commit\ntree-sorter-ts --write $(git diff --cached --name-only --diff-filter=ACM | grep -E '\\.(ts|tsx)$')\n```\n\n### With Make\n```bash\n# Run on all TypeScript files\nmake run\n\n# Check mode\nmake check\n\n# Run tests\nmake test\n```\n\n## Development\n\n### Project Structure\n\nThe codebase follows a modular architecture with clear separation of concerns:\n\n```\ntree-sorter-ts/\n├── cmd/tree-sorter-ts/         # CLI entry point\n├── internal/\n│   ├── app/                    # Application coordination\n│   ├── fileutil/               # File system utilities\n│   ├── processor/              # Main processing logic\n│   │   ├── ast.go             # Legacy monolithic processor\n│   │   ├── processor.go       # New modular processor\n│   │   └── *_test.go          # Comprehensive test suite\n│   ├── config/                 # Configuration parsing\n│   │   └── sort_config.go     # Magic comment configuration\n│   ├── parser/                 # AST parsing utilities\n│   │   └── magic_comments.go  # Find sortable structures\n│   ├── sorting/                # Core sorting abstractions\n│   │   ├── interfaces/        # Core interfaces\n│   │   ├── strategies/        # Sorting strategies (plugin-based)\n│   │   │   ├── property_name.go   # Default alphabetical sorting\n│   │   │   ├── comment_content.go # Sort by comment content\n│   │   │   └── array_key.go       # Array key-based sorting\n│   │   ├── types/             # Type-specific implementations\n│   │   │   ├── arrays/        # Array sorting logic\n│   │   │   └── objects/       # Object sorting logic\n│   │   └── common/            # Shared utilities\n│   └── reconstruction/         # AST reconstruction\n│       ├── array_reconstructor.go  # Rebuild sorted arrays\n│       └── object_reconstructor.go # Rebuild sorted objects\n├── testdata/fixtures/          # Test files\n└── main.go                     # Root entry (for backward compatibility)\n```\n\n### Architecture Overview\n\nThe new modular architecture separates concerns into distinct packages:\n\n1. **Configuration (`config/`)** - Parses and validates magic comment options\n2. **Parser (`parser/`)** - Finds structures marked for sorting in the AST\n3. **Sorting (`sorting/`)** - Core sorting logic with plugin-based strategies\n4. **Reconstruction (`reconstruction/`)** - Rebuilds the AST with sorted content\n\n#### Key Design Patterns\n\n**Strategy Pattern**: Different sorting strategies (property-name, comment-content, array-key) implement a common interface, allowing easy extension:\n\n```go\ntype SortStrategy interface {\n    ExtractKey(item SortableItem, content []byte) (string, error)\n    GetName() string\n}\n```\n\n**Factory Pattern**: Factories create appropriate strategies and reconstructors based on configuration:\n\n```go\nstrategyFactory := strategies.NewFactory()\nstrategy, err := strategyFactory.CreateStrategy(config)\n```\n\n**Interface-Driven Design**: Core interfaces allow different types (arrays, objects, constructors) to be handled uniformly:\n\n```go\ntype Sortable interface {\n    Extract(node *sitter.Node, content []byte) ([]SortableItem, error)\n    Sort(items []SortableItem, strategy SortStrategy, deprecatedAtEnd bool, content []byte) ([]SortableItem, error)\n    CheckIfSorted(items []SortableItem, strategy SortStrategy, deprecatedAtEnd bool, content []byte) bool\n}\n```\n\n#### Processing Flow\n\n1. **Parse** - Tree-sitter parses TypeScript/TSX into an AST\n2. **Find** - Locate structures with magic comments\n3. **Extract** - Extract sortable items (properties, elements, parameters)\n4. **Sort** - Apply the appropriate sorting strategy\n5. **Reconstruct** - Rebuild the AST content with sorted items\n6. **Write** - Update the file with sorted content\n\nThis architecture makes it easy to:\n- Add new sorting strategies\n- Support new structure types\n- Test individual components\n- Maintain and debug the codebase\n\n### Building and Testing\n```bash\n# Build the binary\nmake build\n\n# Run tests\nmake test\n\n# Run benchmarks\nmake bench\n\n# Install locally\nmake install\n```\n\n## TODO\n\n- [ ] **File-level declaration sorting** - Sort top-level declarations like `export const`, `const`, `function`, etc.\n  ```typescript\n  /** tree-sorter-ts: keep-sorted **/\n  export const CONFIG = { ... };\n  \n  const helper = () => { ... };\n  \n  export function processData() { ... }\n  \n  export const API_KEY = \"...\";\n  \n  const cache = new Map();\n  \n  // Would sort to (exports first, then by declaration name):\n  /** tree-sorter-ts: keep-sorted **/\n  export const API_KEY = \"...\";\n  \n  export const CONFIG = { ... };\n  \n  export function processData() { ... }\n  \n  const cache = new Map();\n  \n  const helper = () => { ... };\n  ```\n  Features to include:\n  - Sort by declaration name (including the modifier like `export`)\n  - Support all sorting options except `key` (not applicable)\n  - `with-new-line` for spacing between declarations\n  - `deprecated-at-end` for `@deprecated` declarations\n  - `sort-by-comment` for organizing by comment content\n  - Natural grouping: exports together, non-exports together\n\n- [ ] **Section sorting** - Support `start-sort` and `end-sort` comments for sorting subsections\n  ```typescript\n  const config = {\n    // Critical settings - do not sort\n    apiUrl: \"https://api.example.com\",\n    timeout: 5000,\n    \n    /** tree-sorter-ts: start-sort **/\n    featureFlags: {\n      enableAnalytics: true,\n      enableChat: false,\n      enableNotifications: true,\n    },\n    permissions: {\n      canEdit: true,\n      canDelete: false,\n      canView: true,\n    },\n    /** tree-sorter-ts: end-sort **/\n    \n    // Debug settings - must remain last\n    debug: true,\n  };\n  ```\n\n\n- [ ] **Class member sorting** - Sort class members including decorators and annotations\n  ```typescript\n  class APIClient {\n    /** tree-sorter-ts: keep-sorted **/\n    @deprecated()\n    legacyEndpoint: string;\n    \n    @inject()\n    httpClient: HttpClient;\n    \n    apiKey: string;\n    \n    baseUrl: string;\n    \n    @observable()\n    isLoading: boolean;\n  }\n  ```\n\n\n## License\n\nMIT","readmeFilename":"README.md"}