Skip to content

Commit 8ebf968

Browse files
sjsyrekclaude
authored andcommitted
docs: stop citing a translate flag that does not exist
The note explaining that the sync init locale rename does not affect translate named `deepl translate --target-lang`, which exits 6 with `error: unknown option`. translate selects its target with `-t` / `--to`; `--target-lang` exists only on the glossary subcommands, and git history shows it was never declared on translate at v1.0.0, v1.1.0 or v1.2.0 — so the sentence has been wrong since it was written, in docs/API.md, docs/SYNC.md and the 2.0.0 changelog entry. A reader following the reassurance got an error. The 1.1.0 changelog entry carries the same claim and is left as the historical record of a shipped release. The docs gate could not see it. `invocations()` collected only lines starting with `deepl `, so an invocation inside an inline-code span mid-sentence — which is exactly how this one appeared — was never checked against the CLI surface. It now collects both, which is what fails on the sentence above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 13357e1 commit 8ebf968

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7777
- **BREAKING — sync**: `tms.api_key` and `tms.token` are gone from the `.deepl-sync.yaml` schema, leaving `TMS_API_KEY` and `TMS_TOKEN` as the only credential source. Both were accepted with a stderr warning through 1.x and now fail config load with a `ConfigError` (exit 7) that names the environment variable to use instead — `tms.api_key is no longer read from .deepl-sync.yaml` — and never quotes the value. This file is committed, which is its purpose, so a credential written into it was a secret in version control: present in every clone and fork, and surviving its own deletion from the file, so **rotate any credential that has ever been pushed**. Nothing working depended on the file being read, since the environment variable already won wherever both were set. Two consequences reach past the schema. The TMS destination-trust gate loses its bypass: it applied only to environment-supplied credentials, on the reasoning that a credential inlined in the same file that chose the destination leaked nothing of the operator's, and now that every credential comes from the environment, every destination is checked. And `SyncTmsConfig` drops both fields, along with the `'config'` member of the internal credential-provenance type.
7878
- **BREAKING — sync**: `tms.auto_push`, `tms.auto_pull` and `tms.require_review` are gone from the config schema. All three were on the `tms:` allowlist and in `docs/SYNC.md`, and **no code read any of them**, so a review gate configured through `require_review` was doing nothing. Each now fails config load with a `ConfigError` (exit 7) naming it — `tms.require_review was never implemented and has been removed` — rather than as a generic unknown field, which would read as a typo. `require_review` is not implementable from this side, since the documented export contract is a flat `{ key: value }` map with no per-entry review flag; use `deepl sync pull --dry-run` to preview a pull instead, and run `deepl sync push` / `deepl sync pull` explicitly in place of the auto flags.
7979
- **BREAKING — cli**: The `--enable-beta-languages` flag on `translate` is gone. The API deprecated the underlying parameter as having no effect — beta languages are part of the regular language set — so the flag had become a silent no-op. Scripts passing it exit 6 with an unknown-option error; remove the flag.
80-
- **BREAKING — sync**: `deepl sync init --source-lang` and `--target-langs`, the deprecated aliases introduced in 1.x, are removed and fail with `error: unknown option` (exit 6). Use `--source-locale` and `--target-locales`. `deepl translate --target-lang` is unaffected — it is the API's wire name, not a deprecated alias.
80+
- **BREAKING — sync**: `deepl sync init --source-lang` and `--target-langs`, the deprecated aliases introduced in 1.x, are removed and fail with `error: unknown option` (exit 6). Use `--source-locale` and `--target-locales`. `deepl translate` is unaffected — it selects its target with `-t` / `--to`, which was never a locale alias.
8181
- **usage**: The dedicated "Speech-to-Text Usage" section (text output), the "Speech-to-text" row (table output) and the `speechToTextMilliseconds*` fields they read are gone, following the API's deprecation of `speech_to_text_milliseconds_count`/`_limit` ("Always returns 0"). Voice usage remains visible in the Product Breakdown, which reads live per-product minutes; the Admin API's per-key `speech_to_text_milliseconds` usage limit is a different, still-current field and is unaffected.
8282
- **deps**: `better-sqlite3` and `@types/better-sqlite3`. The production dependency tree no longer contains any native addon, removing the whole class of ABI-mismatch failures (`ERR_DLOPEN_FAILED` / `NODE_MODULE_VERSION` after a Node major upgrade), a 1.9 MB platform-specific binary, and the C++ compilation-toolchain requirement for installs from source. The cacheless-degradation safety net remains: a runtime whose `node:sqlite` is unusable warns once and runs uncached rather than crashing, and never touches the cache database.
8383
- **deps**: `inquirer`, which no source file imported.

‎docs/API.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ Interactive setup wizard that creates `.deepl-sync.yaml` by scanning the project
13741374
- `--format FORMAT` - Output format: `text` (default), `json`. Under `json`, success emits the envelope described below and failure emits the shared error envelope, both on stdout
13751375
- `--sync-config PATH` - Path to `.deepl-sync.yaml`
13761376

1377-
`--source-lang` and `--target-langs` were accepted as deprecated aliases during `1.x` and were removed in `2.0.0`; use `--source-locale` / `--target-locales`. `deepl translate --target-lang` is unchanged — it operates on strings and stays aligned with the DeepL API's wire name.
1377+
`--source-lang` and `--target-langs` were accepted as deprecated aliases during `1.x` and were removed in `2.0.0`; use `--source-locale` / `--target-locales`. `deepl translate` is unaffected — it selects its target with `-t` / `--to` and operates on strings rather than locale files.
13781378

13791379
**Examples:**
13801380

‎docs/SYNC.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ deepl sync init [OPTIONS]
758758
| `--path <pattern>` | Source file path or glob pattern |
759759
| `--sync-config <path>` | Path to `.deepl-sync.yaml` (default: auto-detect) |
760760

761-
`--source-lang` and `--target-langs` were accepted as deprecated aliases during `1.x` and were removed in `2.0.0`; use `--source-locale` and `--target-locales`. The `--locale` filter on `sync push` / `pull` / `status` / `export` is unchanged. `deepl translate --target-lang` is unchanged — it operates on strings and stays aligned with the DeepL API's wire name.
761+
`--source-lang` and `--target-langs` were accepted as deprecated aliases during `1.x` and were removed in `2.0.0`; use `--source-locale` and `--target-locales`. The `--locale` filter on `sync push` / `pull` / `status` / `export` is unchanged. `deepl translate` is unaffected — it selects its target with `-t` / `--to` and operates on strings rather than locale files.
762762

763763
**Examples:**
764764

‎tests/unit/docs/documented-surface.test.ts‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,20 @@ describe('documented CLI surface', () => {
209209
return tokens;
210210
}
211211

212+
/**
213+
* Every `deepl …` run a reader could copy: whole lines in fenced blocks, and
214+
* inline-code spans in prose, which a line-start test never sees.
215+
*/
212216
function invocations(markdown: string): string[] {
213-
return markdown
217+
const wholeLines = markdown
214218
.split('\n')
215219
.map((line) => line.replace(/^\s*[$>]\s*/, '').trim())
216220
.filter((line) => line.startsWith('deepl '))
217221
.map((line) => line.slice('deepl '.length));
222+
const inlineCode = [...markdown.matchAll(/`deepl\s+([^`\n]+)`/g)].map(
223+
(match) => match[1]!.trim()
224+
);
225+
return [...wholeLines, ...inlineCode];
218226
}
219227

220228
describe.each(DOCS)('%s', (docPath) => {

0 commit comments

Comments
 (0)