diff --git a/.hypertext/formatter-tools/native-addons-rules.json b/.hypertext/formatter-tools/native-addons-rules.json index 42e43f6..e317b48 100644 --- a/.hypertext/formatter-tools/native-addons-rules.json +++ b/.hypertext/formatter-tools/native-addons-rules.json @@ -1,19 +1,11 @@ { "setup": [ - [ - "python3", - "{repo}/.hypertext/formatter-tools/native-addons.py", - "setup-swift" - ], - [ - "python3", - "{repo}/.hypertext/formatter-tools/native-addons.py", - "setup-terraform" - ] + ["python3", "{repo}/.hypertext/formatter-tools/native-addons.py", "setup-swift"], + ["python3", "{repo}/.hypertext/formatter-tools/native-addons.py", "setup-terraform"] ], "rules": [ { - "name": "SwiftFormat 0.64.0", + "name": "SwiftFormat", "patterns": ["**/*.swift", "*.swift"], "argv": [ "python3", @@ -24,15 +16,8 @@ ] }, { - "name": "Terraform 1.15.5", - "patterns": [ - "**/*.tf", - "*.tf", - "**/*.tfvars", - "*.tfvars", - "**/*.hcl", - "*.hcl" - ], + "name": "Terraform", + "patterns": ["**/*.tf", "*.tf", "**/*.tfvars", "*.tfvars", "**/*.hcl", "*.hcl"], "argv": [ "python3", "{repo}/.hypertext/formatter-tools/native-addons.py", diff --git a/.hypertext/formatter-tools/native-addons.py b/.hypertext/formatter-tools/native-addons.py index 624fa0c..2c7a040 100644 --- a/.hypertext/formatter-tools/native-addons.py +++ b/.hypertext/formatter-tools/native-addons.py @@ -18,15 +18,15 @@ Path(os.environ.get("XDG_CACHE_HOME", str(Path.home() / ".cache"))) / "hypertext-formatters" ) -SWIFT_VERSION = "0.64.0" -SWIFT_ARCHIVE = "95ea62625d0b898a7af870293311ae6f09e4a3147ecd900593687e4b9ab2fd98" -SWIFT_BINARY = "c2b098cc3ae30ff9fdd1acf7342f9b6efac4c403cf0b4e2d473690c92ac41210" -TF_VERSION = "1.15.5" +SWIFT_VERSION = "0.64.1" +SWIFT_ARCHIVE = "0e5762a848d738602c7a983b26812031e634d85e357db070968b9c805f253eff" +SWIFT_BINARY = "8814dbe3f89c833e990948f692b3c063bc67fdd6dc5db49f7b205e7c541c8620" +TF_VERSION = "1.17.0" TF_HASHES = { - "darwin_arm64": "01137660510005b918bba82154866fbeac4393163d8277c2abe861dfb5842c3c", - "darwin_amd64": "3687d07c034b3e7deed5b072cd8ae2b34835bcb139baec3fc4f5fd534dabf5ed", - "linux_arm64": "06e7b48de826146c6d9331ba35b13da12332d8392be30d1dd6b789ba4713fff0", - "linux_amd64": "702b2136af6728c8ff037f843dd2dbce2b7ad88786b7381d1d72aefa250f601c", + "darwin_arm64": "7472a54cca911d46c0e399a5ebbce44444912d0d4dad7495f37f1fa51e7ca6b7", + "darwin_amd64": "3773397524196e4ebbf7167e2b9fb478dff1962d555d649f616ba97ca446a143", + "linux_arm64": "f32478134ffc6d710eec474bbd316652cdddc0f4e336973a3745e8d3a3309cdf", + "linux_amd64": "c168cab7c637a8769fdb90089ddd19de701bc6ff8aca64dc2e2185fe46f59f67", } # Archive digests from HashiCorp's versioned SHA256SUMS and PyPI release metadata. CLANG_VERSION = "23.1.3" @@ -154,9 +154,11 @@ def main(): "swift", "terraform", "metal", + "c", "setup-swift", "setup-terraform", "setup-metal", + "setup-c", ], ) parser.add_argument("--path", default="input.swift") @@ -182,12 +184,12 @@ def main(): elif tool == "terraform": command = [str(binary), "fmt", "-no-color", "-"] else: - # Metal's shader syntax is C++ based. The virtual .cpp extension selects - # that parser while retaining the source directory for native style lookup. + # Preserve C virtual paths; Metal shader syntax uses the C++ parser. + # Both retain the source directory for native style configuration lookup. command = [ str(binary), "--assume-filename", - str(Path(args.path).with_suffix(".cpp")), + args.path if tool == "c" else str(Path(args.path).with_suffix(".cpp")), "--style=file", "--fallback-style=LLVM", ] @@ -195,6 +197,18 @@ def main(): k: v for k, v in os.environ.items() if not k.startswith("TF_CLI_ARGS") } environment.update(CHECKPOINT_DISABLE="1", TF_IN_AUTOMATION="1") + if tool == "swift": + result = subprocess.run( + command, + input=sys.stdin.buffer.read(), + capture_output=True, + cwd=ROOT, + env=environment, + ) + sys.stderr.buffer.write(result.stderr) + if not result.returncode: + sys.stdout.buffer.write(result.stdout) + return result.returncode return subprocess.call(command, cwd=ROOT, env=environment) diff --git a/.hypertext/formatter-tools/npm-lock.json b/.hypertext/formatter-tools/npm-lock.json index 3ed57c3..b1d0113 100644 --- a/.hypertext/formatter-tools/npm-lock.json +++ b/.hypertext/formatter-tools/npm-lock.json @@ -6,7 +6,8 @@ "": { "name": "studio-formatter-runtime", "dependencies": { - "prettier": "3.9.6", + "@thehypertextstudio/format-config": "0.0.1", + "prettier": "3.9.10", "prettier-plugin-sh": "0.20.2", "prettier-plugin-toml": "4.1.0" } @@ -33,46 +34,75 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/@reteps/dockerfmt-darwin-arm64/-/dockerfmt-darwin-arm64-0.5.4.tgz", "integrity": "sha512-urMqV+dQyvVI8/WrXwClX9e1PEyS35wFdwJjpZYmL09AkV4Io5U1oam8UBKK7jZk0+YsdF88ay6e86Kn6DIyQg==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "license": "MIT", "optional": true, - "os": ["darwin"] + "os": [ + "darwin" + ] }, "node_modules/@reteps/dockerfmt-darwin-x64": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/@reteps/dockerfmt-darwin-x64/-/dockerfmt-darwin-x64-0.5.4.tgz", "integrity": "sha512-fJORy6DFxbgDiMqxpLTPZlb5KUY0Vq0iR4NGnyKnuYZ9LdZUS508DK2kt/AJ87/jIKNV1qRG0JXG1Tc6xdvWjw==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "license": "MIT", "optional": true, - "os": ["darwin"] + "os": [ + "darwin" + ] }, "node_modules/@reteps/dockerfmt-linux-arm64": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/@reteps/dockerfmt-linux-arm64/-/dockerfmt-linux-arm64-0.5.4.tgz", "integrity": "sha512-6pVakO06eXtDuvxy1Dnjs/gQyUoGGycle8PRSt5IFRwLi/AVaOQwfkfmW0WP8VH9wNUeti6BfJ3ksTn2G+XMxg==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "license": "MIT", "optional": true, - "os": ["linux"] + "os": [ + "linux" + ] }, "node_modules/@reteps/dockerfmt-linux-x64": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/@reteps/dockerfmt-linux-x64/-/dockerfmt-linux-x64-0.5.4.tgz", "integrity": "sha512-OD6SIlUV1D4TgJoTui3FMBAZsGbTSPYsiT0BKhD6jMUcJb3GpFTa7dY9rL8rP9FUqfL7OTHVUGUOL4Rh64Olog==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "license": "MIT", "optional": true, - "os": ["linux"] + "os": [ + "linux" + ] + }, + "node_modules/@thehypertextstudio/format-config": { + "version": "0.0.1", + "resolved": "https://npm.pkg.github.com/download/@thehypertextstudio/format-config/0.0.1/6edd7d867aa0dd577d6249dedbf3d91229a5c2c2", + "integrity": "sha512-lQ+NHFee/pVNP7/3NZ+XZ5NuRyzp8AvQZkMh5xyBI9N44Jbv3AsTHPHyJi2LAuGmW0+y8REeIK+M9y70oC/5Ug==", + "license": "UNLICENSED", + "peerDependencies": { + "prettier": "3.9.10" + } }, "node_modules/@tombit/binding-android-arm-eabi": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-android-arm-eabi/-/binding-android-arm-eabi-0.1.7.tgz", "integrity": "sha512-iyPsflbdpyrQuFGjsq/2F0EY3mwgtYMSjHOo8E28lRw7Bk0q60YHSsrgDY31MCfEOEgzDqfjX8Olr6iYTFwMjw==", - "cpu": ["arm"], + "cpu": [ + "arm" + ], "license": "MIT", "optional": true, - "os": ["android"], + "os": [ + "android" + ], "engines": { "node": ">=20.0.0" } @@ -81,10 +111,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-android-arm64/-/binding-android-arm64-0.1.7.tgz", "integrity": "sha512-PDe05sj7SnGBhrOFda7Zbc4HPoV9pc9YfiioH2prhKWCsdkOPdRrsINNzKaQ9zB/UidMu35EsgDfpzR7GAPTvA==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "license": "MIT", "optional": true, - "os": ["android"], + "os": [ + "android" + ], "engines": { "node": ">=20.0.0" } @@ -93,10 +127,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-darwin-arm64/-/binding-darwin-arm64-0.1.7.tgz", "integrity": "sha512-miTaFHWcB3ZrP+LR/V7P6itH4rt5GqubfOhg99U84KVmRhNAUSqq9OcSaUU4nJAS+KKea9Ee2qSCXxfNWfNLCw==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "license": "MIT", "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": ">=20.0.0" } @@ -105,10 +143,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-darwin-x64/-/binding-darwin-x64-0.1.7.tgz", "integrity": "sha512-8AdCarDY+voPiQO+Nes3AMnG/b5cnt4PJpgFG78fss9YlQwvttxiDXydDeEtb3VQ6hK8tJk1bt0j1mrbu323HA==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "license": "MIT", "optional": true, - "os": ["darwin"], + "os": [ + "darwin" + ], "engines": { "node": ">=20.0.0" } @@ -117,10 +159,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-freebsd-x64/-/binding-freebsd-x64-0.1.7.tgz", "integrity": "sha512-3+FbhwB5/SZPe2hYH9LhS3X977kMIn9ulnCu3T8ToSDe3g9YwZzUobYxIXazQvNwerQEhri7kcRqqVizr3UJ1A==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "license": "MIT", "optional": true, - "os": ["freebsd"], + "os": [ + "freebsd" + ], "engines": { "node": ">=20.0.0" } @@ -129,10 +175,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.1.7.tgz", "integrity": "sha512-pBweM11IOeWxEEeFQ2ldNC8RLFOnr4T+Zs43zHIPGAB0eBi6QBn2LpD6O7aSB5jBOgR3rYAJ5VNZ3XdDYzDzkw==", - "cpu": ["arm"], + "cpu": [ + "arm" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -141,10 +191,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.1.7.tgz", "integrity": "sha512-vJSsAeTHGuTzZCT+ibOXtBfkSHFbBs+0Ckz+zpQLzJzrYooWXb4vxbq5YcU7ANnJ8BHFHq3bfpQd9ld9wvo2Xw==", - "cpu": ["arm"], + "cpu": [ + "arm" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -153,11 +207,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.1.7.tgz", "integrity": "sha512-v/xQuHzUi2Y4fgAWjKekMOEYtDNnE7bNYuZhX/TUmL1rL7MES5+e19cSiPPqwZTx7XlA3PIeOtwV/gBpbr+/iw==", - "cpu": ["arm64"], - "libc": ["glibc"], + "cpu": [ + "arm64" + ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -166,11 +226,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.1.7.tgz", "integrity": "sha512-HgRIXOh99HKd/IkRqPvNMy5LSZ0mXVRj7yM6l62lHbxS1rDMW0fyJtxikrJX6FMMAZrbCcYKpOjNFqWdln8Zzg==", - "cpu": ["arm64"], - "libc": ["musl"], + "cpu": [ + "arm64" + ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -179,11 +245,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-loong64-gnu/-/binding-linux-loong64-gnu-0.1.7.tgz", "integrity": "sha512-vGmWQG+A2VgiX1YmcPkzDrCmdphjk1pc8Y724SeSz1nggJRsD6qy42kpxFR4Mwmpv3fneKfsP9AA5DvgNMBMCA==", - "cpu": ["loong64"], - "libc": ["glibc"], + "cpu": [ + "loong64" + ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -192,11 +264,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-loong64-musl/-/binding-linux-loong64-musl-0.1.7.tgz", "integrity": "sha512-BjepP36zGh0PX2ok3v/Q1HHZLHSJkCTdnLwQxpWp0Ts3Jm2lUL7oBpwTFqBMVW7qEmoezH3RcYa+hIlCEht/mw==", - "cpu": ["loong64"], - "libc": ["musl"], + "cpu": [ + "loong64" + ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -205,11 +283,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.1.7.tgz", "integrity": "sha512-aTYG3ND7CcLUZ4QCWyWnW6b8g2L481n3dRx564BB2tsdMYR+UTTMT9Ht8GCk8NRni5jR4qOj8/6opZU5iUWepw==", - "cpu": ["ppc64"], - "libc": ["glibc"], + "cpu": [ + "ppc64" + ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -218,11 +302,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-ppc64-musl/-/binding-linux-ppc64-musl-0.1.7.tgz", "integrity": "sha512-cLJegaEISxKO1+l6o+tePYL9e4zZ+7e/HC6akVKIUA5KlINLgBRoi1f1wdSAWVeN3p73zGC1HZnCwflmu5ueOA==", - "cpu": ["ppc64"], - "libc": ["musl"], + "cpu": [ + "ppc64" + ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -231,11 +321,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.1.7.tgz", "integrity": "sha512-pmrjVWhX7f2ze8rGPvceRSYP2R57R2Y1hUkks0qDnAweFvNlJM6tn575ArDUF/Wq3jcbjmfuFQOnfeB3qIEoRg==", - "cpu": ["riscv64"], - "libc": ["glibc"], + "cpu": [ + "riscv64" + ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -244,11 +340,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.1.7.tgz", "integrity": "sha512-cSOZ3ybyJa3SY9mM0ZM9p2xwrw/emdcSPSg+sRkqpT9Pk/LvAL1Tckj3+fm2WtphctAnjDNhuvL7hOdUTDqlMA==", - "cpu": ["riscv64"], - "libc": ["musl"], + "cpu": [ + "riscv64" + ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -257,11 +359,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.1.7.tgz", "integrity": "sha512-KZir6MHNSXi06kUQ4D6VJdTmVekH2qgVP5lCCI3+19u0fNaXwG4ncB0AG+JYm76o8/bneS5QHjUtzAoh+paaPA==", - "cpu": ["s390x"], - "libc": ["glibc"], + "cpu": [ + "s390x" + ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -270,11 +378,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.1.7.tgz", "integrity": "sha512-lvEGWsuTK7tBf/ck5tb07qxC2eEv4MP5ZRS5VnOsJg+cUwdthEkrYkb8oeCyu2j4nwHW3U9QoHXChv7Gs8/51w==", - "cpu": ["x64"], - "libc": ["glibc"], + "cpu": [ + "x64" + ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -283,11 +397,17 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-linux-x64-musl/-/binding-linux-x64-musl-0.1.7.tgz", "integrity": "sha512-BT84fASpACpaID1xj2Td0nPpuzGt3jDr1uU+fxi0uczVrNcrWLDSBjllD2ttf3lPiJ/Q/ceQGESTOy9a5+nZgQ==", - "cpu": ["x64"], - "libc": ["musl"], + "cpu": [ + "x64" + ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, - "os": ["linux"], + "os": [ + "linux" + ], "engines": { "node": ">=20.0.0" } @@ -296,10 +416,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-openharmony-arm64/-/binding-openharmony-arm64-0.1.7.tgz", "integrity": "sha512-bouy+zR5Z+oKAuVpPFoxiv0EZynvVaJLJkmz35InQ2Cle/0RHnnk5C/SF8DAksfXf7Cz1M+mjtoB3DQ0+Qvphw==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "license": "MIT", "optional": true, - "os": ["openharmony"], + "os": [ + "openharmony" + ], "engines": { "node": ">=20.0.0" } @@ -308,10 +432,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-openharmony-x64/-/binding-openharmony-x64-0.1.7.tgz", "integrity": "sha512-I/CIJsBu1DKS5Lvq+pp4o7BMuVANeTFO61BV1BY4W9Unkc9H020WVkpDKAkMhdDOI3qhI2GcafunkdIUIa/8Vw==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "license": "MIT", "optional": true, - "os": ["openharmony"], + "os": [ + "openharmony" + ], "engines": { "node": ">=20.0.0" } @@ -320,10 +448,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.1.7.tgz", "integrity": "sha512-W7wJ+grPsqk0QAzqlgQgwVFY7mapKU5XKVLMU/ZVSZn72bAb0dyhc9mceuPIzZHFS/emmWpsPD6+bIiraJObYA==", - "cpu": ["arm64"], + "cpu": [ + "arm64" + ], "license": "MIT", "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=20.0.0" } @@ -332,10 +464,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.1.7.tgz", "integrity": "sha512-hpM4AxTVmwf9K4Wo2/sLpqJEHPDAecaF7a5K5sg66A2/XCwX+s86vBXLeXuDdMm8+U1svM6nOsqqFjWz3VnhFw==", - "cpu": ["ia32"], + "cpu": [ + "ia32" + ], "license": "MIT", "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=20.0.0" } @@ -344,10 +480,14 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/@tombit/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.1.7.tgz", "integrity": "sha512-qWtuJEDiZCn01ha9WBaVp0hx6xjveWs4eQzITXQbXtSNrm0c4UtdQApMmgOS9TzwRhoxyZyKgLKBLnJTBHBy4w==", - "cpu": ["x64"], + "cpu": [ + "x64" + ], "license": "MIT", "optional": true, - "os": ["win32"], + "os": [ + "win32" + ], "engines": { "node": ">=20.0.0" } @@ -369,9 +509,9 @@ } }, "node_modules/prettier": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", - "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "version": "3.9.10", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz", + "integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==", "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" diff --git a/.hypertext/formatter-tools/preset.mjs b/.hypertext/formatter-tools/preset.mjs new file mode 100644 index 0000000..244f7f4 --- /dev/null +++ b/.hypertext/formatter-tools/preset.mjs @@ -0,0 +1,62 @@ +// Load the existing Studio style authority from the prepared formatter installation. +import { readFile } from 'node:fs/promises'; +import { createRequire } from 'node:module'; +import path from 'node:path'; +import { fileURLToPath, pathToFileURL } from 'node:url'; +import { isDeepStrictEqual } from 'node:util'; + +const tools = path.dirname(fileURLToPath(import.meta.url)); +const name = '@thehypertextstudio/format-config'; +const json = async (filename) => JSON.parse(await readFile(filename, 'utf8')); +const exact = (value) => typeof value === 'string' && /^\d+\.\d+\.\d+$/.test(value); +let expected; +let prettierVersion; +let anchor; +try { + // A cache-backed formatter installation must still match its committed recipe. + const spec = await json(path.join(tools, 'tools.json')); + const runtime = await json(path.join(tools, 'runtime.json')); + if (!isDeepStrictEqual(spec, runtime.spec)) + throw Error('Formatter pins changed; rerun hook setup'); + expected = spec.npm[name]; + prettierVersion = runtime.prettier; + anchor = path.join(runtime.npm, '../package.json'); +} catch (error) { + // Only an absent tools.json selects the generic repository-local installation. + // A broken or unprepared cache must never fall back to another installation. + if (error.code !== 'ENOENT' || error.path !== path.join(tools, 'tools.json')) throw error; + anchor = path.join(tools, 'package.json'); + const manifest = await json(anchor).catch(async (error) => { + if (error.code !== 'ENOENT' || error.path !== anchor) throw error; + // Reuse a repository's existing dependency owner instead of another manifest. + anchor = path.resolve(tools, '../../package.json'); + return json(anchor); + }); + expected = manifest.devDependencies?.[name] ?? manifest.dependencies?.[name]; + prettierVersion = manifest.devDependencies?.prettier ?? manifest.dependencies?.prettier; +} +if (!exact(expected) || !exact(prettierVersion)) + throw Error('Run Studio setup: shared preset and Prettier require exact pins'); +const require = createRequire(anchor); + +async function metadata(filename, packageName) { + let folder = path.dirname(filename); + while (true) { + const candidate = await json(path.join(folder, 'package.json')).catch((error) => { + if (error.code === 'ENOENT') return null; + throw error; + }); + if (candidate?.name === packageName) return candidate; + const parent = path.dirname(folder); + if (parent === folder) throw Error('Cannot identify installed package: ' + packageName); + folder = parent; + } +} +const entry = require.resolve(name + '/prettier'); +const config = await metadata(entry, name); +const prettier = await metadata(require.resolve('prettier'), 'prettier'); +if (config.version !== expected) + throw Error('Run Studio setup: shared preset version differs from its pin'); +if (prettier.version !== prettierVersion || config.peerDependencies?.prettier !== prettierVersion) + throw Error('Run Studio setup: shared preset requires its exact Prettier peer'); +export default (await import(pathToFileURL(entry))).default; diff --git a/.hypertext/formatter-tools/setup.py b/.hypertext/formatter-tools/setup.py index 3267443..cd8c946 100644 --- a/.hypertext/formatter-tools/setup.py +++ b/.hypertext/formatter-tools/setup.py @@ -1,18 +1,26 @@ #!/usr/bin/env python3 """Prepare only pinned formatter dependencies; never run on commit.""" +import argparse import hashlib import json import os -from pathlib import Path import re import shutil import subprocess import sys +import tempfile +import time +from contextlib import contextmanager +from pathlib import Path TOOLS = Path(__file__).resolve().parent ROOT = TOOLS.parents[1] -SPEC = json.loads((TOOLS / "tools.json").read_text()) +SPEC = ( + json.loads((TOOLS / "tools.json").read_text()) + if (TOOLS / "tools.json").exists() + else None +) CACHE = ( Path(os.environ.get("XDG_CACHE_HOME", str(Path.home() / ".cache"))) / "hypertext-studio/formatters" @@ -36,7 +44,9 @@ def prettier_version(): if value and value.startswith("catalog:"): workspace = (ROOT / "pnpm-workspace.yaml").read_text() match = re.search( - r"^\s+prettier:\s*[\'\"]?(\d+\.\d+\.\d+)[\'\"]?\s*$", workspace, re.M + r"^\s+prettier:\s*[\'\"]?(\d+\.\d+\.\d+)[\'\"]?\s*$", + workspace, + re.MULTILINE, ) value = match[1] if match else None if not value or not re.fullmatch(r"\d+\.\d+\.\d+", value): @@ -96,7 +106,93 @@ def npm_inventory_matches(folder, lock, recipe): return True +def install_npm(folder, recipe, arguments): + """Authenticate private packages only during explicit setup, without saved tokens.""" + private = any( + name.startswith("@thehypertextstudio/") for name in recipe["dependencies"] + ) + kwargs = {} + options = [] + if private: + configuration = folder / ".npmrc" + content = ( + "@thehypertextstudio:registry=https://npm.pkg.github.com\n" + "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}\n" + ) + if configuration.exists() and configuration.read_text() != content: + raise ValueError( + "Formatter cache registry configuration needs reconciliation" + ) + environment = os.environ.copy() + token = ( + environment.get("NODE_AUTH_TOKEN") + or environment.get("GH_TOKEN") + or environment.get("GITHUB_TOKEN") + ) + if not token and shutil.which("gh"): + result = subprocess.run( + ["gh", "auth", "token", "--hostname", "github.com"], + capture_output=True, + check=False, + text=True, + timeout=15, + ) + if result.returncode == 0: + token = result.stdout.strip() + if not token: + raise ValueError( + "Studio package access requires GitHub authentication or NODE_AUTH_TOKEN during setup" + ) + environment["NODE_AUTH_TOKEN"] = token + configuration.write_text(content) + options = ["--userconfig", str(configuration)] + kwargs["env"] = environment + subprocess.run([*npm_command(), *arguments, *options], check=True, **kwargs) + + +@contextmanager +def cache_lock(folder, timeout=180): + """Serialize explicit setup across processes; commits never acquire this lock.""" + folder.parent.mkdir(parents=True, exist_ok=True) + lock = folder.with_name(folder.name + ".lock") + deadline = time.monotonic() + timeout + while True: + try: + lock.mkdir() + break + except FileExistsError: + if lock.is_symlink() or not lock.is_dir(): + raise ValueError("Unsafe formatter setup lock: " + str(lock)) from None + if time.monotonic() >= deadline: + raise ValueError( + "Formatter setup is locked; inspect its owner and retry: " + + str(lock) + ) from None + time.sleep(0.1) + try: + (lock / "owner.json").write_text(json.dumps({"pid": os.getpid()}) + "\n") + yield + finally: + (lock / "owner.json").unlink(missing_ok=True) + lock.rmdir() + + +def npm_cache_key(recipe, lock_bytes): + # Different reviewed transitive locks never mutate the same prepared runtime. + return hashlib.sha256( + json.dumps(recipe, sort_keys=True).encode() + b"\0" + lock_bytes + ).hexdigest()[:20] + + def prepare_npm(folder, recipe, lock_bytes): + with cache_lock(folder): + folder.mkdir(parents=True, exist_ok=True) + (folder / "package.json").write_text(json.dumps(recipe, indent=2) + "\n") + (folder / "package-lock.json").write_bytes(lock_bytes) + _prepare_npm_locked(folder, recipe, lock_bytes) + + +def _prepare_npm_locked(folder, recipe, lock_bytes): """Reuse only a complete install bound to the exact reviewed integrity lock.""" data = json.loads(lock_bytes) if ( @@ -124,9 +220,10 @@ def prepare_npm(folder, recipe, lock_bytes): if complete and npm_inventory_matches(folder, data, recipe): return marker.unlink(missing_ok=True) - subprocess.run( + install_npm( + folder, + recipe, [ - *npm_command(), "ci", "--prefix", str(folder), @@ -135,7 +232,6 @@ def prepare_npm(folder, recipe, lock_bytes): "--no-fund", "--registry=https://registry.npmjs.org", ], - check=True, ) if not npm_inventory_matches(folder, data, recipe): raise ValueError( @@ -157,56 +253,64 @@ def main(): "private": True, "dependencies": {"prettier": version, **SPEC["npm"]}, } - key = hashlib.sha256(json.dumps(recipe, sort_keys=True).encode()).hexdigest()[:20] - folder = CACHE / "npm" / key - folder.mkdir(parents=True, exist_ok=True) - manifest = folder / "package.json" - manifest.write_text(json.dumps(recipe, indent=2) + "\n") lock = TOOLS / "npm-lock.json" if not lock.exists(): - subprocess.run( - [ - *npm_command(), - "install", - "--prefix", - str(folder), - "--package-lock-only", - "--ignore-scripts", - "--no-audit", - "--no-fund", - "--registry=https://registry.npmjs.org", - ], - check=True, - ) - lock.write_bytes((folder / "package-lock.json").read_bytes()) - data = json.loads(lock.read_text()) + # Resolve a missing lock in a private temporary directory, never a shared runtime. + with tempfile.TemporaryDirectory( + prefix="studio-formatter-recipe-" + ) as temporary: + staging = Path(temporary) + (staging / "package.json").write_text(json.dumps(recipe, indent=2) + "\n") + install_npm( + staging, + recipe, + [ + "install", + "--prefix", + str(staging), + "--package-lock-only", + "--ignore-scripts", + "--no-audit", + "--no-fund", + "--registry=https://registry.npmjs.org", + ], + ) + temporary_lock = lock.with_suffix(".tmp." + str(os.getpid())) + try: + temporary_lock.write_bytes((staging / "package-lock.json").read_bytes()) + os.replace(temporary_lock, lock) + finally: + temporary_lock.unlink(missing_ok=True) + lock_bytes = lock.read_bytes() + data = json.loads(lock_bytes) if data["packages"][""]["dependencies"] != recipe["dependencies"]: raise ValueError( "Formatter lock differs from current repository pins; regenerate npm-lock.json with the reviewed dependency change" ) - (folder / "package-lock.json").write_bytes(lock.read_bytes()) - prepare_npm(folder, recipe, lock.read_bytes()) + folder = CACHE / "npm" / npm_cache_key(recipe, lock_bytes) + prepare_npm(folder, recipe, lock_bytes) ruffdir = CACHE / "ruff" / SPEC["ruff"] python = ruffdir / ("Scripts/python.exe" if os.name == "nt" else "bin/python") ruff = ruffdir / ("Scripts/ruff.exe" if os.name == "nt" else "bin/ruff") - if not python.is_file(): - subprocess.run([sys.executable, "-m", "venv", str(ruffdir)], check=True) - if ( - not ruff.is_file() - or subprocess.check_output([str(ruff), "--version"]).strip() - != ("ruff " + SPEC["ruff"]).encode() - ): - subprocess.run( - [ - str(python), - "-m", - "pip", - "install", - "--disable-pip-version-check", - "ruff==" + SPEC["ruff"], - ], - check=True, - ) + with cache_lock(ruffdir): + if not python.is_file(): + subprocess.run([sys.executable, "-m", "venv", str(ruffdir)], check=True) + if ( + not ruff.is_file() + or subprocess.check_output([str(ruff), "--version"]).strip() + != ("ruff " + SPEC["ruff"]).encode() + ): + subprocess.run( + [ + str(python), + "-m", + "pip", + "install", + "--disable-pip-version-check", + "ruff==" + SPEC["ruff"], + ], + check=True, + ) for command in SPEC.get("native_setup", []): subprocess.run( [ @@ -227,4 +331,25 @@ def main(): if __name__ == "__main__": - main() + if sys.argv[1:]: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--npm-only", action="store_true", required=True) + parser.add_argument("command", choices=["ci"]) + parser.add_argument("--prefix", type=Path, default=TOOLS) + arguments = parser.parse_args() + folder = arguments.prefix.resolve() + manifest = json.loads((folder / "package.json").read_text()) + install_npm( + folder, + {"dependencies": manifest["devDependencies"]}, + [ + "ci", + "--prefix", + str(folder), + "--ignore-scripts", + "--no-audit", + "--no-fund", + ], + ) + else: + main() diff --git a/.hypertext/formatter-tools/test_swift.py b/.hypertext/formatter-tools/test_swift.py new file mode 100644 index 0000000..1b397fe --- /dev/null +++ b/.hypertext/formatter-tools/test_swift.py @@ -0,0 +1,72 @@ +"""Verify pinned SwiftFormat stdin behavior and native configuration ownership.""" + +import os +from pathlib import Path +import shutil +import subprocess +import sys +import tempfile +import unittest + +DIRECTORY = Path(__file__).resolve().parent +HELPER = DIRECTORY / "native.py" +if not HELPER.exists() or "SWIFT_VERSION" not in HELPER.read_text(): + HELPER = DIRECTORY / "native-addons.py" + + +def format_source(source, helper=HELPER, environment=None, cwd=None): + return subprocess.run( + [sys.executable, str(helper), "swift", "--path", "src/Sample.swift"], + input=source, + capture_output=True, + env=environment, + cwd=cwd, + ) + + +class SwiftFormatterTests(unittest.TestCase): + def test_stdin_formats_and_is_idempotent(self): + first = format_source(b"let value=1\n") + self.assertEqual(first.returncode, 0, first.stderr.decode()) + self.assertEqual(first.stdout, b"let value = 1\n") + second = format_source(first.stdout) + self.assertEqual(second.returncode, 0, second.stderr.decode()) + self.assertEqual(second.stdout, first.stdout) + + def test_invalid_swift_does_not_return_replacement_source(self): + result = format_source(b'let broken = "') + self.assertNotEqual(result.returncode, 0) + self.assertEqual(result.stdout, b"") + self.assertTrue(result.stderr) + + def test_missing_cache_blocks_without_network_or_cache_creation(self): + with tempfile.TemporaryDirectory() as directory: + result = format_source( + b"let value=1\n", + environment=dict(os.environ, XDG_CACHE_HOME=directory), + ) + self.assertNotEqual(result.returncode, 0) + self.assertEqual(result.stdout, b"") + self.assertEqual(list(Path(directory).iterdir()), []) + + def test_existing_config_controls_style_without_changing_working_source(self): + with tempfile.TemporaryDirectory() as directory: + root = Path(directory) + helper = root / ".hypertext/formatter-tools" / HELPER.name + helper.parent.mkdir(parents=True) + shutil.copyfile(HELPER, helper) + (root / ".swiftformat").write_text("--indent 2\n") + source = root / "src/Sample.swift" + source.parent.mkdir() + before = b"private draft must remain unchanged\n" + source.write_bytes(before) + result = format_source( + b"func sample(){\nprint(1)\n}\n", helper, cwd=root.parent + ) + self.assertEqual(result.returncode, 0, result.stderr.decode()) + self.assertIn(b"\n print(1)\n", result.stdout) + self.assertEqual(source.read_bytes(), before) + + +if __name__ == "__main__": + unittest.main() diff --git a/.hypertext/formatter-tools/tools.json b/.hypertext/formatter-tools/tools.json index 65c8532..5ac497b 100644 --- a/.hypertext/formatter-tools/tools.json +++ b/.hypertext/formatter-tools/tools.json @@ -1,24 +1,17 @@ { "schema_version": 1, "prettier": { - "version": "3.9.6" + "version": "3.9.10" }, "npm": { "prettier-plugin-sh": "0.20.2", - "prettier-plugin-toml": "4.1.0" + "prettier-plugin-toml": "4.1.0", + "@thehypertextstudio/format-config": "0.0.1" }, - "ruff": "0.15.9", + "ruff": "0.17.2", "native_setup": [ - [ - "python3", - "{repo}/.hypertext/formatter-tools/native-addons.py", - "setup-swift" - ], - [ - "python3", - "{repo}/.hypertext/formatter-tools/native-addons.py", - "setup-terraform" - ] + ["python3", "{repo}/.hypertext/formatter-tools/native-addons.py", "setup-swift"], + ["python3", "{repo}/.hypertext/formatter-tools/native-addons.py", "setup-terraform"] ], "sql_dialect": "postgresql" } diff --git a/.hypertext/formatters.json b/.hypertext/formatters.json index 7e05337..ffaf5c3 100644 --- a/.hypertext/formatters.json +++ b/.hypertext/formatters.json @@ -12,14 +12,7 @@ ] }, { - "include": [ - "**/*.tf", - "*.tf", - "**/*.tfvars", - "*.tfvars", - "**/*.hcl", - "*.hcl" - ], + "include": ["**/*.tf", "*.tf", "**/*.tfvars", "*.tfvars", "**/*.hcl", "*.hcl"], "argv": [ "python3", "{repo}/.hypertext/formatter-tools/native-addons.py", @@ -30,21 +23,11 @@ }, { "include": ["*.yml", "*.yaml"], - "argv": [ - "node", - ".hypertext/formatter-tools/prettier.mjs", - "{path}", - "yaml" - ] + "argv": ["node", ".hypertext/formatter-tools/prettier.mjs", "{path}", "yaml"] }, { "include": ["*.json"], - "argv": [ - "node", - ".hypertext/formatter-tools/prettier.mjs", - "{path}", - "json" - ] + "argv": ["node", ".hypertext/formatter-tools/prettier.mjs", "{path}", "json"] }, { "include": ["*.py", "*.pyi"], @@ -52,39 +35,19 @@ }, { "include": ["*.md", "*.markdown", "*.mdc"], - "argv": [ - "node", - ".hypertext/formatter-tools/prettier.mjs", - "{path}", - "markdown" - ] + "argv": ["node", ".hypertext/formatter-tools/prettier.mjs", "{path}", "markdown"] }, { "include": ["assets/run.sh.in", "*.sh", "*.bash", "*.zsh"], - "argv": [ - "node", - ".hypertext/formatter-tools/prettier.mjs", - "{path}", - "sh" - ] + "argv": ["node", ".hypertext/formatter-tools/prettier.mjs", "{path}", "sh"] }, { "include": ["*.toml"], - "argv": [ - "node", - ".hypertext/formatter-tools/prettier.mjs", - "{path}", - "toml" - ] + "argv": ["node", ".hypertext/formatter-tools/prettier.mjs", "{path}", "toml"] }, { "include": ["*.js", "*.jsx", "*.mjs", "*.cjs"], - "argv": [ - "node", - ".hypertext/formatter-tools/prettier.mjs", - "{path}", - "babel" - ] + "argv": ["node", ".hypertext/formatter-tools/prettier.mjs", "{path}", "babel"] } ], "exclude": [ @@ -94,7 +57,9 @@ ".hypertext/formatter-tools/setup.py", ".hypertext/formatter-tools/run.py", ".hypertext/formatter-tools/prettier.mjs", - ".hypertext/formatter-tools/text.py" + ".hypertext/formatter-tools/text.py", + ".hypertext/formatter-tools/preset.mjs", + ".hypertext/formatter-tools/npm-lock.json" ], "kind": "vendored", "reason": "Locked shared formatter engine; maintained and formatted in product-standards." @@ -115,10 +80,7 @@ "reason": "Images, JAR/archive payloads, and serialized Xcode UI state are binary artifacts." }, { - "include": [ - "tests/fixtures/legacy-runtime/v0.1.7.commit", - "infra/**/.terraform.lock.hcl" - ], + "include": ["tests/fixtures/legacy-runtime/v0.1.7.commit", "infra/**/.terraform.lock.hcl"], "kind": "generated", "reason": "Immutable release fixture identity and Terraform-generated provider lock selections must retain tool-owned bytes." }, diff --git a/.hypertext/formatting/LOCK.json b/.hypertext/formatting/LOCK.json index 421ecf5..3f27427 100644 --- a/.hypertext/formatting/LOCK.json +++ b/.hypertext/formatting/LOCK.json @@ -2,7 +2,7 @@ "__init__.py": "3858bfb4a4fa531ea1269e6e42cce86f0b7bfaf351600a755afc159def4c85d3", "gate.py": "172510d10dc9a4f6d8623eb25d92991dd032c72ef81f62634c2a0715cbef93e6", "runner.py": "bdd2d79fa3e00cdf8375da0fe3092e3dba67ec2f8462a9611182ea346f64a167", - "setup_files.py": "fbe7525bdac4f3f8dabb5c3cc298386db9700a881d86d37e9a033ae59d115b53", - "formatting.py": "3f2fbabd12f2ee87679e4f4d6e8200dfec93cc3399c0d28cde9981ec058d8a81", + "setup_files.py": "1f90c674fce827139df32df6c84763f643696ad453d2f4e1621897fff6c4de68", + "formatting.py": "51e74bf9a1bae3c05aa27c6a712b51897f2ea82ce0ebd7a06bb2e96b6f3d5d07", "git_policy.py": "87337a7465e95df1d4da345a5ab9bf8c3f7dccadc38f88a41aec24e0ec21780d" } diff --git a/.hypertext/formatting/core/formatting.py b/.hypertext/formatting/core/formatting.py index 712422d..c817c62 100644 --- a/.hypertext/formatting/core/formatting.py +++ b/.hypertext/formatting/core/formatting.py @@ -30,6 +30,11 @@ "package.json", "pnpm-lock.yaml", "pnpm-workspace.yaml", + "libs.versions.toml", + "gradle.properties", + "Cargo.toml", + "rust-toolchain.toml", + "global.json", } @@ -44,12 +49,14 @@ def configuration_file(name): and base in { "tools.json", + "preset.mjs", "native-rules.json", "native-addons-rules.json", "document-rules.json", "dsl-rules.json", "kotlin.editorconfig", "npm-lock.json", + "requirements.txt", } ) diff --git a/.hypertext/formatting/core/setup_files.py b/.hypertext/formatting/core/setup_files.py index 53e535c..ab54adb 100644 --- a/.hypertext/formatting/core/setup_files.py +++ b/.hypertext/formatting/core/setup_files.py @@ -79,9 +79,11 @@ def relative_path(name): "adapters/formatting/tools/setup.py", "adapters/formatting/tools/run.py", "adapters/formatting/tools/prettier.mjs", + "adapters/formatting/tools/preset.mjs", "adapters/formatting/tools/text.py", "adapters/formatters/package.json", "adapters/formatters/package-lock.json", + "adapters/formatters/requirements.txt", "adapters/formatters/run.py", "docs/git-standards.md", "docs/product-standards.md", diff --git a/.hypertext/formatting/managed.json b/.hypertext/formatting/managed.json index 70696f2..a71015c 100644 --- a/.hypertext/formatting/managed.json +++ b/.hypertext/formatting/managed.json @@ -4,15 +4,16 @@ ".hypertext/formatting/core/__init__.py": "3858bfb4a4fa531ea1269e6e42cce86f0b7bfaf351600a755afc159def4c85d3", ".hypertext/formatting/core/gate.py": "172510d10dc9a4f6d8623eb25d92991dd032c72ef81f62634c2a0715cbef93e6", ".hypertext/formatting/core/runner.py": "bdd2d79fa3e00cdf8375da0fe3092e3dba67ec2f8462a9611182ea346f64a167", - ".hypertext/formatting/core/setup_files.py": "fbe7525bdac4f3f8dabb5c3cc298386db9700a881d86d37e9a033ae59d115b53", - ".hypertext/formatting/core/formatting.py": "3f2fbabd12f2ee87679e4f4d6e8200dfec93cc3399c0d28cde9981ec058d8a81", + ".hypertext/formatting/core/setup_files.py": "1f90c674fce827139df32df6c84763f643696ad453d2f4e1621897fff6c4de68", + ".hypertext/formatting/core/formatting.py": "51e74bf9a1bae3c05aa27c6a712b51897f2ea82ce0ebd7a06bb2e96b6f3d5d07", ".hypertext/formatting/core/git_policy.py": "87337a7465e95df1d4da345a5ab9bf8c3f7dccadc38f88a41aec24e0ec21780d", - ".hypertext/formatting/LOCK.json": "00a0305b8c184e6d093105b9e1805e5a5b2cf73a8f85e5f2187fb1b82a89e467", + ".hypertext/formatting/LOCK.json": "531c1c7d08fa98c9813f477721e138a6cdf3b0d08bd9850d4a33dc904666a9e2", ".hypertext/formatting/commit.py": "5745312af7089246e44ac8a2fd537db9c9b69203753eebfc83d8d2ab2604f8b4", ".hypertext/formatting/install.py": "a67c1660c371f22a5befa5cf61c4b34f1cd37c477d6a9225ea3a34a272095df2", - ".hypertext/formatter-tools/setup.py": "f472125c6773982fe1dcae32293d49435a814cd0a950464eaf92127f23d03bbc", + ".hypertext/formatter-tools/setup.py": "2b681e562bd663ca1ce8a18e30efc5f669d07dfdae620e3aed6bd12b562722a3", ".hypertext/formatter-tools/run.py": "d6fbab2bab923d03d8fa904d9e35d54436e0ee36ba471708931cd6d409fe421e", ".hypertext/formatter-tools/prettier.mjs": "56ea416b45c56a09331009a3e1eecd261100d0262d3a8ae9ca134b502ddbe278", + ".hypertext/formatter-tools/preset.mjs": "0eba1bb6edbfbeb4101afb2e65c1b4120ebd94403808864de534dc60b25e06c0", ".hypertext/formatter-tools/text.py": "0c0e7f27d6ec0b9e02ec330a7faa60f535f60fafb8a4eb5bf023af68acc6a149" } } diff --git a/prettier.config.mjs b/prettier.config.mjs new file mode 100644 index 0000000..cc1499b --- /dev/null +++ b/prettier.config.mjs @@ -0,0 +1,3 @@ +import preset from './.hypertext/formatter-tools/preset.mjs'; + +export default preset;