fix: update bin configuration to resolve Windows CLI issue#1939
fix: update bin configuration to resolve Windows CLI issue#1939cherkanovart merged 19 commits intomainfrom
Conversation
📝 WalkthroughWalkthroughVersion bumps and changelog entries for CLI, new-compiler, and demo packages; Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant PR as "PR / Manual Trigger"
participant GH as "GitHub Actions Runner"
participant Node as "actions/setup-node"
participant Cache as "actions/cache (pnpm/turbo)"
participant PNPM as "pnpm / store path"
participant Build as "pnpm turbo / build"
participant Registry as "npm Registry (NPM_TOKEN)"
PR->>GH: trigger one-off-release (previously)
GH->>Node: setup Node.js
GH->>Cache: restore pnpm & turbo caches
GH->>PNPM: configure pnpm store path
GH->>Build: run `pnpm turbo build --force`
GH->>Registry: publish packages using NPM_TOKEN
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/one-off-release.yml:
- Around line 34-41: Update the GitHub Action step that currently uses
actions/cache@v3 to use actions/cache@v4; specifically change the step with
"uses: actions/cache@v3" to "uses: actions/cache@v4" (the surrounding pnpm cache
step and inputs path, key, and restore-keys in the same job should remain
unchanged) to align with the recommended cache action version.
| - name: Configure pnpm cache | ||
| id: pnpm-cache | ||
| run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
| - uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
| restore-keys: | |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, check if the workflow file exists and view the relevant section
cat -n .github/workflows/one-off-release.yml | sed -n '30,45p'Repository: lingodotdev/lingo.dev
Length of output: 686
🌐 Web query:
actionlint deprecated actions/cache versions warnings
💡 Result:
actionlint is warning because your workflow references a deprecated actions/cache major version (typically actions/cache@v1 or actions/cache@v2). GitHub announced that cache storage moved to a new architecture, deprecating v1–v2 starting Feb 1, 2025 and fully retiring them on Mar 1, 2025—after that, using them can fail runs. [1]
Fix
Update your workflow to a supported major version:
- uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-Notes:
actions/cache@v5exists and runs on Node.js 24 and requires GitHub Actions Runner >= 2.327.1 (relevant for self-hosted runners). [2]- If you can’t move to v5 yet, the
actions/cachemaintainers recommend upgrading to v4 or v3 (both use the newer cache service APIs). [2] - If you pinned
actions/cacheby SHA, you must update that pin too. [1]
Sources: GitHub Changelog deprecation notice [1], actions/cache README (v5 requirements + upgrade guidance) [2].
🌐 Web query:
actions/cache@v4 vs v3 GitHub Actions current recommendation
💡 Result:
- General recommendation (GitHub-hosted runners / most repos): use
actions/cache@v4. It’s the newer major line and is updated to the Node.js 20 runtime. (github.com) - Use
actions/cache@v3only if you specifically need to stay on the v3 line (e.g., org policy / pinned major), noting v3’s documented highlight is GHES 3.5+ caching support and older baseline (Node 16-era). (github.com)
Notes:
- GitHub’s cache team explicitly says the safe minimum upgrade targets are
v4orv3(older versions were deprecated around the cache-service migration). (github.com) - If you’re on self-hosted runners, ensure your runner is new enough (the cache repo calls out runner
2.231.0+for the new cache service). (github.com)
Citations:
- 1: https://github.com/actions/cache
- 2: https://github.com/actions/cache
- 3: https://github.com/actions/cache
- 4: https://github.com/actions/cache
🏁 Script executed:
# Check for actionlint configuration in the repository
fd actionlintrc -o .actionlintrc -o actionlint.yaml -o actionlint.ymlRepository: lingodotdev/lingo.dev
Length of output: 210
🏁 Script executed:
# Look for actionlint in workflows to see if it's being used
rg "actionlint" .github/workflows/ -A 2Repository: lingodotdev/lingo.dev
Length of output: 47
Upgrade actions/cache to v4 as a best practice.
Line 37 uses actions/cache@v3, which is still supported but v4 is the currently recommended version for GitHub-hosted runners. Consider upgrading to v4 to align with GitHub's latest cache action standards.
Suggested fix
- - uses: actions/cache@v3
+ - uses: actions/cache@v4📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - name: Configure pnpm cache | |
| id: pnpm-cache | |
| run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| - name: Configure pnpm cache | |
| id: pnpm-cache | |
| run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | |
🧰 Tools
🪛 actionlint (1.7.10)
[error] 37-37: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🤖 Prompt for AI Agents
In @.github/workflows/one-off-release.yml around lines 34 - 41, Update the
GitHub Action step that currently uses actions/cache@v3 to use actions/cache@v4;
specifically change the step with "uses: actions/cache@v3" to "uses:
actions/cache@v4" (the surrounding pnpm cache step and inputs path, key, and
restore-keys in the same job should remain unchanged) to align with the
recommended cache action version.
* feat: add one-off release workflow for package publishing * chore: remove obsolete changeset for one-off release workflow * fix: update bin configuration to resolve Windows CLI issue * Merge branch 'main' into feat-add-bin-path * chore: update package versions and changelogs for lingo.dev and compiler * chore: add registry URL to one-off release workflow for npm * chore: update one-off release workflow to use changesets action for publishing * chore: add NODE_AUTH_TOKEN to one-off release workflow for npm authentication * chore: enhance one-off release workflow with Turbo caching and pnpm configuration * chore: remove unused registry URL and NODE_AUTH_TOKEN from one-off release workflow * chore: add NPM_TOKEN to one-off release workflow for npm authentication * chore: add NPM_TOKEN to one-off release workflow for npm authentication * chore: add initial changeset file for tracking updates * chore: downgrade compiler version to 0.3.2 in package.json * chore: update CHANGELOG to remove version 0.3.3 details
Summary
Fix CLI bin entry for Windows 11 and Bash by adjusting the package
binconfiguration (e.g. adding or using thelingocommand).Changes
packages/clibin(e.g. addlingoalongsidelingo.devor change the main entry) so the CLI runs correctly on Windows 11 and in Bash.lingo.devvia changeset.Testing
Business logic tests added:
lingo(andlingo.devif kept) runs on Windows 11 and in Bash.Visuals
Required for UI/UX changes:
N/A — no UI/UX changes.
Checklist
silent-wasps-hope.mdCloses #--
Summary by CodeRabbit
New Features
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.