Skip to content

fix: tslib should be listed as dependency#1186

Merged
JounQin merged 2 commits intoprettier:masterfrom
bpfoster:tslib-dependency
May 7, 2025
Merged

fix: tslib should be listed as dependency#1186
JounQin merged 2 commits intoprettier:masterfrom
bpfoster:tslib-dependency

Conversation

@bpfoster
Copy link
Copy Markdown
Contributor

@bpfoster bpfoster commented May 7, 2025

Fixes MODULE_NOT_FOUND error when used in a non-ts project

I think this is all it takes, but I'm really not a javascript guy.

fixes #1185


Important

Move tslib to dependencies in package.json to fix MODULE_NOT_FOUND error in non-TypeScript projects.

  • Dependencies:
    • Move tslib from devDependencies to dependencies in package.json to fix MODULE_NOT_FOUND error in non-TypeScript projects.

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

Summary by CodeRabbit

  • Chores
    • Updated dependency management to improve application stability.

Fixes MODULE_NOT_FOUND error when used in a non-ts project

fixes prettier#1185
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented May 7, 2025

Walkthrough

The change moves the "tslib" package from the "devDependencies" section to the "dependencies" section in package.json. Additionally, a new changeset file was added documenting this update. No other files or dependency versions were modified.

Changes

File(s) Change Summary
package.json Moved "tslib" from "devDependencies" to "dependencies".
.changeset/ready-mangos-run.md Added a changeset documenting the move of "tslib" to dependencies.

Assessment against linked issues

Objective Addressed Explanation
Ensure "tslib" is a direct dependency to resolve runtime errors (Issue #1185)

Poem

A hop and a skip, a tweak to the list,
"tslib" now found, no module is missed!
From dev to prod, dependencies shift—
Prettier and eslint, your builds now uplift.
With every install, a rabbit's delight:
No more errors, just code running right! 🐇✨


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 52ee63b and fb3b3fe.

📒 Files selected for processing (1)
  • .changeset/ready-mangos-run.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/ready-mangos-run.md

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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented May 7, 2025

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
Copy Markdown

@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 52ee63b in 33 seconds. Click for details.
  • Reviewed 20 lines of code in 1 files
  • Skipped 0 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. package.json:65
  • Draft comment:
    Correctly declaring tslib as a dependency ensures it’s available at runtime; this should resolve the MODULE_NOT_FOUND error.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. package.json:99
  • Draft comment:
    Removing tslib from devDependencies prevents conflicts and clarifies that it's required for production use.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
3. package.json:65
  • Draft comment:
    Good change: Moving 'tslib' to dependencies ensures it's installed for runtime, fixing the MODULE_NOT_FOUND error for non-TypeScript projects.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
4. package.json:101
  • Draft comment:
    Removing 'tslib' from devDependencies is appropriate since it's required at runtime rather than just during development.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_OSkbY0B1m0IPhTUv

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented May 7, 2025

Open in StackBlitz

npm i https://pkg.pr.new/prettier-eslint@1186

commit: fb3b3fe

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d1cfc1b) to head (fb3b3fe).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1186   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          304       304           
  Branches        78        79    +1     
=========================================
  Hits           304       304           

☔ 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.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 7, 2025

🦋 Changeset detected

Latest commit: fb3b3fe

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

This PR includes changesets to release 1 package
Name Type
prettier-eslint 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

@JounQin JounQin changed the title fix: Declare tslib as a dependency fix: tslib should be listed as dependency May 7, 2025
@JounQin JounQin merged commit 96967e9 into prettier:master May 7, 2025
8 checks passed
@bpfoster bpfoster deleted the tslib-dependency branch May 7, 2025 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v16.4 requires direct dependency on tslib?

3 participants