Skip to content

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Jan 9, 2026

https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices#provide-utility-scripts

[... skill ...]

# Example: Simulating Perfect Circle Movement

```javascript
async (page) => {
  const { runCircle } = await import('./run-circle.js'); // helper to generate circle points
  await runCircle(page, {
    center: { latitude: 52.5234, longitude: 13.4014 },
    radius: 50, // in meters
    steps: 30,
    duration: 15 * 60 * 1000,
  });
}
``

This API is experimental, though. https://nodejs.org/api/vm.html#support-of-dynamic-import-in-compilation-apis

@Skn0tt Skn0tt self-assigned this Jan 9, 2026
@Skn0tt Skn0tt requested a review from dgozman January 9, 2026 15:17
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Test results for "tests 1"

3 fatal errors, not part of any test
53 failed
❌ [default] › debug-tests.spec.ts:380 › should run global setup before debugging @vscode-extension
❌ [default] › debug-tests.spec.ts:516 › should not pause at the end of a setup test @vscode-extension
❌ [default-reuse] › debug-tests.spec.ts:380 › should run global setup before debugging @vscode-extension
❌ [default-reuse] › debug-tests.spec.ts:516 › should not pause at the end of a setup test @vscode-extension
❌ [default-trace] › debug-tests.spec.ts:380 › should run global setup before debugging @vscode-extension
❌ [default-trace] › debug-tests.spec.ts:516 › should not pause at the end of a setup test @vscode-extension
❌ [playwright-test] › expect.spec.ts:217 › should work with default expect matchers and esModuleInterop=false @ubuntu-latest-node20
❌ [playwright-test] › resolver.spec.ts:793 › directory imports › should resolve index.js after path mapping in CJS @ubuntu-latest-node20
❌ [playwright-test] › resolver.spec.ts:834 › directory imports › should resolve index.js after path mapping in ESM @ubuntu-latest-node20
❌ [playwright-test] › resolver.spec.ts:878 › directory imports › should respect package.json#main after path mapping in CJS @ubuntu-latest-node20
❌ [playwright-test] › resolver.spec.ts:925 › directory imports › should respect package.json#main after path mapping in ESM @ubuntu-latest-node20
❌ [playwright-test] › resolver.spec.ts:971 › directory imports › should respect package.json#exports without path mapping in CJS @ubuntu-latest-node20
❌ [playwright-test] › resolver.spec.ts:1013 › directory imports › should respect package.json#exports without path mapping in ESM @ubuntu-latest-node20
❌ [playwright-test] › resolver.spec.ts:1055 › directory imports › should not respect package.json#exports after type mapping in CJS @ubuntu-latest-node20
❌ [playwright-test] › resolver.spec.ts:1107 › directory imports › should not respect package.json#exports after type mapping in ESM @ubuntu-latest-node20
❌ [playwright-test] › expect.spec.ts:217 › should work with default expect matchers and esModuleInterop=false @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:793 › directory imports › should resolve index.js after path mapping in CJS @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:834 › directory imports › should resolve index.js after path mapping in ESM @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:878 › directory imports › should respect package.json#main after path mapping in CJS @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:925 › directory imports › should respect package.json#main after path mapping in ESM @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:971 › directory imports › should respect package.json#exports without path mapping in CJS @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:1013 › directory imports › should respect package.json#exports without path mapping in ESM @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:1055 › directory imports › should not respect package.json#exports after type mapping in CJS @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:1107 › directory imports › should not respect package.json#exports after type mapping in ESM @macos-latest-node20
❌ [playwright-test] › runner.spec.ts:124 › should ignore subprocess creation error because of SIGINT @macos-latest-node20
❌ [playwright-test] › expect.spec.ts:217 › should work with default expect matchers and esModuleInterop=false @ubuntu-latest-node24
❌ [playwright-test] › resolver.spec.ts:793 › directory imports › should resolve index.js after path mapping in CJS @ubuntu-latest-node24
❌ [playwright-test] › resolver.spec.ts:834 › directory imports › should resolve index.js after path mapping in ESM @ubuntu-latest-node24
❌ [playwright-test] › resolver.spec.ts:878 › directory imports › should respect package.json#main after path mapping in CJS @ubuntu-latest-node24
❌ [playwright-test] › resolver.spec.ts:925 › directory imports › should respect package.json#main after path mapping in ESM @ubuntu-latest-node24
❌ [playwright-test] › resolver.spec.ts:971 › directory imports › should respect package.json#exports without path mapping in CJS @ubuntu-latest-node24
❌ [playwright-test] › resolver.spec.ts:1013 › directory imports › should respect package.json#exports without path mapping in ESM @ubuntu-latest-node24
❌ [playwright-test] › resolver.spec.ts:1055 › directory imports › should not respect package.json#exports after type mapping in CJS @ubuntu-latest-node24
❌ [playwright-test] › resolver.spec.ts:1107 › directory imports › should not respect package.json#exports after type mapping in ESM @ubuntu-latest-node24
❌ [playwright-test] › expect.spec.ts:217 › should work with default expect matchers and esModuleInterop=false @ubuntu-latest-node22
❌ [playwright-test] › resolver.spec.ts:793 › directory imports › should resolve index.js after path mapping in CJS @ubuntu-latest-node22
❌ [playwright-test] › resolver.spec.ts:834 › directory imports › should resolve index.js after path mapping in ESM @ubuntu-latest-node22
❌ [playwright-test] › resolver.spec.ts:878 › directory imports › should respect package.json#main after path mapping in CJS @ubuntu-latest-node22
❌ [playwright-test] › resolver.spec.ts:925 › directory imports › should respect package.json#main after path mapping in ESM @ubuntu-latest-node22
❌ [playwright-test] › resolver.spec.ts:971 › directory imports › should respect package.json#exports without path mapping in CJS @ubuntu-latest-node22
❌ [playwright-test] › resolver.spec.ts:1013 › directory imports › should respect package.json#exports without path mapping in ESM @ubuntu-latest-node22
❌ [playwright-test] › resolver.spec.ts:1055 › directory imports › should not respect package.json#exports after type mapping in CJS @ubuntu-latest-node22
❌ [playwright-test] › resolver.spec.ts:1107 › directory imports › should not respect package.json#exports after type mapping in ESM @ubuntu-latest-node22
❌ [playwright-test] › expect.spec.ts:217 › should work with default expect matchers and esModuleInterop=false @windows-latest-node20
❌ [playwright-test] › reporter-html.spec.ts:304 › merged › should not include image diff with non-images @macos-latest-node20
❌ [playwright-test] › resolver.spec.ts:793 › directory imports › should resolve index.js after path mapping in CJS @windows-latest-node20
❌ [playwright-test] › resolver.spec.ts:834 › directory imports › should resolve index.js after path mapping in ESM @windows-latest-node20
❌ [playwright-test] › resolver.spec.ts:878 › directory imports › should respect package.json#main after path mapping in CJS @windows-latest-node20
❌ [playwright-test] › resolver.spec.ts:925 › directory imports › should respect package.json#main after path mapping in ESM @windows-latest-node20
❌ [playwright-test] › resolver.spec.ts:971 › directory imports › should respect package.json#exports without path mapping in CJS @windows-latest-node20
❌ [playwright-test] › resolver.spec.ts:1013 › directory imports › should respect package.json#exports without path mapping in ESM @windows-latest-node20
❌ [playwright-test] › resolver.spec.ts:1055 › directory imports › should not respect package.json#exports after type mapping in CJS @windows-latest-node20
❌ [playwright-test] › resolver.spec.ts:1107 › directory imports › should not respect package.json#exports after type mapping in ESM @windows-latest-node20

3 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:1082 › cli codegen › should not throw csp directive violation errors `@firefox-ubuntu-22.04-node20`
⚠️ [firefox-page] › page/page-wait-for-function.spec.ts:104 › should work with strict CSP policy `@firefox-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:426 › should work behind reverse proxy `@macos-latest-node20`

34188 passed, 691 skipped


Merge workflow run.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Test results for "MCP"

1 failed
❌ [chrome] › mcp/video.spec.ts:63 › should work with recordVideo (persistent) @mcp-macos-15

2842 passed, 121 skipped


Merge workflow run.

`);

const code = `async (page) => {
const { clickSubmit } = await import(${JSON.stringify(scriptPath)});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to prohibit random imports? Looks like it did work for require but not for import. I think the user should have better control over what can be imported.

"@types/codemirror": "^5.60.7",
"@types/formidable": "^2.0.4",
"@types/node": "18.19.76",
"@types/node": "25.0.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use 20 which is our oldest supported node?

@Skn0tt Skn0tt closed this Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants