-
-
Notifications
You must be signed in to change notification settings - Fork 1
chore: migrate to premove and tsdown #83
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
🦋 Changeset detectedLatest commit: 5db3712 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis update introduces a new changeset documenting a migration to "premove" and "tsdown," restructures the package configuration for enhanced module resolution and build tooling, and reorganizes TypeScript configurations into a composite project setup targeting ES2019. Several new TypeScript config files were added, the declaration file Changes
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
vitest.config.tsOops! Something went wrong! :( ESLint: 9.27.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.js 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (8)
🔇 Additional comments (1)
✨ Finishing Touches
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. 🪧 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 (
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #83 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 3 3
Branches 1 1
=========================================
Hits 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
commit: |
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
Migrates the build toolchain to use tsdown and premove, restructures package exports for dual CJS/ESM support, and bumps various dependency versions.
- Introduced
main,module, and detailedexportswith separate CJS/ESM paths - Added a
build:tsdownscript and replacedrimrafwithpremovefor cleanup - Updated/dependencies and devDependencies to newer versions
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.
Important
Looks good to me! 👍
Reviewed everything up to 47e0a05 in 1 minute and 39 seconds. Click for details.
- Reviewed
126lines of code in1files - Skipped
2files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:15
- Draft comment:
Top-level 'types' field uses './lib/index.d.cts' while the exports.import condition uses './lib/index.d.ts'. Confirm if this discrepancy is intentional. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The comment identifies a real technical issue - having mismatched type definition files could cause problems for TypeScript consumers. However, the comment asks for confirmation rather than directly stating the problem. The .d.cts extension is typically used for CommonJS modules while .d.ts is for ESM, so this could be intentional dual-mode support. I could be wrong about whether this is actually a problem - maybe having different extensions for different module types is the correct pattern. The package is also using "type": "module" which suggests ESM is the primary format. While the different extensions might be intentional, having the top-level "types" field point to .d.cts when the package is ESM-first seems incorrect. The suggestion to use .d.ts aligns better with the package's module system. Delete this comment because it asks for confirmation rather than stating a clear issue. If there is a real problem, it should be restated as a direct recommendation.
2. package.json:37
- Draft comment:
Verify that the new 'build:tsdown' script produces the expected CommonJS output in './lib' matching the export setup. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
3. package.json:38
- Draft comment:
Ensure that replacing 'rimraf' with 'premove' in the 'clean' script works reliably across all target environments. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. package.json:43
- Draft comment:
The removal of the 'publishConfig' block should be reviewed to ensure that the new 'exports' field fully meets the publishing requirements. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
Workflow ID: wflow_iifcTdGI9A4ThCxV
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
size-limit report 📦
|
📊 Package size report 0.6%↑
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
|
Deploy preview for lib-boilerplate ready! ✅ Preview Built with commit 5db3712. |
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.
Important
Looks good to me! 👍
Reviewed 5585d24 in 1 minute and 30 seconds. Click for details.
- Reviewed
170lines of code in5files - Skipped
3files when reviewing. - Skipped posting
8draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .changeset/plenty-ears-rescue.md:1
- Draft comment:
Changelog entry is concise and follows the expected format. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. package.json:17
- Draft comment:
Exports mapping now supports both ESM and CJS; verify corresponding type files exist in lib. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. package.json:37
- Draft comment:
Ensure that the tsdown configuration (--clean false) is intentionally set as needed. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. package.json:38
- Draft comment:
Review the premove patterns in the clean script to ensure all caches and directories are correctly targeted. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. package.json:81
- Draft comment:
Removal of the publishConfig block is acceptable with the new exports configuration. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
6. tsconfig.lib.json:1
- Draft comment:
TSConfig for the library is clear; verify that an empty 'files' array is intentional for your build. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
7. tsconfig.node.json:1
- Draft comment:
TSConfig for Node is set up correctly; including 'docs' aids broader coverage. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
8. package.json:15
- Draft comment:
Typo/ Inconsistency Detected: The 'types' field on line 15 uses the extension '.d.cts' while the 'import' configuration under exports (line 20) uses '.d.ts'. Please verify if this is intentional or if it should consistently use '.d.ts' for TypeScript declaration files. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% The different extensions appear to be intentional - .d.ts for ESM imports and .d.cts for CommonJS requires. This is a valid pattern for dual ESM/CommonJS packages. The comment suggests this might be a mistake when it's actually a deliberate design choice. The comment shows a lack of understanding of modern package.json configurations. Could there be an actual inconsistency I'm missing? Maybe there's a TypeScript-specific reason why this pattern would be problematic? No, this is a well-known pattern for dual ESM/CommonJS packages. The .cts extension is specifically designed for CommonJS declaration files, while .d.ts is for ESM. The configuration is correct as-is. The comment should be deleted as it incorrectly flags an intentional and correct configuration pattern as a potential error.
Workflow ID: wflow_KPOnSwVYfEjXUAST
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
Important
Looks good to me! 👍
Reviewed e395af6 in 58 seconds. Click for details.
- Reviewed
52lines of code in1files - Skipped
1files when reviewing. - Skipped posting
6draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:37
- Draft comment:
Added '--tsconfig src/tsconfig.json' option to the 'build:tsdown' script. Ensure that the file exists and is correctly configured. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. package.json:56
- Draft comment:
Updated '@1stg/common-config' from ^13.0.1 to ^14.0.0. Confirm compatibility with any breaking changes in the new version. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%This comment is related to a dependency update and asks the PR author to confirm compatibility with breaking changes. According to the rules, comments on dependency changes or asking for confirmation are not allowed.
3. package.json:67
- Draft comment:
Bumped '@types/node' from ^22.15.18 to ^22.15.19. Verify that there are no unintended type changes. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. package.json:73
- Draft comment:
Updated '@vitest/coverage-v8' from ^3.1.3 to ^3.1.4. Ensure that test coverage functionality works as expected. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
5. package.json:91
- Draft comment:
Bumped 'tsdown' from ^0.11.11 to ^0.11.12. Check that this update doesn’t introduce unintended build issues. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
6. package.json:96
- Draft comment:
Updated 'vitest' from ^3.1.3 to ^3.1.4. Make sure tests continue to run smoothly after this minor update. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_D0EH1Rp8nbiRvMOX
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
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.
Caution
Changes requested ❌
Reviewed 5db3712 in 1 minute and 28 seconds. Click for details.
- Reviewed
68lines of code in2files - Skipped
1files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:37
- Draft comment:
Ensure '--tsconfig src/tsconfig.json' is supported by tsdown and necessary for your workflow. This explicit config improves clarity but verify compatibility with other tsconfig references. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%The comment is asking the author to ensure compatibility and verify the necessity of a specific configuration. This falls under asking the author to double-check things, which is against the rules. The comment does not provide a specific code suggestion or ask for a specific test to be written.
2. package.json:56
- Draft comment:
Version bump for '@1stg/common-config' to ^14.0.0 may include breaking changes; verify that the new version is fully compatible with your project. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =0%<= threshold50%This comment is about a version bump for a dependency and suggests verifying compatibility, which is against the rules. The comment does not provide a specific suggestion or ask for a specific test to be written. It is more of a cautionary note, which is not allowed.
Workflow ID: wflow_NPdx2rabQU4AFzD8
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Important
Migrated build scripts to use
premoveandtsdown, updated TypeScript configurations, and refreshed dependencies.premovefor cleaning andtsdownfor type generation inpackage.json.rimrafand redundant publish configuration.tsconfig.lib.jsontargeting ES2019 andtsconfig.node.jsonfor Node.js projects.index.d.ctsfor cleaner exports.package.json, including@1stg/common-config,@eslint-react/eslint-plugin, andtypescript.This description was created by
for 5db3712. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit