You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Tests live in `extensions/vscode/tests/` and `packages/*/tests/` using vitest + `jest-mock-vscode` + `msw` for HTTP mocking.
12
+
Monorepo (pnpm workspaces) for VS Code extension around [npmx.dev](https://npmx.dev). Uses `reactive-vscode` for reactivity, `tsdown` for bundling, Volar for language server. Tests are colocated (`.test.ts` next to source).
13
+
14
+
### Workspaces
15
+
-`extensions/vscode/` — thin client (language client, commands, providers). Commands in `src/commands/` must NOT import `reactive-vscode`; use `vscode` API directly.
│ └── utils/ # Service utilities (with colocated tests)
119
+
└── language-server/ # Language server (Volar)
120
+
└── src/
121
+
├── server.ts # Server setup
122
+
└── workspace.ts # Server workspace handling
123
+
playground/ # Playground for testing
124
+
res/ # Assets (e.g. marketplace icon)
117
125
```
118
126
119
127
### Key concepts
120
128
121
-
-**Extractor**– Parses a supported file (`package.json`, `pnpm-workspace.yaml`, `.yarnrc.yml`) and extracts dependency information with AST ranges. Each file format has its own extractor in `extensions/vscode/src/core/extractors/`.
129
+
-**Extractor**– Parses a supported file (`package.json`, `pnpm-workspace.yaml`, `.yarnrc.yml`) and extracts dependency information with AST ranges. Each file format has its own extractor in `packages/language-core/src/extractors/`.
122
130
-**WorkspaceContext**– Holds per-workspace-folder state: detected package manager, resolved catalogs, and memoized dependency info. Created lazily and invalidated when workspace-level files change.
123
-
-**ResolvedDependencyInfo**– A dependency with its protocol resolved (e.g., `catalog:` → actual version, `npm:alias@version` → underlying package). Providers consume resolved dependencies instead of raw AST data.
124
-
-**Provider**–VS Code language feature (hover, completion, diagnostics, etc.) that operates on resolved dependencies.
131
+
-**ResolvedDependencyInfo**– A dependency with its protocol resolved (e.g., `catalog:` → actual version, `npm:alias@version` → underlying package). Plugins consume resolved dependencies instead of raw AST data.
132
+
-**Plugin**–A Volar language service plugin (hover, completion, diagnostics, etc.) in `packages/language-service/` that operates on resolved dependencies.
0 commit comments