From 556e30f8e6a0f5732ed0d38dd282d6d41f0975fa Mon Sep 17 00:00:00 2001 From: Stefano Caldarini Date: Thu, 29 Oct 2026 14:45:44 +0100 Subject: [PATCH] fix: require Node 20 in docs, test on Node 20 and 22, update npm keywords (1.7.2) - README: Node.js v18 -> 20 in both Requirements sections, to match engines.node >=20 - CI: new test.yml runs build and tests on pull requests and pushes to main, Node 20 and 22 - package.json: keywords aligned with the other Lara packages - Version bumped to 1.7.2 --- .github/workflows/test.yml | 53 ++++++++++++++++++++++++++++++++++++++ README.md | 6 ++--- package.json | 11 +++++--- 3 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..397efcd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,53 @@ +name: Test + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + matrix: + # 20 = engines.node minimum, 22 = active LTS + node-version: ['20', '22'] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.11.1 + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v4 + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build project + run: pnpm run build + + - name: Run tests + run: pnpm run test diff --git a/README.md b/README.md index 454ff33..ff8dd63 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Lara Cli automates translation of your i18n files with a single command, preserv Supports multiple file formats including JSON, PO (gettext), TypeScript, Vue I18n single-file components, Markdown and MDX files, Android XML string resource files, Xcode localization files (.strings, .stringsdict, .xcstrings), and plain text (.txt) files. See [Supported Formats](docs/config/formats.md) for details. -[![Version](https://img.shields.io/badge/version-1.7.1-blue.svg)](https://github.com/translated/lara-cli) +[![Version](https://img.shields.io/badge/version-1.7.2-blue.svg)](https://github.com/translated/lara-cli) @@ -24,7 +24,7 @@ Supports multiple file formats including JSON, PO (gettext), TypeScript, Vue I18 ### Requirements -- Node.js v18 or higher +- Node.js 20 or higher ### Install via npm @@ -115,7 +115,7 @@ If you want to contribute to Lara CLI or run it from source, follow these steps. ### Requirements -- Node.js v18 or higher +- Node.js 20 or higher - pnpm v8 or higher 1. **Clone the repository** diff --git a/package.json b/package.json index c62a311..4ab58f7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@translated/lara-cli", "type": "module", - "version": "1.7.1", + "version": "1.7.2", "description": "CLI tool for automated i18n file translation using Lara Translate", "repository": { "type": "git", @@ -11,10 +11,15 @@ "keywords": [ "laratranslate", "lara", - "localization", "translation", - "ai", "translate", + "localization", + "i18n", + "l10n", + "internationalization", + "cli", + "command-line", + "ai", "translated" ], "author": {