chore: remove unnecessary tslib by targeting ES2021#12
Conversation
🦋 Changeset detectedLatest commit: a66982b 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 |
|
Caution Review failedThe pull request is closed. WalkthroughThis update removes the project's dependency on Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant checkAndPreparePackage
participant fs
participant path
participant npm
participant https
User->>checkAndPreparePackage: Call with package info
checkAndPreparePackage->>fs: Check for native binary
alt Binary exists
checkAndPreparePackage-->>User: Success
else Binary missing
checkAndPreparePackage->>npm: Try install via npm
alt npm install succeeds
checkAndPreparePackage-->>User: Success
else npm install fails
checkAndPreparePackage->>https: Download binary directly
alt Download succeeds
checkAndPreparePackage-->>User: Success
else Download fails
checkAndPreparePackage-->>User: Error
end
end
end
Possibly related issues
Possibly related PRs
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
eslint.config.mjsOops! Something went wrong! :( ESLint: 9.25.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.mjs lib/helpers.jsOops! Something went wrong! :( ESLint: 9.25.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.mjs lib/constants.jsOops! Something went wrong! :( ESLint: 9.25.0 Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@1stg/eslint-config' imported from /eslint.config.mjs
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (5)
📒 Files selected for processing (11)
✨ 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:
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.
Pull Request Overview
This PR removes the unnecessary dependency on tslib by targeting ES2021 and updates the import style accordingly. Key changes include:
- Converting default imports for Node built-ins in TypeScript files to namespace imports.
- Removing tslib usage in JavaScript files and updating helper functions to use modern syntax.
- Disabling an ESLint unicorn rule to match the team’s style preferences.
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Updated import statements for Node modules. |
| src/helpers.ts | Changed import syntax and updated Typescript types. |
| src/constants.ts | Adjusted import style for Node modules. |
| lib/target.js | Replaced older nullish patterns with the nullish coalescing operator. |
| lib/index.js | Removed tslib usage and refactored async functions and error messages. |
| lib/helpers.js | Updated Node module imports and modernized error handling syntax. |
| lib/constants.js | Revised import flow using the new require syntax. |
| eslint.config.mjs | Disabled a unicorn rule to ensure consistent import styles. |
Files not reviewed (1)
- package.json: Language not supported
commit: |
📊 Package size report No changes
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #12 +/- ##
=======================================
Coverage 39.56% 39.56%
=======================================
Files 6 6
Lines 460 460
Branches 53 53
=======================================
Hits 182 182
Misses 278 278 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Deploy preview for napi-postinstall ready! ✅ Preview Built with commit a66982b. |
Summary by CodeRabbit
Chores
tsliband updated build configuration to target ES2021.tslibfrom the package manifest and related build files.Style
Documentation