chore: config / tooling upgrades and cleanup#476
Conversation
|
3973fe6 to
2277202
Compare
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (24)
WalkthroughUpdated repository configuration and developer tooling: updated Changesets schema, removed legacy Markdown issue templates and added GitHub Issue Forms, simplified the pull request template, and added Dependabot. CI workflow was refactored (concurrency, renamed job, new 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/ISSUE_TEMPLATE/bug-report.yml:
- Around line 20-27: The form field with id "reproduction" currently sets an
unsupported render value ("render: marko") which GitHub ignores; update the
textarea definition (type: textarea, id: reproduction) to either remove the
render attribute entirely so it remains plain text, or replace "marko" with a
supported Linguist language identifier (e.g., "javascript" or "bash") depending
on whether you expect code snippets, ensuring syntax highlighting will work.
In `@package.json`:
- Around line 16-18: The scripts in package.json use non-fail-fast chaining:
update the "format" script to use && instead of ; (change "format": "eslint
--fix .; prettier . --write --log-level=warn" to use &&) and update the
"prepare" script to use && instead of a single & (change "prepare": "husky & npm
run --ws --if-present prepare" to use &&) so that "eslint --fix" and "husky"
must succeed before the next command runs; keep the "lint" script unchanged.
In `@packages/vscode/package.json`:
- Around line 10-15: Update the incorrect package links in package.json: change
the "homepage" value and the "repository.url" value that currently point to
"clients/vscode" so they point to the correct "packages/vscode" location; edit
the "homepage" field and the "repository" object (the "url" string) to use the
repository path with "packages/vscode" instead of "clients/vscode".
- Line 21: The prepare npm script currently uses POSIX-only commands ("mkdir -p"
and "cp -r") which fail on Windows; replace the shell commands in the "prepare"
script with a cross-platform Node-based solution by creating a small Node script
(e.g., scripts/prepare.js) that uses fs.mkdirSync(..., { recursive: true }) and
fs.cpSync or a recursive copy routine to copy ./modules/* into ./node_modules/,
and update the "prepare" script to run that Node script (invoke node
scripts/prepare.js) so the prepare step works on all platforms.
🪄 Autofix (Beta)
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: 5901e2a0-2a0c-4950-83f9-358a6b547296
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.jsonand included by**
📒 Files selected for processing (24)
.changeset/config.json.github/ISSUE_TEMPLATE/Bug_report.md.github/ISSUE_TEMPLATE/Feature_request.md.github/ISSUE_TEMPLATE/bug-report.yml.github/ISSUE_TEMPLATE/feature-request.yml.github/PULL_REQUEST_TEMPLATE.md.github/dependabot.yml.github/workflows/ci.yml.gitignore.prettierignore.prettierrc.jsoncspell.jsoneslint.config.mjspackage.jsonpackages/language-server/build.mtspackages/language-server/package.jsonpackages/language-tools/build.mtspackages/language-tools/package.jsonpackages/type-check/build.mtspackages/type-check/package.jsonpackages/vscode/build.mtspackages/vscode/modules/marko-ts-plugin/package.jsonpackages/vscode/package.jsonpackages/vscode/release.mts
💤 Files with no reviewable changes (3)
- .prettierignore
- .github/ISSUE_TEMPLATE/Feature_request.md
- .github/ISSUE_TEMPLATE/Bug_report.md
2277202 to
f21fa4a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (3)
packages/vscode/package.json (2)
21-21:⚠️ Potential issue | 🟠 MajorReplace the POSIX-only
preparescript.
mkdir -pandcp -rfail under npm's default Windows shells, so this workspace cannot be prepared on Windows. Keep the copy step, but move it into a small Node script.Suggested direction
- "prepare": "mkdir -p ./node_modules; cp -r ./modules/* ./node_modules/", + "prepare": "node ./scripts/prepare-modules.mjs",Implement
scripts/prepare-modules.mjswithfs.mkdirSync(..., { recursive: true })andfs.cpSync(...).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/vscode/package.json` at line 21, The prepare script in package.json uses POSIX-only commands ("prepare": "mkdir -p ./node_modules; cp -r ./modules/* ./node_modules/") which fails on Windows; replace it by creating a Node script (e.g., scripts/prepare-modules.mjs) and update package.json prepare to run "node ./scripts/prepare-modules.mjs". In the new prepare-modules.mjs use fs.mkdirSync("./node_modules", { recursive: true }) and fs.cpSync("./modules", "./node_modules", { recursive: true }) (or copy individual entries) and handle errors/exit codes so the npm prepare step behaves the same. Ensure package.json's prepare script specifically references the new script name.
10-15:⚠️ Potential issue | 🟡 MinorFix the package links and use a real repository descriptor.
homepageandrepository.urlstill targetclients/vscode, but this workspace lives underpackages/vscode. Also,repository.urlshould point at the repo itself; usedirectoryfor the subpath instead of atree/main/...page.Suggested fix
- "homepage": "https://github.com/marko-js/language-server/tree/main/clients/vscode/README.md", + "homepage": "https://github.com/marko-js/language-server/blob/main/packages/vscode/README.md", @@ "repository": { "type": "git", - "url": "https://github.com/marko-js/language-server/tree/main/clients/vscode/" + "url": "git+https://github.com/marko-js/language-server.git", + "directory": "packages/vscode" },🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/vscode/package.json` around lines 10 - 15, Update the package.json metadata so links point to the actual workspace: change "homepage" to the README under packages/vscode (e.g. the README.md path within that package), set "repository.url" to the git repo root (the canonical git+https URL for the repo, not a tree/main page), and add a "repository.directory": "packages/vscode" entry so the repository descriptor references the subpath; update "bugs" only if necessary to the repo's issues URL format. Use the existing keys "homepage", "repository.url", and add "repository.directory" to locate the package correctly.package.json (1)
16-18:⚠️ Potential issue | 🟠 MajorUse fail-fast chaining in the root scripts.
formatkeeps running Prettier after an ESLint failure, andprepareuses single&, which backgroundshuskyon POSIX shells instead of waiting for it before workspace prepares start.Suggested fix
- "format": "eslint --fix .; prettier . --write --log-level=warn", + "format": "eslint --fix . && prettier . --write --log-level=warn", @@ - "prepare": "husky & npm run --ws --if-present prepare", + "prepare": "husky && npm run --ws --if-present prepare",🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@package.json` around lines 16 - 18, The root package.json scripts should use fail-fast chaining: update the "format" script to stop if ESLint fails by replacing the semicolon chain in the "format" script with an AND chain so Prettier doesn't run after an ESLint failure (edit the "format" script definition), and fix the "prepare" script to wait for husky by replacing the single ampersand (&) with && in the "prepare" script so husky runs to completion before workspace prepare runs; keep the "lint" script as-is since it already uses &&.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Line 13: The root NPM "build" script uses POSIX-only env syntax and fails on
Windows; update the "build" script to be shell-agnostic by using cross-env (add
"cross-env" to devDependencies and change the "build" script to prefix with
cross-env NODE_ENV=production) or alternatively move the NODE_ENV production
assignment into the Node build step invoked by the script; target the
package.json "build" script entry when making this change.
---
Duplicate comments:
In `@package.json`:
- Around line 16-18: The root package.json scripts should use fail-fast
chaining: update the "format" script to stop if ESLint fails by replacing the
semicolon chain in the "format" script with an AND chain so Prettier doesn't run
after an ESLint failure (edit the "format" script definition), and fix the
"prepare" script to wait for husky by replacing the single ampersand (&) with &&
in the "prepare" script so husky runs to completion before workspace prepare
runs; keep the "lint" script as-is since it already uses &&.
In `@packages/vscode/package.json`:
- Line 21: The prepare script in package.json uses POSIX-only commands
("prepare": "mkdir -p ./node_modules; cp -r ./modules/* ./node_modules/") which
fails on Windows; replace it by creating a Node script (e.g.,
scripts/prepare-modules.mjs) and update package.json prepare to run "node
./scripts/prepare-modules.mjs". In the new prepare-modules.mjs use
fs.mkdirSync("./node_modules", { recursive: true }) and fs.cpSync("./modules",
"./node_modules", { recursive: true }) (or copy individual entries) and handle
errors/exit codes so the npm prepare step behaves the same. Ensure
package.json's prepare script specifically references the new script name.
- Around line 10-15: Update the package.json metadata so links point to the
actual workspace: change "homepage" to the README under packages/vscode (e.g.
the README.md path within that package), set "repository.url" to the git repo
root (the canonical git+https URL for the repo, not a tree/main page), and add a
"repository.directory": "packages/vscode" entry so the repository descriptor
references the subpath; update "bugs" only if necessary to the repo's issues URL
format. Use the existing keys "homepage", "repository.url", and add
"repository.directory" to locate the package correctly.
🪄 Autofix (Beta)
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: b56449ef-98ef-4f84-858e-a876a1f837d7
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.jsonand included by**
📒 Files selected for processing (24)
.changeset/config.json.github/ISSUE_TEMPLATE/Bug_report.md.github/ISSUE_TEMPLATE/Feature_request.md.github/ISSUE_TEMPLATE/bug-report.yml.github/ISSUE_TEMPLATE/feature-request.yml.github/PULL_REQUEST_TEMPLATE.md.github/dependabot.yml.github/workflows/ci.yml.gitignore.prettierignore.prettierrc.jsoncspell.jsoneslint.config.mjspackage.jsonpackages/language-server/build.mtspackages/language-server/package.jsonpackages/language-tools/build.mtspackages/language-tools/package.jsonpackages/type-check/build.mtspackages/type-check/package.jsonpackages/vscode/build.mtspackages/vscode/modules/marko-ts-plugin/package.jsonpackages/vscode/package.jsonpackages/vscode/release.mts
💤 Files with no reviewable changes (3)
- .prettierignore
- .github/ISSUE_TEMPLATE/Bug_report.md
- .github/ISSUE_TEMPLATE/Feature_request.md
✅ Files skipped from review due to trivial changes (14)
- packages/vscode/modules/marko-ts-plugin/package.json
- .github/ISSUE_TEMPLATE/feature-request.yml
- .changeset/config.json
- .prettierrc.json
- .github/PULL_REQUEST_TEMPLATE.md
- packages/type-check/build.mts
- packages/language-tools/build.mts
- packages/vscode/release.mts
- .github/ISSUE_TEMPLATE/bug-report.yml
- packages/language-server/build.mts
- cspell.json
- packages/language-tools/package.json
- packages/vscode/build.mts
- packages/language-server/package.json
🚧 Files skipped from review as they are similar to previous changes (5)
- .github/dependabot.yml
- .gitignore
- packages/type-check/package.json
- .github/workflows/ci.yml
- eslint.config.mjs
f21fa4a to
fc6834f
Compare
fc6834f to
9be96cb
Compare
No description provided.