Repository navigation
feat(prettier-plugin-sh): ✨ support zsh dialect via sh-syntax@^0.6.0 - #512
Conversation
🦋 Changeset detectedLatest commit: ad408bc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
📝 WalkthroughWalkthroughUpgrades the ChangesZsh dialect support
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
I ran $ yarn build && echo "✅ build" && yarn lint && echo "✅ lint"
✅ build
✅ lint@JounQin, would you mind running the CI actions? Thanks! |
prettier-plugin-autocorrect
prettier-plugin-pkg
prettier-plugin-sh
prettier-plugin-sql
prettier-plugin-toml
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #512 +/- ##
=======================================
Coverage 87.28% 87.28%
=======================================
Files 10 10
Lines 236 236
Branches 66 66
=======================================
Hits 206 206
Misses 29 29
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



🎯 Summary
prettier-plugin-shby upgradingsh-syntaxto^0.6.0.${0:A:h:h}(parameter modifier chains) previously failed withternary operator missing ? before :; it now formats correctly under the newzshvariant.sh-syntaxto0.6.0#511.🔗 Upstream
[email protected], which rebuilds the WASM againstmvdan/shv3.13.1 and exposes aLangZshvariant.ternary operator missing ? before :— vendoredmvdan/shversion has no zsh dialect sh-syntax#135🛠️ Changes
sh-syntax^0.5.8→^0.6.0(packages/sh/package.json,yarn.lock).LangVariant.LangZshto thevariantoptionchoicesinpackages/sh/src/index.ts.Invalid variant value. Expected 1, 2, 4, 8 or 32, but received 16.packages/sh/test/zsh.spec.tscovering theLangZshconstant and formatting of a zsh modifier chain.mvdan/shv3.13 now backtick-quotes tokens in parse errors, so:test/error.spec.ts:encountered )→encountered `)`test/__snapshots__/fixtures.spec.ts.snap(445.sh):closing quote '→closing quote `'`minorbump forprettier-plugin-sh.✅ Verification
yarn build✅yarn lint:es✅yarn lint:tsc✅yarn test✅ (83/83)foo(){ echo ${1:t}; }→foo() { echo ${1:t}; },${0:A:h:h}preserved.📝 Notes
LangVariantnumeric values changed upstream (now1 << iotabit flags), but this plugin references the exported constants, so no numeric values are hard-coded here.languages.tsis unaffected.Summary by CodeRabbit
New Features
Bug Fixes