Commit Graph

64 Commits (ed5fbf5a161587b6614917e12e919e3e69e6278c)

Author SHA1 Message Date
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
Benjamin Pasero dc265add0b
esm - drop need for manual concat (#230571) 2024-10-06 14:12:20 +02:00
Benjamin Pasero 9bd60d090a
esm - better content mapper to address sourcemaps (#230476) 2024-10-04 15:34:21 +02:00
Benjamin Pasero c7caef00ea
esm - make `optimize.ts` ESM only 2024-09-27 08:05:06 +02:00
Benjamin Pasero b544846460
esm - further cleanup build scripts 2024-09-27 08:04:56 +02:00
Benjamin Pasero c1952297c5
esm - cleanup editor worker build descriptors 2024-09-27 08:04:36 +02:00
Benjamin Pasero d2701aa2ec
esm - remove AMD modifications in sources 2024-09-27 08:04:16 +02:00
Benjamin Pasero 332b89f198
esm - remove AMD build scripts, tests and variables 2024-09-27 08:04:01 +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
Sandeep Somavarapu ebc02af2d8
rename electron-node to electron-utility (#227672) 2024-09-05 00:49:23 -07:00
Sandeep Somavarapu 01fcf004a6
Use electron net directly in shared process (#227553)
* Use electron net directly in shared process

* add built file

* introduce shared electron-node layer

* remove electron-utility layer

* fix (overlook): move back cli files to node
2024-09-04 07:26:43 -07:00
Benjamin Pasero 21135c81b5
esm - provide a bridge to AMD world (#227361) 2024-09-02 12:09:12 -07:00
Benjamin Pasero 6b924c5152
ESM merge to main (#227184)
Co-authored-by: Johannes Rieken <jrieken@microsoft.com>
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
2024-08-30 10:31:46 +02:00
João Moreno c9f093d529
Revert "cleanup web html pages (#216609)"
This reverts commit 54cad31687.
2024-08-28 14:24:52 +02:00
João Moreno 54cad31687
cleanup web html pages (#216609) 2024-08-28 10:12:38 +02:00
Benjamin Pasero a002d1512e
build - move `buildfile.js` out of `src` (#226403)
* build - move `buildfile.js` out of `src`

* .

* fix build
2024-08-23 12:18:26 +02:00
Alex Ross 0062a6e767
Include highlights files in build (#226067)
* Include highlights files in build
Part of #210475

* Also add for non-esm
2024-08-20 17:06:21 +02:00
Benjamin Pasero 3dc8c38c92
esm - some build polish (#225948) 2024-08-19 16:54:29 +02:00
Benjamin Pasero 3666f94deb
esm - backport new HTML entry points and use if ESM (#225633) 2024-08-14 20:48:27 +02:00
Benjamin Pasero 7c8097dbbf
build - reuse the same `date` across builds (#220076) 2024-07-05 11:06:43 -07:00
Benjamin Pasero 42f6c85556
web - include `nls.messages.js` in standalone build (#219919) 2024-07-04 08:47:46 +02:00
Benjamin Pasero 82c54248fd
perf - inline `package.json` and `product.json` (#219841) 2024-07-04 07:59:10 +02:00
Benjamin Pasero d65fd5ba2e
nls follow up debt work (#219265) 2024-07-01 11:44:19 +02:00
Johannes Rieken d0db6d013f
fix https://github.com/microsoft/vscode/issues/218692 (#219078) 2024-06-28 14:46:05 +02:00
João Moreno addd445017
upload sourcemaps to CDN instead of ticino (#214141) 2024-06-03 16:10:01 +02:00
Johannes 978bb08619
add `extensions-ci-pr` task which does a full build without mangling 2023-06-07 16:36:02 +02:00
Robo e5f61433b5
chore: update to Electron 22 (#177600)
* Revert "chore: revert to Electron 19 (#175851)"

This reverts commit 3a11b47eee.

* chore: bump electron@22.3.3

* build: use custom version for V8 sandbox

* chore: update electron@22.4.1

* chore: enable forceAllocationsToV8Sandbox for extension host

* chore: bump electron@22.4.2

* chore: bump electron@22.4.3

* sandbox - cleanup from electron 22 update (#178919)

* Revert "chore: revert to Electron 19 (#175851)"

This reverts commit 3a11b47eee.

* chore: bump electron@22.3.3

* build: use custom version for V8 sandbox

* chore: update electron@22.4.1

* chore: enable forceAllocationsToV8Sandbox for extension host

* chore: bump electron@22.4.2

* chore: bump electron@22.4.3

* temp: update distro

* sandbox - cleanup from electron 22 update

* missing comile

* more changes

* fix build

* restore

* 💄

* compile

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: Benjamin Pasero <benjamin.pasero@microsoft.com>
2023-04-03 09:09:31 +02:00
yiliang114 ef3dbb5e11 fix: typos 2023-03-10 20:02:01 +08:00
Johannes Rieken 7e69465303
don't use underscore for native JS things (#173282) 2023-02-03 03:47:51 -08:00
Sandeep Somavarapu fac2283bf3
fix string.replace (#168169)
fix string.replace #167239
2022-12-06 14:50:23 +01:00
Benjamin Pasero aa961ec5da
String.replace will substitute special patterns (#167239) (#167250) 2022-11-25 14:03:49 +00:00
Johannes Rieken fec87f38cb
Analyse profiles in worker thread (#164468)
- profile renderer returns profile data
- analyse profiles in separate worker thread
- adjust renderer and extension host profiling
- adjust build scripts to build worker file
2022-10-24 17:42:54 +02:00
Connor Peet 18f743d534
address pr comments 2022-10-05 12:56:07 -07:00
Benjamin Pasero 9db57e76e9
Build: bundle / concat entry points (#161161)
* perf - concatenate windows main files

* Revert "Revert "Use `esbuild` to bundle some CommonJS main files (#160957)" (#161118)"

This reverts commit 84c46b71a5.

* build - exclude server main files

* build - make concat a task that runs like the others

* some renames

* Avoid overwriting the nodejs closure require

* Revert "build - exclude server main files"

This reverts commit 736516624e.

Co-authored-by: Alex Dima <alexdima@microsoft.com>
2022-09-21 00:38:44 -07:00
Benjamin Pasero 84c46b71a5
Revert "Use `esbuild` to bundle some CommonJS main files (#160957)" (#161118)
This reverts commit 2179e52fb9.
2022-09-16 09:31:44 -07:00
Benjamin Pasero 2179e52fb9
Use `esbuild` to bundle some CommonJS main files (#160957)
* ensure node.js `require` is captured

* optimize `main.js` and `cli.js`

* cleanup

* leave out bundled files

* drop package.json from userdata paths

* fix web task

* fix editor distro

* inline version into `product.json`

* also bundle server

* t

* actually do server too

* Keep bundling nls in editor worker

Co-authored-by: Alex Dima <alexdima@microsoft.com>
2022-09-16 05:24:23 -07:00
isidor f1143ac3d6
make sure to include mp3 files in our build 2022-08-22 12:48:59 +02:00
Connor Peet ca48c64699
build: cache built-in extensions to avoid rate limiting (#156918) 2022-08-03 00:27:16 +02:00
Johannes 0656d21d11
auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
Henning Dieterichs 856e0ae9cb
Include opus files for web build 2022-04-19 14:48:46 +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
Johannes Rieken e6b63f39c4
debt - remove all of `extensionAllowedProposedApi` 2022-03-01 11:44:11 +01:00
Matt Bierner f71bd27ec9
Adding type annotations 2022-02-28 14:32:12 -08:00
Benjamin Pasero 6defcb5efe
web - remove legacy main build file 2022-02-15 16:22:06 +01:00
Alex Dima 1b429e7432
Strip `webEndpointUrlTemplate` from `reh-web` builds 2022-02-03 19:28:09 +01:00
Alex Dima 9fb5c8e094
Split up the two web content patchers 2022-02-03 19:28:08 +01:00
Benjamin Pasero 0f89762b4b
Rename `workbench.web.api.*` to `workbench.web.main.*` (#141263)
* web - rename entry file

* web - rename entry file also for server

* rename main entry in copy
2022-01-24 12:45:49 +01:00
Benjamin Pasero 13461f8c61
Web: change `yarn web` to run with our server instead of playground (#139725)
* web - first cut `yarn web` via our server

* properly pipe output

* web - remove traces of web playground

* web - remember last opened workspace for convinience

* use vscode-test-web for server less, clean up web commands

* fix comment

* fix `yarn web`

* rename to code-server

* open system browser

* code-server script: use minimist

* test resolver: use ./scripts/code-server

* integartion tests: fix code-server command name

Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
2022-01-20 13:48:08 +01:00
Alex Dima 0a81bd1bbf
Use an identical CSP for both `https` and `http` (enabled by using 'self') 2021-12-07 14:40:56 +01:00
Alex Dima 42a0825e8e
Allow building to continue despite a missing `remote/LICENSE` file 2021-10-21 15:28:47 +02:00