From 4385ceef1a885bd9f2f320658a8a20c10c253ee3 Mon Sep 17 00:00:00 2001 From: Johan Carlin Date: Fri, 3 Apr 2026 18:04:36 +0200 Subject: [PATCH 1/2] ci: remove macOS install-script runner from matrix --- .github/workflows/dev-containers.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev-containers.yml b/.github/workflows/dev-containers.yml index b8abfb0fc..f1dd10c49 100644 --- a/.github/workflows/dev-containers.yml +++ b/.github/workflows/dev-containers.yml @@ -155,7 +155,9 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + # macOS runners are not available in all org/repo configurations. + # Keep this matrix to universally available hosted runners. + os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 From d1358dd78746110e921770d85a0ec05b8c0225a4 Mon Sep 17 00:00:00 2001 From: Johan Carlin Date: Fri, 3 Apr 2026 18:16:08 +0200 Subject: [PATCH 2/2] build: sanitize CONFIGURATION env for npm build scripts --- build/sanitize-env.js | 30 ++++++++++++++++++++++++++++++ package.json | 10 +++++----- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 build/sanitize-env.js diff --git a/build/sanitize-env.js b/build/sanitize-env.js new file mode 100644 index 000000000..ddaec268d --- /dev/null +++ b/build/sanitize-env.js @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +const { spawnSync } = require('child_process'); + +const [, , command, ...args] = process.argv; + +if (!command) { + console.error('Usage: node build/sanitize-env.js [args...]'); + process.exit(1); +} + +const env = { ...process.env }; +delete env.CONFIGURATION; + +const result = spawnSync(command, args, { + stdio: 'inherit', + env, + shell: process.platform === 'win32', +}); + +if (typeof result.status === 'number') { + process.exit(result.status); +} + +process.exit(1); diff --git a/package.json b/package.json index 4cb903c1e..a95a6424f 100644 --- a/package.json +++ b/package.json @@ -18,14 +18,14 @@ "node": ">=20.0.0" }, "scripts": { - "compile": "npm-run-all clean-dist compile-dev", - "watch": "npm-run-all clean-dist compile-watch", - "package": "npm-run-all clean-dist compile-prod store-packagejson patch-packagejson npm-pack restore-packagejson", + "compile": "node build/sanitize-env.js npm-run-all clean-dist compile-dev", + "watch": "node build/sanitize-env.js npm-run-all clean-dist compile-watch", + "package": "node build/sanitize-env.js npm-run-all clean-dist compile-prod store-packagejson patch-packagejson npm-pack restore-packagejson", "store-packagejson": "copyfiles package.json build-tmp/", "patch-packagejson": "node build/patch-packagejson.js", "restore-packagejson": "copyfiles --up 1 build-tmp/package.json .", - "type-check": "npm-run-all clean-built tsc-b", - "type-check-watch": "npm-run-all clean-built tsc-b-w", + "type-check": "node build/sanitize-env.js npm-run-all clean-built tsc-b", + "type-check-watch": "node build/sanitize-env.js npm-run-all clean-built tsc-b-w", "compile-prod": "node esbuild.js --production", "compile-dev": "node esbuild.js", "compile-watch": "node esbuild.js --watch",