Commit Graph

46 Commits (main)

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
Robo 51cfc9ece4
ci: add checks to verify mach-o objects architecture (#230598) 2024-10-05 12:27:10 -07: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
deepak1556 7ba544f617 fix: universal build 2024-09-06 18:28:44 +09: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
Benjamin Pasero 0dea4804f4
esm - introduce VSCODE_BUILD_ESM variable (#225586) 2024-08-14 14:49:26 +02:00
Robo 2fe0527205
chore: update to electron 30 (#215406)
* chore: update electron@30.0.9

* chore: update rpm deps

* chore: bump electron@30.1.2

* fix: update kerberos for Node.js 20.x

Refs c1f7acafb2

* fix: use shell when spawning .bat or .cmd files

Refs https://github.com/nodejs/node/commit/6627222409

* fix: update @vscode/test-electron@2.4.0

Refs 3f7a3cc5c5

* fixup! use shell when spawning .bat or .cmd files

* chore: bump nodejs@20.14.0 internal build

* ci: skip nodejsMirror for 20.14.0 due to missing builds

* fixup! use shell when spawning .bat or .cmd files

* chore: update debian deps

* fixup! skip nodejsMirror for 20.14.0 due to missing builds

* fix: universal build

- Updates vscode-universal-bundler to support x64ArchFiles option
- Kerberos starts building universal binaries which should now be
  skipped from lipo step via x64ArchFiles
- Skips bundling *.mk files

* chore: bump distro
2024-07-09 14:33:22 +09:00
Benjamin Pasero 82c54248fd
perf - inline `package.json` and `product.json` (#219841) 2024-07-04 07:59:10 +02:00
João Moreno e469272e45
remove inline sourcemaps from build files (#198842) 2023-11-22 14:05:46 +01:00
Matt Bierner 10d94ba0f3
Pick up latest TS nightly for building VS Code (#194631) 2023-10-02 19:40:35 +01:00
Matt Bierner 70139e827a
Pick up latest TS nightly for building VS Code (#193534)
Required fixing a real typing error
2023-09-19 17:25:11 -07:00
Tyler James Leonhardt 5134662139
Remove CredentialsService & keytar (#192224)
* Remove CredentialsService & keytar

ref https://github.com/microsoft/vscode/issues/115215
fixes https://github.com/microsoft/vscode/issues/143395

* compile

* remove imports

* rip the bandaid
2023-09-05 17:47:30 -07:00
João Moreno aac80c3f0a
Adopt new distro format (#178689)
* Simplify distro

Also a ton of drive-by fixing around builds:
- simplified many oneliners
- fixed missing custom npm registry call setups
- remove unnecessary and duplicate work during builds
- many many fixes
2023-04-02 09:35:39 +02:00
João Moreno 277e80be94
dynamically find macos signing identity (#171063)
* dynamically find macos signing identity

* debug

* more debug

* argh

* Revert "argh"

This reverts commit 0e0715fb44.

Revert "more debug"

This reverts commit 7632542023.

Revert "debug"

This reverts commit 6f00a3acef.
2023-01-11 23:39:31 +09:00
Robo 2fae780e49
chore: update code signing certificate identity (#171061) 2023-01-11 14:13:50 +01:00
Johannes 696c1cf199
build utils with source map to enable JS debug console 2022-11-10 15:05:47 +01:00
Robo 0d5fbcc577
chore: use plugin executable for utility process on macOS (#161102)
chore: update app entitlements
2022-09-21 08:18:39 -07:00
Matt Bierner 2a84b0fb6d
Enable alwaysStrict for build scripts (#152778)
Turns on `alwaysStrict` and removes `'use strict';` from our `.ts` files
2022-06-21 19:00:43 +00:00
Johannes 2c004b870f
recompile build folder with `const` over let 2022-06-09 10:59:11 +02:00
Johannes 0656d21d11
auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
deepak1556 345f572e37 ci: fix universal build 2022-04-05 19:23:16 +09:00
deepak1556 eaa2b431ac ci: fix codesigning universal build 2022-03-21 16:05:13 +09:00
Robo 5f09c54449
chore: replace plist with plutil (#145392) 2022-03-18 07:48:48 -07:00
Matt Bierner 433bf7cd88
Update build scripts to target es2020 2022-02-28 14:00:17 -08:00
Alex Dima cab9713422
Fixes #141994: Address eslint problems 2022-02-02 13:18:12 +01:00
deepak1556 48417434d6 chore: allow running universal build via rosetta
Fixes https://github.com/microsoft/vscode/issues/139319
2022-01-31 20:20:00 +09:00
deepak1556 d49d7e7fe1 chore: harder checks around universal build creation 2021-08-05 23:55:06 -07:00
deepak1556 934d280a9f chore: bump vscode-universal-bundler
Fixes https://github.com/microsoft/vscode/issues/115262
2021-08-02 22:14:02 -07:00
Matt Bierner 0762d23ae7
Build VS Code using TS 4.4 (#127823)
* Build VS Code using TS 4.4

* Remove usages of deprecated `ClientRectList`

* Add any casts for missing `caretRangeFromPoint`

* Add temporary any casts for `zoom` css propery

This non-standard css property no longer exists in lib.dom.d.ts

* MouseWheelEvent -> WheelEvent

* Pick up new TS nightly

Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
2021-07-08 14:27:39 -07:00
Benjamin Pasero 15aca96cd5
build - unblock lauching 2021-06-03 07:21:15 +02:00
João Moreno 0a7a69f190
fix build compilation 2021-05-26 13:30:43 +02:00
deepak1556 5904b7b686 chore: info.plist => Info.plist 2021-04-08 10:33:02 -07:00
deepak1556 9a8d55525d fix: skip sha comparison for info.plist 2021-04-08 01:31:18 -07:00
deepak1556 325bea69a7 chore: add media and apple event entitlements
Fixes https://github.com/microsoft/vscode/issues/119787
Fixes https://github.com/microsoft/vscode/issues/95062
2021-03-30 22:58:21 -07:00
Tyler James Leonhardt 8fefa6aff2
Speed up mac builds (#116984)
* ci: [mac] Unify tasks between different flavors

* take 3

* remove zip

* unzip in place

* logging

* log

* rm zip

* all the things

* remove thing to trigger another build

* publish server for x64 only and only start on non-arm

* delete commented out code

* remove unused sh script

* address main changes

* address feedback

* add a comment

* try slimming down yarn

* only compile createAsset

* install typescript

* move build to correct location

* change to 64

* add useful comments based on joao

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-03-10 17:52:15 -08:00
Robo f73c011ae3
fix: disable rosetta option for universal build (#115280) 2021-01-27 20:34:19 -08:00
Robo 60bce0f628
feat: add macos universal build ci config (#114446)
* feat: add universal build ci config

* chore: skip .npmrc files added by terrapin

* ci: cleanup conditional vairables for universal

* ci: use publish variable instead of parameter
2021-01-25 10:29:02 -08:00
Alexandru Dima d1fff1a083
Check in `.js` files from the `/build/` folder to improve build speeds 2020-12-14 11:13:16 +01:00
Robo 94142bd7e0
chore: bump electron@11.0.3 (#111931)
* chore: bump electron@11.0.3

This reverts commit 155691d0be.

* chore: bump x64 build image

* chore: rebuild remote with older gcc toolchain

* chore: bump electron@11.0.3

* ci: remove condition for remote step

* chore: disable an integration test
2020-12-05 01:54:58 -08:00
Robo 155691d0be
chore: bump electron@9.3.5 (#111530)
* chore: bump electron@9.3.5

* Revert "fix: removed plugin helper entitlement"

This reverts commit 40a81495f2.

* Revert "chore: bump vscode-windows-ca-certs@0.3.0"

This reverts commit 2f4a3dc31a.
2020-11-30 11:24:10 -08:00
deepak1556 40a81495f2 fix: removed plugin helper entitlement
we build with enable_plugins=false for the internal builds
https://chromium-review.googlesource.com/c/chromium/src/+/2173416
2020-11-24 11:00:51 -08:00
Robo 0baf6bb9cc
chore: update to electron 11 (#110759)
* chore: bump electron@11.0.0-beta.4

* build: add mac arm64 target

* chore: bump electron@11.0.1

* fix: remove macOS workaround for devtools with custom titlebar

https://github.com/electron/electron/pull/26395

* chore: bump vscode-windows-ca-certs@0.3.0

* chore: bump electron@11.0.2

* fixup! remove macOS workaround for devtools with custom titlebar
2020-11-23 15:31:03 -08:00
João Moreno 2469bf6832
remove build compilation output 2020-09-22 11:12:55 +02:00
Robo d5372eb159
Reland "fix: use electron-osx-sign instead of manual code signing (#97582)" (#98145)
This reverts commit f291767f09.
2020-05-20 10:06:15 +02:00
deepak1556 f291767f09 Revert "fix: use electron-osx-sign instead of manual code signing (#97582)"
This reverts commit a1ddfae782.
2020-05-19 00:49:44 -07:00
João Moreno a1ddfae782
fix: use electron-osx-sign instead of manual code signing (#97582)
* fix: use electron-osx-sign instead of manual code signing

* build/gulpfile.vscode.darwin.js -> build/darwin/sign.ts

* fix script call in pipeline

* fix incorrect keychain path

* fix update path to entitlements

* sign children first

* move electron-osx-sign deps to build/

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2020-05-18 08:43:30 -07:00