Skip to content

Commit f874184

Browse files
authored
docs: using new vscode APIs #3702
1 parent 0711965 commit f874184

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,18 @@ Note therefore:
379379
2. `HEAD` implies that the URL depends on the current _default branch_ (i.e.
380380
`master`). Changes to other branches won't affect the marketplace page.
381381

382+
## Using new vscode APIs
383+
384+
The minimum required vscode version specified in [package.json](https://github.com/aws/aws-toolkit-vscode/blob/07119655109bb06105a3f53bbcd86b812b32cdbe/package.json#L16)
385+
is decided by the version of vscode running in Cloud9 and other vscode-compatible targets.
386+
387+
But you can still use the latest vscode APIs, by checking the current running vscode version. For example, to use a vscode 1.64 API:
388+
389+
1. Check the vscode version: `semver.gte(vscode.version, '1.64.0')`
390+
2. Disable the feature if is too old. That could mean just skipping the code entirely, or showing a different UI.
391+
392+
Full example: https://github.com/aws/aws-toolkit-vscode/blob/7cb97a2ef0a765862d21842693967070b0dcdd49/src/shared/credentials/defaultCredentialSelectionDataProvider.ts#L54-L76
393+
382394
## Importing icons from other open source repos
383395

384396
If you are contribuing visual assets from other open source repos, the source repo must have a compatible license (such as MIT), and we need to document the source of the images. Follow these steps:

0 commit comments

Comments
 (0)