-
Notifications
You must be signed in to change notification settings - Fork 1
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
ποΈ Upgrade workflows and enable erasableSyntaxOnly #86
Conversation
π WalkthroughWalkthroughThe changes update various GitHub Actions workflows and configuration files. The adjustments include upgrading the Node.js version from 21 to 23 across multiple workflows, removing the SSH key for the GitHub Actions bot, and altering job definitions. Notably, a new βfixβ job has been added to the Node.js CI workflow, and steps in the package publishing and version patch workflows have been restructured. Minor updates are also applied in the README import path, package scripts, TypeScript dependency, and TS configuration. Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as GitHub Actions Runner
participant Repo as Repository Code
participant PNPM as Dependency Manager
participant Commit as Commit Action
participant Git as Git Repository
Runner->>Repo: Checkout repository
Runner->>PNPM: Setup pnpm and install dependencies with --fix-lockfile
PNPM-->>Runner: Return fixed dependencies and lockfile updates
Runner->>Commit: Format code and fix lint issues
Commit-->>Git: Commit changes (lockfile, code formatting, lint fixes)
Runner->>Git: Conditionally push committed changes
Tip π Web search-backed reviews and chat
πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
π§Ή Nitpick comments (1)
.github/workflows/pnpm-version-patch.yaml (1)
24-27
: Version Patch Step Added
The new step (id: patch) captures the output frompnpm version patch --no-git-tag-version
and exposes it via$GITHUB_OUTPUT
. This is a smart way to propagate the version information. One suggestion: instead of usinggit add .
, consider staging only the necessary files (e.g.,package.json
andpnpm-lock.yaml
) to avoid unintended changes.
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
β Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
π Files selected for processing (8)
.github/authorized_keys
(0 hunks).github/workflows/github-pages.yaml
(1 hunks).github/workflows/node.js.yaml
(2 hunks).github/workflows/pnpm-publish.yaml
(2 hunks).github/workflows/pnpm-version-patch.yaml
(1 hunks)README.md
(1 hunks)package.json
(2 hunks)tsconfig.json
(1 hunks)
π€ Files with no reviewable changes (1)
- .github/authorized_keys
π Additional comments (14)
.github/workflows/github-pages.yaml (1)
18-19
: Node.js Version Upgrade Confirmed
Theactions/setup-node
step now specifiesnode-version: 23
, which aligns with the other workflow updates and ensures consistency across the CI processes..github/workflows/pnpm-version-patch.yaml (4)
15-15
: Checkout Reference Updated
The checkout step now explicitly usesref: ${{ github.ref }}
, ensuring that the workflow checks out the correct branch or tag. This improves reproducibility of the version patching process.
22-22
: Node.js Version Update
The update tonode-version: 23
in this workflow is consistent with the other changes. Please double-check that all dependencies are compatible with Node.js 23.
29-33
: Commit Step Validation
The commit step uses the qoomon action to create a commit with the version number. Ensure that this action fits your security and stability requirements. Otherwise, the implementation looks good.
34-40
: Release Creation Step
The release creation step now pushes changes and uses the GitHub CLI to create a release with the appropriate commit target and version title. Please verify that the environment variables (COMMIT
andVERSION
) are correctly set and that your release process works as intended..github/workflows/pnpm-publish.yaml (2)
25-25
: Node.js Version Update in Publish Workflow
The update tonode-version: 23
in the publishing workflow aligns with the overall upgrade. This consistency should help avoid discrepancies between different CI jobs.
46-46
: Release Upload Step
The final step usesgh release upload
to attach the packaged tarball. Please confirm that the glob patterncoderabbitai-openai-chat-tokens-*.tgz
accurately matches the generated package file, and that the GitHub CLI is appropriately configured in your environment.package.json (2)
23-24
: Test Script Adjustments
The changes in thescripts
section now execute tests via"vitest run"
for the default test command, and"vitest"
for watch mode. These modifications are clear; ensure that they function as expected both in CI and during local development.
33-33
: TypeScript Version Upgrade to Beta
Upgrading TypeScript from"5.7.3"
to"5.8.0-beta"
introduces access to new language features; however, it is a beta version. It is advisable to thoroughly test your codebase with the new version to catch any unforeseen compatibility issues.tsconfig.json (1)
36-36
: New Compiler Option: erasableSyntaxOnly
The addition of"erasableSyntaxOnly": true
under the Interop Constraints section is a notable change. This option should help remove certain syntax constructs during compilation. Please confirm that this alteration produces the desired output and does not adversely affect debugging or runtime behaviour..github/workflows/node.js.yaml (3)
3-12
: Review Trigger Events ConfigurationThe workflow now triggers on a new
merge_group
event as well as onpull_request
andpush
events targeting themain
branch. Please verify that the custommerge_group
trigger is supported as intended within your GitHub Actions setup.
24-27
: Node.js Version Update and pnpm Install OptionsThe Node.js version has been updated to 23 and the
pnpm install
command now includes the--strict-peer-dependencies
flag. This improves dependency resolution consistency. Ensure that these changes do not conflict with any downstream tooling or scripts.
32-90
: New 'fix' Job for Automated CorrectionsA new
fix
job has been added to automatically address lockfile issues, code formatting, and lint fixes. The job is structured with clear steps and commit actions. A few points to note:
- The job's conditional (
if: failure() && github.event_name != 'merge_group' && github.actor != 'github-actions[bot]' && github.actor != 'nektos/act'
) ensures it runs only under specific failure conditions. Please double-check that usingfailure()
at the job level (without explicit dependencies on prior jobs) meets your intended logic.- Make sure that the commit actions using
qoomon/actions--create-commit@v1
align with your version control policies.README.md (1)
17-19
: Update Import Path for Namespace AlignmentThe import path for
promptTokensEstimate
has been updated to use the scoped package@coderabbitai/openai-chat-tokens
, ensuring consistency with the new package structure. This change aligns the documentation with the current distribution strategy.
Summary by CodeRabbit