Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- **BREAKING — package**: The package is now published as the scoped **`@deepl/cli`** (previously the unpublished working name `deepl-cli`). Scoped packages default to restricted visibility, so `publishConfig.access: "public"` is set explicitly — without it the publish fails. The `bin` name is unchanged: the command is still `deepl`, and scoping changes only the install string (`npm install -g @deepl/cli`). Repository, bugs, and homepage metadata now point at `github.com/DeepL/deepl-cli` directly instead of relying on the redirect from the legacy `DeepLcom` org name.
- **BREAKING — cache/runtime**: The translation cache now uses Node's built-in `node:sqlite` module instead of the `better-sqlite3` native addon, and the CLI consequently requires **Node.js >= 24** (`engines.node` is now `>=24.0.0`). Node 24 is the first release where `node:sqlite` is non-experimental; Node 18/20 lack the module entirely and Node 22 would both warn on every invocation and downgrade the bundled SQLite (3.50.4 vs 3.53.1). Existing cache databases are read in place with no migration — the on-disk format is unchanged (SQLite 3.53.2-written files verified readable, WAL mode and `user_version` stamp included). **Migration**: upgrade to Node 24 (current LTS), e.g. `nvm install 24`; no other action is needed, and the cache keeps its contents.

- **ci**: `.nvmrc` now pins Node 24, matching the CI matrix. It still read `20`, so `nvm use` handed local developers a runtime that cannot load `node:sqlite` and does not satisfy `commander`'s `engines.node >=22.12.0`.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "deepl-cli",
"name": "@deepl/cli",
"version": "1.2.0",
"publishConfig": {
"access": "public"
},
"description": "Next-generation CLI for DeepL translation and writing enhancement",
"type": "module",
"main": "dist/index.js",
Expand Down Expand Up @@ -99,10 +102,10 @@
},
"repository": {
"type": "git",
"url": "https://github.com/DeepLcom/deepl-cli"
"url": "https://github.com/DeepL/deepl-cli"
},
"bugs": {
"url": "https://github.com/DeepLcom/deepl-cli/issues"
"url": "https://github.com/DeepL/deepl-cli/issues"
},
"homepage": "https://github.com/DeepLcom/deepl-cli#readme"
"homepage": "https://github.com/DeepL/deepl-cli#readme"
}
25 changes: 25 additions & 0 deletions tests/unit/package-manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import * as fs from 'fs';
import * as path from 'path';

interface PackageManifest {
name: string;
publishConfig?: { access?: string };
repository: { type: string; url: string };
bugs: { url: string };
homepage: string;
scripts: {
clean?: string;
build: string;
Expand Down Expand Up @@ -68,4 +73,24 @@ describe('package.json manifest', () => {
expect(Object.values(pkg.bin).every((target) => target.startsWith('dist/'))).toBe(true);
});
});

describe('publish identity', () => {
it('should be the scoped @deepl/cli package', () => {
expect(pkg.name).toBe('@deepl/cli');
});

it('should keep the bin name deepl regardless of the package scope', () => {
expect(Object.keys(pkg.bin)).toEqual(['deepl']);
});

it('should publish publicly — scoped packages default to restricted', () => {
expect(pkg.publishConfig?.access).toBe('public');
});

it('should point repository metadata at the DeepL org, not the legacy DeepLcom redirect', () => {
expect(pkg.repository.url).toBe('https://github.com/DeepL/deepl-cli');
expect(pkg.bugs.url).toBe('https://github.com/DeepL/deepl-cli/issues');
expect(pkg.homepage).toBe('https://github.com/DeepL/deepl-cli#readme');
});
});
});