Skip to content

Commit

Permalink
Migrate to builtin authentication provider & remove Configure Pipelin…
Browse files Browse the repository at this point in the history
…e support (#595)

* Remove Azure Accounts dependency & delete configure flow

* Don't bring in a new package for one API call

* Only run MSA logic on MSAs

* Account for the non-MSAL case

* Further remove references to Configure Pipeline

* Remove leftover comment

* Use modern versions of vsce

* Bump compilation target

VS Code 1.82/Node 18 supports all the way up to ES2022.

* Also remove uuid dependency

* Switch to @vscode/test-cli

* Provide a fast path for the single org scenario

And use clearSessionPreference when the wrong account is used

* Remove unused telemetry keys

* Add user agent info

* Add Extension Test Runner as a recommended extension
  • Loading branch information
winstliu authored Oct 1, 2024
1 parent f71d2c0 commit 6c788db
Show file tree
Hide file tree
Showing 58 changed files with 2,433 additions and 5,829 deletions.
4 changes: 2 additions & 2 deletions .azure-pipelines/common-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ steps:

# Acquire the `vsce` tool and use it to package
- script: |
npm install -g vsce
vsce package --githubBranch main
npm install -g @vscode/vsce
vsce package
displayName: Create VSIX

- script: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage
dist
out
node_modules
Expand Down
16 changes: 16 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// @ts-check

import { defineConfig } from '@vscode/test-cli';
import path from 'path';

export default defineConfig({
files: 'out/test/**/*.test.js',
workspaceFolder: path.join(import.meta.dirname, 'src', 'test', 'workspace'),
mocha: {
timeout: 100000,
},
coverage: {
reporter: ['cobertura', 'text', 'html'],
output: './coverage',
}
});
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
}
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"testConfiguration": "${workspaceFolder}/.vscode-test.js",
"args": [
"${workspaceFolder}/src/test/workspace",
"--extensionDevelopmentPath=${workspaceFolder}",
Expand Down
3 changes: 2 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

.gitattributes
.gitignore
.vscode-test.mjs
tsconfig.json
tslint.json
webpack.config.js
.azure-pipelines/
.vscode/
.vscode-test/
coverage/
dist/**/*.map
examples/
node_modules/
Expand Down
28 changes: 0 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,38 +56,10 @@ Add this to your `settings.json`:

Both format on save and the `Format document` command should now work!

## Pipeline configuration

![Configure Pipeline Demo](https://raw.githubusercontent.com/microsoft/azure-pipelines-vscode/main/resources/configure-pipeline.gif)

To set up a pipeline, choose *Azure Pipelines: Configure Pipeline* from the command palette (Ctrl/Cmd + Shift + P) or right-click in the file explorer. The guided workflow will generate a starter YAML file defining the build and deploy process.

You can customize the pipeline using all the features offered by [Azure Pipelines.](https://azure.microsoft.com/services/devops/pipelines/).

Once the setup is completed, an automatic CI/CD trigger will fire for every code push. To set this up, the extension will ask for a GitHub PAT with *repo* and *admin:repo_hook* scope.

![GitHub PAT scope](resources/gitHubPatScope.png)

## Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkID=528096&clcid=0x409) to learn more. If you don’t wish to send usage data to Microsoft, you can set the `telemetry.enableTelemetry` setting to `false`. Learn more in our [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).

## Troubleshooting failures

- **Selected workspace is not a Git repository**: You can configure a pipeline for a Git repository backed by GitHub or Azure Repos. Initialize your workspace as a Git repo, commit your files, and add a remote to GitHub or Azure Repos. Run the following commands to configure git repository:

`git init`

`git add *`

`git commit -m <commit-message>`

`git remote add <remote-name> <remote-url>`

- **The current branch doesn't have a tracking branch, and the selected repository has no remotes**: You can configure a pipeline for a Git repository backed by GitHub or Azure Repos. To add a new remote Git repository, run `git remote add <remote-name> <remote-url>`

- **Failed to determine Azure Repo details from remote url**: If you're configuring a pipeline for a Git repository backed by Azure Repos, ensure that it has a remote pointing to a valid Azure Repos Git repo URL.

## Extension Development

If you are only working on the extension (i.e. syntax highlighting, configure pipeline, and the language client):
Expand Down
Loading

0 comments on commit 6c788db

Please sign in to comment.