Skip to content

chore: update #441 test case #443

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
Apr 10, 2025
Merged

chore: update #441 test case #443

merged 1 commit into from
Apr 10, 2025

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented Apr 10, 2025

Summary by CodeRabbit

  • New Features
    • Consolidated production dependency installation and cleanup steps to improve deployment reliability by ensuring that cleanup only occurs after a successful installation.

@JounQin JounQin requested a review from Copilot April 10, 2025 13:55
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.

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

Files not reviewed (3)
  • package.json: Language not supported
  • packages/sh/test/snapshots/fixtures.spec.ts.snap: Language not supported
  • packages/sh/test/fixtures/441.Dockerfile: Language not supported

Copy link

changeset-bot bot commented Apr 10, 2025

⚠️ No Changeset found

Latest commit: fba187a

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 10, 2025

Walkthrough

This change updates the Dockerfile for test fixtures by replacing an earlier debugging command with new instructions to install production dependencies and perform a cleanup. The new command sets the Node environment to production and uses npm install-clean, while removing the previous ls -la command. Additionally, the cleanup process now fetches and executes a remote script using a bash command, with the cleanup chained via && to ensure it only runs after a successful installation.

Changes

File(s) Change Summary
packages/.../441.Dockerfile Added command to install production dependencies using NODE_ENV=production npm install-clean; removed ls -la command; modified cleanup to fetch & execute a remote script using bash with chained execution via &&.

Sequence Diagram(s)

sequenceDiagram
    participant Dockerfile
    participant npm
    participant CleanupScript

    Dockerfile->>npm: Execute "NODE_ENV=production npm install-clean"
    alt Installation Successful
        npm->>CleanupScript: Proceed via '&&'
        CleanupScript-->>Dockerfile: Execute fetched cleanup script
    else Installation Fails
        npm-->>Dockerfile: Abort cleanup command
    end
Loading

Poem

I'm a rabbit, code-hopping with glee,
Skipping past the clutter to set dependencies free.
A new install command in the Docker burrow,
Cleans up the mess with a neat, bash-powered arrow.
Carrot-powered builds now run smooth and so bright! 🥕
Hoppity cheers to improvements done 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 85dccbf and fba187a.

