Skip to content

Commit 2f9b604

Browse files
authored
Pin Playwright to 1.56.1 and add NPM package update tracking (#4103)
1 parent cc1f3a4 commit 2f9b604

14 files changed

Lines changed: 155 additions & 30 deletions

.github/workflows/blog-auditor.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/cloclo.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/daily-multi-device-docs-tester.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/dependabot-go-checker.lock.yml

Lines changed: 71 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/dependabot-go-checker.md

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Checks for Go module dependency updates and analyzes Dependabot PRs for compatibility and breaking changes
2+
description: Checks for Go module and NPM dependency updates and analyzes Dependabot PRs for compatibility and breaking changes
33
on:
44
schedule:
55
# Run every other business day: Monday, Wednesday, Friday at 9 AM UTC
@@ -30,14 +30,15 @@ tools:
3030
bash: [":*"]
3131

3232
---
33-
# Dependabot Go Module Dependency Checker
33+
# Dependabot Dependency Checker
3434

3535
## Objective
36-
Check for available Go module updates using Dependabot, evaluate their safety, and create issues for safe updates.
36+
Check for available Go module and NPM dependency updates using Dependabot, evaluate their safety, and create issues for safe updates.
3737

3838
## Current Context
3939
- **Repository**: ${{ github.repository }}
4040
- **Go Module File**: `go.mod` in repository root
41+
- **NPM Packages**: Check for `@playwright/mcp` updates in constants.go
4142

4243
## Your Tasks
4344

@@ -50,6 +51,19 @@ Check for available Go module updates using Dependabot, evaluate their safety, a
5051
- Security vulnerability information (if any)
5152
- Changelog or release notes (if available via web-fetch)
5253

54+
### Phase 1.5: Check Playwright NPM Package Updates
55+
1. Check the current `@playwright/mcp` version in `pkg/constants/constants.go`:
56+
- Look for `DefaultPlaywrightVersion` constant
57+
- Extract the current version number
58+
2. Check for newer versions on NPM:
59+
- Use web-fetch to query `https://registry.npmjs.org/@playwright/mcp`
60+
- Compare the latest version with the current version in constants.go
61+
- Get release information and changelog if available
62+
3. Evaluate the update:
63+
- Check if it's a patch, minor, or major version update
64+
- Look for breaking changes in release notes
65+
- Consider security fixes and improvements
66+
5367
### Phase 2: Evaluate Update Safety
5468
For each dependency update, evaluate:
5569

@@ -206,3 +220,50 @@ go mod tidy
206220
- Test system-specific functionality
207221
- Verify cross-platform compatibility
208222
```
223+
224+
### Example 3: Playwright NPM Package Update
225+
226+
```markdown
227+
## Summary
228+
Update `@playwright/mcp` package from 1.56.1 to 1.57.0
229+
230+
## Current State
231+
- **Package**: @playwright/mcp
232+
- **Current Version**: 1.56.1 (in pkg/constants/constants.go - DefaultPlaywrightVersion)
233+
- **Proposed Version**: 1.57.0
234+
- **Update Type**: Minor
235+
236+
## Safety Assessment
237+
**Safe to update**
238+
- Minor version update (1.56.1 -> 1.57.0)
239+
- No breaking changes mentioned in release notes
240+
- Includes bug fixes and new features
241+
- Backward compatible
242+
243+
## Changes
244+
- Added support for new Playwright features
245+
- Improved MCP server stability
246+
- Bug fixes in browser automation
247+
- Performance improvements
248+
249+
## Links
250+
- [NPM Package](https://www.npmjs.com/package/@playwright/mcp)
251+
- [Release Notes](https://github.com/microsoft/playwright/releases/tag/v1.57.0)
252+
- [Source Repository](https://github.com/microsoft/playwright)
253+
254+
## Recommended Action
255+
```bash
256+
# Update the constant in pkg/constants/constants.go
257+
# Change: const DefaultPlaywrightVersion = "1.56.1"
258+
# To: const DefaultPlaywrightVersion = "1.57.0"
259+
260+
# Then run tests to verify
261+
make test-unit
262+
```
263+
264+
## Testing Notes
265+
- Run unit tests: `make test-unit`
266+
- Verify Playwright MCP configuration generation
267+
- Test browser automation workflows with playwright tool
268+
- Check that version is correctly used in compiled workflows
269+
```

.github/workflows/unbloat-docs.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/constants/constants.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const DefaultGitHubMCPServerVersion = "v0.20.2"
2929
// DefaultFirewallVersion is the default version of the gh-aw-firewall (AWF) binary
3030
const DefaultFirewallVersion = "v0.1.1"
3131

32+
// DefaultPlaywrightVersion is the default version of the @playwright/mcp package
33+
const DefaultPlaywrightVersion = "1.56.1"
34+
3235
// DefaultBunVersion is the default version of Bun for runtime setup
3336
const DefaultBunVersion = "1.1"
3437

pkg/workflow/custom_engine_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ func TestCustomEngineRenderPlaywrightMCPConfigWithDomainConfiguration(t *testing
301301
}
302302

303303
// Check that it contains Playwright MCP npx configuration
304-
if !strings.Contains(output, "@playwright/mcp@latest") {
304+
if !strings.Contains(output, "@playwright/mcp@1.56.1") {
305305
t.Errorf("Expected Playwright MCP npx package in output")
306306
}
307307

@@ -352,7 +352,7 @@ func TestCustomEngineRenderPlaywrightMCPConfigDefaultDomains(t *testing.T) {
352352
}
353353

354354
// Check that it contains Playwright MCP npx configuration
355-
if !strings.Contains(output, "@playwright/mcp@latest") {
355+
if !strings.Contains(output, "@playwright/mcp@1.56.1") {
356356
t.Errorf("Expected Playwright MCP npx package in output")
357357
}
358358

pkg/workflow/mcp-config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ func renderPlaywrightMCPConfigWithOptions(yaml *strings.Builder, playwrightTool
3636
}
3737

3838
// Determine version to use - respect version configuration if provided
39-
playwrightPackage := "@playwright/mcp@latest"
40-
if includeCopilotFields && args.ImageVersion != "" && args.ImageVersion != "latest" {
39+
playwrightPackage := "@playwright/mcp@" + constants.DefaultPlaywrightVersion
40+
if includeCopilotFields && args.ImageVersion != "" && args.ImageVersion != constants.DefaultPlaywrightVersion {
4141
playwrightPackage = "@playwright/mcp@" + args.ImageVersion
4242
}
4343

@@ -203,7 +203,7 @@ func renderPlaywrightMCPConfigTOML(yaml *strings.Builder, playwrightTool any) {
203203
yaml.WriteString(" [mcp_servers.playwright]\n")
204204
yaml.WriteString(" command = \"npx\"\n")
205205
yaml.WriteString(" args = [\n")
206-
yaml.WriteString(" \"@playwright/mcp@latest\",\n")
206+
yaml.WriteString(" \"@playwright/mcp@" + constants.DefaultPlaywrightVersion + "\",\n")
207207
yaml.WriteString(" \"--output-dir\",\n")
208208
yaml.WriteString(" \"/tmp/gh-aw/mcp-logs/playwright\"")
209209
if len(args.AllowedDomains) > 0 {

pkg/workflow/mcp_config_refactor_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestRenderPlaywrightMCPConfigWithOptions(t *testing.T) {
4848
`"playwright": {`,
4949
`"command": "npx"`,
5050
`"args": [`,
51-
`"@playwright/mcp@latest"`,
51+
`"@playwright/mcp@1.56.1"`,
5252
`"--output-dir"`,
5353
`"/tmp/gh-aw/mcp-logs/playwright"`,
5454
` },`,
@@ -269,7 +269,7 @@ func TestRenderPlaywrightMCPConfigTOML(t *testing.T) {
269269
`[mcp_servers.playwright]`,
270270
`command = "npx"`,
271271
`args = [`,
272-
`"@playwright/mcp@latest"`,
272+
`"@playwright/mcp@1.56.1"`,
273273
`"--output-dir"`,
274274
`"/tmp/gh-aw/mcp-logs/playwright"`,
275275
},

0 commit comments

Comments
 (0)