Skip to content

Conversation

JounQin
Copy link
Member

@JounQin JounQin commented May 9, 2025

This is the only difference I can tell between prettier-plugin-toml v2.0.3 vs v2.0.4

close #452

related un-ts/pkgr#391


Important

Remove module-sync export field from package.json in multiple packages.

  • Exports Field Removal:
    • Removed module-sync export field from package.json in autocorrect, pkg, sh, sql, and toml packages.

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

Summary by CodeRabbit

  • Bug Fixes
    • Removed the problematic "module-sync" export entry from several packages to resolve related issues. This affects autocorrect, pkg, sh, sql, and toml plugins.
  • Chores
    • Updated package configuration for improved stability and compatibility.

@JounQin JounQin requested a review from Copilot May 9, 2025 04:28
@JounQin JounQin self-assigned this May 9, 2025
@JounQin JounQin added bug Something isn't working regression labels May 9, 2025
Copy link

changeset-bot bot commented May 9, 2025

🦋 Changeset detected

Latest commit: a26b877

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

This PR includes changesets to release 5 packages
Name Type
prettier-plugin-autocorrect Patch
prettier-plugin-pkg Patch
prettier-plugin-sh Patch
prettier-plugin-sql Patch
prettier-plugin-toml 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

@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 removes the buggy "module-sync" exports field from several package.json files to address export configuration issues.

  • Removed the "module-sync" field from packages/toml/package.json
  • Removed the "module-sync" field from packages/sql/package.json
  • Removed the "module-sync" field from packages/sh/package.json, packages/pkg/package.json, and packages/autocorrect/package.json

Reviewed Changes

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

Show a summary per file
File Description
packages/toml/package.json Removed the "module-sync" export configuration field.
packages/sql/package.json Removed the "module-sync" export configuration field.
packages/sh/package.json Removed the "module-sync" export configuration field.
packages/pkg/package.json Removed the "module-sync" export configuration field.
packages/autocorrect/package.json Removed the "module-sync" export configuration field.

Copy link

coderabbitai bot commented May 9, 2025

Walkthrough

The "module-sync" export entry was removed from the exports field in the package.json files of several packages, including autocorrect, pkg, prettier-plugin-sh, prettier-plugin-sql, and prettier-plugin-toml. No other changes to exports or public APIs were made.

Changes

File(s) Change Summary
packages/autocorrect/package.json
packages/pkg/package.json
packages/sh/package.json
packages/sql/package.json
packages/toml/package.json
Removed the "module-sync" export entry from the exports field.

Assessment against linked issues

