Skip to content

Commit 4bc247c

Browse files
bwateratmsftCopilot
andcommitted
Migrate to pnpm workspaces with parallel builds
- Add root package.json with pnpm@10.12.1 packageManager field - Add pnpm-workspace.yaml with catalog versions for shared deps (@types/node, @types/vscode, tsx, esbuild, etc.) - Convert all package scripts from npm to pnpm - Use catalog: protocol for shared dependency versions - Use node-linker=hoisted in .npmrc for compatibility - Add skipLibCheck to tsconfig.base.json for monorepo type isolation - Consolidate serialize-javascript override to root pnpm.overrides - Remove all per-package package-lock.json files (single pnpm-lock.yaml) CI/CD: - GitHub Actions: collapse matrix build to single job using pnpm -r --parallel for lint/build/test/package - AzDO pipeline: collapse 8 jobs to single job at repo root with packageManager: pnpm Packages remain independent (use published versions of each other) so all operations run fully in parallel. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 97c9d9a commit 4bc247c

29 files changed

Lines changed: 8122 additions & 39858 deletions

.config/build.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,6 @@ extends:
3232
template: azdo-pipelines/1es-mb-main.yml@azExtTemplates
3333
parameters:
3434
signType: none
35+
packageManager: pnpm
3536
feedBaseUrl: ${{ variables.feedBaseUrl }}
3637
testARMServiceConnection: ${{ variables.testARMServiceConnection }}
37-
jobs:
38-
- name: microsoft_vscode_azext_azureappservice
39-
working_directory: appservice
40-
- name: microsoft_vscode_azext_azureappsettings
41-
working_directory: appsettings
42-
- name: microsoft_vscode_azext_azureauth
43-
working_directory: auth
44-
- name: microsoft_vscode_azext_azureutils
45-
working_directory: azure
46-
- name: microsoft_vscode_azext_eng
47-
working_directory: eng
48-
- name: microsoft_vscode_azext_github
49-
working_directory: github
50-
- name: microsoft_vscode_azext_utils
51-
working_directory: utils
52-
- name: microsoft_vscode_azext_webview
53-
working_directory: webview

.github/workflows/jobs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
# Setup
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
# GitHub (unlike AzDO) can't enforce an enum on a workflow_call input, so
2525
# fail the build when package_manager isn't one we support. The step is
2626
# skipped entirely when the value is valid.
@@ -39,7 +39,7 @@ jobs:
3939
if: ${{ inputs.package_manager == 'pnpm' }}
4040
run: corepack enable && corepack prepare --activate
4141
- name: Using Node.js
42-
uses: actions/setup-node@v3
42+
uses: actions/setup-node@v4
4343
with:
4444
node-version-file: .nvmrc
4545
cache: ${{ inputs.package_manager == 'pnpm' && 'pnpm' || '' }}

.github/workflows/packages.yml

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,7 @@ on:
88
- rel/*
99

1010
jobs:
11-
ChangedPackages:
12-
# Determine changed subpaths to run the matrix on
13-
# See https://github.com/dorny/paths-filter/tree/v4/#examples
14-
runs-on: ubuntu-latest
15-
steps:
16-
- name: Determine changed packages
17-
uses: dorny/paths-filter@v4
18-
id: filter
19-
with:
20-
filters: |
21-
appservice: "appservice/**"
22-
appsettings: "appsettings/**"
23-
auth: "auth/**"
24-
azure: "azure/**"
25-
eng: "eng/**"
26-
github: "github/**"
27-
utils: "utils/**"
28-
webview: "webview/**"
29-
outputs:
30-
# Expose matched filters as job 'packages' output variable
31-
packages: ${{ steps.filter.outputs.changes }}
32-
3311
Build:
34-
if: ${{ fromJson(needs.ChangedPackages.outputs.packages)[0] != null }}
35-
# Use template from https://github.com/microsoft/vscode-azuretools/blob/main/.github/workflows/jobs.yml
3612
uses: ./.github/workflows/jobs.yml
37-
needs: [ChangedPackages]
3813
with:
39-
working_directory: ${{ matrix.package }}
40-
strategy:
41-
matrix:
42-
package: ${{ fromJson(needs.ChangedPackages.outputs.packages) }}
43-
44-
CheckResults: # required for GtiHub PR rules
45-
# Require all jobs under `build` to have succeeded
46-
# See https://github.com/orgs/community/discussions/26822
47-
if: ${{ always() }}
48-
needs: [Build, ChangedPackages]
49-
runs-on: ubuntu-latest
50-
steps:
51-
- run: exit 1
52-
if: ${{ (fromJson(needs.ChangedPackages.outputs.packages)[0] != null) && contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
14+
package_manager: pnpm

appservice/.vscode-test.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@
33
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
export { azExtTestConfig as default } from '@microsoft/vscode-azext-eng/vscode-test'; // Other configurations exist
6+
import { resolve } from 'node:path';
7+
import { azExtTestConfig } from '@microsoft/vscode-azext-eng/vscode-test';
8+
9+
// Share a single VS Code download across all workspace packages
10+
export default { ...azExtTestConfig, cachePath: resolve(import.meta.dirname, '..', '.vscode-test') };

0 commit comments

Comments
 (0)