fix #329 - feat: Create the language-service package - #376
Conversation
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
✅ Deploy Preview for openworkflow-editor canceled.
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a new internal @openworkflowspec/language-service package (built on @volar/language-service) intended to serve as the shared foundation for upcoming JSON/YAML language services.
Changes:
- Add a new
packages/language-servicepackage that re-exports Volar language-service APIs and includes a basic unit test. - Wire up build/test tooling for the new package (Vite/Vitest/TS config + lint/format configs).
- Add Volar dependency management and enforcement via workspace catalog + Syncpack ban rules.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds @volar/language-service to the workspace catalog. |
| pnpm-lock.yaml | Records the new package importer and Volar-related dependency graph. |
| packages/language-service/vitest.config.ts | Adds Vitest configuration for the new package. |
| packages/language-service/vite.config.ts | Adds Vite library build configuration for the new package. |
| packages/language-service/tsconfig.json | Adds TS config for declaration output and build layout. |
| packages/language-service/tests/languageService.test.ts | Adds a basic test asserting the Volar re-export exists. |
| packages/language-service/src/volar/index.ts | Re-exports createLanguageService + key types from @volar/language-service. |
| packages/language-service/src/index.ts | Exposes the Volar submodule as the package public surface. |
| packages/language-service/README.md | Documents package purpose, architecture, and development commands. |
| packages/language-service/package.json | Defines package metadata, scripts, and dependencies. |
| packages/language-service/.oxlintrc.json | Enforces “Volar imports only under src/volar/”. |
| packages/language-service/.oxfmtrc.json | Hooks formatter config to the repo defaults. |
| .syncpackrc.json | Adds a rule banning Volar deps outside @openworkflowspec/language-service. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 13 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
packages/language-service/.oxlintrc.json:19
- The README says imports from
@volar/*are prevented outsidesrc/volar/, but this Oxlint override only targetssrc/**/*sotests/**can still import Volar directly. If the intent is to enforce the architecture across the package (including tests), expand the override to cover the test files too (and consider matching subpath imports with@volar/**).
"files": ["src/**/*.{ts,tsx}"],
"excludeFiles": ["src/volar/**"],
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 13 out of 14 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
packages/language-service/README.md:25
- README claims Oxlint prevents
@volar/*imports outsidesrc/volar/, but the current oxlint override only applies tosrc/**/*.{ts,tsx}(and excludessrc/volar/**), sotests/**is not covered by that restriction. Update the wording so the documentation matches the enforced rule, or extend the lint override to include tests if that’s the intent.
Volar-specific code is isolated under `src/volar/`. Imports from `@volar/*` outside this directory are prevented by Oxlint.
Closes #329
Description
Language service spike: #209
Create
packages/language-service(@openworkflowspec/language-service), based on@volar/language-service, to provide the common foundation for the JSON and YAML language services.Motivation
Provide the common, editor-agnostic package foundation required to implement Open Workflow-specific authoring assistance.
How to test:
pnpm --filter @openworkflowspec/language-service test