Objective Addressed Explanation
Remove or adjust problematic exports to prevent runtime errors in prettier-plugin-toml (#452)

Possibly related PRs

Poem

Oh, module-sync, you’re gone from sight,
In package files, you took your flight.
Exports are cleaner, less to debug,
No more panics, no more shrug.
The rabbit hops with glee anew—
Simpler exports, smoother through!
🐇✨

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 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 0de2845 and a26b877.

📒 Files selected for processing (1)
  • .changeset/little-baboons-ring.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/little-baboons-ring.md
⏰ Context from checks skipped due to timeout of 90000ms (12)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Lint and Test with Node.js 22 on ubuntu-latest
  • GitHub Check: Lint and Test with Node.js 20 on macos-latest
  • 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 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 18 on windows-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 windows-latest

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.

Copy link

codesandbox-ci bot commented May 9, 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

codecov bot commented May 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.71%. Comparing base (781c264) to head (a26b877).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #453   +/-   ##
=======================================
  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

@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 0de2845 in 42 seconds. Click for details.
  • Reviewed 75 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 13 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. packages/autocorrect/package.json:17
  • Draft comment:
    Good removal of the buggy module-sync field; exports now include only import and require which aligns with standard practices.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. packages/pkg/package.json:17
  • Draft comment:
    Module-sync removal here is consistent with the fix; only import and require are exported now.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/sh/package.json:17
  • Draft comment:
    The removal of the module-sync export from the exports field in this package is correct.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/sql/package.json:17
  • Draft comment:
    Removing the module-sync export resolves potential conflicts; the change is implemented uniformly.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. packages/toml/package.json:22
  • Draft comment:
    The change removes the problematic module-sync export, which should mitigate the panic reported in issue #452.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining what the change does and its expected impact. It doesn't provide a suggestion, ask for confirmation, or point out a potential issue.
6. packages/autocorrect/package.json:19
  • Draft comment:
    Removed the non-standard 'module-sync' export field. This cleanup is appropriate as only 'import' and 'require' are needed per Node spec.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining why a change was made. It doesn't provide a suggestion or ask for confirmation about a specific code change. It doesn't align with the rules for good comments.
7. packages/pkg/package.json:19
  • Draft comment:
    The removal of the 'module-sync' export field is correct; it avoids potential conflicts and aligns with best practices.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it praises the removal of a field without providing any actionable feedback or suggestions. It doesn't ask for confirmation or suggest any changes.
8. packages/sh/package.json:19
  • Draft comment:
    Removing the 'module-sync' field is appropriate. It streamlines exports to only 'import' and 'require', adhering to standards.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it simply states that removing the 'module-sync' field streamlines exports. It doesn't provide any actionable feedback or suggestions for improvement.
9. packages/sql/package.json:19
  • Draft comment:
    The deletion of the 'module-sync' export field is valid. It removes a non-standard field that may have caused issues.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it simply states that the deletion of a field is valid and may have caused issues. It does not provide any actionable feedback or suggestions for improvement.
10. packages/toml/package.json:22
  • Draft comment:
    Removing the 'module-sync' export field here resolves the issue (as seen in issue #452) and maintains proper module exports.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining why a change was made. It doesn't provide a suggestion, ask for confirmation, or point out a potential issue.
11. packages/pkg/package.json:8
  • Draft comment:
    There appears to be a minor typographical inconsistency in the author field: the email uses '1stg.me' while the website URL uses '1stG.me'. It’s recommended to standardize the casing for consistency.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
12. packages/sh/package.json:5
  • Draft comment:
    The description in line 5 contains a grammatical error: "also support simple format" should be "also supports simple format" for proper subject-verb agreement.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
13. packages/toml/package.json:12
  • Draft comment:
    Typographical error: The funding URL in line 12 is set to "https://opencollective.com/unts". Considering the repository owner and other references use "un-ts", you might want to double-check if the URL should be "https://opencollective.com/un-ts".
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_3c4RGehKAHZ2edPA

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

Copy link
Contributor

github-actions bot commented May 9, 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 May 9, 2025

Open in StackBlitz

prettier-plugin-autocorrect

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

prettier-plugin-pkg

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

prettier-plugin-sql

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

prettier-plugin-sh

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

prettier-plugin-toml

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

commit: a26b877

Copy link
Contributor

github-actions bot commented May 9, 2025

📊 Package size report   -0.01%↓

File Before After
.changeset/little-baboons-ring.md 208 B
packages/autocorrect/package.json 1.2 kB -8.22%↓1.1 kB
packages/pkg/package.json 1.1 kB -8.53%↓1.0 kB
packages/sh/package.json 1.5 kB -6.47%↓1.4 kB
packages/sql/package.json 1.4 kB -6.91%↓1.3 kB
packages/toml/package.json 1.2 kB -8.11%↓1.1 kB
Total (Includes all files) 3.3 MB -0.01%↓3.3 MB
Tarball size 1.2 MB 0.01%↑1.2 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 924 B
.github/workflows/ci.yml 1.6 kB
.github/workflows/pkg-pr-new.yml 690 B
.github/workflows/pkg-size.yml 596 B
.github/workflows/release.yml 1.3 kB
.github/workflows/size-limit.yml 766 B
.github/workflows/vercel.yml 1.0 kB
.nano-staged.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.9.1.cjs 3.0 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/README.md 4.0 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 961 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/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/README.md 10.4 kB
packages/sh/src/index.ts 12.2 kB
packages/sh/test/__snapshots__/fixtures.spec.ts.snap 28.9 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 1.2 kB
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/441.Dockerfile 219 B
packages/sh/test/fixtures/445.sh 105 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/README.md 7.0 kB
packages/sql/src/index.ts 13.0 kB
packages/sql/test/__snapshots__/fixtures-eol.spec.ts.snap 886 B
packages/sql/test/__snapshots__/fixtures.spec.ts.snap 40.3 kB
packages/sql/test/__snapshots__/sql.spec.ts.snap 374 B
packages/sql/test/fixtures-eol.spec.ts 1.4 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.8 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/405.sql 160 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/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 493 B
packages/toml/test/fixtures.spec.ts 792 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/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

Copy link

sonarqubecloud bot commented May 9, 2025

@JounQin JounQin merged commit b44651a into master May 9, 2025
38 checks passed
@JounQin JounQin deleted the fix/module-sync branch May 9, 2025 04:33
@JounQin JounQin mentioned this pull request May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when upgrading to prettier-plugin-toml v2.0.4
1 participant