Repository navigation
Use @marko/parse for parsing - #140
DylanPiercey wants to merge 3 commits into
Conversation
🦋 Changeset detectedLatest commit: 116dd25 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 |
|
Warning Review limit reached
On-demand reviews are free for the next 18 days. After that, they cost $0.25 per reviewed file. Or wait 15 minutes for your next included review. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Your 37 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. WalkthroughThe plugin now uses the shared Merge Risk: 🟡 Moderate · up to The PR currently depends on a local 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
40f6437 to
bf8f3ab
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 46: Replace the temporary local link for `@marko/parse` in package.json
with the appropriate semver range for its published release, and regenerate
pnpm-lock.yaml accordingly. Confirm the selected release provides the imports
used by src/ and validate installation from the packed plugin.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2a3e7cbb-9dbf-4eda-a13a-1b595a05966c
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yamland included by**
📒 Files selected for processing (8)
.changeset/use-marko-parse.mdpackage.jsonsrc/index.tssrc/parser.tssrc/utils/get-formatted-body.tssrc/utils/get-parser-name.tssrc/utils/read.tssrc/utils/to-valid-doc.ts
💤 Files with no reviewable changes (1)
- src/parser.ts
| }, | ||
| "dependencies": { | ||
| "htmljs-parser": "^5.12.1" | ||
| "@marko/parse": "link:../language-server/packages/parse" |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/sh
set -eu
node <<'NODE'
const fs = require("node:fs");
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
const dependency = pkg.dependencies?.["`@marko/parse`"];
if (!dependency || dependency.startsWith("link:")) {
throw new Error(
`Expected a published `@marko/parse` version range, got ${dependency}`,
);
}
NODERepository: marko-js/prettier
Length of output: 793
🏁 Script executed:
#!/bin/sh
set -eu
printf '%s\n' '--- package.json dependency and scripts ---'
node <<'NODE'
const fs = require("node:fs");
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
console.log(JSON.stringify({
name: pkg.name,
version: pkg.version,
dependencies: pkg.dependencies,
devDependencies: pkg.devDependencies,
scripts: pkg.scripts,
files: pkg.files
}, null, 2));
NODE
printf '%s\n' '--- repository references to `@marko/parse` and link: ---'
rg -n --glob '!node_modules' --glob '!dist' --glob '!build' '`@marko/parse`|link:../language-server/packages/parse|language-server/packages/parse' . || true
printf '%s\n' '--- workspace and package metadata files ---'
git ls-files | rg '(^|/)(package\.json|yarn\.lock|package-lock\.json|pnpm-lock\.yaml|\.yarnrc|\.npmrc)$' | head -200Repository: marko-js/prettier
Length of output: 2416
🏁 Script executed:
#!/bin/sh
set -eu
printf '%s\n' '--- imported `@marko/parse` exports ---'
rg -n -C 2 'from ["'\'']`@marko/parse`["'\'']' src
printf '%s\n' '--- lockfile entry ---'
sed -n '1,35p' pnpm-lock.yaml
printf '%s\n' '--- published `@marko/parse` metadata ---'
python3 - <<'PY'
import json
import urllib.request
url = "https://registry.npmjs.org/@marko%2Fparse"
with urllib.request.urlopen(url, timeout=10) as response:
data = json.load(response)
print("latest:", data.get("dist-tags", {}).get("latest"))
print("versions:", list(data.get("versions", {}))[-10:])
for version in list(data.get("versions", {}))[-3:]:
package = data["versions"][version]
print(version, {
"exports": package.get("exports"),
"types": package.get("types"),
"main": package.get("main"),
"module": package.get("module"),
})
PYRepository: marko-js/prettier
Length of output: 4459
Replace the temporary link before publishing.
Update package.json and pnpm-lock.yaml to use a semver range for a published @marko/parse release that provides the imports used by src/. Validate a clean install from the packed plugin.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 46, Replace the temporary local link for `@marko/parse`
in package.json with the appropriate semver range for its published release, and
regenerate pnpm-lock.yaml accordingly. Confirm the selected release provides the
imports used by src/ and validate installation from the packed plugin.
bf8f3ab to
3e0fd41
Compare
Slice static statement bodies from the keyword's actual end instead of assuming `static`, document why the root comments list is cleared, downgrade the changeset to a patch and describe the dependency change, and repoint the stale parser feedback item at @marko/parse's errors. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replaces the vendored syntax tree builder with the new shared
@marko/parsepackage (marko-js/language-server#586), the same CST used by the language server,eslint-plugin-markoand (pending)@marko/compiler. All 484 fixtures pass unchanged.Depends on
@marko/parsebeing published — thelink:dependency needs to be swapped for a version range before merge.