-
Notifications
You must be signed in to change notification settings - Fork 123
chore: oxfmt v0.20 #627
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
chore: oxfmt v0.20 #627
Conversation
📝 WalkthroughWalkthroughModernizes packaging: adds ESM/CJS entry points, types, exports map, publishConfig, license/author, and lint-staged configuration in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @fengmk2, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on a chore update, specifically upgrading the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
commit: |
CodSpeed Performance ReportMerging #627 will not alter performanceComparing Summary
|
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.
Code Review
This pull request updates the oxfmt formatter to version 0.20.0 and applies its formatting rules across the project. The changes primarily consist of reordering fields in package.json for better organization and removing trailing commas from various tsconfig.json files, which enforces a stricter JSON format. These modifications improve code style consistency and are a direct result of the tool update. The changes are sound and I found no issues.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #627 +/- ##
==========================================
- Coverage 94.57% 93.14% -1.43%
==========================================
Files 14 14
Lines 1474 1474
Branches 321 319 -2
==========================================
- Hits 1394 1373 -21
- Misses 76 97 +21
Partials 4 4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull request overview
This PR updates the oxfmt formatter from version 0.17 to 0.20. The changes include formatting updates across multiple TypeScript configuration files (removing trailing commas) and reorganizing the package.json file structure.
Key Changes
- Updated
oxfmtdependency from^0.17.0to^0.20.0 - Removed trailing commas in tsconfig.json files to comply with new formatter rules
- Reorganized package.json fields for better structure (moved exports, types, etc.)
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Removed trailing commas from isolatedDeclarations and exclude properties |
| test/mts/tsconfig.json | Removed trailing commas from skipLibCheck and include properties |
| test/fixtures/ts/tsconfig.json | Removed trailing commas from nested objects in paths configuration |
| test/fixtures/ts-esm/tsconfig.json | Removed trailing commas from nested objects in paths configuration |
| test/fixtures/ts-cjs-es2021/tsconfig.json | Removed trailing commas from nested objects in paths configuration |
| pnpm-lock.yaml | Updated oxfmt version and related dependencies, reformatted package entries |
| package.json | Updated oxfmt version to ^0.20.0, reorganized fields alphabetically |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "outDir": "dist", | ||
| "skipLibCheck": false, | ||
| "module": "NodeNext", | ||
| "moduleResolution": "NodeNext" |
Copilot
AI
Dec 24, 2025
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.
The removal of the "extends" field that previously referenced "@tsconfig/strictest" and "@tsconfig/node18" may weaken TypeScript checking for this test directory. The previous configuration provided strict type checking rules and Node 18 compatibility settings. Consider explicitly adding critical compiler options such as "strict": true, "target": "ES2022", and other strict checking options that were previously inherited from these base configurations to maintain the same level of type safety.
| "moduleResolution": "NodeNext" | |
| "moduleResolution": "NodeNext", | |
| "target": "ES2022", | |
| "lib": ["ES2022"], | |
| "strict": true, | |
| "forceConsistentCasingInFileNames": true, | |
| "noImplicitOverride": true, | |
| "noPropertyAccessFromIndexSignature": true, | |
| "noUncheckedIndexedAccess": true, | |
| "exactOptionalPropertyTypes": true, | |
| "useUnknownInCatchVariables": true |
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)
package.json (1)
116-121: Consider limiting lint-staged to specific file types.The current configuration runs on all files (
"*"), which may include non-code files (images, binaries, markdown, etc.). While oxlint and oxfmt typically handle this gracefully, you might improve performance by limiting to relevant extensions:"lint-staged": { "*.{js,ts,mjs,cjs,jsx,tsx,json}": [ "npm run lint -- --fix", "oxfmt" ] }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
package.jsontest/fixtures/ts-cjs-es2021/tsconfig.jsontest/fixtures/ts-esm/tsconfig.jsontest/fixtures/ts/tsconfig.jsontest/mts/tsconfig.jsontsconfig.json
✅ Files skipped from review due to trivial changes (2)
- test/fixtures/ts-cjs-es2021/tsconfig.json
- test/fixtures/ts-esm/tsconfig.json
🚧 Files skipped from review as they are similar to previous changes (2)
- tsconfig.json
- test/fixtures/ts/tsconfig.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: Upload results
- GitHub Check: Test (ubuntu-latest, 24)
- GitHub Check: Test (ubuntu-latest, 22)
- GitHub Check: Test (windows-latest, 22)
- GitHub Check: Test (windows-latest, 18)
- GitHub Check: Test (windows-latest, 24)
- GitHub Check: Test (windows-latest, 20)
🔇 Additional comments (6)
package.json (5)
31-43: LGTM! Well-structured exports map.The exports map properly implements conditional exports with separate type declarations for ESM and CJS. The inclusion of
"./package.json"export is a good practice for tooling compatibility.
17-18: LGTM! Essential metadata additions.The addition of
license,author, andfilesfields improves package metadata and publishing configuration:
- License clarifies usage rights
- Author provides proper attribution
- Files array ensures only
distandsrcare published, excluding test files and development artifactsAlso applies to: 23-26
44-46: LGTM! Standard publish configuration.The
publishConfigwith"tag": "latest"is a standard practice for package publishing.
27-30: The package.json configuration correctly supports dual ESM/CJS consumption.The
"type": "module"declaration (line 27) combined with the properly structuredexportsmap (lines 31-43) is a valid modern dual-package pattern. Theexportsfield defines conditional entry points that correctly routeimportrequests to ESM andrequirerequests to CommonJS, regardless of the"type"field. The legacymain,module, andtypesfields serve as fallbacks for older tools and don't conflict with this setup.The dist directory not existing in the current state is expected—it's generated at build time. No separate
package.jsonfiles in dist subdirectories are needed; the root configuration properly handles module type routing through theexportsfield.
104-104: No action needed. Oxfmt v0.20.0 has no documented breaking changes from v0.17.0, and the codebase is properly configured with.oxfmtrc.jsonfor compatibility.test/mts/tsconfig.json (1)
6-7: NodeNext module resolution is appropriate for the dual ESM/CJS package structure.The test/mts configuration is intentionally standalone (similar to other test fixtures like test/fixtures/ts-esm) and does not extend the root tsconfig. The NodeNext settings correctly support the dual ESM/CommonJS exports configured in package.json. Note that test/mts lacks the strict type checking (strict, noImplicitAny, isolatedDeclarations) defined in the root configuration—verify this is intentional for your test isolation requirements.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.