⛔ Files ignored due to path filters (2)
  • packages/sh/test/__snapshots__/fixtures.spec.ts.snap is excluded by !**/*.snap
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • packages/sh/test/fixtures/441.Dockerfile (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/sh/test/fixtures/441.Dockerfile
⏰ Context from checks skipped due to timeout of 90000ms (14)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Package Size Report
  • GitHub Check: size-limit
  • GitHub Check: publish
  • GitHub Check: Lint and Test with Node.js 22 on macos-latest
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 18 on macos-latest
  • GitHub Check: Lint and Test with Node.js 18 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 on windows-latest
  • GitHub Check: Lint and Test with Node.js 20 on windows-latest
  • GitHub Check: Lint and Test with Node.js 18 on windows-latest
  • GitHub Check: Lint and Test with Node.js 22 on windows-latest

🪧 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 10, 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
Contributor

github-actions bot commented Apr 10, 2025

size-limit report 📦

Path Size
packages/autocorrect/lib/index.js 538 B (0%)
packages/pkg/lib/index.js 447 B (0%)
packages/sh/lib/index.js 3.15 KB (0%)
packages/sql/lib/index.js 2.4 KB (0%)

Copy link

pkg-pr-new bot commented Apr 10, 2025

Open in StackBlitz

prettier-plugin-autocorrect

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

prettier-plugin-pkg

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

prettier-plugin-sh

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

prettier-plugin-sql

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

prettier-plugin-toml

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

commit: fba187a

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.71%. Comparing base (1c2ad5e) to head (fba187a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #443   +/-   ##
=======================================
  Coverage   85.71%   85.71%           
=======================================
  Files          10       10           
  Lines         182      182           
  Branches       47       47           
=======================================
  Hits          156      156           
  Misses         25       25           
  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
Contributor

github-actions bot commented Apr 10, 2025

📊 Package size report   0.01%↑

File Before After
packages/sh/test/__snapshots__/fixtures.spec.ts.snap 28.6 kB 0.6%↑28.8 kB
packages/sh/test/fixtures/441.Dockerfile 31 B 606%↑219 B
Total (Includes all files) 3.1 MB 0.01%↑3.1 MB
Tarball size 1.1 MB 0.01%↑1.1 MB
Unchanged files
File Size
.changeset/config.json 313 B
.changeset/README.md 510 B
.codesandbox/ci.json 38 B
.editorconfig 161 B
.gitattributes 152 B
.github/workflows/autofix.yml 920 B
.github/workflows/ci.yml 1.2 kB
.github/workflows/pkg-pr-new.yml 686 B
.github/workflows/pkg-size.yml 542 B
.github/workflows/release.yml 1.3 kB
.github/workflows/size-limit.yml 762 B
.github/workflows/vercel.yml 1.0 kB
.lintstagedrc.js 48 B
.nvmrc 6 B
.postcssrc.cjs 51 B
.prettierignore 23 B
.prettierrc 24 B
.remarkrc 159 B
.renovaterc 49 B
.simple-git-hooks.js 49 B
.size-limit.json 292 B
.yarn/plugins/plugin-prepare-lifecycle.cjs 202 B
.yarn/releases/yarn-4.8.1.cjs 2.8 MB
.yarnrc.yml 397 B
assets/pkg.svg 15.1 kB
assets/sh.png 14.4 kB
CHANGELOG.md 393 B
docs/App.tsx 1.2 kB
docs/global.css 321 B
docs/index.tsx 211 B
eslint.config.js 516 B
index.html 414 B
LICENSE 1.1 kB
package.json 3.4 kB
packages/autocorrect/CHANGELOG.md 1.9 kB
packages/autocorrect/index.d.cts 63 B
packages/autocorrect/LICENSE 1.1 kB
packages/autocorrect/package.json 1.2 kB
packages/autocorrect/README.md 3.9 kB
packages/autocorrect/src/index.ts 1.4 kB
packages/autocorrect/src/types.ts 78 B
packages/autocorrect/test/__snapshots__/fixtures.spec.ts.snap 4.7 kB
packages/autocorrect/test/fixtures.spec.ts 983 B
packages/autocorrect/test/fixtures/test.css 189 B
packages/autocorrect/test/fixtures/test.go 470 B
packages/autocorrect/test/fixtures/test.html 1.1 kB
packages/autocorrect/test/fixtures/test.md 1.1 kB
packages/autocorrect/test/fixtures/test.py 368 B
packages/autocorrect/test/fixtures/test.rb 234 B
packages/autocorrect/test/fixtures/test0.js 453 B
packages/autocorrect/tsconfig.json 154 B
packages/pkg/CHANGELOG.md 11.4 kB
packages/pkg/index.d.cts 47 B
packages/pkg/LICENSE 16.7 kB
packages/pkg/package.json 1.1 kB
packages/pkg/README.md 6.2 kB
packages/pkg/src/index.ts 1.4 kB
packages/pkg/src/rules/files.ts 1.7 kB
packages/pkg/src/rules/object.ts 899 B
packages/pkg/src/rules/sort.ts 2.4 kB
packages/pkg/src/types.ts 1.0 kB
packages/pkg/src/utils.ts 567 B
packages/pkg/test/__snapshots__/engines.spec.ts.snap 158 B
packages/pkg/test/__snapshots__/files.spec.ts.snap 173 B
packages/pkg/test/__snapshots__/test.spec.ts.snap 2.0 kB
packages/pkg/test/engines.spec.ts 417 B
packages/pkg/test/files.spec.ts 409 B
packages/pkg/test/fixtures/fixture1.json 1.0 kB
packages/pkg/test/fixtures/fixture2.json 863 B
packages/pkg/test/fixtures/fixture3.json 430 B
packages/pkg/test/test.spec.ts 2.3 kB
packages/pkg/tsconfig.json 154 B
packages/sh/CHANGELOG.md 14.7 kB
packages/sh/index.d.cts 45 B
packages/sh/LICENSE 1.1 kB
packages/sh/package.json 1.5 kB
packages/sh/README.md 10.4 kB
packages/sh/src/index.ts 12.2 kB
packages/sh/test/__snapshots__/shellscript.spec.ts.snap 394 B
packages/sh/test/error.spec.ts 482 B
packages/sh/test/fixtures.spec.ts 843 B
packages/sh/test/fixtures/.dockerignore 108 B
packages/sh/test/fixtures/.nvmrc 6 B
packages/sh/test/fixtures/.properties 177 B
packages/sh/test/fixtures/133.sh 5.2 kB
packages/sh/test/fixtures/162.sh 15.7 kB
packages/sh/test/fixtures/182.sh 1.9 kB
packages/sh/test/fixtures/191.sh 1.7 kB
packages/sh/test/fixtures/278.Dockerfile 32 B
packages/sh/test/fixtures/292.Dockerfile 95 B
packages/sh/test/fixtures/376.Dockerfile 217 B
packages/sh/test/fixtures/384.Dockerfile 51 B
packages/sh/test/fixtures/398.Dockerfile 64 B
packages/sh/test/fixtures/Dockerfile 394 B
packages/sh/test/fixtures/hosts 406 B
packages/sh/test/fixtures/jvm.options 162 B
packages/sh/test/fixtures/no-ext 38 B
packages/sh/test/fixtures/shell.sh 368 B
packages/sh/test/loc-functions.spec.ts 1.2 kB
packages/sh/test/parser.spec.ts 2.1 kB
packages/sh/tsconfig.json 154 B
packages/sql/CHANGELOG.md 11.3 kB
packages/sql/index.d.cts 47 B
packages/sql/LICENSE 1.1 kB
packages/sql/package.json 1.4 kB
packages/sql/README.md 6.9 kB
packages/sql/shim.d.ts 59 B
packages/sql/src/index.ts 13.0 kB
packages/sql/test/__snapshots__/fixtures-eol.spec.ts.snap 756 B
packages/sql/test/__snapshots__/fixtures.spec.ts.snap 2.0 kB
packages/sql/test/__snapshots__/sql.spec.ts.snap 374 B
packages/sql/test/fixtures-eol.spec.ts 1.3 kB
packages/sql/test/fixtures-eol/556.sql 73 B
packages/sql/test/fixtures-eol/557.sql 69 B
packages/sql/test/fixtures-eol/558.sql 69 B
packages/sql/test/fixtures-eol/559.sql 73 B
packages/sql/test/fixtures.spec.ts 1.7 kB
packages/sql/test/fixtures/144.sql 68 B
packages/sql/test/fixtures/233.sql 68 B
packages/sql/test/fixtures/277.sql 88 B
packages/sql/test/fixtures/279.sql 106 B
packages/sql/test/fixtures/291.sql 1.2 kB
packages/sql/test/fixtures/334.sql 15 B
packages/sql/test/fixtures/basic.sql 120 B
packages/sql/test/sql.spec.ts 660 B
packages/sql/tsconfig.json 154 B
packages/toml/CHANGELOG.md 2.0 kB
packages/toml/index.d.cts 49 B
packages/toml/LICENSE 1.1 kB
packages/toml/package.json 1.2 kB
packages/toml/README.md 5.2 kB
packages/toml/src/index.ts 1.3 kB
packages/toml/src/options.ts 2.6 kB
packages/toml/src/types.ts 381 B
packages/toml/test/__snapshots__/fixtures.spec.ts.snap 487 B
packages/toml/test/fixtures.spec.ts 955 B
packages/toml/test/fixtures/comments.toml 87 B
packages/toml/test/fixtures/fixture1.toml 162 B
packages/toml/tsconfig.json 154 B
README.md 6.8 kB
scripts/format.ts 593 B
scripts/languages.ts 3.0 kB
test.js 184 B
test/global.d.ts 41 B
test/tsconfig.json 223 B
tsconfig.base.json 89 B
tsconfig.json 275 B
vercel.json 229 B
vite.config.ts 544 B
vitest.config.ts 541 B

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

@JounQin
Copy link
Member Author

JounQin commented Apr 10, 2025

@coderabbitai review

Copy link

coderabbitai bot commented Apr 10, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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)
packages/sh/test/fixtures/441.Dockerfile (1)

2-6: Ensure Dockerfile Commands are Correct and Secure

The updated Dockerfile now installs dependencies in production mode using NODE_ENV=production npm install-clean and then chains a cleanup command that executes a remote script via process substitution. Please verify that:

  • The base image includes bash (required for process substitution) so that the command executes reliably.
  • The remote script fetched from https://raw.githubusercontent.com/softvisio/scripts/main/env-build-node.sh is secure, stable, and its integrity is ensured (consider pinning to a specific commit/version if feasible).
  • The use of && rightly ensures that the cleanup is only performed if the installation succeeds.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1c2ad5e and 85dccbf.

⛔ Files ignored due to path filters (2)
  • packages/sh/test/__snapshots__/fixtures.spec.ts.snap is excluded by !**/*.snap
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • package.json (2 hunks)
  • packages/sh/test/fixtures/441.Dockerfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (2)
package.json (2)

43-43: Confirm @shikijs/rehype Version Downgrade

The version of @shikijs/rehype has been downgraded from ^3.2.2 to ^3.2.1. Please confirm that:

  • This downgrade does not introduce any breaking changes or API regressions.
  • The older minor version is fully compatible with your existing codebase and tooling.

76-76: Verify Vite Version Downgrade

The version of vite has been downgraded from ^6.2.6 to ^6.2.5. Ensure that:

  • This version change does not impact the build pipeline or development environment adversely.
  • All tests pass and there are no compatibility issues with other dependencies in the project.

Copy link

@JounQin JounQin merged commit 583489b into master Apr 10, 2025
36 checks passed
@JounQin JounQin deleted the test/441 branch April 10, 2025 14:07
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.

1 participant