For a long time the account id wasn't handled correctly. It should be a string, but the API returns a number. This ensures it's a string and does some migration logic.
* feat: move from yarn to npm
* chore: skip yarn.lock files
* fix: playwright download
* chore: fix compile and hygiene
* chore: bump vsce@2.17.0
Refs 8b49e9dfdf
* test: update results for bat and sh colorizer tests
* fix: add missing lock files for windows
* fix: switch to legacy-peer-deps
* chore: update markdown-it@14.1.0
Refs 737c95a129
esbuild step in extensions-ci-pr was previously using markdown-it
from root which had userland punycode and was able to compile successfully.
* ci: increase pr timeout for windows integration tests
* chore: fix product build
* build: ignore extension dev dependency for rcedit
* build: fix working directory inside container
* build: fix dependency generation
* npm: update dependencies
* ci: use global npmrc
* ci: update cache
* ci: setup global npmrc for private npm auth
* build: fix extension bundling
* chore: sync npm dependencies
* ci: debug env variables for container
* ci: fix win32 cli pipeline
* build: fix npmrc config usage for build/ and remote/ dirs
* fix: windows build
* fix: container builds
* fix: markdown-language-features tests and bundling
```
[03:58:22] Error: Command failed: /Users/demohan/.nvm/versions/node/v20.15.1/bin/node /Users/demohan/github/vscode/extensions/markdown-language-features/esbuild-notebook.js --outputRoot /Users/demohan/github/vscode/.build/extensions/markdown-language-features
✘ [ERROR] Could not resolve "punycode"
extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
14 │ var punycode = require('punycode');
╵ ~~~~~~~~~~
The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```
Adds userland package based on beed9aee2c
* fix: container builds for distro
* chore: update yarn occurrences
* fixup! chore: bump vsce@2.17.0
Uses the closest version to `main` branch that does not
include d3cc84cdec
while still having the fix 8b49e9dfdf
* chore: sync npm dependencies
* chore: sync npm dependencies
* chore: sync npm dependencies
* chore: throw error when yarn is used for installation
* chore: add review feedback
* chore: switch exec => run where needed
* chore: npm sync dependencies
* fix: markdown-language-features bundling
```
✘ [ERROR] Could not resolve "punycode"
extensions/markdown-language-features/node_modules/markdown-it/lib/index.js:14:27:
14 │ var punycode = require('punycode');
╵ ~~~~~~~~~~
The package "punycode" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
```
Adds missing userland package based on markdown-it/markdown-it@beed9ae,
can be removed once we update markdown-it >= 14.1.0
* ci: rename no-yarn-lock-changes.yml
* chore: sync npm dependencies
* ci: restore no-yarn-lock-changes.yml
We can disable it in a separate PR to keep the required
checks happy and also need workflow edit perms.
* chore: sync npm dependencies
* ci: rebuild cache
* ci: fix no-package-lock-changes.yml
* chore: bump distro
* chore: rm yarn.lock files
* chore: rm yarn.lock files without dependencies
* chore: add vscode-selfhost-import-aid to postinstall dirs
* chore: bump distro
So that all auth providers can take advantage of this logic. This basically will do a light enforcement that the account you signed in to matches the account that was requested (if it was specified).
This is needed for finalization.
* Fix some always true/false errors in codebase
Testing out latest TS nightly that can identify when an expression is always true/false. This caught a few likely coding mistakes in our codebase
Unsure about the intent in some of these cases but I've tried my best to understand them. Pinging relevant code owners for the confusing cases
* Bump TS version
* Fix unreachable in build scripts
* Bump versions
* restore intent
* Revert package.json change
* Fixing a few new layer checker errors
These are global in node now
* Skip lib check in integration project
* One more skiplibcheck
* More skip lib
---------
Co-authored-by: Benjamin Pasero <benjamin.pasero@gmail.com>
It seems like this event fires in Codespaces... my _guess_ is that Codespaces basically overwrites all the settings from settings sync which causes this event to fire.
It's surprising to me that this event fires even though the value hasn't changed.
I can't repro this with the test resolver, and I also cant have Codespaces use Code - OSS, so we'll just have to see how this goes.
This _should_ do the trick though.
Fixes https://github.com/microsoft/vscode/issues/223508
* Have select account picker include accounts that don't match requested scopes (this will run `createSession` for that chosen account)
* Implement multi-account GitHub support behind a setting
The flows are crucial to the extension and I wanted to be able to declare which can be used when in a declarative way. This reworks the flows into that model.
Additionally, it pulls in the Client ID and secret from a config which will allow us to not rely on the vscode.dev proxy on Desktop (because we can make a distro change that includes the secret... which isn't a real secret, says GitHub)... unfortunately we still need to rely on it for Web due to CORS but we're in a position where it will be easy to rip the proxy out when GH supports it.
We don't need to fetch the user details when the Auth Session already has the info we need. This PR removes that extraneous web request.
I've also changed the `User-Agent` that we pass to be more specific so we can narrow down any future issues with spamming web requests.
Fixes#173645
* Organize Errors in GitHub Auth and make sure no double prompting happens
This mostly just moves some strings into variables... but this also fixes the GH Auth side of https://github.com/microsoft/vscode/issues/180697 so you should only be asked once if you want to try a different way to log in.
* add comments
* Improve GHES flow
It's clear to me now that a lot of users of the GHES flow have auth behind a VPN. Something that we cannot support in the OAuth flow because we require making a request to vscode.dev who makes a request to the GHES instance.
In light of this, we will remove the OAuth flow for GHES. Fear not, though... because both the Device Code Flow and the PAT flow are there and the PAT flow has been improved in 1.75... so in conclusion, I think GHES is handled as best we can with this PR.
Additionally, there is some "Hosted GitHub Enterprise" scenarios popping up, and this future proofs that by allowing "Hosted GitHub Enterprise" experiences to go through the OAuth flow because we know for a fact that they will be accessible from vscode.dev.
Fixes#169619
Fixes https://github.com/microsoft/vscode-internalbacklog/issues/3398
* Use api. sub domain and update telemetry logic
This improves the PAT auth flow by showing a modal to open github.com with the scopes already pre-filled.
This should allow for less room for error during the PAT auth.
Additionally, this allows PAT auth flow to be used as a fallback for GH Enterprise flows.
1. Namespace secrets based on the value of github-enterprise.uri to support "multiple separate GHES instances"
2. If the setting value disappears, continue using last set value. Fixes https://github.com/microsoft/vscode-pull-request-github/issues/3992
3. Mark github-enterprise.uri as requires trust
3. Refactoring like:
* UriHandler is handled in extension.ts and passed down everywhere since we can only have 1 instance of it
* misc style (`private` usage, better `disposable` handling)
Web will come in the next PR (hence the TODO)
Also this includes the smallest translation change which will be the ultimate test that this is all working.