Skip to content

Conversation

reteps
Copy link
Contributor

@reteps reteps commented Apr 8, 2025

close #434
close reteps/dockerfmt#7


Summary by CodeRabbit

  • Chores
    • Upgraded the @reteps/dockerfmt dependency to version ^0.2.5, introducing potential bug fixes and enhancements.
  • New Features
    • Introduced a lazy-loading mechanism for the formatting function to improve initial load performance in the printing processes.
    • Added a new asynchronous function for dynamic import of the formatting function.

Copy link

changeset-bot bot commented Apr 8, 2025

⚠️ No Changeset found

Latest commit: 943adca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

coderabbitai bot commented Apr 8, 2025

Walkthrough

This update modifies the dependency version of @reteps/dockerfmt in the packages/sh/package.json file, changing it from ^0.2.3 to ^0.2.5. Additionally, a new asynchronous function getFormatDockerfileContents is introduced in packages/sh/src/index.ts, which implements lazy loading for the formatDockerfileContents function. This change enhances the control flow by delaying the loading of the formatting function until it is needed.

Changes

File(s) Change Summary
packages/sh/package.json Updated @reteps/dockerfmt dependency version from ^0.2.3 to ^0.2.5
packages/sh/src/index.ts Added asynchronous function getFormatDockerfileContents for lazy loading of formatDockerfileContents and updated printer implementations to use it.
.changeset/eighty-snails-rescue.md Introduced a new file documenting a patch for prettier-plugin-sh and version bump for @reteps/dockerfmt.

Assessment against linked issues

Objective Addressed Explanation
Cannot import dockerfmt (Issue #434)

Possibly related PRs

  • chore: release package(s) #431: The changes in the main PR, which involve updating the version of the @reteps/dockerfmt dependency and modifying how its function is imported, are related to the retrieved PR that also involves a version bump for @reteps/dockerfmt and addresses usage specific to ECMAScript Modules.
  • feat: prototype to use dockerfmt as fallback formatter #432: The changes in the main PR, which involve updating the @reteps/dockerfmt dependency and introducing a lazy-loading mechanism for its function, are related to the retrieved PR that implements dockerfmt as a fallback formatter, as both PRs modify the usage and integration of the same dockerfmt functionality.

Poem

I’m hopping through code with a joyful vibe,
A tiny update making dependencies thrive.
From version old to new I leap,
In package.json, a change so neat.
With every jump, improvements we see,
A rabbit’s cheer in this PR spree!
🐰💻


📜 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 943adca and 7fab8fe.

📒 Files selected for processing (1)
  • .changeset/eighty-snails-rescue.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/eighty-snails-rescue.md
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
  • GitHub Check: Codacy Static Code Analysis

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

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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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

codesandbox-ci bot commented Apr 8, 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

pkg-pr-new bot commented Apr 8, 2025

Open in StackBlitz

prettier-plugin-autocorrect

npm i https://pkg.pr.new/prettier-plugin-autocorrect@433

prettier-plugin-pkg

npm i https://pkg.pr.new/prettier-plugin-pkg@433

prettier-plugin-sql

npm i https://pkg.pr.new/prettier-plugin-sql@433

prettier-plugin-sh

npm i https://pkg.pr.new/prettier-plugin-sh@433

prettier-plugin-toml

npm i https://pkg.pr.new/prettier-plugin-toml@433

commit: 7fab8fe

Copy link

codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.90%. Comparing base (c0d68a9) to head (7fab8fe).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
packages/sh/src/index.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
+ Coverage   80.72%   80.90%   +0.17%     
==========================================
  Files          10       10              
  Lines         192      199       +7     
  Branches       51       52       +1     
==========================================
+ Hits          155      161       +6     
- Misses         36       37       +1     
  Partials        1        1              

☔ 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

socket-security bot commented Apr 8, 2025

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@reteps/dockerfmt@0.2.30.2.5 None 0 2.13 MB reteps

View full report↗︎

@JounQin
Copy link
Member

JounQin commented Apr 9, 2025

Wait for reteps/dockerfmt#7 first.

@JounQin JounQin changed the title Bump @reteps/dockerfmt chore: bump @reteps/dockerfmt, fix related ESM only usage Apr 9, 2025
Copy link

sonarqubecloud bot commented Apr 9, 2025

@JounQin JounQin merged commit 6650f9d into un-ts:master Apr 9, 2025
23 checks passed
@JounQin JounQin mentioned this pull request Apr 9, 2025
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.

Cannot import dockerfmt
2 participants