Commit Graph

25 Commits

Author SHA1 Message Date
Matt Bierner
2648263d3e Run our build scripts directly as typescript (#277567)
* Run our build scripts directly as typescript #277567

Follow up on #276864
For #277526

* Remove a few more ts-node references

* Fix linux and script reference

* Remove `_build-script` ref

* Fix script missing closing quote

* use type only import

* Fix export

* Make sure to run copy-policy-dto

* Make sure we run the copy-policy-dto script

* Enable `verbatimModuleSyntax`

* Pipelines fixes

* Try adding explicit ext to path

* Fix bad edit

* Revert extra `--`

---------

Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>
2025-11-21 14:56:00 +01:00
Tyler James Leonhardt
da3cf78129 Enable the broker in macOS (#261148)
* Enable the broker in macOS

Fixes https://github.com/microsoft/vscode/issues/260158

* for testing

* better globbing

* guh

* guh

* delete

* log it all

* let's just log everything

* Only do on supported OS/Arches

* Add a console.log

* look at VSCODE_ARCH

* add msal files

* add entitlement maybe here

* actually it's probably here

* build: bundle msal libs for x64 and arm64

* revert that

* try again

* try adding $(AppIdentifierPrefix)

* temp: add debuggee entitlements

* bump msal and pass in redirect uri on macOS

* revert entitlement files

* forgot the .helper

* Allow PII for the output channel only

* use unsigned option

---------

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-08-27 14:31:09 -07:00
Josh Spicer
9595934bdb Generate macOS configuration profiles (#241773)
* generate configuration policy and manifests

* add darwin pipeline job

* argument for per-platform generation of policy

* adopt argument in pipeline

* formatting tweaks in generated profile (+ check in .js file)

* tidy up output plists

* copy policy definitions

* implement the remaining renderProfileValue()

* remove unnecessary platform option

* copy to .app in vscode-darwin-$PLATFORM-min-ci gulp task

* add darwinProfileUUID and darwinProfilePayloadUUID to product.json

* better way to package in gulp script

* bump distro commit (c3ec5ba485)

* Add bundles policy paths to macOS universal build 'filesToSkip'

Needs this when creating universal macOS app:

Expected all non-binary files to have identical SHAs when creating a universal build
but "Contents/Resources/app/policies/cs-cz/com.microsoft.VSCodeInsiders.plist" did not

See:
298a872f5f/src/index.ts (L163-L172)
2025-03-13 17:12:25 -07:00
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
Robo
51cfc9ece4 ci: add checks to verify mach-o objects architecture (#230598) 2024-10-05 12:27:10 -07: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
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
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
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
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
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
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