Interested in contributing? You can follow the information below to ensure your contribution goes smoothly and is a great experience.
For any contribution we first ask that you file an issue, this helps us keep track of any necessary changes, as well as discuss and agree on a plan of action to ensure landing your changes goes as smoothly as possible.
- Fork into your GitHub account and clone your fork
cd
into and runnpm install
in the directory- Open the project in VS Code
code .
- Open the debug tab, select the "Extension" debug target and click "Start Debugging" (the green play icon).
cd
into and runnpm install
in the directory- Open the project in VS Code
code .
- Open the debug tab, select the "Extension + Debugger" debug target and click "Start Debugging" (the green play icon).
- Configure your Titanium project for debugging, and add
"debugServer": 4711
to your launch configuration. For example:
{
"name": "Launch on iOS",
"type": "titanium",
"request": "launch",
"platform": "ios",
"debugServer": 4711
}
You're now up and running with the extension running in another workspace. When you make changes to the TypeScript the watch task will automatically compile then for you, and you just need to reload the extension yourself using the green restart button on the main window, or by click Cmd+R
(Windows: Ctrl+R
) in the extension window. If you're debugging the debugger and the extension make sure to select the correct target in the Debug Toolbar when reloading.
If you want to test debugging from the build tree view, then you will need to set the debugServer
property in the debug configuration passed to the vscode.debug.startDebugging
call in the Debug command
There are two type of tests in the extension, unit tests and integration tests. Unit tests focus on testing the smaller utilities function that are used in the code, whereas the integration tests focus on testing the areas where we depend on interaction with tooling.
All tests are written using mocha and chai expect.
Unit tests live under the src/test/unit
folder, you can run these tests using the npm run test
command or one of the Extension Tests
launch configurations.
Integration tests live under the src/test/integration
folder, you can run these tests using the runUITests.sh
script in the root of the project. The automation is written using vscode-extension-tester, you can find a guide to using the automation package in their wiki.
The tests run outside of VS Code in a node process, so you are unable to use any code that references the vscode
package.
A lot of features in VS Code are statically defined in the package.json. For example, task definitions, debug configurations, commands etc. To ensure that our documentation is always correct, and to remove the maintenance burden we generate the specific parts of the documentation from this content.
Because of this, the markdown files in docs
should not be edited directly. Instead edit the files in scripts/templates
and then run the npm run generate-docs
script to update the content in docs
.
When sending in a PR please make sure you do the following:
- Commit using
npm run commit
, making sure to reference your issue ID when the prompting asks.- This ensure that the commit follows the Conventional Commits standard used by the project. This is validated on a
git commit
using git hooks via husky.
- This ensure that the commit follows the Conventional Commits standard used by the project. This is validated on a
npm run lint
passes- This is also validated on a
git commit
using git hooks via husky.
- This is also validated on a
- When making the PR, please make sure to contain as much relevant info as possible in the PR body.
- Make sure to sign the CLA.
Releasing should generally be done through GitHub actions which is described below. However the "manual" process is also documented.
💡 The token used for the VSCE_PAT
variable must have an expiry date. The maximum time it can last for is 1 year. The current token in CI is associated with Ewan Harris (@ewanharris) and will expire on 2024/08/09
- Navigate to the Release workflow
- Trigger a workflow run and wait for the run to finish
- Verify the release is published on the VS Code marketplace and GitHub releases
- Ensure that your local
master
branch is completely up to date with the main repo. - Validate the following environment are set:
GITHUB_TOKEN
- An access token that can push to the tidev/vscode-titanium repository. Follow this documentation for how to create this.VSCE_PAT
- An access token that is able to publish to VS Code Marketplace. Follow this documentation for how to create this.
- Run
npm run release
, which performs the following:- Runs
scripts/render.js
to ensure the documentation is up to date. - Runs standard-version to bump versions based on commit messages, updates the changelog, commits the files and tags a new release, publishes to VS Code Marketplace.
- Runs
- Verify the release is published on the VS Code marketplace and GitHub releases