microsoft / microsoft/vscode-documentdb
WIP: Publish TS server plugin as standalone npm package
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 31
- Forks
- 22
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 21
Description
Overview
This issue collects work items for publishing the scratchpad TS server plugin (documentdb-scratchpad-ts-plugin) as a standalone npm package with its own release pipeline.
Currently, the plugin is bundled inline by webpack and requires a runtime node_modules stub created during extension activation (see ClustersExtension.ts). This workaround exists because:
- VS Code's
typescriptServerPluginsresolves plugins vianode_modules/<name>under the extension root @vscode/vscehardcodesignore: 'node_modules/**'in its file collection, so the stub cannot be shipped inside the VSIX- The official VS Code docs recommend TS plugins be published as separate npm packages listed in
dependencies
Steps (to be expanded)
- Publish
documentdb-scratchpad-ts-pluginas an npm package (private or scoped) - Add it as a production
dependencyinpackage.json - Remove the runtime stub creation code from
ClustersExtension.ts(marked withTODO) - Remove the
--no-dependenciesflag fromvsce package(or usepackagedDependenciesto include only the plugin) - Remove the webpack entry point for
scratchpadTsPluginand the CopyWebpackPlugin stub entry (if still present) - Verify the plugin loads correctly from the shipped VSIX in all environments
References
- Runtime stub code:
src/documentdb/ClustersExtension.ts(search forTODO: Remove this runtime stub) - Plugin source:
src/documentdb/scratchpad/tsPlugin/index.ts - VS Code docs: contributes.typescriptServerPlugins
- Vue/Volar uses the same runtime stub pattern: vuejs/language-tools
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/documentdb/ClustersExtension.ts and search for TODO: Remove this runtime stub, then inspect src/documentdb/scratchpad/tsPlugin/index.ts and the package and webpack configuration. Verify how the plugin is packaged and loaded from the VSIX. Done means the standalone package is included as a production dependency, the runtime stub and obsolete webpack entries are removed, and the plugin loads in all environments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript, vscode, webpack
- Domain
- build-system, devtools, release
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100