Skip to content

Contributing

Benjin Dubishar edited this page Dec 17, 2024 · 17 revisions

Contributor Guide

The instructions below will help you set up your development environment to contribute to this repository. Make sure you've already cloned the repo. 😄

Ways to Contribute

Interested in contributing to the mssql project? There are plenty of ways to contribute, all of which help make the project better.

Getting Started

Installing Dependencies

  1. Install Node.js

From a shell, ensure at least:

  • node >=18 and <=22
  • npm >= 10
$ node -v && npm -v
v18.19.1
10.8.2
  1. Install Yarn
npm install --global yarn

Building and Running

  1. Install all the build dependencies:
# From the repository root:
yarn
  1. Compiling the code
# From the repository root:
yarn run watch
  1. Launch the extension in a new VS Code window

From the "Run and Debug" view in VS Code, run the "Launch Extension" target.

Debugging

Most of the extension code can be debugged directly by setting breakpoints in VS Code. The React-based features, however, are run in isolated webviews, and must be debugged by using the Developer Tools (Help -> Toggle Developer Tools) of the Extension Host window from the "Launch Extension" target. Additional information on developing these React-based features can be found here.

Testing

Tests should be run with changes. Before you run tests, make sure you have built the extension.

# From the repository root:
yarn test

To run the tests within Visual Studio Code, change the debug profile to "Launch Tests" and press F5.

Packaging

Install the Visual Studio Code Extension Manager (VSCE)

Before packaging via gulp, ensure that you have the "vsce" tool installed globally. Otherwise, the package step will fail. This is not needed if you are just building and/or running tests.

# From the repository root:
npm install --global vsce

The package command will package the extension into a .vsix file, which can be installed in any VS Code installation by dragging it into the "Extensions" view. It will also transpile the TypeScript into the out\src and out\test folders.

# From the repository root:
yarn package # offline bundle
yarn gulp package:online # online bundle
  • Offline bundles are VSIX packages which includes all the service dependencies bundled in for offline installation.
  • Online bundles do not include these service dependencies; instead, they will be downloaded when the extension is first launched.

Localization

Localization information here

Contribution License Agreement

In order to contribute, you will need to sign a Contributor License Agreement. All you need to do is to submit a pull request, then the PR will get appropriately labeled (e.g. cla-required, cla-norequired, cla-signed, cla-already-signed). If you already signed the agreement we will continue with reviewing the PR, otherwise system will tell you how you can sign the CLA. Once you sign the CLA all future PR's will be labeled as cla-signed.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Submitting Pull Requests

We welcome pull requests! Fork this repo and send us your contributions. Go here to get familiar with GitHub pull requests.

Before submitting your request, ensure that both yarn gulp build and yarn gulp test succeed.