-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
WalkthroughDevelopment dependencies were updated in Changes
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit 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. Note ⚡️ Faster reviews with cachingCodeRabbit 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 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
commit: |
Deploying gunshi with
|
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 |
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 (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:
- Subdirectories within the locales folder
- Error cases if the source directory doesn't exist
- 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
⛔ 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" fiLength 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 fiLength 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 importingUserConfig
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.
Description
Linked Issues
Additional context
Summary by CodeRabbit
Chores
Refactor