Repository navigation
chore(theme-translations): fix the update-translations command that upgraded dependencies instead of updating translations (AI-assisted) - #12768
Merged
Conversation
… upgraded dependencies instead of updating translations (AI-assisted) `update` is a pnpm built-in command (alias of `pnpm upgrade`), and built-in commands take precedence over package scripts. `pnpm --filter @docusaurus/theme-translations update` upgraded the package dependencies instead of running its `update` script. Use `run update` instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 3
✨ Finishing Touches
Comment |
✅ [V2]
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
⚡️ Lighthouse report for the deploy preview of this PR
|
|
Size Change: 0 B Total Size: 12.1 MB ℹ️ View Unchanged
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
pnpm --filter @docusaurus/theme-translations updatedoesn't run the package'supdatescript (update.mjs):updateis a pnpm built-in command (pnpm update, aliasesupandupgrade) that upgrades dependencies.pnpm run update.As a result,
pnpm update-translationsupgraded the theme-translations dependencies instead of updating the translation files. In the Claude Code sandbox, it even failed withERR_PNPM_PACKAGE_MANAGER_REMOVE_MODULES_DIRafter partially wipingnode_modules/.pnpm.This PR replaces it with
pnpm --filter @docusaurus/theme-translations run updatein:update-translationsscriptREADME.md(new locale command)The "For maintainers" section of the README already used the correct
run updateform.This PR was written with Claude Code (AI-assisted).
Test Plan
pnpm update-translationsnow logs$ node ./update.mjs, exits with0, and leaves no diff in the locale files.pnpm --filter @docusaurus/theme-translations run update zz-testforwards the locale argument ($ node ./update.mjs zz-test) and creates the new locale files (deleted afterwards).pnpm test packages/docusaurus-theme-translations/locales/__tests__/locales.test.tspasses.Test links
Deploy preview: https://deploy-preview-12768--docusaurus-2.netlify.app/
Related issues/PRs
Found while working on #12767, which also edits
locales.test.ts(no overlap with the test name changed here).🤖 Generated with Claude Code