playwright 1.57.0-alpha-2025-10-28 → 1.57.0-alpha-2025-10-29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: "Copilot Setup Steps"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
paths:
|
|
7
|
+
- .github/workflows/copilot-setup-steps.yml
|
|
8
|
+
pull_request:
|
|
9
|
+
paths:
|
|
10
|
+
- .github/workflows/copilot-setup-steps.yml
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
copilot-setup-steps:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: lts/*
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: npm ci
|
|
28
|
+
|
|
29
|
+
- name: Install Playwright Browsers
|
|
30
|
+
run: npx playwright install --with-deps
|
|
31
|
+
|
|
32
|
+
# Customize this step as needed
|
|
33
|
+
- name: Build application
|
|
34
|
+
run: npx run build
|
|
@@ -115,7 +115,7 @@ class ClaudeGenerator {
|
|
|
115
115
|
}
|
|
116
116
|
static agentSpec(agent) {
|
|
117
117
|
const claudeToolMap = /* @__PURE__ */ new Map([
|
|
118
|
-
["search", ["Glob", "Grep", "Read"]],
|
|
118
|
+
["search", ["Glob", "Grep", "Read", "LS"]],
|
|
119
119
|
["edit", ["Edit", "MultiEdit", "Write"]]
|
|
120
120
|
]);
|
|
121
121
|
function asClaudeTool(tool) {
|
|
@@ -126,13 +126,15 @@ class ClaudeGenerator {
|
|
|
126
126
|
}
|
|
127
127
|
const examples = agent.examples.length ? ` Examples: ${agent.examples.map((example) => `<example>${example}</example>`).join("")}` : "";
|
|
128
128
|
const lines = [];
|
|
129
|
+
const header = {
|
|
130
|
+
name: agent.header.name,
|
|
131
|
+
description: agent.header.description + examples,
|
|
132
|
+
tools: agent.header.tools.map((tool) => asClaudeTool(tool)).join(", "),
|
|
133
|
+
model: agent.header.model,
|
|
134
|
+
color: agent.header.color
|
|
135
|
+
};
|
|
129
136
|
lines.push(`---`);
|
|
130
|
-
lines.push(
|
|
131
|
-
lines.push(`description: ${agent.header.description}.${examples}`);
|
|
132
|
-
lines.push(`tools: ${agent.header.tools.map((tool) => asClaudeTool(tool)).join(", ")}`);
|
|
133
|
-
lines.push(`model: ${agent.header.model}`);
|
|
134
|
-
lines.push(`color: ${agent.header.color}`);
|
|
135
|
-
lines.push(`---`);
|
|
137
|
+
lines.push(import_utilsBundle.yaml.stringify(header, { lineWidth: 1e5 }) + `---`);
|
|
136
138
|
lines.push("");
|
|
137
139
|
lines.push(agent.instructions);
|
|
138
140
|
return lines.join("\n");
|
|
@@ -212,18 +214,46 @@ class CopilotGenerator {
|
|
|
212
214
|
await deleteFile(`.github/chatmodes/\u{1F3AD} generator.chatmode.md`, "legacy generator chatmode");
|
|
213
215
|
await deleteFile(`.github/chatmodes/\u{1F3AD} healer.chatmode.md`, "legacy healer chatmode");
|
|
214
216
|
await VSCodeGenerator.appendToMCPJson();
|
|
217
|
+
const cwdFolder = import_path.default.basename(process.cwd());
|
|
218
|
+
const mcpConfig = {
|
|
219
|
+
"mcpServers": {
|
|
220
|
+
"playwright-test": {
|
|
221
|
+
"type": "stdio",
|
|
222
|
+
"command": "npx",
|
|
223
|
+
"args": [
|
|
224
|
+
`--prefix=/home/runner/work/${cwdFolder}/${cwdFolder}`,
|
|
225
|
+
"playwright",
|
|
226
|
+
"run-test-mcp-server",
|
|
227
|
+
"--headless",
|
|
228
|
+
`--config=/home/runner/work/${cwdFolder}/${cwdFolder}`
|
|
229
|
+
],
|
|
230
|
+
"tools": ["*"]
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
if (!import_fs.default.existsSync(".github/copilot-setup-steps.yml")) {
|
|
235
|
+
const yaml2 = import_fs.default.readFileSync(import_path.default.join(__dirname, "copilot-setup-steps.yml"), "utf-8");
|
|
236
|
+
await writeFile(".github/workflows/copilot-setup-steps.yml", yaml2, "\u{1F527}", "GitHub Copilot setup steps");
|
|
237
|
+
}
|
|
238
|
+
console.log("");
|
|
239
|
+
console.log("");
|
|
240
|
+
console.log(" \u{1F527} TODO: GitHub > Settings > Copilot > Coding agent > MCP configuration");
|
|
241
|
+
console.log("------------------------------------------------------------------");
|
|
242
|
+
console.log(JSON.stringify(mcpConfig, null, 2));
|
|
243
|
+
console.log("------------------------------------------------------------------");
|
|
215
244
|
initRepoDone();
|
|
216
245
|
}
|
|
217
246
|
static agentSpec(agent) {
|
|
218
247
|
const examples = agent.examples.length ? ` Examples: ${agent.examples.map((example) => `<example>${example}</example>`).join("")}` : "";
|
|
219
248
|
const lines = [];
|
|
249
|
+
const header = {
|
|
250
|
+
name: agent.header.name,
|
|
251
|
+
description: agent.header.description + examples,
|
|
252
|
+
tools: agent.header.tools,
|
|
253
|
+
model: "Claude Sonnet 4"
|
|
254
|
+
};
|
|
220
255
|
lines.push(`---`);
|
|
221
|
-
lines.push(
|
|
222
|
-
lines.push(`description: ${agent.header.description}.${examples}`);
|
|
223
|
-
lines.push(`tools:
|
|
224
|
-
${agent.header.tools.map((tool) => ` - ${tool}`).join("\n")}`);
|
|
225
|
-
lines.push(`model: Claude Sonnet 4`);
|
|
226
|
-
lines.push(`---`);
|
|
256
|
+
lines.push(import_utilsBundle.yaml.stringify(header) + `---`);
|
|
227
257
|
lines.push("");
|
|
228
258
|
lines.push(agent.instructions);
|
|
229
259
|
lines.push("");
|
|
@@ -307,7 +337,7 @@ class VSCodeGenerator {
|
|
|
307
337
|
}
|
|
308
338
|
}
|
|
309
339
|
async function writeFile(filePath, content, icon, description) {
|
|
310
|
-
console.log(
|
|
340
|
+
console.log(` ${icon} ${import_path.default.relative(process.cwd(), filePath)} ${import_utilsBundle.colors.dim("- " + description)}`);
|
|
311
341
|
await (0, import_utils.mkdirIfNeeded)(filePath);
|
|
312
342
|
await import_fs.default.promises.writeFile(filePath, content, "utf-8");
|
|
313
343
|
}
|
|
@@ -318,12 +348,12 @@ async function deleteFile(filePath, description) {
|
|
|
318
348
|
} catch {
|
|
319
349
|
return;
|
|
320
350
|
}
|
|
321
|
-
console.log(
|
|
351
|
+
console.log(` \u2702\uFE0F ${import_path.default.relative(process.cwd(), filePath)} ${import_utilsBundle.colors.dim("- " + description)}`);
|
|
322
352
|
await import_fs.default.promises.unlink(filePath);
|
|
323
353
|
}
|
|
324
354
|
async function initRepo(config, projectName, options) {
|
|
325
355
|
const project = (0, import_seed.seedProject)(config, projectName);
|
|
326
|
-
console.log(
|
|
356
|
+
console.log(` \u{1F3AD} Using project "${project.project.name}" as a primary project`);
|
|
327
357
|
if (!import_fs.default.existsSync("specs")) {
|
|
328
358
|
await import_fs.default.promises.mkdir("specs");
|
|
329
359
|
await writeFile(import_path.default.join("specs", "README.md"), `# Specs
|
|
@@ -353,7 +383,7 @@ This is a directory for test plans.
|
|
|
353
383
|
}
|
|
354
384
|
}
|
|
355
385
|
function initRepoDone() {
|
|
356
|
-
console.log("\u2705 Done.");
|
|
386
|
+
console.log(" \u2705 Done.");
|
|
357
387
|
}
|
|
358
388
|
async function loadPrompt(file, params) {
|
|
359
389
|
const content = await import_fs.default.promises.readFile(import_path.default.join(__dirname, file), "utf-8");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "playwright",
|
|
3
|
-
"version": "1.57.0-alpha-2025-10-
|
|
3
|
+
"version": "1.57.0-alpha-2025-10-29",
|
|
4
4
|
"description": "A high-level API to automate web browsers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"license": "Apache-2.0",
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"playwright-core": "1.57.0-alpha-2025-10-
|
|
67
|
+
"playwright-core": "1.57.0-alpha-2025-10-29"
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
|
70
70
|
"fsevents": "2.3.2"
|