{"_id":"@changesets/format","_rev":"9-28a84d545a29281897d96045bacf2f72","name":"@changesets/format","dist-tags":{"latest":"0.1.3"},"versions":{"0.0.0":{"name":"@changesets/format","version":"0.0.0","author":{"name":"Changesets"},"license":"MIT","_id":"@changesets/format@0.0.0","maintainers":[{"name":"noviny","email":"benjaminconolly@gmail.com"},{"name":"changesets-release-bot","email":"automation+changesets@thinkmill.com.au"},{"name":"emmatown","email":"npm@emmas.town"},{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"dist":{"shasum":"80d3f1658b30abe9b2175cd0e53ed285fcc76e00","tarball":"https://registry.npmjs.org/@changesets/format/-/format-0.0.0.tgz","fileCount":1,"integrity":"sha512-3Mzt1bly2kDLyqRZeU9xcEc4O7jTtZ8x10QN2gz7K6WzI8LdnQqIbRlqfpL08ggxgxGLW8ekw95EftMPoY3RwA==","signatures":[{"sig":"MEUCIGPh3gLOGsnYmze10r7WKZsAZJHElJLpg0NgG+BkHHDbAiEAqNtl1VEH05sinHA9kmTO2zte44h6vqAE3/MbDdzsDw0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":147},"gitHead":"ffedb263443a95050eab4ae7684c36de087bab0d","_npmUser":{"name":"andarist","email":"mateuszburzynski@gmail.com"},"_npmVersion":"11.13.0","description":"Detect and format files","directories":{},"_nodeVersion":"24.3.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/format_0.0.0_1778570315069_0.9144549820359966","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@changesets/format","version":"0.1.0","author":"Changesets","license":"MIT","_id":"@changesets/format@0.1.0","maintainers":[{"name":"emmatown","email":"npm@emmas.town"},{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"bugs":{"url":"https://github.com/changesets/format/issues"},"dist":{"shasum":"b753ba9b9283c449bb590ab14879fcfe850999b5","tarball":"https://registry.npmjs.org/@changesets/format/-/format-0.1.0.tgz","fileCount":5,"integrity":"sha512-m3ScsTpVqQJu6WOV36vpGozJPBu5JWaFXAhG1/yRnzbOnyqomuPrIfm+LeE0PmX4HWPs9Fh4MDH4aDISEsjZaA==","signatures":[{"sig":"MEUCIQCRoeeXAUSuC7DOQRU0Ld22brAGOJMZwbjAKZu+L/WHrAIgXh55fxO3wdZZoqFY4wXuiOvHHctM0MU/hcVasv9gQxQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@changesets%2fformat@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11271},"type":"module","engines":{"node":"^22.11 || ^24 || >=26"},"exports":"./dist/index.js","scripts":{"dev":"tsdown --watch","lint":"oxfmt --check","test":"vitest","build":"tsdown","format":"oxfmt","release":"changeset publish","typecheck":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d4d7ed59-5545-4f9d-88b1-ef5816e4185d"}},"repository":{"url":"git+https://github.com/changesets/format.git","type":"git"},"description":"Detect and format files","directories":{},"_nodeVersion":"26.0.0","dependencies":{"package-manager-detector":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.48.0","tsdown":"^0.22.0","vitest":"^4.1.5","fs-fixture":"^2.13.0","typescript":"~6.0.3","@types/node":"^25.6.2","@changesets/cli":"^3.0.0-next.3","@changesets/changelog-github":"^1.0.0-next.3"},"_npmOperationalInternal":{"tmp":"tmp/format_0.1.0_1778599185728_0.7013943010992179","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@changesets/format","version":"0.1.1","author":"Changesets","license":"MIT","_id":"@changesets/format@0.1.1","maintainers":[{"name":"emmatown","email":"npm@emmas.town"},{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"bugs":{"url":"https://github.com/changesets/format/issues"},"dist":{"shasum":"ab49fc9ee6202edfb8068274a02beecdaf8fb004","tarball":"https://registry.npmjs.org/@changesets/format/-/format-0.1.1.tgz","fileCount":5,"integrity":"sha512-OBN/xfe+lcNWCv8P4Ogop9EOTi5QRKd1c2JJfZRBT9AT3AybzDYDfHeX4Y7j20Q4e16BPu3XvcdOe9sPZmTEig==","signatures":[{"sig":"MEUCIErf595IgyttpZTBwuL9qG87MmsSRK1NVrFcMUxuG2yyAiEA9VUJYF0F0ehKC7w/WLbHsw4VxubFQoXPE0i2eEcY9Mg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@changesets%2fformat@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10959},"type":"module","engines":{"node":"^22.11 || ^24 || >=26"},"exports":"./dist/index.js","scripts":{"dev":"tsdown --watch","lint":"oxfmt --check","test":"vitest","build":"tsdown","format":"oxfmt","release":"changeset publish","typecheck":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d4d7ed59-5545-4f9d-88b1-ef5816e4185d"}},"repository":{"url":"git+https://github.com/changesets/format.git","type":"git"},"description":"Detect and format files","directories":{},"_nodeVersion":"24.18.0","dependencies":{"tinyexec":"^1.2.4","package-manager-detector":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.53.0","tsdown":"^0.22.1","vitest":"^4.1.8","fs-fixture":"^2.14.0","typescript":"~6.0.3","@types/node":"^25.9.1","@changesets/cli":"^3.0.0-next.3","@changesets/changelog-github":"^1.0.0-next.3"},"_npmOperationalInternal":{"tmp":"tmp/format_0.1.1_1784459399112_0.5089518701456088","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@changesets/format","version":"0.1.2","author":"Changesets","license":"MIT","_id":"@changesets/format@0.1.2","maintainers":[{"name":"emmatown","email":"npm@emmas.town"},{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"bugs":{"url":"https://github.com/changesets/format/issues"},"dist":{"shasum":"036f5e32ebbcd0b5220f7f5092e617e10d9f96dc","tarball":"https://registry.npmjs.org/@changesets/format/-/format-0.1.2.tgz","fileCount":5,"integrity":"sha512-Caez5XtNXCFS/G5bwyav3wuXL0tMxVd2ZGbaumWbzN08tyzO21asCw7JZhNtVsAZDCvDRUzZN+Iit9SyRITSYA==","signatures":[{"sig":"MEQCIGJm1t62220WdmoP4xUPxEEIZlS21yd1SErADcfSzz9fAiAXPPL9cZh321T/ko5wr89CCkM7R5Ko4HYu9c7ARRQ5+g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@changesets%2fformat@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11480},"type":"module","engines":{"node":"^22.11 || ^24 || >=26"},"exports":"./dist/index.js","scripts":{"dev":"tsdown --watch","lint":"oxfmt --check","test":"vitest","build":"tsdown","format":"oxfmt","typecheck":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d4d7ed59-5545-4f9d-88b1-ef5816e4185d"}},"repository":{"url":"git+https://github.com/changesets/format.git","type":"git"},"description":"Detect and format files","directories":{},"_nodeVersion":"24.18.0","dependencies":{"tinyexec":"^1.3.0","package-manager-detector":"^1.8.0"},"_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.62.0","tsdown":"^0.22.14","vitest":"^4.1.10","fs-fixture":"^2.14.0","typescript":"~7.0.2","@types/node":"^26.1.2","@changesets/cli":"^3.0.0","@changesets/changelog-github":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/format_0.1.2_1786642192357_0.8810776670888736","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"_id":"@changesets/format@0.1.3","bugs":{"url":"https://github.com/changesets/format/issues"},"dist":{"shasum":"dc1eb309a1cdbe3137fcd3521ed3311ea742e8eb","tarball":"https://registry.npmjs.org/@changesets/format/-/format-0.1.3.tgz","fileCount":5,"integrity":"sha512-zTZrJbfY81+/MsXsey6i3jQjpApz4PqRQ+nouHGDJhCa5sKCExwR9mZFQ/67lMsqZDNy2G2v3wTbzOmZ56EtaQ==","signatures":[{"sig":"MEUCIQD/3V5ZURhjuXpngjGPF1ZKH1PvAY6FjYYUYJjW1Aj8TAIgILyhQWXwqCWTo/uYrdw9csxXjy1dsh1UEbwRyLpBNFw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGGCM2cj/uWgu3o4L5CzrHNL1FRqkdN6JPXeGQunlxbGAiBXleIMTjdoTQ0yWJXI4S9qro5Y1PPlQgC0j1XJVORd6Q=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@changesets%2fformat@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11403},"name":"@changesets/format","type":"module","author":"Changesets","engines":{"node":"^22.11 || ^24 || >=26"},"exports":"./dist/index.js","license":"MIT","scripts":{"dev":"tsdown --watch","lint":"oxfmt --check","test":"vitest","build":"tsdown","format":"oxfmt","typecheck":"tsc"},"version":"0.1.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"d4d7ed59-5545-4f9d-88b1-ef5816e4185d"}},"repository":{"url":"git+https://github.com/changesets/format.git","type":"git"},"description":"Detect and format files","directories":{},"maintainers":[{"name":"emmatown","email":"npm@emmas.town"},{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"_nodeVersion":"24.21.0","dependencies":{"tinyexec":"^1.3.1","package-manager-detector":"^1.8.0"},"_hasShrinkwrap":false,"devDependencies":{"oxfmt":"^0.70.0","tsdown":"^0.23.0","vitest":"^5.0.1","fs-fixture":"^2.16.0","typescript":"~7.0.2","@types/node":"^26.6.2","@changesets/cli":"^3.0.3","@changesets/changelog-github":"^1.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/format_0.1.3_1792740902477_0.9411567957748526"}}},"time":{"created":"2026-05-12T07:18:34.884Z","modified":"2026-10-23T07:35:02.978Z","0.0.0":"2026-05-12T07:18:35.203Z","0.1.0":"2026-05-12T15:19:46.005Z","0.1.1":"2026-07-19T11:09:59.262Z","0.1.2":"2026-08-13T17:29:52.508Z","0.1.3":"2026-10-23T07:35:02.572Z"},"bugs":{"url":"https://github.com/changesets/format/issues"},"author":"Changesets","license":"MIT","repository":{"url":"git+https://github.com/changesets/format.git","type":"git"},"description":"Detect and format files","maintainers":[{"name":"emmatown","email":"npm@emmas.town"},{"name":"andarist","email":"mateuszburzynski@gmail.com"}],"readme":"# @changesets/format\n\nDetect installed code formatters and format files with them.\n\n## Usage\n\n### `detect()`\n\n<!-- NOTE: Docs should match src/detect.ts -->\n\nDetect the preferred formatter used in the project.\n\n```ts\nimport { detect } from \"@changesets/format\";\n\nconst result = await detect();\n// => \"prettier\"\n```\n\nOptions can be passed to the first parameter:\n\n- `cwd`: The current working directory to start looking up for the formatter. Defaults to `process.cwd()`.\n- `stopDir`: The path to stop traversing up the directory.\n- `order`: The order of formatters to check for. Defaults to `[\"dprint\", \"deno\", \"oxfmt\", \"biome\", \"prettier\"]` (from `defaultDetectOrder`)\n\n### `format()`\n\nFormat the given patterns with a specified or auto-detected formatter. It returns `true` if a formatter is found and the formatting process passes (even if the patterns didn't match any files), otherwise returns `false`.\n\n<!-- NOTE: Docs should match src/format.ts -->\n\n```ts\nimport { format } from \"@changesets/format\";\n\nawait format([\"src/index.ts\"]);\n```\n\nOptions can be passed to the second parameter:\n\n- `formatter`: The formatter to use for formatting. It not specified, it will be auto-detected using `detect`. Use `detect` directly if you want to have more control over the detection process.\n- `cwd`: The current working directory to start looking up for the formatter and package manager, and to execute the formatter's command from. Defaults to `process.cwd()`.\n- `stopDir`: The path to stop traversing up the directory.\n- `packageManager`: The package manager to use for executing the formatter's command. If not specified, it will use `package-manager-detector` to detect the package manager.\n\n## Thanks\n\nThe core idea of this package is based on [formatly](https://github.com/JoshuaKGoldberg/formatly), but implemented for Changesets' needs. However, it is still generic enough to be used by other projects than Changesets.\n\n## License\n\nMIT\n","readmeFilename":""}