Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 5
Add Terminal49 TypeScript CLI (production-ready)#310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
2f7cde7a6e3bd258db6f90f4fea8fb2a1943b6192d41f2cee6249e0bd7443e8add0ad135cb5b7File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| name: Publish TypeScript CLI | ||
| on: | ||
| release: | ||
| types: [published] | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: Release tag to publish, for example cli-v-v0.1.0 | ||
| required: true | ||
| type: string | ||
| permissions: | ||
| contents: read | ||
| id-token: write | ||
| jobs: | ||
| publish: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Resolve release tag | ||
| id: release-tag | ||
| run: echo "tag=${{ github.event.release.tag_name || inputs.tag }}" >> "$GITHUB_OUTPUT" | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ steps.release-tag.outputs.tag }} | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| registry-url: https://registry.npmjs.org/ | ||
| cache: npm | ||
| cache-dependency-path: package-lock.json | ||
| - name: Read CLI version | ||
| id: cli-version | ||
| run: | | ||
| version=$(node -p "require('./sdks/typescript-sdk-cli/package.json').version") | ||
| echo "version=$version" >> "$GITHUB_OUTPUT" | ||
| - name: Check release tag matches CLI version | ||
| id: tag-check | ||
| run: | | ||
| tag="${{ steps.release-tag.outputs.tag }}" | ||
| version="${{ steps.cli-version.outputs.version }}" | ||
| if [[ "$tag" == "v$version" || "$tag" == "cli-v$version" || "$tag" == "$version" || "$tag" == "cli-v-v$version" ]]; then | ||
| echo "publish=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "publish=false" >> "$GITHUB_OUTPUT" | ||
| echo "Release tag $tag does not match CLI version $version; skipping publish." | ||
| fi | ||
| - name: Install workspace dependencies | ||
| if: steps.tag-check.outputs.publish == 'true' | ||
| run: npm ci | ||
| - name: Build SDK (workspace dependency) | ||
| if: steps.tag-check.outputs.publish == 'true' | ||
| run: npm run build --workspace @terminal49/sdk | ||
| - name: Build CLI | ||
| if: steps.tag-check.outputs.publish == 'true' | ||
| run: npm run build --workspace @terminal49/cli | ||
| - name: Test CLI | ||
| if: steps.tag-check.outputs.publish == 'true' | ||
| run: npm run test --workspace @terminal49/cli | ||
| - name: Publish | ||
| if: steps.tag-check.outputs.publish == 'true' | ||
| working-directory: sdks/typescript-sdk-cli | ||
| run: npm publish --access public |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -29,8 +29,22 @@ | ||
| "type": "json", | ||
| "path": "packages/mcp/package-lock.json", | ||
| "jsonpath": "$.packages[''].dependencies['@terminal49/sdk']" | ||
| }, | ||
| { | ||
| "type": "json", | ||
| "path": "sdks/typescript-sdk-cli/package.json", | ||
| "jsonpath": "$.dependencies['@terminal49/sdk']" | ||
| } | ||
| ] | ||
Comment on lines
+34
to
38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When release-please bumps the SDK, this entry updates the CLI package's Knowledge Base Used:Repo Tooling and CI Prompt To Fix With AIThis is a comment left during a code review.
Path: .release-please-config.json
Line: 34-38
Comment:
**CLI lockfile dependency stays stale**
When release-please bumps the SDK, this entry updates the CLI package's `@terminal49/sdk` dependency without updating the corresponding CLI workspace dependency in the root lockfile. The subsequent root-level `npm ci` used by CLI CI and publishing rejects the inconsistent manifest and lockfile, preventing the CLI from building or publishing.
**Knowledge Base Used:**[Repo Tooling and CI](https://app.greptile.com/terminal49/-/custom-context/knowledge-base/terminal49/api/-/docs/repo-tooling-ci.md)---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly. | ||
| }, | ||
| "sdks/typescript-sdk-cli": { | ||
| "package-name": "@terminal49/cli", | ||
| "release-type": "node", | ||
| "changelog-path": "CHANGELOG.md", | ||
| "bump-minor-pre-major": true, | ||
Comment on lines
+40
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Release Please increments the CLI package version, this package configuration has no updater for AGENTS.md reference: AGENTS.md:L11-L11 Useful? React with 👍 / 👎. | ||
| "tag-separator": "-", | ||
| "include-component-in-tag": true, | ||
| "component": "cli-v" | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| { | ||
| "sdks/typescript-sdk": "0.3.1" | ||
| "sdks/typescript-sdk": "0.3.1", | ||
| "sdks/typescript-sdk-cli": "0.1.0" | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When Release Please bumps the SDK, this updater changes the CLI's exact
@terminal49/sdkdependency but does not update the corresponding dependency underpackages['sdks/typescript-sdk-cli']in the authoritative root lockfile. The resulting release PR and CLI publish tag run rootnpm ci, which rejects the package/lock mismatch before building; add an adjacent root-lockextra-filesupdater for that dependency.AGENTS.md reference: AGENTS.md:L11-L11
Useful? React with 👍 / 👎.