Repository navigation
chore: release package(s) - #501
Conversation
📝 WalkthroughWalkthroughRemoves two Changeset files and publishes version bumps: Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
|
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. |
prettier-plugin-autocorrect
prettier-plugin-pkg
prettier-plugin-sh
prettier-plugin-sql
prettier-plugin-toml
commit: |
size-limit report 📦
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #501 +/- ##
=======================================
Coverage 88.13% 88.13%
=======================================
Files 10 10
Lines 236 236
Branches 68 68
=======================================
Hits 208 208
Misses 27 27
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/pkg/CHANGELOG.md`:
- Around line 9-16: The fenced code block starting with the triple backticks
(```) in CHANGELOG.md has no language tag, triggering markdownlint MD040; update
the opening fence to include a language (e.g., `text`) so the block becomes a
language-labeled fenced code block and re-run linting to confirm the MD040
warning is resolved.
- Around line 7-16: The changelog lists multiple special-case exceptions for
pre/post script sorting, but the implementation in packages/pkg/src/utils.ts
only hard-codes "prepare" as excluded from pre* matching and has no equivalent
post* exclusion; either update the CHANGELOG entry to state that only "prepare"
is excluded (and that post* are not specially excluded), or modify the utils
logic (in packages/pkg/src/utils.ts — the pre/post matching/exception logic) to
include the additional exceptions (e.g., "pare", "postpare", "preprepare",
"postprepare") and a post* exclusion rule so the shipped behavior matches the
documented list.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ca044bc2-5e4a-44c2-9a10-f6a6a7c8c544
📒 Files selected for processing (3)
.changeset/cold-moles-vanish.mdpackages/pkg/CHANGELOG.mdpackages/pkg/package.json
💤 Files with no reviewable changes (1)
- .changeset/cold-moles-vanish.md
There was a problem hiding this comment.
Pull request overview
This is an auto-generated Changesets release PR to publish [email protected], capturing the user-facing changelog entry for the minor feature added in #500.
Changes:
- Bump
prettier-plugin-pkgversion from0.21.2to0.22.0. - Add
0.22.0release notes topackages/pkg/CHANGELOG.md. - Remove the consumed Changeset file for this release.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/pkg/package.json | Updates the package version to 0.22.0 for the npm publish. |
| packages/pkg/CHANGELOG.md | Adds the 0.22.0 changelog entry describing the minor change from #500. |
| .changeset/cold-moles-vanish.md | Removes the Changeset now that it has been applied to versioning/changelog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
332e851 to
6541aa3
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (2)
packages/pkg/CHANGELOG.md (2)
7-16:⚠️ Potential issue | 🟠 MajorVerify that documented exceptions match the implementation.
This was previously flagged: the changelog lists five exception cases (
pare,postpare,preprepare,prepare,postprepare), but the earlier review indicated thatpackages/pkg/src/utils.tsonly hard-codesprepareas excluded frompre*matching, with no equivalentpost*exclusion logic. Before releasing, confirm the implementation matches this documented behavior.Run the following script to verify the implementation:
#!/bin/bash # Description: Check how pre/post script exceptions are actually implemented in utils.ts # Search for the pre/post matching logic and exception handling echo "=== Searching for pre/post script matching logic ===" rg -n -A10 -B5 'prepare|pre\*|post\*' packages/pkg/src/utils.ts echo -e "\n=== Searching for script sorting/exception logic ===" ast-grep --pattern 'if ($_.includes($SCRIPT)) { $$$ }' ast-grep --pattern 'if ($_.startsWith("pre")) { $$$ }' ast-grep --pattern 'if ($_.startsWith("post")) { $$$ }'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/pkg/CHANGELOG.md` around lines 7 - 16, The changelog lists five exception cases for sorting pre/post scripts but the implementation in packages/pkg/src/utils.ts only hard-codes `prepare` as excluded from `pre*` matching; update the implementation or the changelog so they match: inspect the functions that detect and sort scripts (e.g., any helpers named isPreScript, isPostScript, sortScriptsAroundBase or the array/condition that currently checks for "prepare"), and either extend the exclusion list to include "pare", "postpare", "preprepare", "prepare", and "postprepare" and add equivalent post* exclusion logic, or remove/adjust entries in the changelog to reflect the actual behavior; ensure the matching logic uses the unified exception list and add a unit test to verify each exception case.
9-16:⚠️ Potential issue | 🟡 MinorAdd language identifier to fenced code block.
The fenced code block is missing a language identifier, triggering markdownlint MD040.
📝 Proposed fix
- ``` + ```text pare postpare preprepare prepare postprepare</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@packages/pkg/CHANGELOG.mdaround lines 9 - 16, Add a language identifier to
the fenced code block (the triple-backtick block shown) so markdownlint MD040 is
satisfied; update the opening fence fromtotext (or another appropriate
language) in the CHANGELOG.md block containing the lines "pare", "postpare",
"preprepare", "prepare", "postprepare" so the code fence is explicitly labeled.</details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In@packages/pkg/CHANGELOG.md:
- Around line 7-16: The changelog lists five exception cases for sorting
pre/post scripts but the implementation in packages/pkg/src/utils.ts only
hard-codesprepareas excluded frompre*matching; update the implementation
or the changelog so they match: inspect the functions that detect and sort
scripts (e.g., any helpers named isPreScript, isPostScript,
sortScriptsAroundBase or the array/condition that currently checks for
"prepare"), and either extend the exclusion list to include "pare", "postpare",
"preprepare", "prepare", and "postprepare" and add equivalent post* exclusion
logic, or remove/adjust entries in the changelog to reflect the actual behavior;
ensure the matching logic uses the unified exception list and add a unit test to
verify each exception case.- Around line 9-16: Add a language identifier to the fenced code block (the
triple-backtick block shown) so markdownlint MD040 is satisfied; update the
opening fence fromtotext (or another appropriate language) in the
CHANGELOG.md block containing the lines "pare", "postpare", "preprepare",
"prepare", "postprepare" so the code fence is explicitly labeled.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `d4e8b574-ad2a-4197-a3f6-b226556a74fb` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 332e851935078291b2b2943205bfb788c9393a37 and 6541aa31d9bb364014f691514787204e71d502e0. </details> <details> <summary>📒 Files selected for processing (5)</summary> * `.changeset/cold-moles-vanish.md` * `packages/pkg/CHANGELOG.md` * `packages/pkg/package.json` * `packages/sql/CHANGELOG.md` * `packages/sql/package.json` </details> <details> <summary>💤 Files with no reviewable changes (1)</summary> * .changeset/cold-moles-vanish.md </details> <details> <summary>✅ Files skipped from review due to trivial changes (3)</summary> * packages/sql/CHANGELOG.md * packages/pkg/package.json * packages/sql/package.json </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
6541aa3 to
8fdfd63
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (2)
packages/pkg/CHANGELOG.md (2)
9-16:⚠️ Potential issue | 🟡 MinorAdd a language identifier to the fenced code block.
The fenced code block starting at line 9 lacks a language identifier, triggering markdownlint MD040. Add a language tag for proper rendering and linting compliance.
🔧 Suggested fix
- ``` + ```text pare postpare preprepare prepare postprepare</details> As per coding guidelines, markdownlint-cli2 reports MD040 violations for fenced code blocks without language specifications. <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@packages/pkg/CHANGELOG.mdaround lines 9 - 16, The fenced code block
containing the lines "pare postpare preprepare prepare postprepare" is missing a
language identifier; update that triple-backtick fence to include a language tag
(e.g., add "text" after ``` ) so the block becomes a language-specified fenced
code block and satisfies markdownlint MD040.</details> --- `7-16`: _⚠️ Potential issue_ | _🟠 Major_ **Changelog entry does not accurately describe the implementation.** The exception list implies all five cases are specially handled, but the implementation in `packages/pkg/src/utils.ts` only explicitly excludes `'prepare'` from being treated as `pre` + `pare`. The other names (`pare`, `postpare`, `preprepare`, `postprepare`) are implicitly handled by the logic that checks whether the base script exists—they are not hardcoded exceptions. Consider revising the changelog to accurately reflect the implementation: "Sort `pre`/`post` scripts around the base script, with special handling to ensure `prepare` is not treated as `pre` + `pare`." <details> <summary>📝 Suggested revision</summary> ```diff -- [`#500`](https://github.com/un-ts/prettier/pull/500) [`041b9e5`](https://github.com/un-ts/prettier/commit/041b9e50928f078ac109f334c3c2e16ddd064c29) Thanks [`@porada`](https://github.com/porada)! - feat(prettier-plugin-pkg): Sort `pre`/`post` scripts around the base script, except the following cases: - - ``` - pare - postpare - - preprepare - prepare - postprepare - ``` +- [`#500`](https://github.com/un-ts/prettier/pull/500) [`041b9e5`](https://github.com/un-ts/prettier/commit/041b9e50928f078ac109f334c3c2e16ddd064c29) Thanks [`@porada`](https://github.com/porada)! - feat(prettier-plugin-pkg): Sort `pre`/`post` scripts around the base script, with special handling to ensure `prepare` is not treated as `pre` + `pare`. ``` </details> Based on the implementation in `packages/pkg/src/utils.ts:16-53`, which only contains `scriptName !== 'prepare'` as the hardcoded exception. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@packages/pkg/CHANGELOG.md` around lines 7 - 16, The changelog overstates the implementation by listing several hardcoded exceptions while the code only hardcodes the check scriptName !== 'prepare' (see the logic in packages/pkg/src/utils.ts); update the CHANGELOG.md entry to remove the five-item exception list and instead state: "Sort `pre`/`post` scripts around the base script, with special handling to ensure `prepare` is not treated as `pre` + `pare`," so the description matches the actual behavior. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In@packages/pkg/CHANGELOG.md:
- Around line 9-16: The fenced code block containing the lines "pare postpare
preprepare prepare postprepare" is missing a language identifier; update that
triple-backtick fence to include a language tag (e.g., add "text" after ``` ) so
the block becomes a language-specified fenced code block and satisfies
markdownlint MD040.- Around line 7-16: The changelog overstates the implementation by listing
several hardcoded exceptions while the code only hardcodes the check scriptName
!== 'prepare' (see the logic in packages/pkg/src/utils.ts); update the
CHANGELOG.md entry to remove the five-item exception list and instead state:
"Sortpre/postscripts around the base script, with special handling to
ensureprepareis not treated aspre+pare," so the description matches
the actual behavior.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `08d2862d-5609-4a27-837a-8361fc51e504` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 6541aa31d9bb364014f691514787204e71d502e0 and 8fdfd63e2b6e169e0c2888c8f8da2432252ec486. </details> <details> <summary>📒 Files selected for processing (6)</summary> * `.changeset/clickhouse-formatting.md` * `.changeset/cold-moles-vanish.md` * `packages/pkg/CHANGELOG.md` * `packages/pkg/package.json` * `packages/sql/CHANGELOG.md` * `packages/sql/package.json` </details> <details> <summary>💤 Files with no reviewable changes (2)</summary> * .changeset/clickhouse-formatting.md * .changeset/cold-moles-vanish.md </details> <details> <summary>✅ Files skipped from review due to trivial changes (3)</summary> * packages/sql/package.json * packages/sql/CHANGELOG.md * packages/pkg/package.json </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
|



This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
[email protected]
Minor Changes
#500
041b9e5Thanks @porada! - feat(prettier-plugin-pkg): Sortpre/postscripts around the base script, except the following cases:[email protected]
Minor Changes
2059ba0Thanks @derN3rd! - feat: add support for clickhouse sql formattingSummary by CodeRabbit