Commit graph

15020 commits

Author SHA1 Message Date
Ladislau Szomoru 31e597ccdd
Git - only compute incoming changes decorations when needed (#228611) 2024-09-14 00:49:13 +02:00
Ladislau Szomoru a8343f15fa
Git - retrieve references as part of updating the model (#228609)
* Git - retrieve references as part of updating the model

* Remove extra import
2024-09-13 15:31:26 -07:00
Ladislau Szomoru 056af29c9b
SCM Graph - Add "Go to Current History Item" action (#228600)
* Reveal current history item if it is already part of the tree

* Fetch current history item
2024-09-13 23:35:29 +02:00
Tyler James Leonhardt 6bd8e90fb7
Misc fixes for Sovereign Clouds (#228591)
* Misc fixes for Sovereign Clouds

* For now, use the URL handler since the main flow doesn't work right now because the localhost redirect url needs to be in those environments
* Includes the name of the cloud in the PCAs so that we have separation between the auth providers
* extra logging for the URL Handler

* fix tests
2024-09-13 21:57:12 +02:00
Ladislau Szomoru 597b5e965b
SCM Graph - Add more commands to the context menu (#228480)
* SCM Graph - add "Checkout (Detached)" command

* Add "Cherry Pick" command
2024-09-13 15:36:52 +02:00
Ladislau Szomoru 4376d38fcd
SCM Graph - Add "Create Branch..." command to the history item context menu (#228438) 2024-09-13 12:15:16 +02:00
Ladislau Szomoru 8a9caf323a
SCM Graph - Add "Create Tag" action to history item context menu (#228428) 2024-09-13 10:17:44 +02:00
Tyler James Leonhardt db2a1df708
Use an EventBufferer to ensure only one event across PCAs (#228400) 2024-09-13 01:24:41 +02:00
Don Jayamanne c4645ea0ec
Restore changes to ipynb extension to serialize notebook in node worker for desktop (#228319)
* Revert usage of node worker due to failing web compilation

* Revert "Revert usage of node worker due to failing web compilation"

This reverts commit 3190f58c7e.

* Ensure node worker is used only in desktop bundle of ipynb extension

---------

Co-authored-by: Aaron Munger <aamunger@microsoft.com>
2024-09-12 23:56:34 +02:00
Ladislau Szomoru adc7335b1d
SCM Graph - fix action item title and order (#228380) 2024-09-12 21:23:31 +02:00
Alex Ross e4ffea4865
Add test for issue with new YAML grammar (#228265)
Part of #224862
2024-09-12 14:32:06 +02:00
Ladislau Szomoru 1d3895d045
SCM Graph - better handling of graph refresh (#228329)
* Initial implementation

* Removed refs should be also removed from the filter
2024-09-12 12:06:25 +02:00
Don Jayamanne 102ff8db3f
Revert usage of node worker due to failing web compilation (#228318)
* Revert usage of node worker due to failing web compilation

* fix linter error
2024-09-12 17:44:02 +09:00
Peng Lyu 94cd4ed34c
Merge pull request #226632 from nojaf/notebook-serialization-worker
Use Worker to serialize Notebook
2024-09-11 17:36:51 -07:00
Tyler James Leonhardt b8be82f239
Workaround MSAL behavior (#228289)
* Workaround MSAL behavior

The main change this makes is around what scopes are being requested.

Due to an MSAL or Identity issue, if you request a resource like `FOO/user_impersonation` and then `email`... the 2nd call does not use Graph and instead uses FOO and FOO may not have an `email` scope available. To work around this, if we detect that all scopes being requested are [OIDC scopes](https://learn.microsoft.com/en-us/entra/identity-platform/scopes-oidc#openid-connect-scopes) then we tack on `User.Read` to make sure that what gets returned is in fact from Graph. This prevents an infinite loop that was happening before. MSAL/Identity should fix this behavior, but this works for now.

Additionally, MSAL does already tack on OIDC scopes to all requests so I removed the logic that adds those.

Couple small things:
* Make sure MSAL logs get logged (trace)
* Use a Sequencer to make sure acquireToken calls are done sequentially just in case.

* more comment
2024-09-12 02:29:29 +02:00
Matt Bierner 94d5b2a31e Remove ts-expect-error 2024-09-11 14:49:06 -07:00
Aaron Munger 28692d5be4
Merge branch 'main' into notebook-serialization-worker 2024-09-11 14:27:43 -07:00
Matt Bierner 5df28bfd6a
Merge branch 'main' into noisy-piranha 2024-09-11 14:11:49 -07:00
Matt Bierner dcbea4aaaf
Merge branch 'main' into fix-226095-transparency-grid-zoom 2024-09-10 16:56:11 -07:00
Ladislau Szomoru 0485695683
Git - fix remote reference id (#228164)
* Git - fix remote reference id

* Remove unnecessary code
2024-09-11 00:40:22 +02:00
Ladislau Szomoru ff86643196
Git - clean-up history provider (#228148) 2024-09-10 21:43:46 +02:00
Ladislau Szomoru 2a27ab1e48 Fix typo 2024-09-10 15:07:54 +02:00
Ladislau Szomoru c2c032e0da SCM - 💄 remove SourceControlHistoryItemGroup from the API proposal 2024-09-10 14:46:12 +02:00
Ladislau Szomoru fea0aa298b
Git - only calculate branch merge base on checkout (#228066) 2024-09-10 08:45:20 +02:00
Tyler James Leonhardt c4d1cc2e67
Fix GitHub account ids being numbers (#228045)
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.
2024-09-10 04:39:37 +02:00
Ladislau Szomoru d8af24e15d
SCM - wire-up the onDidChangeHistoryItemRefs event (#228042)
Wire-up the event
2024-09-09 16:51:31 -07:00
Matt Bierner a07d021fe8 Pick up TS 5.6 final
Fixes #227481
2024-09-09 16:01:20 -07:00
Raymond Zhao dc9412125d
chore: bump micromatch (#228005) 2024-09-09 09:59:31 -07:00
Tyler James Leonhardt 1349397cf7
Remove vscode-nls-dev dependency (#228002)
This was when extensions used the old localization stuff. None of this is used anymore.
2024-09-09 18:28:32 +02:00
Don Jayamanne edd3903933
Updates 2024-09-10 01:19:53 +10:00
Ladislau Szomoru 3f0893b273
SCM - cleanup history provider proposed API (#227960) 2024-09-09 14:40:56 +02:00
hj 88d7b97c93
chore: rm unreached ignore items when build extensions. (#227906)
chore: rm unreached ignore items when compiling extensions.
2024-09-09 10:32:51 +00:00
Ladislau Szomoru 3ab41c2f69
SCM Graph - add branch picker (#227949)
* WIP - saving my work

* Extract HistoryItemRef picker

* Extract Repository picker

* Improve history item ref picker rendering

* Refactor color map

* Refresh the graph when the filter changes

* Push minor fix
2024-09-09 12:02:31 +02:00
Don Jayamanne 692656799a
Safer way to determine whether node or browser 2024-09-09 12:07:43 +10:00
Don Jayamanne 1865c2979d
Import node worker 2024-09-09 11:48:21 +10:00
Don Jayamanne ddd0f1fe34
Updates to perform all operations in worker 2024-09-09 11:37:44 +10:00
Peng Lyu fc8fda56e5 fix worker import 2024-09-06 22:16:04 -07:00
Tyler James Leonhardt 533d8ec6a5
Rework eventing for PCAs and fix a few bugs along the way (#227854)
A big change, but a good one... This addresses some core issues around how we manage multiple PublicClientApplications (which are an object that should be created for each set of clientId,authority). Previously, we were doing some pretty nasty things to detect when a new PCA was created/deleted and as a result it would cause infinite loops and the likes...

Now we've focused on managing that in SecretStorage by looking for a `publicClientApplications` key. This is all encapsulated in the new `PublicClientApplicationsSecretStorage`.

Since we no longer relied on that hack, we still needed some way to have a PCA inform that:
* accounts have changed
* the last account was removed (signaling that this PCA could be disposed of in `PublicClientApplicationsSecretStorage`)

Both of these events have been added to `CachedPublicClientApplication` (now in its own file) and are being used. (replacing the old `_accountChangeHandler` which was hacky... true events are cleaner).

Last thing in the eventing space is that I try to minimize calls to `_storePublicClientApplications` so to not spam events across SecretStorage. You can see this in my usage of `_doCreatePublicClientApplication` over `getOrCreate`.

Couple random other things:
* `changed` accounts are properly bubbled up in `_onDidChangeSessionsEmitter` which is needed when a token is refreshed
* `getSessions` when no scopes are passed in no longer causes new tokens to be minted
* we use to only remove the first account we found but in some cases there may be the same account across different PCAs, so there's a `return` that's removed in `authProvider.ts` that fixes this bug
* Logging is clearer and more verbose (in a good way)
2024-09-06 21:03:25 -07:00
Peng Lyu 65f36ead2a Merge remote-tracking branch 'origin/main' into pr/nojaf/226632 2024-09-06 11:39:00 -07:00
Tyler James Leonhardt 9d28a232cb
Bump MSAL Node (#227815) 2024-09-06 18:39:14 +02:00
Benjamin Pasero 6f1101d812
Ignore tsserver requests for createDirectoryWatcher(~/Library) on macOS (#227788)
* Ignore tsserver requests for createDirectoryWatcher(~/Library) on macOS

* update deps

---------

Co-authored-by: Aman Karmani <aman@tmm1.net>
2024-09-06 16:25:54 +02:00
Robo b5a6aa14a8
feat: switch to npm as default package manager (#226927)
* 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
2024-09-06 22:18:02 +09:00
Ladislau Szomoru 5ae8ffb7e3
SCM Graph - set the groundwork to show all history item groups (#227780) 2024-09-06 15:12:48 +02:00
Florian Verdonck f7e0eabb6d
Update extensions/ipynb/package.nls.json
Co-authored-by: Aaron Munger <aaron.munger@gmail.com>
2024-09-05 22:17:11 +02:00
Benjamin Pasero 7f5d714e41
Revert "Ignore tsserver requests for createDirectoryWatcher(~/Library) on macOS" 2024-09-05 12:43:29 +02:00
nojaf cdc45ffb42 Include ending new line 2024-09-05 10:46:28 +02:00
nojaf b6669a7bff Mention desktop application in setting description. 2024-09-05 10:46:14 +02:00
nojaf eccf86a18e Copy worker to dist folder 2024-09-05 10:43:53 +02:00
Aman Karmani 39c063bcc7 Ignore tsserver requests for createDirectoryWatcher(~/Library) on macOS 2024-09-04 18:42:01 -07:00
Joyce Er b4608c9394
fix: resolve remote source actions by remote url (#227647)
fix: resolve remote source actions by remote name
2024-09-04 16:02:13 -07:00
Ladislau Szomoru 65af7713d1
SCM - fix graph rendering when checking out a tag or detached commit (#227578) 2024-09-04 15:17:51 +02:00
Ladislau Szomoru 87f05e126a
SCM - show multi-line commit message in hover (#227538)
* SCM - show multi-line commit message in hover

* Fix tests
2024-09-04 11:09:17 +02:00
nojaf 12abcccc81 Duplicate sortObjectPropertiesRecursively 2024-09-04 09:15:29 +02:00
nojaf e3caeae15d Verify that node worker is only used in node context. 2024-09-04 09:15:29 +02:00
nojaf c363defd73 Update worker file to esm 2024-09-04 09:15:29 +02:00
nojaf 366df5a69d Put worker behind setting 2024-09-04 09:15:29 +02:00
nojaf eb948e1ab7 Use Worker to serialize Notebook 2024-09-04 09:15:27 +02:00
Matt Bierner 8649c9c18b Allow lookbehind regexps in core
I believe safari was the last browser to add these, but they have been supported in safari since 16.4
2024-09-03 16:03:04 -07:00
Matt Bierner b54a277894
Merge pull request #227468 from mjbvz/distinct-hyena
Fix image preview after image update
2024-09-03 13:09:37 -07:00
Matt Bierner 77e9532099 Fix image preview after image update
Fixes #227447
2024-09-03 12:50:29 -07:00
Raymond Zhao e90a17d498
chore: bump webpack and micromatch (#227456) 2024-09-03 19:47:17 +02:00
Ladislau Szomoru 27b83d5060
SCM - fix tag detection (#227440) 2024-09-03 15:40:49 +02:00
Ladislau Szomoru cd0427ad28
SCM - add color to history item labels (#227436)
* Initial implementation

* Cleanup colors

* Revert changes to define colors in the git extension

* Add colors to labels
2024-09-03 14:04:22 +02:00
Don Jayamanne 9b2e9634aa
Remove code used to store metadata in custom property for notebooks (#227418)
* Remove code used to store metadata in custom property for notebooks

* oops
2024-09-03 09:24:35 +02:00
Ladislau Szomoru a3aedeae3e
SCM - cleanup SourceControlHistoryProvider api (#227376)
* Remove provideHistoryItemSummary

* Remove resolveHistoryItemGroupCommonAncestor

* Remove provideHistoryItems

* Rename methods and remove unused code

* Remove duplicated code
2024-09-02 15:52:05 +02:00
Don Jayamanne c0e1202c12
Stop adding a default cell in notebooks (#226692) 2024-09-02 08:20:26 +02:00
Don Jayamanne 2503ccd9d0
Support reverting Jupyter execution count via nb diff editor (#227157)
Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2024-09-02 06:23:17 +02:00
Ladislau Szomoru a546f7613c
SCM - graph always scoped to one repository (#227302)
* Initial implementation of the view

* Extract things into SCMHistoryViewModel

* Add repository name in the title description

* Set the scmProvider context key
2024-09-01 07:50:16 -07:00
Alex Ross 03dc55030b
Update grammars (#227249) 2024-08-30 22:03:00 +02:00
Ladislau Szomoru 96af81f067
SCM - introduce history item displayId (#227205)
* SCM - add `displayId` to `SourceControlHistoryItem`

* Add `displayId` into the history item hover
2024-08-30 14:51:11 +02:00
Ladislau Szomoru 72e9b7daff
SCM - remove old incoming/outgoing code (#227200)
* Delete SCMViewSeparatorElement

* Deleted all renderers

* Delete SCMHistoryItemGroupTreeElement

* More clean-up

* Cleanup old menus

* Fix compilation errors after ESM merge
2024-08-30 14:10:47 +02:00
Matt Bierner 3e0761cc9f Fix setting 2024-08-28 14:11:30 -07:00
Matt Bierner 913b9b9a2c Tweak organize imports setting descriptions
For #225814

- Removes link to presets which haven't yet been finalized
- Adds periods at end of descriptions
2024-08-28 13:48:57 -07:00
Martin Aeschlimann ce9ce04ab5
[css/json/html] update services (#226666)
* [css/json/html] update services

* revert server/client update
2024-08-27 00:25:24 +02:00
dependabot[bot] 70071d2047
Bump micromatch from 4.0.2 to 4.0.8 in /extensions/npm (#226486)
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.2 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.2...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 20:41:09 +02:00
Tyler James Leonhardt 214bf83a48
3 Changes to MSAL auth (#226580)
* Remove access token refreshing logic. The new calling pattern for an extension is that they should just always call `getSession` before doing something with it. The session that returns will be valid because MSAL will refresh any access tokens that are close to expiry using the refresh tokens that it has
  * NOTE: access tokens expire after 1hr. Refresh tokens expire after like... many days.
* Have `createSession` fire an `onDidChangeSession` event so that the badge goes away
* Improved logging messages
2024-08-26 08:27:20 +02:00
Matt Bierner e81aceaa07
Merge pull request #226541 from mjbvz/involved-gopher
Remove allowImportingTsExtensions from created tsconfigs
2024-08-24 14:18:44 -07:00
Matt Bierner e348be6b66 Remove allowImportingTsExtensions from created tsconfigs
Fixes #226108
2024-08-24 14:00:35 -07:00
Anees 945d4cdda8 Use separate div for image preview transparency grid 2024-08-24 02:41:24 +01:00
Matt Bierner 89f2077c35
Merge pull request #226485 from mjbvz/informal-echidna
Enable ATA on web by default again
2024-08-23 13:30:54 -07:00
Matt Bierner a8a33390df
Merge pull request #226202 from andrewbranch/autoImportSpecifierExcludeRegexes
[typescript-language-features] Add autoImportSpecifierExcludeRegexes preference
2024-08-23 13:23:49 -07:00
Matt Bierner 47fb559c6d
Reorder go to source definition (#226212)
Fixes #225419
2024-08-23 13:15:37 -07:00
Matt Bierner bedf9f4ab7 Enable ATA on web by default again
For #182791

Enabling for further testing
2024-08-23 13:14:54 -07:00
Ladislau Szomoru 88810d83f6
SCM - graph progress indicator improvements (#226482) 2024-08-23 21:50:46 +02:00
Ladislau Szomoru 00082d111f
SCM - use fixed references when paging in more data (#226425) 2024-08-23 15:06:06 +02:00
Don Jayamanne 5809a68666
wip 2024-08-23 05:59:29 +10:00
Ladislau Szomoru 557228e262
SCM - Source Control Graph view (#226250)
* Added the new view

* Add support for getting N number of commits

* Added view title actions

* More work to enable view/repository actions

* Expand the view by default, and always show the last N commits

* Add context menu actions

* Improve actions

* Basic infinite scrolling implemented

* Better implementation using --skip instead of a cursor

* Do not refresh graph when pressing Refresh

* Refactor load more/caching

* Rename the view

* Add support for the find widget
2024-08-22 15:54:22 +02:00
Ladislau Szomoru cd360e0318
SCM - remove incoming/outgoing/history graph from the Source Control view (#226241) 2024-08-22 12:42:14 +02:00
Andrea Mah c2aa3c4625
let findfiles2new use an array of includes/excludes (#226103)
* let findfiles2new use an array of includes/excludes
2024-08-21 19:14:01 -07:00
Tyler James Leonhardt 6544b003dc
Bump msal-node and fix a bad contrast ratio (#226210)
Bumps MSAL-node which contains [my fix](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/7247) that will actually show our error template.

Also fixes an A11y contrast issue with said error template.
2024-08-22 00:53:21 +02:00
Andrew Branch 7b357dd3a5
[typescript-language-features] Add autoImportSpecifierExcludeRegexes preference 2024-08-21 12:10:36 -07:00
Tyler James Leonhardt e1db90f81d
Add logging for deciding on MSAL (#226112)
so it's clear why
2024-08-20 18:28:02 -07:00
Tyler James Leonhardt c125b90d41
Add experimentation to Microsoft auth (#226107)
* Add experimentation to Microsoft auth

So that we can gradually roll out MSAL support.

* correct order
2024-08-20 17:17:15 -07:00
Matt Bierner 2baacda638 Remove presets keys
Fixes #226031
2024-08-20 15:08:00 -07:00
Rob Lourens 36257be8ef
Add ChatTitleProvider, updates to Show Chats (#225997)
* Sort chat history entries by lastMessageDate

* Add date labels to chat history picker

* Remove unused dynamic 'isDefault'

* Add ChatTitleProvider

* Disallow deleting and moving active chats

* Add test for new data normalization

* Fix build and add test

* Fix new test
2024-08-19 15:40:38 -07:00
Tyler James Leonhardt b2d6860308
Improve refresh and scope handling (#225832)
* Moves the `setupRefresh` stuff into the CachedPublicClientApp simplifying things a bit
* Uses a ScopeData class to handle all scope operations fixing an issue where we were passing in the wrong array into the `acquireTokenInteractive`
2024-08-17 07:55:33 +02:00
Matt Bierner aeb66cd959
Merge pull request #209293 from iisaduan/organize-imports-settings
add settings for typescript's organizeImports to the settings interface
2024-08-16 14:38:53 -07:00
Peng Lyu 28e80d4036
Revert dirty notebooks after each test (#225820) 2024-08-16 23:14:47 +02:00
Matt Bierner ddbe321368 Remove presets for now
https://github.com/microsoft/typescript/issues/59579
2024-08-16 13:01:03 -07:00
Matt Bierner 2360f3d014 Merge branch 'main' into organize-imports-settings 2024-08-16 12:55:08 -07:00