Slack breaking change: New feature: An update to the Slack CLI
What changed
slack.json renamed to .slack/hooks.json (legacy path still supported with a verbose-mode warning)
From the upstream announcement:
Version 3.0.0 of the developer tools for the Slack automations platform is here, with lots of goodies for you! We renamed the slack.json file to .slack/hooks.json , and continue to support slack.json for existing projects. There is now a warning shown in --verbose output to encourage projects to migrate their slack.json to .slack/hooks.json. We've removed the invalid_app_directory error from any commands run in nested project directories, and now search for the required slack.json file in the project's configuration. We also now also check for this file at .slack/hooks.json . We now cache the last known manifest export; the cache is used to avoid overwriting changes on app settings. If the manifest is changed on app settings since the last update, a confirmation prompt will appear before making another update via the Slack CLI. We've moved the top-level commands you know and love, slack […]
Who is affected
Deterministic repository transform rather than a source-code edit: move slack.json to .slack/hooks.json (creating the .slack directory), keeping the JSON content byte-identical since only the location changed.
To find out whether your repo is hit — file and line number, no code leaving your machine:
npx mendapi scan --repo .
How to fix it
mendapi ships a deterministic migration pack for this change (slack-cli-hooks-file-move). Preview the patch locally (dry-run is the default; nothing is modified without --apply):
npx mendapi fix --repo . --migration slack-cli-hooks-file-move
The pack is idempotent, gold-regression tested, and safe on partially migrated code.
What the migration does:
Deterministic repository transform rather than a source-code edit: move slack.json to .slack/hooks.json (creating the .slack directory), keeping the JSON content byte-identical since only the location changed. Sweep the repo for references to the old path — CI scripts, Dockerfiles, .gitignore entries, docs and npm scripts that copy or validate slack.json — and update them to .slack/hooks.json. Because the legacy path keeps working in 3.0.0, the mend is low urgency but trivially safe and idempotent (if .slack/hooks.json already exists, do nothing). This is a file-move pack candidate, a different mend primitive from our in-file rewrites and worth keeping as the reference example of repo-level transforms.
Before:
// repo layout slack.json // ci step cat slack.json | jq .hooks
After:
// repo layout .slack/hooks.json // ci step cat .slack/hooks.json | jq .hooks
Detected and tracked by mendapi — Dependabot for every API you depend on. Scans run locally; your code never leaves your machine.
Related
- All monitored providers — live change counts for slack and 19 others.
- Migration pack catalog — every deterministic fix mendapi ships.
- Getting started — scan your repo in 30 seconds, no code leaves your machine.