8000 chore: bump tsdown and jsr-exports-lint by kazupon · Pull Request #129 · kazupon/gunshi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: bump tsdown and jsr-exports-lint #129

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

Merged
merged 2 commits into from
May 16, 2025
Merged

Conversation

kazupon
Copy link
Owner
@kazupon kazupon commented May 16, 2025

Description

Linked Issues

Additional context

Summary by CodeRabbit

  • Chores

    • Updated several development dependencies to their latest versions for improved stability and compatibility.
  • Refactor

    • Simplified the process for copying locale files during the build, making configuration more straightforward and maintainable.

Copy link
Contributor
coderabbitai bot commented May 16, 2025

Walkthrough

Development dependencies were updated in package.json to newer versions. In tsdown.config.ts, the process for copying locale JSON files was refactored: a custom plugin was replaced with a declarative copy configuration, utilizing a new helper function to generate the file list for copying.

Changes

File(s) Change Summary
package.json Updated multiple development dependencies to newer versions. No changes to scripts or production dependencies.
tsdown.config.ts Replaced custom locale file copy plugin with a declarative copy option using a new helper function. Changed config type annotation.

Poem

The rabbit hopped through fields of code,
Updating tools to lighten the load.
With plugins gone and helpers neat,
Locale files copy—now a treat!
Dependencies fresh, the garden grows,
Simpler scripts, as springtime shows.
🐇✨

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 5f37f73 and 302a6c3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kazupon kazupon added the 🧹 p1-chore Priority 1: no change in change code behavior label May 16, 2025
Copy link
pkg-pr-new bot commented May 16, 2025

Open in StackBlitz

npm i https://pkg.pr.new/kazupon/gunshi@129

commit: 302a6c3

Copy link
cloudflare-workers-and-pages bot commented May 16, 2025

Deploying gunshi with  Cloudflare Pages  Cloudflare Pages

Latest commit: 302a6c3
Status: ✅  Deploy successful!
Preview URL: https://7b43957d.gunshi.pages.dev
Branch Preview URL: https://chore-bump-tsdwon-jsr-lint.gunshi.pages.dev

View logs

Copy link
Contributor
@coderabbitai coderabbitai bot left a 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 (2)
tsdown.config.ts (2)

8-8: Consider renaming the function.

The current name "getDistributionableLocaleFiles" has a spelling error. Consider renaming to "getDistributableLocaleFiles" for better clarity.

-function getDistributionableLocaleFiles() {
+function getDistributableLocaleFiles() {

8-23: Consider handling edge cases.

The current implementation doesn't handle:

  1. Subdirectories within the locales folder
  2. Error cases if the source directory doesn't exist
  3. Creating the destination directory if it doesn't exist

For improved robustness, you might want to add these checks.

 function getDistributionableLocaleFiles() {
   const localesDir = path.join(dirname, './src/locales')
   const outDir = path.join(dirname, 'lib', 'locales')
+  
+  // Check if source directory exists
+  if (!fs.existsSync(localesDir)) {
+    return []
+  }
+  
   return fs.readdirSync(localesDir).reduce(
     (acc, file) => {
       if (file.endsWith('.json')) {
+        const fromPath = path.join(localesDir, file)
+        const toPath = path.join(outDir, file)
+        
+        // Ensure destination directory exists
+        const outDirExists = fs.existsSync(outDir) || fs.mkdirSync(outDir, { recursive: true })
+        
         acc.push({
-          from: path.join(localesDir, file),
-          to: path.join(outDir, file)
+          from: fromPath,
+          to: toPath
         })
       }
       return acc
     },
     [] as { from: string; to: string }[]
   )
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between a9c222e and 5f37f73.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json (2 hunks)
  • tsdown.config.ts (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (5)
package.json (2)

121-159: All dependency updates look appropriate.

Good maintenance practice to keep development dependencies up to date. The updates align with the PR title and the configuration changes in tsdown.config.ts.


141-141:

❓ Verification inconclusive

Verify jsr-exports-lint compatibility.

Since jsr-exports-lint is a pre-1.0 package, the update from 0.2.0 to 0.3.0 might include breaking changes. Ensure that it's still compatible with your usage in the tsdown configuration.


🏁 Script executed:

#!/bin/bash
# Check for potential breaking changes in jsr-exports-lint
if [ -f CHANGELOG.md ]; then
  echo "Checking local CHANGELOG.md for jsr-exports-lint changes"
  grep -A 10 "0.3.0" CHANGELOG.md
else
  echo "Checking jsr-exports-lint GitHub repository for changelog"
  # Get the latest releases and look for breaking changes
  curl -s "https://api.github.com/repos/jsr-io/jsr-exports-lint/releases" | grep -E "tag_name|body" | grep -B 1 -A 10 "0.3.0"
fi

Length of output: 1014


🏁 Script executed:

#!/bin/bash
# Fetch remote jsr-exports-lint release notes for v0.3.0
if command -v jq &>/dev/null; then
  curl -s "https://api.github.com/repos/jsr-io/jsr-exports-lint/releases/tags/v0.3.0" | jq -r .body
else
  curl -s "https://api.github.com/repos/jsr-io/jsr-exports-lint/releases/tags/v0.3.0" | grep -E '"body":' -A20
fi

Length of output: 118


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Se
8000
arching for jsr-exports-lint in repository ==="
rg -n "jsr-exports-lint" .

echo "=== Searching for tsdown configuration usage ==="
rg -n "tsdown" -C2 .

Length of output: 4636


Verify jsr-exports-lint v0.3.0 compatibility

We couldn’t find any published release notes or breaking-change warnings for jsr-exports-lint v0.3.0, and as a pre-1.0 package it may introduce breaking changes. Please double-check that your usage in tsdown hasn’t been affected:

• In package.json (line 141):
"jsr-exports-lint": "^0.3.0",
• In tsdown.config.ts (line 1):
import { lintJsrExports } from 'jsr-exports-lint/tsdown'

Steps to verify:

  • Review the diff between v0.2.0 and v0.3.0 on the jsr-exports-lint GitHub repo.
  • Confirm that the lintJsrExports export signature and path remain unchanged.
  • Run your tsdown build/tests to ensure no regressions in your lint rules.
tsdown.config.ts (3)

8-23: Good refactoring to use a helper function.

Creating a dedicated function to generate the list of locale files improves readability and maintainability.


25-25: Type annotation change is appropriate.

Using ReturnType<typeof defineConfig> instead of explicitly importing UserConfig ensures the type will automatically stay in sync with any changes to the defineConfig return type.


40-40: Good use of built-in copy functionality.

This approach leverages the built-in features of tsdown instead of using a custom plugin, making the configuration more maintainable.

@kazupon kazupon merged commit 3f85400 into main May 16, 2025
10 checks passed
@kazupon kazupon deleted the chore/bump-tsdwon-jsr-lint branch May 16, 2025 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧹 p1-chore Priority 1: no change in change code behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0