Skip to content

Commit 0c0e931

Browse files
committed
fix(@angular/cli): use correct path for MCP get_best_practices tool
The package internal path for the Angular best practices markdown file has been corrected to the new location following a previous refactoring.
1 parent 3a7b9fb commit 0c0e931

File tree

3 files changed

+61
-20
lines changed

3 files changed

+61
-20
lines changed

.github/shared-actions/windows-bazel-test/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ runs:
1818
steps:
1919
- name: Initialize WSL
2020
id: init_wsl
21-
uses: angular/dev-infra/github-actions/setup-wsl@7f2c99469dcf64fd466abf6cb53bede791d7599d
21+
uses: alan-agius4/dev-infra/github-actions/setup-wsl@0d5a3b903184c1896ee2b7beab1465569b727468
2222
with:
2323
wsl_firewall_interface: 'vEthernet (WSL (Hyper-V firewall))'
2424

2525
- name: Installing pnpm (in WSL)
26-
run: npm install -g pnpm@9
26+
run: npm install -g pnpm@10
2727
shell: wsl-bash {0}
2828

2929
- name: Install node modules in WSL (re-using from previous install/cache restore)

.github/workflows/pr.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -127,24 +127,22 @@ jobs:
127127
- name: Run CLI E2E tests
128128
run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=6 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}
129129

130-
# Temporarily disabled due to https://github.com/Vampire/setup-wsl/issues/76.
131-
# e2e-windows-subset:
132-
# needs: build
133-
# runs-on: windows-2025
134-
# steps:
135-
# - name: Initialize environment
136-
# uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
137-
# - name: Setup Bazel
138-
# uses: angular/dev-infra/github-actions/bazel/setup@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
139-
# - name: Setup Bazel RBE
140-
# uses: angular/dev-infra/github-actions/bazel/configure-remote@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
141-
# with:
142-
# allow_windows_rbe: true
143-
# - name: Run CLI E2E tests
144-
# uses: ./.github/shared-actions/windows-bazel-test
145-
# with:
146-
# test_target_name: e2e_node22
147-
# test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"
130+
e2e-windows-subset:
131+
runs-on: windows-2025
132+
steps:
133+
- name: Initialize environment
134+
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
135+
- name: Setup Bazel
136+
uses: angular/dev-infra/github-actions/bazel/setup@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
137+
- name: Setup Bazel RBE
138+
uses: angular/dev-infra/github-actions/bazel/configure-remote@59c46175bf3a8870c0c2ceb9de1eb741fd50d415
139+
with:
140+
allow_windows_rbe: true
141+
- name: Run CLI E2E tests
142+
uses: ./.github/shared-actions/windows-bazel-test
143+
with:
144+
test_target_name: e2e_node22
145+
test_args: --esbuild --glob "tests/basic/{build,rebuild}.ts"
148146

149147
e2e-package-managers:
150148
needs: build
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { chdir } from 'node:process';
2+
import { exec, ProcessOutput, silentNpm } from '../../utils/process';
3+
import assert from 'node:assert/strict';
4+
5+
const MCP_INSPECTOR_PACKAGE_NAME = '@modelcontextprotocol/inspector-cli';
6+
const MCP_INSPECTOR_PACKAGE_VERSION = '0.16.2';
7+
const MCP_INSPECTOR_COMMAND_NAME = 'mcp-inspector-cli';
8+
9+
async function runInspector(...args: string[]): Promise<ProcessOutput> {
10+
const result = await exec(
11+
MCP_INSPECTOR_COMMAND_NAME,
12+
'--cli',
13+
'npx',
14+
'--no',
15+
'@angular/cli',
16+
'mcp',
17+
...args,
18+
);
19+
20+
return result;
21+
}
22+
23+
export default async function () {
24+
await silentNpm(
25+
'install',
26+
'--ignore-scripts',
27+
'-g',
28+
`${MCP_INSPECTOR_PACKAGE_NAME}@${MCP_INSPECTOR_PACKAGE_VERSION}`,
29+
);
30+
31+
// Ensure `get_best_practices` returns the markdown content
32+
const { stdout: stdoutInsideWorkspace } = await runInspector(
33+
'--method',
34+
'tools/call',
35+
'--tool-name',
36+
'get_best_practices',
37+
);
38+
39+
assert.match(
40+
stdoutInsideWorkspace,
41+
/You are an expert in TypeScript, Angular, and scalable web application development./,
42+
);
43+
}

0 commit comments

Comments
 (0)