Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for separating the vscode tools from the vscode API #970

Closed
egamma opened this issue Dec 3, 2015 · 3 comments
Closed

Proposal for separating the vscode tools from the vscode API #970

egamma opened this issue Dec 3, 2015 · 3 comments
Assignees
Labels
plan-item VS Code - planned item for upcoming
Milestone

Comments

@egamma
Copy link
Member

egamma commented Dec 3, 2015

Currently the vscode node module combines the tools and the vscode API into one unit, we want to decouple the API from the used modules.

Support that the vscode tools and its API can evolve separately.

@egamma egamma added the plan-item VS Code - planned item for upcoming label Dec 3, 2015
@egamma egamma added this to the Dec 2015 milestone Dec 3, 2015
@egamma egamma mentioned this issue Dec 3, 2015
34 tasks
@bpasero bpasero changed the title Proposal for separating the vscode tools form the vscode API Proposal for separating the vscode tools from the vscode API Dec 13, 2015
@bpasero bpasero modified the milestones: Jan 2016, Dec 2015, Backlog Dec 14, 2015
@bpasero bpasero modified the milestones: Backlog, Jan 2016 Jan 5, 2016
@egamma egamma mentioned this issue Jan 6, 2016
59 tasks
@bpasero bpasero modified the milestones: Jan 2016, Backlog Jan 8, 2016
@bpasero
Copy link
Member

bpasero commented Jan 8, 2016

Here is the proposal that you can already try out by installing the generator from the next branch:

npm install --g generator-code@next

  • an extension is now generated with a npm post install script that will download the correct version of vscode.d.ts depending on the engine field of the extension
  • the logic to find the right version to download is by applying a semver check and taking the smallest vscode version that qualifies the engine version
  • you can specify to depend on vscode: "*" and this will pull down the vscode.d.ts as we have it on master

To not break existing extensions, we publish the vscode module as version 0.2.0.

In order for existing extensions to adopt this change:

  • change dependency of vscode to 0.2.0
  • add the following scripts section to package.json:
"scripts": {
   "postinstall": "node ./node_modules/vscode/bin/install"
}
  • adjust the engine field for vscode depending on API needs
  • run npm install to pull down the correct vscode.d.ts version

Note: If you leave the engine field for vscode the way it was (^0.10.1), you will end up with an old vscode.d.ts that does not have our latest documentation. Therefor it is recommended to change the engine field to ^0.10.6.

@felixfbecker
Copy link
Contributor

@bpasero Should vscode be a dependency or a devDependency?

@bpasero
Copy link
Member

bpasero commented Mar 11, 2016

@felixfbecker devDependencies

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
plan-item VS Code - planned item for upcoming
Projects
None yet
Development

No branches or pull requests

3 participants