Commit Graph

131 Commits

Author SHA1 Message Date
Aman Karmani e76c50f20e
build: switch `build/tsconfig.json` to `module: nodenext` (#238426)
* build/tsconfig: switch to module: nodenext for bun compat

* build: rewrite imports for nodenext compat

* build: re-generate
2025-01-22 20:12:39 +01:00
Tyler James Leonhardt 305134296c
Adopt the MSAL broker to talk to the OS for Microsoft auth (#233739)
This adopts the `NativeBrokerPlugin` provided by `@azure/msal-node-extensions` to provide the ability to use auth state from the OS, and show native auth dialogs instead of going to the browser.

This has several pieces:
* The adoption of the broker in the microsoft-authentication extension:
  * Adding `NativeBrokerPlugin` to our PCAs
  * Using the proposed handle API to pass the native window handle down to MSAL calls (btw, this API will change in a follow up PR)
  * Adopting an AccountAccess layer to handle:
    * giving the user control of which accounts VS Code uses
    * an eventing layer so that auth state can be updated across multiple windows
* Getting the extension to build properly and only build what it really needs. This required several package.json/webpack hacks:
  * Use a fake keytar since we don't use the feature in `@azure/msal-node-extensions` that uses keytar
  * Use a fake dpapi layer since we don't use the feature in  `@azure/msal-node-extensions` that uses it
  * Ensure the msal runtime `.node` and `.dll` files are included in the bundle
* Get the VS Code build to allow a native node module in an extension: by having a list of native extensions that will be built in the "ci" part of the build - in other words when VS Code is building on the target platform

There are a couple of followups:
* Refactor the `handle` API to handle (heh) Auxiliary Windows https://github.com/microsoft/vscode/issues/233106
* Separate the call to `acquireTokenSilent` and `acquireTokenInteractive` and all the usage of this native node module into a separate process or maybe in Core... we'll see. Something to experiment with after we have something working. NEEDS FOLLOW UP ISSUE

Fixes https://github.com/microsoft/vscode/issues/229431
2024-11-15 20:53:28 +09:00
Tyler James Leonhardt d6688b5ba3
Only rewrite sourcemap urls when js (#233626)
This prevents the build from touching any other kind of file.
2024-11-12 00:45:15 +01:00
Alex Ross e6f2cc2f0a
Add an easy way to run performance tests for tree-sitter (#233072)
* Add an easy way to run performance tests for tree-sitter
Part os #210475

* Compile build folder
2024-11-05 15:35:58 +01: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
Connor Peet 1acc838297
fix: `yarn run gulp vscode-darwin-arm64` fails when run in the debug terminal (#224245)
>I think that block can just be removed safely since execFile with provide an error if the subprocess has a !=0 exit code

Fixes #221581
2024-07-29 16:30:35 -07:00
João Moreno addd445017
upload sourcemaps to CDN instead of ticino (#214141) 2024-06-03 16:10:01 +02:00
Benjamin Pasero 8afb685c9b
eng - add `checksum` validation support to `nodejs` and `extensions` (#184877)
* eng - add `checksum` validation support to `remote`

* eng - wire in more `checksum` support

* eng - renames for remote fetching

* eng - renames for remote fetching

* eng - disable verbose

* eng - always fetch verbose in CI

* eng - 💄

* eng - add checksums for node

* eng - report checksum matches

* eng - fix build

* eng - warn when not being able to check sum

* eng - support checksums for built in extensions

* eng - clear todo

* eng - add nodejs metadata to product.json

* 🆙 version

* 🆙 distro

* update distro

* eng - switch to checksum file

* cleanup alpine

* fix alpine

* fix bug

* eng - fetch all from remote

* eng - 💄

* eng - print checksums

* eng - fix missing import

* 🆙 distro

* undo version change
2023-06-14 16:57:06 +02:00
Raymond Zhao 06ae4b61c2
Bump windows-mutex to 0.4.4 (#184366)
Also adds OS-specific .moduleignore files
2023-06-09 09:40:10 -07:00
Johannes 978bb08619
add `extensions-ci-pr` task which does a full build without mangling 2023-06-07 16:36:02 +02:00
Martin Aeschlimann 899cdd5ace
remove request dependency (#179149)
* remove request dependency

* replace gulp-remote-retry-src in build scripts

* fix retry delay & polish
2023-04-05 16:05:16 +02:00
Benjamin Pasero 34d69db22c
server - introduce support for `nodejsRepository` (#179105)
* server - introduce support for `nodejsRepository`

* fix path

* add auth

* proper download

* extract to utility function

* reuse

* fix compile
2023-04-05 14:36:25 +02:00
Tyler James Leonhardt bc392ac9ff
Remove stale code & old migration (#176828)
* Remove stale code & old migration

* Removes browserNlsMetadataPath everywhere which was the old attempt to localize the web
* Removes an old migration

* js file
2023-03-13 18:41:59 +01:00
Johannes Rieken 7e69465303
don't use underscore for native JS things (#173282) 2023-02-03 03:47:51 -08:00
João Moreno 326876fa9e
bump vsce (#168071)
* bump vsce

* remainder

* use latest vsce

* compile build output
2022-12-22 17:00:21 +01:00
Matt Bierner ce934ff443
Also run `cleanNodeModules` on extensions/node_modules (#167476)
Also run cleanNodeModules on extensions/node_modules

Fixes #166652
2022-11-29 12:15:09 -08:00
Martin Aeschlimann 86ff830c3a
fix string.replace (for #167239) (#167259) 2022-11-25 14:45:57 +00:00
Matt Bierner d0d28a6295
Reapply building of web server (#166391)
* Reapply building of web server

Revert 8b4642ab23

* Fix critical dep error
2022-11-15 14:55:40 -08:00
Henning Dieterichs b11207c539 Revert "Copy webServer from Typescript to VS Code (#165771)"
This reverts commit cb43019d6a.
2022-11-15 14:45:32 +01:00
Nathan Shively-Sanders cb43019d6a
Copy webServer from Typescript to VS Code (#165771)
* Initial draft.

Not working.
Also not correctly formatted, I'll do that later.

* Various fixes

It works now

* A bit of cleanup

* Move webServer to its own directory

And prepare for getting rid of dynamicImportCompat.js hack

* Remove dynamicImportCompat.js hack

* Revert unrelated change

* Webpac tsserver.web.js with webServer.ts as entrypoint

Instead of using CopyPlugin.

1. Shipping multiple entrypoints in a single file required fixes to
build code.
2. There are a couple of warnings from `require` calls in
tsserverlibrary.js. Those are not relevant since they're in non-web
code, but I haven't figured how to turn them off; they are fully dynamic
so `externals` didn't work.

* Ignore warnings from dynamic import in tsserver

* Add to .vscodeignore files
2022-11-14 10:56:31 -08:00
Matt Bierner d950552131
Allow trailing commas while minifying json resources (#165870)
I noticed a few of our built-in extension's json resources were not being minified. The root cause appears to be trailing commas in the json
2022-11-08 14:38:53 -08:00
Connor Peet 18f743d534
address pr comments 2022-10-05 12:56:07 -07:00
Rob Lourens c717237d7c
Reenable a couple notebook smoketests (#159521)
* Remove vscode-notebook-tests in favor of an .ipynb in vscode-smoketest-express

* Update build folder

* Add build task to correct platform

* Build for smoke tests on other platforms

* Fix repo url and remove comment

* Just -media?

* Update darwin/win32 as well
2022-09-14 13:22:16 -07:00
Tyler James Leonhardt 49394cc44d
Enable translations for extension code for the web (#155355)
* Initial attempt

* alex feedback
2022-08-08 09:11:16 -07:00
Connor Peet ca48c64699
build: cache built-in extensions to avoid rate limiting (#156918) 2022-08-03 00:27:16 +02:00
Michael Lively e617076801 added `ipynb/esbuild.js` to the media scripts when building extensions 2022-07-27 09:34:22 -07:00
Matt Bierner bbe7b54cf4
Remove custom editor tests (#152777)
These tests are not actively being run or maintained. Removing them for now
2022-06-21 15:37:19 -04:00
Johannes 3622010b64
Merge branch 'main' into joh/voluminous-lobster 2022-06-09 09:08:20 +02:00
Matt Bierner 640898db17
Update to build using latest TS nightly (#151576) 2022-06-08 22:02:49 -04:00
Johannes 0656d21d11
auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
Connor Peet 5e86e40fab
extensions: pull from github in OSS build (#146863)
* extensions: pull from github in OSS build

* fixup! address pr comment
2022-04-10 22:36:12 -07:00
Matt Bierner fb6cf37ea9
Move simple-browser to use esbuild for webview scripts 2022-03-08 16:23:14 -08:00
Matt Bierner e65a786a92
Fix build script to use esbuild 2022-03-08 16:09:23 -08:00
rebornix f2b7964599
re #142429. Image renderer moved to extension. 2022-02-07 12:49:20 -08:00
Johannes Rieken 4a130c40ed
enable `@typescript-eslint/member-delimiter-style`, https://github.com/microsoft/vscode/issues/140391 2022-02-02 14:35:33 +01:00
Martin Aeschlimann 51c39d0df3
update isWebExtension check in built script (fixes microsoft/vscode-internalbacklog#2295) 2021-08-16 15:57:36 +02:00
Matt Bierner ab598a53ab
Only include prod node_modules from extensions
Fixes #130158
2021-08-05 13:39:04 -07:00
Johannes Rieken a3e07245ee
Revert "Revert "Merge pull request #127874 from microsoft/joh/webpack5""
This reverts commit c5f12c7226.
2021-07-08 10:28:33 +02:00
Johannes Rieken c5f12c7226
Revert "Merge pull request #127874 from microsoft/joh/webpack5"
This reverts commit 1f5b688e9c, reversing
changes made to 6efcb92e34.
2021-07-07 18:04:11 +02:00
Johannes Rieken 6b5129650b
adopt webpack stream changes 2021-07-02 16:34:51 +02:00
Sandeep Somavarapu c80fba9f9a
clean up 2021-06-22 16:58:33 +02:00
Dirk Baeumer 9c3a109adf
Fixes #126408: Support changes in vscode-nls-dev that allow hint comments in package.nls.json 2021-06-16 11:53:10 +02:00
Matt Bierner 34f0fcaf52
Rename `notebook-markdown-extension` to `markdown-math`
This makes it more clear what this extension is contributing
2021-06-08 09:58:54 -07:00
João Moreno d0d80ec337
fix build 2021-05-27 11:50:04 +02:00
João Moreno d777991656
move buildExtensionMedia to lib 2021-05-26 20:38:28 +02:00
João Moreno 0e7f3d0d8c
Revert "remove colorize-tests extension usage"
This reverts commit d577c4b18d.
2021-01-19 11:39:39 +01:00
João Moreno ed8655201a fix web extensions 2021-01-18 14:35:58 +01:00
João Moreno d577c4b18d
remove colorize-tests extension usage 2021-01-15 12:59:42 +01:00
João Moreno fc4b40b633
fix type casts 2021-01-04 15:54:59 +01:00
Alexandru Dima c1eb24b027
Load expensive node modules lazily 2020-12-22 19:55:56 +01:00