Skip to content

fix: disable importHelpers to drop tslib dependency #13

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 1 commit into from
May 26, 2025
Merged

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented May 26, 2025

close import-js/eslint-import-resolver-typescript#456


Important

Disable importHelpers to remove tslib dependency and update several dependencies in package.json.

  • Build Configuration:
    • Disable importHelpers to remove tslib dependency.
  • Dependencies:
    • Update @eslint-react/eslint-plugin to ^1.50.0 in package.json.
    • Update npm-run-all2 to ^8.0.4 in package.json.
    • Update react-router-dom to ^7.6.1 in package.json.

This description was created by Ellipsis for 63fdb78. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • Chores
    • Updated development dependencies to their latest minor versions.
    • Adjusted TypeScript configuration to remove the dependency on an external helper package.

@JounQin JounQin self-assigned this May 26, 2025
@Copilot Copilot AI review requested due to automatic review settings May 26, 2025 03:42
@JounQin JounQin added bug Something isn't working dependencies labels May 26, 2025
Copy link

changeset-bot bot commented May 26, 2025

🦋 Changeset detected

Latest commit: 63fdb78

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-import-context Patch

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

Copy link

coderabbitai bot commented May 26, 2025

Walkthrough

This update disables the TypeScript importHelpers option in tsconfig.json, removing the dependency on the tslib package. It documents this patch-level fix in a new changeset file and also bumps minor versions of several development dependencies in package.json.

Changes

File(s) Change Summary
tsconfig.json Set "importHelpers": false in compilerOptions, eliminating dependency on tslib.
.changeset/proud-carpets-shine.md Added changeset documenting the patch-level fix regarding importHelpers and tslib.
package.json Updated versions: @eslint-react/eslint-plugin, npm-run-all2, and react-router-dom.

Assessment against linked issues

Objective Addressed Explanation
Remove dependency on tslib to resolve "Cannot find module 'tslib'" error (#456)
Document the patch-level fix for disabling importHelpers (#456)

Poem

In the warren, code hops anew,
No more tslib to pursue!
Helpers now stay home and rest,
TypeScript’s burden is addressed.
With dependencies light and bright,
This patch brings devs delight—
🐇✨ The code hops on, just right!


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.

❤️ Share
🪧 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.

Copy link

@Copilot Copilot AI left a 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 disables the importHelpers option to drop the tslib dependency while updating several dependency versions.

  • Updated dependency versions in package.json for @eslint-react/eslint-plugin, npm-run-all2, and react-router-dom.
  • Added a changeset file (.changeset/proud-carpets-shine.md) documenting the patch fix.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
package.json Updated dependency versions to support disabling importHelpers and dropping tslib
.changeset/proud-carpets-shine.md Added changeset metadata documenting the fix

Copy link

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.

Copy link

codecov bot commented May 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (9f4cf90) to head (63fdb78).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           53        53           
  Branches        16        16           
=========================================
  Hits            53        53           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@ellipsis-dev ellipsis-dev bot left a 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 63fdb78 in 45 seconds. Click for details.
  • Reviewed 39 lines of code in 2 files
  • Skipped 2 files when reviewing.
  • Skipped posting 4 draft 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/proud-carpets-shine.md:1
  • Draft comment:
    Commit message mentions disabling importHelpers to drop tslib dependency, but no tsconfig change is shown in the diff. Confirm the tsconfig update is included elsewhere.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm if a change is included elsewhere, which violates the rule against asking for confirmation or double-checking things. It does not provide a specific code suggestion or point out a specific issue with the code.
2. package.json:65
  • Draft comment:
    Bump of @eslint-react/eslint-plugin from ^1.49.0 to ^1.50.0. Verify that this update is compatible with the project.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. package.json:83
  • Draft comment:
    Updated npm-run-all2 from ^8.0.3 to ^8.0.4. Ensure no unintended side effects in scripts.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. package.json:88
  • Draft comment:
    react-router-dom updated from ^7.6.0 to ^7.6.1. Confirm that this change is intended.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_UelLRn36t1sErJ1B

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

size-limit report 📦

Path Size
src/index.ts 184 B (0%)

Copy link
Contributor

Deploy preview for eslint-import-context ready!

✅ Preview
https://eslint-import-context-ch7xm3zwy-1stg.vercel.app

Built with commit 63fdb78.
This pull request is being automatically deployed with vercel-action

Copy link

pkg-pr-new bot commented May 26, 2025

Open in StackBlitz

npm i https://pkg.pr.new/eslint-import-context@13

commit: 63fdb78

Copy link
Contributor

📊 Package size report   4%↑

File Before After
lib/index.js 611 B 104%↑1.2 kB
lib/index.js.map 439 B 3%↑452 B
lib/utils.js 1.9 kB 5%↑2.0 kB
lib/utils.js.map 1.4 kB 0.1%↑1.4 kB
Total (Includes all files) 19.5 kB 4%↑20.2 kB
Tarball size 6.3 kB 4%↑6.6 kB
Unchanged files
File Size
lib/index.d.ts 351 B
lib/types.d.ts 4.3 kB
lib/types.js 110 B
lib/types.js.map 102 B
lib/utils.d.ts 741 B
LICENSE 1.1 kB
package.json 3.4 kB
README.md 5.0 kB

🤖 This report was automatically generated by pkg-size-action

Copy link

@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 (1)
tsconfig.json (1)

4-5: Consider bundle size implications of disabling importHelpers.

Setting "importHelpers": false will inline TypeScript helper functions across your compiled files, potentially increasing total bundle size. Ensure this trade-off is acceptable or introduce a bundler plugin to dedupe common helpers.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f4cf90 and 63fdb78.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • .changeset/proud-carpets-shine.md (1 hunks)
  • package.json (2 hunks)
  • tsconfig.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (13)
  • GitHub Check: Lint and Test with Node.js 24 on windows-latest
  • GitHub Check: Lint and Test with Node.js 24 on macos-latest
  • GitHub Check: Lint and Test with Node.js 24 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 22 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on macos-latest
  • GitHub Check: Lint and Test with Node.js 20 on macos-latest
  • GitHub Check: Lint and Test with Node.js 18 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on ubuntu-latest
  • GitHub Check: Package Size Report
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
🔇 Additional comments (5)
.changeset/proud-carpets-shine.md (2)

1-3: Changeset header matches the expected format.

The YAML frontmatter correctly specifies the package name, level, and separators.


5-5: Changeset description clearly documents the fix.

The summary “fix: disable importHelpers to drop tslib dependency” succinctly explains the change.

package.json (3)

65-65: Verify @eslint-react/eslint-plugin version bump.

You’ve updated to ^1.50.0; please confirm there are no new linting rules or breaking changes.


83-83: Approve npm-run-all2 patch bump.

The update from ^8.0.3 to ^8.0.4 is a patch-level bump and appears safe.


88-88: Verify react-router-dom version bump.

Minor bump to ^7.6.1—please check for any API adjustments or deprecations in the changelog.

@JounQin JounQin merged commit 07dd8a1 into main May 26, 2025
40 checks passed
@JounQin JounQin deleted the fix/tslib branch May 26, 2025 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot find module 'tslib' in v4.4.0
1 participant