Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughRenames the primary CLI package from Changes
Sequence Diagram(s)sequenceDiagram
participant Release as Release Workflow
participant Build as Build Step
participant R2 as R2 Storage
participant NPM as npm Registry
Release->>Build: detect published packages (gt / gtx-cli)
alt gt published
Release->>Build: build gt binaries (multi-arch)
Build->>R2: upload rgba(0,128,0,0.5) gt/v<version>/*
Build->>R2: upload rgba(0,128,0,0.5) gt/latest/*
Build->>NPM: publish gt binary package
end
alt gtx-cli published
Release->>Build: build gtx-cli binaries (multi-arch)
Build->>R2: upload rgba(0,0,255,0.5) gtx-cli/v<version>/*
Build->>R2: upload rgba(0,0,255,0.5) gtx-cli/latest/*
Build->>NPM: publish gtx-cli binary package
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@greptile-ai re-review |
There was a problem hiding this comment.
Actionable comments posted: 16
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
180-199:⚠️ Potential issue | 🟠 Major
test-gtx-cli-binarieshas the same matrix coverage gap.This job also defines per-arch/per-binary matrix values but validates
pnpm gtx-cli --helpinstead of checking the actual built artifact for each matrix row.💡 Minimal validation fix
- - name: Test gtx-cli in test environment + - name: Validate built gtx-cli binary artifact if: steps.gtx_cli_changed.outputs.changed == 'true' shell: bash - run: cd tests/apps/cli-test-app && pnpm install && pnpm gtx-cli --help + run: | + test -f "packages/gtx-cli/binaries/${{ matrix.binary }}" + if [ "${{ matrix.arch }}" = "x64" ]; then + "./packages/gtx-cli/binaries/${{ matrix.binary }}" --help + fiAlso applies to: 247-255
🧹 Nitpick comments (4)
packages/gtx-cli/src/bin/bin-main.ts (1)
13-33: Consider centralizing platform mapping to avoid drift withpackages/cli/src/bin/bin-main.ts.This mapping is likely duplicated across launchers; keeping a shared resolver module reduces rebrand/compatibility regressions.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/gtx-cli/src/bin/bin-main.ts` around lines 13 - 33, The platform-to-binary mapping in detectPlatform (the platformMap constant and detectPlatform function) is duplicated across launchers; extract this mapping and resolution logic into a single shared resolver function (e.g., resolvePlatformBinary or getCliBinaryName) in a common module and replace the local platformMap/detectPlatform in this file and the other launcher with imports that call the shared resolver; ensure the exported function accepts Node's process.platform and process.arch (or reads them internally) and preserves the same return shape (string | null) so callers like detectPlatform keep behaviour unchanged.packages/gtx-cli/scripts/restore-package-json.js (1)
17-19: Capture originalbinvalue before modifying it inprepare-binary-release.js.At Line 18 in
restore-package-json.js, hardcodingpackageJson.bin = 'dist/main.js'ignores the original shape of the field. Ifbinis (or becomes) an object with multiple aliases, this approach will silently lose those entries. Theprepare-binary-release.jsscript should capture the originalbinvalue (like it does forversion) and the restore script should use that captured value instead of assuming a fixed string.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/gtx-cli/scripts/restore-package-json.js` around lines 17 - 19, The restore script is overwriting packageJson.bin with a hardcoded string and will lose original shapes (strings or objects); capture the original bin value in prepare-binary-release.js the same way originalVersion is captured (e.g., store originalBin alongside originalVersion) and update restore-package-json.js to set packageJson.bin = originalBin (or delete the field if originalBin was undefined) instead of packageJson.bin = 'dist/main.js', referencing the same stored variable name you add (originalBin) so multi-entry bin objects are preserved.packages/gtx-cli/src/main.ts (1)
11-13: Useawait program.parseAsync()for async command actions.The commands registered via
main(program)are async, and usingprogram.parse()prevents Commander from waiting for them to complete. Switch toawait program.parseAsync()to ensure proper promise handling and error consistency, especially when async actions may perform I/O or other async operations.Proposed fix
main(program); program.name('gtx-cli'); -program.parse(); +await program.parseAsync();🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/gtx-cli/src/main.ts` around lines 11 - 13, The CLI is calling program.parse() which doesn't await async command handlers; change the call in main flow to await program.parseAsync() so Commander will wait for promises from async actions registered in main(program); update the invocation where main(program) executes and replace program.parse() with await program.parseAsync(), and ensure the surrounding function is async or top-level await is used so the await is valid.packages/gtx-cli/package.json (1)
19-19: Avoid duplicate binary build in release script.
build:bin:cleanalready invokesbuild:bin, so the second call is redundant.Proposed fix
- "build:bin:release": "pnpm run build:bin:clean && pnpm run build:bin", + "build:bin:release": "pnpm run build:bin:clean",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/gtx-cli/package.json` at line 19, The "build:bin:release" npm script currently runs "build:bin:clean && build:bin", but "build:bin:clean" already invokes "build:bin", causing a redundant second build; update the "build:bin:release" script to only call the cleaning script (i.e., replace the current command with just "pnpm run build:bin:clean" or otherwise remove the extra "&& pnpm run build:bin") so the release script doesn't perform the binary build twice and references the existing scripts "build:bin:release", "build:bin:clean", and "build:bin" when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 105-123: The CI matrix defines matrix.arch and matrix.binary but
never uses them to validate the produced artifacts; update the test-cli-binaries
job (referencing matrix.arch and matrix.binary) to download the built CLI
artifact(s) for the current matrix entry and assert the expected binary exists
and is runnable, e.g. add a step after artifact/package creation that uses
actions/download-artifact or similar to fetch packages/cli/binaries and then a
run step that checks packages/cli/binaries/${{ matrix.binary }} (or the
equivalent produced path) for existence and executability and runs a basic
invocation (e.g. --version or help) to validate the binary output; apply the
same changes to the corresponding matrix job block around the other matrix
entries referenced (the second block at lines 171-179).
In @.github/workflows/release.yml:
- Around line 87-93: Replace the brittle grep/sed JSON parsing in the gt-version
step (id: gt-version) and the gtx-cli extraction step with jq: read the
steps.changesets.outputs.publishedPackages JSON into a variable
(published_packages), use jq to select the object where .name == "gt" (and
separately .name == "gtx-cli") and extract .version, write that value to
GITHUB_OUTPUT as version, and add validation that the extracted version is
non-empty; if jq returns nothing or the version is empty, print an error to
stderr and exit 1 so the job fails fast instead of producing malformed paths.
In `@assets/install.sh`:
- Around line 149-153: The post-install messages are hardcoded to "gt" while the
script uses the BINARY_NAME variable (and checks/installs
"${BINARY_NAME}"/install_path); update the user-facing messages to reference the
actual binary variable (use "${BINARY_NAME}" instead of "gt") so the info and
warn calls (info "gt installed successfully!", info "Run 'gt --help'...", warn
"gt was installed to ${install_path}", etc.) are consistent with the
install/verification logic and reflect any rename.
- Line 121: The installer uses the Bash-only "local" keyword (e.g., declaration
of tmp_file in the function where tmp_file is set) which breaks POSIX /bin/sh;
remove all "local" prefixes (there are ~8 occurrences) and instead declare
variables with plain assignments at the start of the function (e.g.,
tmp_file="${tmp_dir}/gt"), ensure names are unique to avoid clobbering outer
scope, and explicitly unset or reassign them at function end if needed to mimic
local scope; update every function that uses local (search for "local "
occurrences) to follow this pattern so the script remains POSIX-compliant.
In `@examples/next-gt-starter/package.json`:
- Line 7: The "build" script in package.json uses a semicolon so `next build`
runs even if `gt translate` fails; change the "build" script entry (the "build"
key in package.json) to use a logical AND operator so the script fails fast
(i.e., run gt translate && next build) ensuring `next build` only runs if `gt
translate` succeeds.
In `@packages/cli/src/index.ts`:
- Line 10: The program name is hardcoded via program.name('gt') inside main,
which forces wrappers to override it; change main to make the CLI name
injectable by either (a) adding an optional parameter to main (e.g.,
main(program, cliName?) and call program.name(cliName) only when cliName is
provided, or (b) only call program.name(...) if program.name() is unset so
callers that set the name (the wrapper that calls main(program)) keep their
identity; update usages that call main(program) accordingly and keep the symbol
references program.name and main(program) consistent.
In `@packages/gtx-cli/__tests__/wrapper.test.ts`:
- Around line 2-7: The test currently imports main from the wrong module ('gt'),
so update the import in wrapper.test.ts to import { main } from 'gtx-cli' (the
wrapper package) and keep the existing assertion that typeof main is 'function'
to ensure the wrapper actually re-exports the symbol; locate the test file and
replace the import source while leaving the test name and expect assertion
intact.
In `@packages/gtx-cli/.gitignore`:
- Line 3: Replace the non-standard gitignore pattern **.tgz with the
conventional *.tgz in the packages/gtx-cli/.gitignore so the rule clearly and
idiomatically matches all .tgz files at any directory level; update the line
containing the pattern to use *.tgz.
In `@packages/gtx-cli/.prettierrc`:
- Line 8: Replace the deprecated JSON key "jsxBracketSameLine" in the
.prettierrc entry with the supported "bracketSameLine" (or remove the option
entirely to match the root config); locate the key "jsxBracketSameLine" in the
package's Prettier config, rename it to "bracketSameLine" and keep the boolean
value, or delete the key if you prefer to align with the root omission and other
packages.
In `@packages/gtx-cli/package.json`:
- Line 31: The release:bin script can skip bin:restore and build:clean if pnpm
publish fails due to the && chaining; update the "release:bin" script so the
publish step cannot short-circuit the rest (e.g., run pnpm publish --tag bin
--no-git-checks with a fail-tolerant form such as appending "|| true" or
wrapping the publish in a shell try/finally construct) so that pnpm run
bin:restore and pnpm run build:clean always execute after pnpm run bin:prep and
pnpm run build:bin:clean even if pnpm publish fails.
In `@packages/gtx-cli/scripts/build-exe.sh`:
- Around line 1-75: Add strict failure handling and safe variable quoting:
enable fail-fast by adding "set -euo pipefail" at the top of the script so any
failing bun build stops the script (preventing chmod on missing files), and
update the case dispatch to quote the ARCH variable (use case "$ARCH" in place
of case $ARCH) so values with spaces are handled safely; modify the existing
build_* functions (build_darwin_x64, build_darwin_arm64, build_linux_x64,
build_linux_arm64, build_windows_x64) and the case block to rely on these
changes so failed builds halt immediately and the script does not print "Build
complete!" on errors.
In `@packages/gtx-cli/scripts/prepare-binary-release.js`:
- Around line 14-18: The current code always appends "-bin.0" to
packageJson.version (using originalVersion and binaryVersion), causing
double-suffixing if run twice; change the logic in prepare-binary-release.js to
first derive a baseVersion by stripping any existing "-bin" suffix (e.g. use a
regex to remove /-bin(?:\.\d+)?$/ from packageJson.version or originalVersion),
then set packageJson.version = `${baseVersion}-bin.0`; reference
originalVersion, binaryVersion and packageJson.version when locating where to
change the assignment so the operation becomes idempotent.
In `@packages/gtx-cli/src/bin/bin-main.ts`:
- Around line 18-29: The child process close handler in bin-main.ts currently
treats a null exit code as failure; update the child.on('close', ...) logic in
the launcher (the handler attached to the spawned child in
packages/gtx-cli/src/bin/bin-main.ts — same logic exists in
packages/cli/src/bin/bin-main.ts) to detect the signal parameter and propagate
it using process.kill(process.pid, signal) when signal is truthy, otherwise exit
with the child code (process.exit(code ?? 1)); after fixing, factor the common
launcher/routing logic into a shared helper to avoid duplication between the two
bin-main.ts files.
- Around line 70-73: The child 'close' handler currently ignores the signal
parameter and always exits with code 1 on null code; update the
child.on('close', (code, signal) => { ... }) handler to preserve termination
semantics by checking signal first: if signal is set, re-emit/propagate that
signal to the current process (e.g., process.kill(process.pid, signal));
otherwise exit with the actual numeric code (use process.exit(code ?? 0)). Apply
this change to the child.on('close' ...) callback in the code using that pattern
(same fix required in the other bin-main.ts).
In `@packages/gtx-cli/src/main.ts`:
- Around line 7-10: The .env.production file is being loaded unconditionally via
dotenv.config({ path: '.env.production', override: true }) and will overwrite
local/dev variables; update the startup logic around dotenv.config calls so that
dotenv.config({ path: '.env.production', override: true }) only runs when
process.env.NODE_ENV === 'production' (or equivalent env check) after loading
.env and .env.local; keep the existing override order (.env, then .env.local
override true, then .env.production only in production) and ensure you still
pass override: true for the later loads to preserve intended precedence.
In `@packages/tanstack-start/local-dev.md`:
- Line 104: Replace the personal/stale phrase with a neutral, explicit
transitional instruction: change the sentence that says “I haven't set up `gt`
yet, so import `<T>` from `gt-react` and when you wrap `gt()` around a string,
wrap it in `msg()` from `gt-react` as well for registration” to something like
“Until `gt` is wired into this template, import `T` from `gt-react` and use
`msg()` to register any strings you wrap with `gt()` (e.g., wrap `gt()` calls in
`msg()`).” Ensure the updated wording references `gt`, `gt-react`, `T`, `msg()`,
and `gt()` exactly so readers know which symbols to use.
---
Nitpick comments:
In `@packages/gtx-cli/package.json`:
- Line 19: The "build:bin:release" npm script currently runs "build:bin:clean &&
build:bin", but "build:bin:clean" already invokes "build:bin", causing a
redundant second build; update the "build:bin:release" script to only call the
cleaning script (i.e., replace the current command with just "pnpm run
build:bin:clean" or otherwise remove the extra "&& pnpm run build:bin") so the
release script doesn't perform the binary build twice and references the
existing scripts "build:bin:release", "build:bin:clean", and "build:bin" when
making the change.
In `@packages/gtx-cli/scripts/restore-package-json.js`:
- Around line 17-19: The restore script is overwriting packageJson.bin with a
hardcoded string and will lose original shapes (strings or objects); capture the
original bin value in prepare-binary-release.js the same way originalVersion is
captured (e.g., store originalBin alongside originalVersion) and update
restore-package-json.js to set packageJson.bin = originalBin (or delete the
field if originalBin was undefined) instead of packageJson.bin = 'dist/main.js',
referencing the same stored variable name you add (originalBin) so multi-entry
bin objects are preserved.
In `@packages/gtx-cli/src/bin/bin-main.ts`:
- Around line 13-33: The platform-to-binary mapping in detectPlatform (the
platformMap constant and detectPlatform function) is duplicated across
launchers; extract this mapping and resolution logic into a single shared
resolver function (e.g., resolvePlatformBinary or getCliBinaryName) in a common
module and replace the local platformMap/detectPlatform in this file and the
other launcher with imports that call the shared resolver; ensure the exported
function accepts Node's process.platform and process.arch (or reads them
internally) and preserves the same return shape (string | null) so callers like
detectPlatform keep behaviour unchanged.
In `@packages/gtx-cli/src/main.ts`:
- Around line 11-13: The CLI is calling program.parse() which doesn't await
async command handlers; change the call in main flow to await
program.parseAsync() so Commander will wait for promises from async actions
registered in main(program); update the invocation where main(program) executes
and replace program.parse() with await program.parseAsync(), and ensure the
surrounding function is async or top-level await is used so the await is valid.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: dc50d383-a68e-4899-a5a7-00cea16858a4
⛔ Files ignored due to path filters (2)
packages/cli/src/generated/version.tsis excluded by!**/generated/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (51)
.changeset/config.json.github/workflows/ci.yml.github/workflows/release.ymlREADME.mdassets/install.shexamples/create-react-app/package.jsonexamples/next-chatbot/package.jsonexamples/next-create-app/package.jsonexamples/next-gt-starter/package.jsonexamples/next-pages-router/package.jsonexamples/next-ssg/package.jsonexamples/vite-create-app/package.jsonpackage.jsonpackages/cli/README.mdpackages/cli/package.jsonpackages/cli/scripts/build-exe.shpackages/cli/src/bin/bin-main.tspackages/cli/src/cli/base.tspackages/cli/src/console/index.tspackages/cli/src/functions.tspackages/cli/src/index.tspackages/cli/src/setup/agentInstructions.tspackages/cli/src/setup/instructions/base.mdpackages/cli/src/setup/wizard.tspackages/cli/src/translation/validate.tspackages/gtx-cli/.gitignorepackages/gtx-cli/.npmignorepackages/gtx-cli/.prettierrcpackages/gtx-cli/README.mdpackages/gtx-cli/__tests__/wrapper.test.tspackages/gtx-cli/package.jsonpackages/gtx-cli/scripts/build-exe.shpackages/gtx-cli/scripts/prepare-binary-release.jspackages/gtx-cli/scripts/restore-package-json.jspackages/gtx-cli/src/bin/bin-entry.tspackages/gtx-cli/src/bin/bin-main.tspackages/gtx-cli/src/functions.tspackages/gtx-cli/src/index.tspackages/gtx-cli/src/main.tspackages/gtx-cli/tsconfig.jsonpackages/gtx-cli/vitest.config.tspackages/locadex/package.jsonpackages/locadex/src/cli.tspackages/next/README.mdpackages/react/README.mdpackages/tanstack-start/README.mdpackages/tanstack-start/local-dev.mdpnpm-workspace.yamltests/apps/cli-test-app/package.jsontests/apps/next/base/package.jsontests/apps/next/general-cases/package.json
There was a problem hiding this comment.
♻️ Duplicate comments (1)
packages/gtx-cli/package.json (1)
31-31:⚠️ Potential issue | 🟠 MajorEnsure cleanup always runs after binary publish attempts.
Line 31 still short-circuits on publish failure, so
bin:restore/build:cleancan be skipped and leave the manifest in binary-release mode.Proposed fix
- "release:bin": "pnpm run bin:prep && pnpm run build:bin:clean && pnpm publish --tag bin --no-git-checks && pnpm run bin:restore && pnpm run build:clean", + "release:bin": "sh -c 'set -e; pnpm run bin:prep; trap \"pnpm run bin:restore; pnpm run build:clean\" EXIT; pnpm run build:bin:clean; pnpm publish --tag bin --no-git-checks'",#!/bin/bash set -euo pipefail python - <<'PY' import json, pathlib p = pathlib.Path("packages/gtx-cli/package.json") data = json.loads(p.read_text()) s = data["scripts"]["release:bin"] print("release:bin =", s) if "pnpm publish" in s and "trap" not in s: print("FAIL: cleanup is not guaranteed if publish fails") raise SystemExit(1) print("PASS: cleanup guard detected") PY🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/gtx-cli/package.json` at line 31, Update the release:bin script so cleanup always runs even if pnpm publish fails: in the release:bin entry, set an EXIT trap that runs "pnpm run bin:restore && pnpm run build:clean" before running the sequence of bin:prep, build:bin:clean and pnpm publish (and clear the trap after publish if desired); this ensures bin:restore and build:clean run on any exit from the script. Target the release:bin script in package.json and reference the existing steps bin:prep, build:bin:clean, pnpm publish, bin:restore and build:clean when making the change.
🧹 Nitpick comments (2)
.changeset/chatty-papers-fold.md (1)
16-16: Make the release note explicit about rename + compatibility.The current text is a bit terse for a user-facing changelog. Consider mentioning that
gtis now primary andgtx-cliremains as a compatibility wrapper.Suggested wording
-feat: add new gt package +feat(cli): make `gt` the primary CLI package and keep `gtx-cli` as a compatibility wrapper🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.changeset/chatty-papers-fold.md at line 16, Update the release note line "feat: add new gt package" to explicitly state the rename and compatibility: say that the package has been renamed so "gt" is now the primary CLI package and "gtx-cli" remains available as a compatibility wrapper for existing workflows, ensuring users know both the rename and backward compatibility; edit the line in .changeset/chatty-papers-fold.md that currently reads "feat: add new gt package" to a fuller sentence including "gt" and "gtx-cli".packages/gtx-cli/package.json (1)
19-19: Avoid running binary build twice inbuild:bin:release.Line 19 calls
build:binagain even though Line 18 (build:bin:clean) already ends withpnpm run build:bin.Proposed simplification
- "build:bin:release": "pnpm run build:bin:clean && pnpm run build:bin", + "build:bin:release": "pnpm run build:bin:clean",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/gtx-cli/package.json` at line 19, The "build:bin:release" npm script is invoking the binary build twice; update the package.json so "build:bin:release" only runs the cleaner script (or only runs the build) instead of chaining both when "build:bin:clean" already invokes "build:bin"; edit the "build:bin:release" script entry to remove the redundant "&& pnpm run build:bin" (leave just "pnpm run build:bin:clean" or change to a single "pnpm run build:bin" depending on desired behavior), referencing the script names "build:bin:release", "build:bin:clean", and "build:bin".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@packages/gtx-cli/package.json`:
- Line 31: Update the release:bin script so cleanup always runs even if pnpm
publish fails: in the release:bin entry, set an EXIT trap that runs "pnpm run
bin:restore && pnpm run build:clean" before running the sequence of bin:prep,
build:bin:clean and pnpm publish (and clear the trap after publish if desired);
this ensures bin:restore and build:clean run on any exit from the script. Target
the release:bin script in package.json and reference the existing steps
bin:prep, build:bin:clean, pnpm publish, bin:restore and build:clean when making
the change.
---
Nitpick comments:
In @.changeset/chatty-papers-fold.md:
- Line 16: Update the release note line "feat: add new gt package" to explicitly
state the rename and compatibility: say that the package has been renamed so
"gt" is now the primary CLI package and "gtx-cli" remains available as a
compatibility wrapper for existing workflows, ensuring users know both the
rename and backward compatibility; edit the line in
.changeset/chatty-papers-fold.md that currently reads "feat: add new gt package"
to a fuller sentence including "gt" and "gtx-cli".
In `@packages/gtx-cli/package.json`:
- Line 19: The "build:bin:release" npm script is invoking the binary build
twice; update the package.json so "build:bin:release" only runs the cleaner
script (or only runs the build) instead of chaining both when "build:bin:clean"
already invokes "build:bin"; edit the "build:bin:release" script entry to remove
the redundant "&& pnpm run build:bin" (leave just "pnpm run build:bin:clean" or
change to a single "pnpm run build:bin" depending on desired behavior),
referencing the script names "build:bin:release", "build:bin:clean", and
"build:bin".
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: cc34696a-e1e5-48a2-8412-918c5e8234d4
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (18)
.changeset/chatty-papers-fold.mdassets/install.shpackages/cli/package.jsonpackages/gtx-cli/.gitignorepackages/gtx-cli/__tests__/subpath-exports.test.tspackages/gtx-cli/package.jsonpackages/gtx-cli/src/config/generateSettings.tspackages/gtx-cli/src/config/resolveConfig.tspackages/gtx-cli/src/fs/config/setupConfig.tspackages/gtx-cli/src/fs/matchFiles.tspackages/gtx-cli/src/next/parse/handleInitGT.tspackages/gtx-cli/src/next/parse/wrapContent.tspackages/gtx-cli/src/react/parse/wrapContent.tspackages/gtx-cli/src/types/index.tspackages/gtx-cli/src/utils/installPackage.tspackages/gtx-cli/src/utils/packageInfo.tspackages/gtx-cli/src/utils/packageJson.tspackages/gtx-cli/src/utils/packageManager.ts
✅ Files skipped from review due to trivial changes (2)
- packages/gtx-cli/src/fs/config/setupConfig.ts
- packages/gtx-cli/src/utils/packageManager.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/cli/package.json
- packages/gtx-cli/.gitignore
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## gt@2.7.0 ### Minor Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package ## gtx-cli@2.7.0 ### Minor Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package ### Patch Changes - Updated dependencies \[[`ff38c7c`](ff38c7c)]: - gt@2.7.0 ## @generaltranslation/compiler@1.1.24 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package ## locadex@1.0.110 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package - Updated dependencies \[[`ff38c7c`](ff38c7c)]: - gt@2.7.0 ## gt-next@6.13.4 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package - Updated dependencies \[[`ff38c7c`](ff38c7c)]: - @generaltranslation/compiler@1.1.24 - gt-react@10.11.3 ## @generaltranslation/gt-next-lint@11.0.4 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package - Updated dependencies \[[`ff38c7c`](ff38c7c)]: - gt-next@6.13.4 ## gt-react@10.11.3 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package - Updated dependencies \[[`ff38c7c`](ff38c7c)]: - @generaltranslation/react-core@1.5.3 ## @generaltranslation/react-core@1.5.3 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package ## @generaltranslation/react-core-linter@0.1.3 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package ## gt-tanstack-start@0.1.10 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package - Updated dependencies \[[`ff38c7c`](ff38c7c)]: - @generaltranslation/react-core@1.5.3 - gt-react@10.11.3 ## next-ssg@0.1.1 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package ## gt-next-middleware-e2e@0.1.4 ### Patch Changes - [#1069](#1069) [`ff38c7c`](ff38c7c) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - feat: add new gt package - Updated dependencies \[[`ff38c7c`](ff38c7c)]: - gt-next@6.13.4 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary by CodeRabbit
New Features
Documentation
CI / Release
Tests
Chores
Config
Greptile Summary
This PR renames the primary CLI package from
gtx-clitogt(living inpackages/cli/) and adds a new thingtx-cliwrapper package (packages/gtx-cli/) that re-exports everything fromgtfor backward compatibility. All internal consumers (locadex, examples, tests) and CI/release workflows are updated accordingly.Key changes:
packages/cli/is renamed to package namegt; binary names updated togt-*packages/gtx-cli/wrapper package delegates togtvia re-exports and a shebang entry point that overridesprogram.nameback togtx-clitest-cli-binariesjob forgtand preservestest-gtx-cli-binariesfor the wrappergtbinaries go tocli/,gtx-clibinaries togtx-cli/fixedgroup ensures both packages share the same versionIssues found:
assets/install.shhasBINARY_NAME="gtx"(unchanged from before) while the success message was updated to referencegt. The binary is physically installed asgtxon disk, but users are instructed to rungt --help, which will not be found.Confidence Score: 3/5
BINARY_NAME="gtx"not updated to"gt"in install.sh — causes the shell installer to put the binary at the wrong name while advertising the new name in the success message, breaking the user-facing install flow for anyone usingcurl | sh.Important Files Changed
gtxbut users are told to rungt --help.vitestis also missing from devDependencies.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD subgraph npm["npm registry"] PKG_GT["gt (packages/cli/)"] PKG_GTX["gtx-cli (packages/gtx-cli/)"] end subgraph users["End users"] U1["npx gt ..."] U2["npx gtx-cli ..."] U3["curl | sh install.sh"] end subgraph internals["Internal consumers"] LOC["locadex"] TESTS["cli-test-app"] end U1 -->|"bin: dist/main.js"| PKG_GT U2 -->|"bin: dist/main.js\nsets program.name('gtx-cli')"| PKG_GTX PKG_GTX -->|"re-exports via export * from 'gt'"| PKG_GT U3 -->|"downloads gt-* binary\ninstalls as BINARY_NAME (gtx ⚠️)"| PKG_GT LOC -->|"import from 'gt'"| PKG_GT TESTS -->|"pnpm gt --help"| PKG_GT PKG_GT -->|"builds"| BIN_GT["gt-darwin-arm64\ngt-linux-x64\ngt-win32-x64.exe\n..."] PKG_GTX -->|"builds"| BIN_GTX["gtx-cli-darwin-arm64\ngtx-cli-linux-x64\ngtx-cli-win32-x64.exe\n..."]Comments Outside Diff (2)
assets/install.sh, line 11 (link)BINARY_NAMEmismatch causes incorrect binary nameThe
BINARY_NAMEis still set to"gtx"(a leftover from the previous name), but the rest of the script has been updated to referencegt. This causes the binary to be installed asgtxin$INSTALL_DIR, while the success message on line 150 tells users to run'gt --help'. Thecommand_exists "$BINARY_NAME"check on line 148 will also look for a command namedgtxrather thangt, so it will always fall into the warning branch even after a successful install.Prompt To Fix With AI
assets/install.sh, line 11 (link)BINARY_NAMEnot updated — binary installed asgtx, notgtBINARY_NAMEis still"gtx", so the binary is written to${INSTALL_DIR}/gtx(e.g./usr/local/bin/gtx). Meanwhile the success message on line 150 was changed to"Run 'gt --help' to get started."— but that command does not exist on disk. Thecommand_exists "$BINARY_NAME"check (line 148) will findgtx, so no warning is printed, and the user is directed to run a command that will returncommand not found.Last reviewed commit: dbe8bdc