skillfit 0.15.0 → 0.15.1
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.
- package/CHANGELOG.md +50 -0
- package/README.md +76 -33
- package/README.zh-CN.md +75 -32
- package/benches/README.md +1 -1
- package/dist/agents/accounting.js +27 -10
- package/dist/agents/adapters/api.js +59 -32
- package/dist/agents/adapters/cli.js +208 -111
- package/dist/agents/adapters/codex-usage.js +51 -25
- package/dist/agents/adapters/kimi-usage.js +23 -16
- package/dist/agents/call-budget.js +67 -33
- package/dist/agents/call-limits.js +11 -7
- package/dist/agents/contracts.js +2 -2
- package/dist/agents/environment.js +46 -22
- package/dist/agents/execution.js +32 -19
- package/dist/agents/health.js +88 -66
- package/dist/agents/installed-skills.js +28 -9
- package/dist/agents/matrix.js +5 -3
- package/dist/agents/mcp-probe.js +157 -146
- package/dist/agents/observation/model-identity.js +96 -49
- package/dist/agents/observation/trigger-contract.js +40 -21
- package/dist/agents/observation/trigger-detection.js +100 -61
- package/dist/agents/preflight-contract.js +40 -20
- package/dist/agents/preflight.js +136 -70
- package/dist/agents/session-observation.js +39 -29
- package/dist/agents/timeout.js +14 -6
- package/dist/bench/authoring.js +320 -201
- package/dist/bench/claims.js +6 -3
- package/dist/bench/constants.js +1 -1
- package/dist/bench/controls.js +123 -91
- package/dist/bench/diagnostics.js +57 -24
- package/dist/bench/draft.js +133 -68
- package/dist/bench/gates/check.js +79 -69
- package/dist/bench/gates/error.js +26 -17
- package/dist/bench/gates/summary.js +7 -7
- package/dist/bench/gates/timeout.js +2 -2
- package/dist/bench/gates/verifier.js +12 -5
- package/dist/bench/location.js +18 -10
- package/dist/bench/output-layout.js +5 -5
- package/dist/bench/read.js +74 -42
- package/dist/bench/scope.js +56 -34
- package/dist/bench/source.js +32 -20
- package/dist/bench/templates.js +30 -22
- package/dist/cli/bench-check-report.js +34 -10
- package/dist/cli/bench-manage.js +6 -6
- package/dist/cli/bench.js +45 -38
- package/dist/cli/confirm.js +3 -3
- package/dist/cli/definition.js +172 -114
- package/dist/cli/doctor.js +14 -14
- package/dist/cli/eval-cli.js +3 -3
- package/dist/cli/eval-component.js +21 -7
- package/dist/cli/eval-display.js +66 -55
- package/dist/cli/eval-plan.js +7 -2
- package/dist/cli/eval-report.js +114 -83
- package/dist/cli/eval-single-arm-report.js +53 -33
- package/dist/cli/eval.js +2 -2
- package/dist/cli/evaluation-host.js +5 -5
- package/dist/cli/evaluation-report.js +1 -1
- package/dist/cli/main.js +350 -196
- package/dist/cli/mcp.js +7 -7
- package/dist/cli/report.js +40 -17
- package/dist/cli/trigger-summary.js +23 -23
- package/dist/cli.js +1 -1
- package/dist/commands/bench-draft.test.js +226 -96
- package/dist/commands/bench-source.test.js +70 -53
- package/dist/commands/bench.js +1 -1
- package/dist/commands/bundle.js +1 -1
- package/dist/commands/eval-api-failure.test.js +61 -28
- package/dist/commands/eval-cli.js +1 -1
- package/dist/commands/eval-export.js +1 -1
- package/dist/commands/eval-layout.test.js +148 -70
- package/dist/commands/eval-single-arm-replay.js +1 -1
- package/dist/commands/eval.js +1 -1
- package/dist/commands/evaluation-report.js +1 -1
- package/dist/commands/install.js +1 -1
- package/dist/composition.js +41 -20
- package/dist/configuration/bundle.js +109 -89
- package/dist/configuration/constants.js +1 -1
- package/dist/configuration/install.js +184 -112
- package/dist/configuration/setup.js +64 -41
- package/dist/configuration/transaction.js +13 -11
- package/dist/configuration/upstream.js +61 -43
- package/dist/evaluation/application/calibration.js +231 -85
- package/dist/evaluation/application/evaluation.js +166 -56
- package/dist/evaluation/application/export.js +107 -67
- package/dist/evaluation/application/planning.js +289 -114
- package/dist/evaluation/application/preflight-error.js +11 -4
- package/dist/evaluation/application/preflight.js +54 -21
- package/dist/evaluation/application/read.js +1 -1
- package/dist/evaluation/application/request.js +45 -21
- package/dist/evaluation/application/self-test.js +188 -75
- package/dist/evaluation/execution/activation.js +91 -65
- package/dist/evaluation/execution/budget.js +20 -9
- package/dist/evaluation/execution/control-executor.js +34 -16
- package/dist/evaluation/execution/interrupted.js +2 -2
- package/dist/evaluation/execution/judge.js +51 -26
- package/dist/evaluation/execution/mock-executor.js +7 -7
- package/dist/evaluation/execution/paired.js +104 -72
- package/dist/evaluation/execution/prompt.js +21 -15
- package/dist/evaluation/measurement/acceptance.js +143 -68
- package/dist/evaluation/measurement/costs.js +39 -29
- package/dist/evaluation/measurement/efficiency.js +51 -18
- package/dist/evaluation/measurement/invocation-costs.js +50 -29
- package/dist/evaluation/measurement/judge-protocol.js +16 -18
- package/dist/evaluation/measurement/paired-contract.js +4 -3
- package/dist/evaluation/measurement/policy.js +48 -31
- package/dist/evaluation/measurement/report.js +51 -43
- package/dist/evaluation/measurement/scope.js +25 -7
- package/dist/evaluation/measurement/statistics.js +7 -3
- package/dist/evaluation/measurement/trial-summary.js +20 -12
- package/dist/evaluation/measurement/trigger-summary.js +1 -1
- package/dist/evaluation/records/assess.js +4 -2
- package/dist/evaluation/records/audit.js +336 -202
- package/dist/evaluation/records/contracts.js +44 -21
- package/dist/evaluation/records/formats.js +36 -19
- package/dist/evaluation/records/input-snapshot.js +88 -53
- package/dist/evaluation/records/judge-audit.js +37 -31
- package/dist/evaluation/records/manifest.js +302 -223
- package/dist/evaluation/records/model-identity.js +39 -29
- package/dist/evaluation/records/read.js +122 -42
- package/dist/evaluation/records/replay-package.js +81 -48
- package/dist/evaluation/records/session.js +200 -93
- package/dist/evaluation/records/single-arm-audit.js +313 -195
- package/dist/evaluation/records/single-arm-read.js +235 -112
- package/dist/evaluation/targets/native-diff.js +22 -13
- package/dist/evaluation/targets/output-layout.js +6 -6
- package/dist/evaluation/targets/skill.js +16 -13
- package/dist/evaluation/targets/workspace.js +19 -19
- package/dist/harness/bench-location.test.js +21 -21
- package/dist/harness/executors/cli.js +1 -1
- package/dist/harness/hash.js +1 -1
- package/dist/harness/interruption.js +1 -1
- package/dist/harness/replay-package.js +1 -1
- package/dist/harness/single-arm-audit.js +1 -1
- package/dist/harness/verifier-timeout.test.js +63 -32
- package/dist/matrix/agents.json +29 -6
- package/dist/matrix/agents.schema.json +17 -3
- package/dist/resources/experiment.js +18 -16
- package/dist/resources/frontmatter.js +6 -6
- package/dist/resources/installed-skill.js +32 -22
- package/dist/resources/skill.js +10 -10
- package/dist/shared/backup.js +1 -1
- package/dist/shared/cancellation.js +10 -4
- package/dist/shared/command.js +8 -7
- package/dist/shared/digest.js +2 -2
- package/dist/shared/hash.js +9 -9
- package/dist/shared/input-directories.js +6 -5
- package/dist/shared/json.js +10 -6
- package/dist/shared/local-files.js +8 -10
- package/dist/shared/output-path.js +4 -4
- package/dist/shared/package-root.js +7 -5
- package/dist/shared/process-tree.js +20 -14
- package/dist/shared/process.js +20 -15
- package/dist/shared/read-json.js +3 -3
- package/dist/shared/timing.js +22 -11
- package/dist/shared/version.js +3 -3
- package/dist/usage/receipts.js +41 -27
- package/docs/README.md +6 -6
- package/docs/assets/skillfit-report.svg +17 -0
- package/docs/guides/bench-authoring.md +1 -1
- package/docs/guides/first-real-eval.md +16 -0
- package/docs/maintainers/architecture.md +3 -3
- package/docs/maintainers/releases.md +5 -0
- package/docs/reference/evaluation-reports.md +3 -1
- package/docs/reference/metrics.md +1 -1
- package/package.json +9 -4
- package/skills/skillfit/SKILL.md +14 -15
- package/tools/verify/recipes/0.11.0-feature-smoke.mjs +491 -140
- package/tools/verify/recipes/release-docs-smoke.mjs +38 -21
- package/tools/verify/recipes/release-feature-smoke.mjs +187 -88
- package/benches/contrib/README.md +0 -73
- package/benches/contrib/oss-lru-cache/README.md +0 -27
- package/benches/contrib/oss-lru-cache/bench.json +0 -37
- package/benches/contrib/oss-lru-cache/provenance.json +0 -62
- package/benches/contrib/oss-lru-cache/runtime.mjs +0 -32
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/fixture/LICENSE +0 -15
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/fixture/README.md +0 -3
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/fixture/index.js +0 -1044
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/fixture/package.json +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/fixture/runtime.mjs +0 -32
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/fixture/test.mjs +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/prompt.md +0 -5
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/reference/LICENSE +0 -15
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/reference/answer.md +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/reference/index.js +0 -1053
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/reference/oracle.mjs +0 -8
- package/benches/contrib/oss-lru-cache/tasks/fetch-abort/verify.mjs +0 -3
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/LICENSE.md +0 -55
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/README.md +0 -3
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/package.json +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/runtime.mjs +0 -32
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/src/diagnostics-channel-browser.ts +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/src/diagnostics-channel-cjs.cts +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/src/diagnostics-channel-esm.mts +0 -29
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/src/diagnostics-channel-node.ts +0 -7
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/src/diagnostics-channel.ts +0 -6
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/src/index.ts +0 -3148
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/src/perf.ts +0 -17
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/fixture/test.mjs +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/prompt.md +0 -5
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/LICENSE.md +0 -55
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/answer.md +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/oracle.mjs +0 -7
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/src/diagnostics-channel-browser.ts +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/src/diagnostics-channel-cjs.cts +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/src/diagnostics-channel-esm.mts +0 -29
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/src/diagnostics-channel-node.ts +0 -7
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/src/diagnostics-channel.ts +0 -6
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/src/index.ts +0 -3174
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/reference/src/perf.ts +0 -17
- package/benches/contrib/oss-lru-cache/tasks/fetch-lifecycle/verify.mjs +0 -3
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/fixture/LICENSE +0 -15
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/fixture/README.md +0 -3
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/fixture/index.js +0 -1028
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/fixture/package.json +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/fixture/runtime.mjs +0 -32
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/fixture/test.mjs +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/prompt.md +0 -5
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/reference/LICENSE +0 -15
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/reference/answer.md +0 -11
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/reference/index.js +0 -1028
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/reference/oracle.mjs +0 -7
- package/benches/contrib/oss-lru-cache/tasks/fetch-size/verify.mjs +0 -3
- package/benches/contrib/oss-lru-cache/verifiers/cases.mjs +0 -74
- package/benches/contrib/oss-lru-cache/verifiers/oracle.mjs +0 -9
- package/benches/contrib/oss-lru-cache/verifiers/probe.mjs +0 -14
- package/benches/contrib/oss-lru-cache/verifiers/shared.mjs +0 -131
- package/benches/contrib/oss-lru-cache/verifiers/test-reporter.mjs +0 -29
- package/benches/contrib/oss-mcp-use-utf8/LICENSE.upstream +0 -21
- package/benches/contrib/oss-mcp-use-utf8/README.md +0 -57
- package/benches/contrib/oss-mcp-use-utf8/bench.json +0 -16
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/fixture/LICENSE +0 -21
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/fixture/package.json +0 -3
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/fixture/src/ext-apps-bridge.js +0 -3
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/fixture/src/resolve-view-resource.ts +0 -96
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/fixture/test/basic.test.mjs +0 -13
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/prompt.md +0 -8
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/reference/README.md +0 -5
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/reference/oracle.mjs +0 -11
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/reference/solutions/view-utf8/src/resolve-view-resource.ts +0 -96
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/reference/solutions/view-utf8/test/utf8.regression.test.mjs +0 -14
- package/benches/contrib/oss-mcp-use-utf8/tasks/view-utf8/verify.mjs +0 -120
- package/benches/contrib/oss-minipass/README.md +0 -32
- package/benches/contrib/oss-minipass/bench.json +0 -43
- package/benches/contrib/oss-minipass/provenance.json +0 -87
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/README.md +0 -717
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/UPSTREAM.package.json +0 -39
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/index.js +0 -615
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/package.json +0 -8
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/runtime.cjs +0 -11
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/test.mjs +0 -16
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/vendor/yallist/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/vendor/yallist/README.md +0 -204
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/vendor/yallist/iterator.js +0 -8
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/vendor/yallist/package.json +0 -29
- package/benches/contrib/oss-minipass/tasks/async-end/fixture/vendor/yallist/yallist.js +0 -426
- package/benches/contrib/oss-minipass/tasks/async-end/prompt.md +0 -3
- package/benches/contrib/oss-minipass/tasks/async-end/reference/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/async-end/reference/README.md +0 -717
- package/benches/contrib/oss-minipass/tasks/async-end/reference/UPSTREAM.package.json +0 -39
- package/benches/contrib/oss-minipass/tasks/async-end/reference/index.js +0 -622
- package/benches/contrib/oss-minipass/tasks/async-end/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-minipass/tasks/async-end/reference/package.json +0 -8
- package/benches/contrib/oss-minipass/tasks/async-end/reference/regression.test.mjs +0 -10
- package/benches/contrib/oss-minipass/tasks/async-end/reference/runtime.cjs +0 -11
- package/benches/contrib/oss-minipass/tasks/async-end/reference/test.mjs +0 -16
- package/benches/contrib/oss-minipass/tasks/async-end/reference/vendor/yallist/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/async-end/reference/vendor/yallist/README.md +0 -204
- package/benches/contrib/oss-minipass/tasks/async-end/reference/vendor/yallist/iterator.js +0 -8
- package/benches/contrib/oss-minipass/tasks/async-end/reference/vendor/yallist/package.json +0 -29
- package/benches/contrib/oss-minipass/tasks/async-end/reference/vendor/yallist/yallist.js +0 -426
- package/benches/contrib/oss-minipass/tasks/async-end/verify.mjs +0 -2
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/README.md +0 -613
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/UPSTREAM.package.json +0 -39
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/index.js +0 -594
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/package.json +0 -8
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/runtime.cjs +0 -11
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/test.mjs +0 -16
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/vendor/yallist/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/vendor/yallist/README.md +0 -204
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/vendor/yallist/iterator.js +0 -8
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/vendor/yallist/package.json +0 -29
- package/benches/contrib/oss-minipass/tasks/buffered-readable/fixture/vendor/yallist/yallist.js +0 -426
- package/benches/contrib/oss-minipass/tasks/buffered-readable/prompt.md +0 -3
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/README.md +0 -613
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/UPSTREAM.package.json +0 -39
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/index.js +0 -596
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/package.json +0 -8
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/regression.test.mjs +0 -9
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/runtime.cjs +0 -11
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/test.mjs +0 -16
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/vendor/yallist/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/vendor/yallist/README.md +0 -204
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/vendor/yallist/iterator.js +0 -8
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/vendor/yallist/package.json +0 -29
- package/benches/contrib/oss-minipass/tasks/buffered-readable/reference/vendor/yallist/yallist.js +0 -426
- package/benches/contrib/oss-minipass/tasks/buffered-readable/verify.mjs +0 -2
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/README.md +0 -205
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/UPSTREAM.package.json +0 -34
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/index.js +0 -415
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/package.json +0 -8
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/runtime.cjs +0 -11
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/test.mjs +0 -16
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/vendor/yallist/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/vendor/yallist/README.md +0 -204
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/vendor/yallist/iterator.js +0 -8
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/vendor/yallist/package.json +0 -29
- package/benches/contrib/oss-minipass/tasks/end-listeners/fixture/vendor/yallist/yallist.js +0 -426
- package/benches/contrib/oss-minipass/tasks/end-listeners/prompt.md +0 -3
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/README.md +0 -205
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/UPSTREAM.package.json +0 -34
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/index.js +0 -407
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/package.json +0 -8
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/regression.test.mjs +0 -9
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/runtime.cjs +0 -11
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/test.mjs +0 -16
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/vendor/yallist/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/vendor/yallist/README.md +0 -204
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/vendor/yallist/iterator.js +0 -8
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/vendor/yallist/package.json +0 -29
- package/benches/contrib/oss-minipass/tasks/end-listeners/reference/vendor/yallist/yallist.js +0 -426
- package/benches/contrib/oss-minipass/tasks/end-listeners/verify.mjs +0 -2
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/README.md +0 -613
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/UPSTREAM.package.json +0 -39
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/index.js +0 -538
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/package.json +0 -8
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/runtime.cjs +0 -11
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/test.mjs +0 -16
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/vendor/yallist/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/vendor/yallist/README.md +0 -204
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/vendor/yallist/iterator.js +0 -8
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/vendor/yallist/package.json +0 -29
- package/benches/contrib/oss-minipass/tasks/pipeline-order/fixture/vendor/yallist/yallist.js +0 -426
- package/benches/contrib/oss-minipass/tasks/pipeline-order/prompt.md +0 -3
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/README.md +0 -613
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/UPSTREAM.package.json +0 -39
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/index.js +0 -545
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/package.json +0 -8
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/regression.test.mjs +0 -19
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/runtime.cjs +0 -11
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/test.mjs +0 -16
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/vendor/yallist/LICENSE +0 -15
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/vendor/yallist/README.md +0 -204
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/vendor/yallist/iterator.js +0 -8
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/vendor/yallist/package.json +0 -29
- package/benches/contrib/oss-minipass/tasks/pipeline-order/reference/vendor/yallist/yallist.js +0 -426
- package/benches/contrib/oss-minipass/tasks/pipeline-order/verify.mjs +0 -2
- package/benches/contrib/oss-minipass/upstream/async-end.patch +0 -83
- package/benches/contrib/oss-minipass/upstream/buffered-readable.patch +0 -79
- package/benches/contrib/oss-minipass/upstream/end-listeners.patch +0 -77
- package/benches/contrib/oss-minipass/upstream/pipeline-order.patch +0 -173
- package/benches/contrib/oss-minipass/verifiers/cases.mjs +0 -88
- package/benches/contrib/oss-minipass/verifiers/grade.mjs +0 -35
- package/benches/contrib/oss-minipass/verifiers/probe.mjs +0 -10
- package/benches/contrib/oss-minipass/verifiers/regression-evidence.mjs +0 -98
- package/benches/contrib/oss-minipass/verifiers/test-reporter.mjs +0 -29
- package/benches/contrib/oss-normalize-url/README.md +0 -31
- package/benches/contrib/oss-normalize-url/bench.json +0 -16
- package/benches/contrib/oss-normalize-url/provenance.json +0 -41
- package/benches/contrib/oss-normalize-url/tasks/query-shape/fixture/index.d.ts +0 -303
- package/benches/contrib/oss-normalize-url/tasks/query-shape/fixture/index.js +0 -285
- package/benches/contrib/oss-normalize-url/tasks/query-shape/fixture/license +0 -9
- package/benches/contrib/oss-normalize-url/tasks/query-shape/fixture/package.json +0 -57
- package/benches/contrib/oss-normalize-url/tasks/query-shape/fixture/readme.md +0 -312
- package/benches/contrib/oss-normalize-url/tasks/query-shape/fixture/test.js +0 -427
- package/benches/contrib/oss-normalize-url/tasks/query-shape/fixture/test.mjs +0 -4
- package/benches/contrib/oss-normalize-url/tasks/query-shape/prompt.md +0 -7
- package/benches/contrib/oss-normalize-url/tasks/query-shape/reference/index.js +0 -294
- package/benches/contrib/oss-normalize-url/tasks/query-shape/reference/license +0 -9
- package/benches/contrib/oss-normalize-url/tasks/query-shape/reference/oracle.mjs +0 -7
- package/benches/contrib/oss-normalize-url/tasks/query-shape/reference/query-shape.md +0 -12
- package/benches/contrib/oss-normalize-url/tasks/query-shape/reference/query-shape.regression.test.mjs +0 -6
- package/benches/contrib/oss-normalize-url/tasks/query-shape/verify.mjs +0 -40
- package/benches/contrib/oss-normalize-url/verifiers/cases.mjs +0 -26
- package/benches/contrib/oss-normalize-url/verifiers/probe.mjs +0 -10
- package/benches/contrib/oss-normalize-url/verifiers/regression-evidence.mjs +0 -98
- package/benches/contrib/oss-normalize-url/verifiers/test-reporter.mjs +0 -29
- package/benches/contrib/oss-skill-followup/README.md +0 -54
- package/benches/contrib/oss-skill-followup/bench.json +0 -79
- package/benches/contrib/oss-skill-followup/provenance.json +0 -730
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/fixture/LICENSE +0 -11
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/fixture/README.md +0 -61
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/fixture/index.js +0 -93
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/fixture/package.json +0 -9
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/fixture/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/fixture/test.mjs +0 -22
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/fixture/upstream-package.json +0 -47
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/prompt.md +0 -3
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/reference/index.js +0 -97
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/reference/regression.test.mjs +0 -2
- package/benches/contrib/oss-skill-followup/tasks/debounce-context-classes/verify.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/fixture/LICENSE +0 -21
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/fixture/README.md +0 -69
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/fixture/index.js +0 -70
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/fixture/package.json +0 -9
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/fixture/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/fixture/test.mjs +0 -22
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/fixture/upstream-package.json +0 -27
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/prompt.md +0 -3
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/reference/index.js +0 -72
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/reference/regression.test.mjs +0 -2
- package/benches/contrib/oss-skill-followup/tasks/debounce-recursive-args/verify.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/fixture/LICENSE +0 -23
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/fixture/README.md +0 -46
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/fixture/index.js +0 -56
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/fixture/package.json +0 -9
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/fixture/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/fixture/test.mjs +0 -22
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/fixture/upstream-package.json +0 -22
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/prompt.md +0 -3
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/reference/index.js +0 -56
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/reference/regression.test.mjs +0 -2
- package/benches/contrib/oss-skill-followup/tasks/debounce-timer-boundary/verify.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/fixture/LICENSE +0 -24
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/fixture/README.md +0 -469
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/fixture/index.js +0 -1645
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/fixture/package.json +0 -9
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/fixture/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/fixture/test.mjs +0 -22
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/fixture/upstream-package.json +0 -86
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/prompt.md +0 -3
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/reference/index.js +0 -1643
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/reference/regression.test.mjs +0 -2
- package/benches/contrib/oss-skill-followup/tasks/duration-large-digits/verify.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/fixture/LICENSE +0 -24
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/fixture/README.md +0 -470
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/fixture/index.js +0 -1676
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/fixture/package.json +0 -9
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/fixture/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/fixture/test.mjs +0 -22
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/fixture/upstream-package.json +0 -86
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/prompt.md +0 -3
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/reference/index.js +0 -1676
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/reference/regression.test.mjs +0 -2
- package/benches/contrib/oss-skill-followup/tasks/duration-plural-count/verify.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/fixture/LICENSE +0 -9
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/fixture/README.md +0 -136
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/fixture/index.js +0 -153
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/fixture/package.json +0 -9
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/fixture/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/fixture/test.mjs +0 -22
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/fixture/upstream-package.json +0 -53
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/prompt.md +0 -3
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/reference/index.js +0 -155
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/reference/regression.test.mjs +0 -2
- package/benches/contrib/oss-skill-followup/tasks/promise-falsy-rejection/verify.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/fixture/LICENSE +0 -9
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/fixture/README.md +0 -92
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/fixture/index.js +0 -57
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/fixture/package.json +0 -9
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/fixture/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/fixture/test.mjs +0 -22
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/fixture/upstream-package.json +0 -53
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/prompt.md +0 -3
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/reference/index.js +0 -57
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/reference/regression.test.mjs +0 -2
- package/benches/contrib/oss-skill-followup/tasks/promise-method-context/verify.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/fixture/LICENSE +0 -9
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/fixture/README.md +0 -102
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/fixture/index.js +0 -117
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/fixture/package.json +0 -9
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/fixture/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/fixture/test.mjs +0 -22
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/fixture/upstream-package.json +0 -53
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/prompt.md +0 -3
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/reference/index.js +0 -112
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/reference/regression.test.mjs +0 -2
- package/benches/contrib/oss-skill-followup/tasks/promise-overlap-results/verify.mjs +0 -1
- package/benches/contrib/oss-skill-followup/test-clock.mjs +0 -64
- package/benches/contrib/oss-skill-followup/verifiers/cases.mjs +0 -214
- package/benches/contrib/oss-skill-followup/verifiers/grade.mjs +0 -35
- package/benches/contrib/oss-skill-followup/verifiers/probe.mjs +0 -10
- package/benches/contrib/oss-skill-followup/verifiers/regression-evidence.mjs +0 -98
- package/benches/contrib/oss-skill-followup/verifiers/test-reporter.mjs +0 -29
- package/benches/contrib/oss-skill-independent/README.md +0 -61
- package/benches/contrib/oss-skill-independent/bench.json +0 -79
- package/benches/contrib/oss-skill-independent/provenance.json +0 -1903
- package/benches/contrib/oss-skill-independent/task-specs.json +0 -63
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/LICENSE +0 -22
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/Readme.md +0 -1015
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/esm.mjs +0 -15
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/index.js +0 -27
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/lib/argument.js +0 -147
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/lib/command.js +0 -1944
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/lib/error.js +0 -45
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/lib/help.js +0 -396
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/lib/option.js +0 -208
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/lib/suggestSimilar.js +0 -100
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/package-support.json +0 -16
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/package.json +0 -63
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/typings/index.d.ts +0 -774
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/typings/index.test-d.ts +0 -416
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/fixture/upstream-package.json +0 -69
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/prompt.md +0 -3
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/LICENSE +0 -22
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/Readme.md +0 -1015
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/esm.mjs +0 -15
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/index.js +0 -27
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/lib/argument.js +0 -147
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/lib/command.js +0 -1948
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/lib/error.js +0 -45
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/lib/help.js +0 -396
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/lib/option.js +0 -208
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/lib/suggestSimilar.js +0 -100
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/package-support.json +0 -16
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/package.json +0 -63
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/regression.test.mjs +0 -5
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/typings/index.d.ts +0 -774
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/typings/index.test-d.ts +0 -416
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/reference/upstream-package.json +0 -69
- package/benches/contrib/oss-skill-independent/tasks/commander-async-listener-order/verify.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/LICENSE +0 -22
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/Readme.md +0 -1149
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/esm.mjs +0 -16
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/index.js +0 -24
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/lib/argument.js +0 -149
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/lib/command.js +0 -2662
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/lib/error.js +0 -39
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/lib/help.js +0 -713
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/lib/option.js +0 -367
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/lib/suggestSimilar.js +0 -101
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/package-support.json +0 -16
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/package.json +0 -71
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/typings/esm.d.mts +0 -3
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/typings/index.d.ts +0 -1045
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/typings/index.test-d.ts +0 -737
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/fixture/upstream-package.json +0 -82
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/prompt.md +0 -3
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/LICENSE +0 -22
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/Readme.md +0 -1149
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/esm.mjs +0 -16
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/index.js +0 -24
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/lib/argument.js +0 -149
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/lib/command.js +0 -2666
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/lib/error.js +0 -39
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/lib/help.js +0 -713
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/lib/option.js +0 -367
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/lib/suggestSimilar.js +0 -101
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/package-support.json +0 -16
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/package.json +0 -71
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/regression.test.mjs +0 -5
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/typings/esm.d.mts +0 -3
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/typings/index.d.ts +0 -1045
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/typings/index.test-d.ts +0 -737
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/reference/upstream-package.json +0 -82
- package/benches/contrib/oss-skill-independent/tasks/commander-output-isolation/verify.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/index.d.ts +0 -40
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/index.js +0 -68
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/package.json +0 -54
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/readme.md +0 -99
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/upstream-package.json +0 -54
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/vendor/yocto-queue/index.js +0 -67
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/vendor/yocto-queue/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/fixture/vendor/yocto-queue/package.json +0 -46
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/prompt.md +0 -3
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/async-hooks-stub.js +0 -15
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/index.d.ts +0 -40
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/index.js +0 -71
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/package.json +0 -61
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/readme.md +0 -99
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/regression.test.mjs +0 -6
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/upstream-package.json +0 -54
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/vendor/yocto-queue/index.js +0 -67
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/vendor/yocto-queue/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/reference/vendor/yocto-queue/package.json +0 -46
- package/benches/contrib/oss-skill-independent/tasks/limit-async-context/verify.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/index.d.ts +0 -136
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/index.js +0 -132
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/package.json +0 -57
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/readme.md +0 -181
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/upstream-package.json +0 -58
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/vendor/yocto-queue/index.js +0 -84
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/vendor/yocto-queue/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/fixture/vendor/yocto-queue/package.json +0 -48
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/prompt.md +0 -3
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/index.d.ts +0 -136
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/index.js +0 -148
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/package.json +0 -57
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/readme.md +0 -181
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/regression.test.mjs +0 -5
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/upstream-package.json +0 -58
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/vendor/yocto-queue/index.js +0 -84
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/vendor/yocto-queue/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/reference/vendor/yocto-queue/package.json +0 -48
- package/benches/contrib/oss-skill-independent/tasks/limit-map-iteration-rejection/verify.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/fixture/index.d.ts +0 -136
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/fixture/index.js +0 -116
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/fixture/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/fixture/package.json +0 -60
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/fixture/readme.md +0 -170
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/fixture/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/fixture/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/fixture/upstream-package.json +0 -60
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/prompt.md +0 -3
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/index.d.ts +0 -136
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/index.js +0 -121
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/package.json +0 -60
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/readme.md +0 -170
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/regression.test.mjs +0 -6
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/reference/upstream-package.json +0 -60
- package/benches/contrib/oss-skill-independent/tasks/throttle-sync-throw/verify.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/fixture/index.d.ts +0 -149
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/fixture/index.js +0 -93
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/fixture/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/fixture/package.json +0 -52
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/fixture/readme.md +0 -192
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/fixture/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/fixture/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/fixture/upstream-package.json +0 -52
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/prompt.md +0 -3
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/index.d.ts +0 -149
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/index.js +0 -95
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/package.json +0 -52
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/readme.md +0 -192
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/regression.test.mjs +0 -5
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/reference/upstream-package.json +0 -52
- package/benches/contrib/oss-skill-independent/tasks/timeout-custom-timers/verify.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/fixture/index.d.ts +0 -151
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/fixture/index.js +0 -114
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/fixture/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/fixture/package.json +0 -48
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/fixture/readme.md +0 -158
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/fixture/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/fixture/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/fixture/upstream-package.json +0 -48
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/prompt.md +0 -3
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/index.d.ts +0 -151
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/index.js +0 -114
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/package.json +0 -48
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/readme.md +0 -158
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/regression.test.mjs +0 -5
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/reference/upstream-package.json +0 -48
- package/benches/contrib/oss-skill-independent/tasks/timeout-infinity-abort/verify.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/fixture/index.d.ts +0 -151
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/fixture/index.js +0 -122
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/fixture/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/fixture/package.json +0 -50
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/fixture/readme.md +0 -190
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/fixture/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/fixture/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/fixture/upstream-package.json +0 -50
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/prompt.md +0 -3
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/index.d.ts +0 -151
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/index.js +0 -122
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/license +0 -9
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/oracle.mjs +0 -1
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/package.json +0 -50
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/readme.md +0 -190
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/regression.test.mjs +0 -5
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/test.mjs +0 -4
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/reference/upstream-package.json +0 -50
- package/benches/contrib/oss-skill-independent/tasks/timeout-rejection-listener/verify.mjs +0 -1
- package/benches/contrib/oss-skill-independent/test-clock.mjs +0 -65
- package/benches/contrib/oss-skill-independent/verifiers/cases.mjs +0 -197
- package/benches/contrib/oss-skill-independent/verifiers/grade.mjs +0 -48
- package/benches/contrib/oss-skill-independent/verifiers/probe.mjs +0 -16
- package/benches/contrib/oss-skill-independent/verifiers/regression-evidence.mjs +0 -105
- package/benches/contrib/oss-skill-independent/verifiers/test-reporter.mjs +0 -29
- package/benches/contrib/oss-skill-validation/README.md +0 -33
- package/benches/contrib/oss-skill-validation/bench.json +0 -79
- package/benches/contrib/oss-skill-validation/provenance.json +0 -119
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/fixture/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/fixture/index.js +0 -281
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/fixture/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/fixture/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/fixture/readme.md +0 -169
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/fixture/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/prompt.md +0 -3
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/reference/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/reference/index.js +0 -281
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/reference/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/reference/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/reference/readme.md +0 -169
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/reference/regression.test.mjs +0 -115
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/reference/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/async-concurrency/verify.mjs +0 -2
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/fixture/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/fixture/index.js +0 -661
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/fixture/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/fixture/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/fixture/readme.md +0 -404
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/fixture/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/prompt.md +0 -3
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/index.js +0 -663
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/readme.md +0 -404
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/regression.test.mjs +0 -115
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/cold-thenable/verify.mjs +0 -2
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/fixture/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/fixture/index.js +0 -288
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/fixture/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/fixture/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/fixture/readme.md +0 -190
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/fixture/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/prompt.md +0 -3
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/reference/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/reference/index.js +0 -293
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/reference/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/reference/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/reference/readme.md +0 -190
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/reference/regression.test.mjs +0 -115
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/reference/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/consumer-stop/verify.mjs +0 -2
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/fixture/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/fixture/index.js +0 -283
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/fixture/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/fixture/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/fixture/readme.md +0 -190
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/fixture/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/prompt.md +0 -3
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/reference/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/reference/index.js +0 -284
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/reference/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/reference/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/reference/readme.md +0 -190
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/reference/regression.test.mjs +0 -115
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/reference/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/mapper-index/verify.mjs +0 -2
- package/benches/contrib/oss-skill-validation/tasks/source-close/fixture/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/source-close/fixture/index.js +0 -300
- package/benches/contrib/oss-skill-validation/tasks/source-close/fixture/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/source-close/fixture/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/source-close/fixture/readme.md +0 -190
- package/benches/contrib/oss-skill-validation/tasks/source-close/fixture/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/source-close/prompt.md +0 -3
- package/benches/contrib/oss-skill-validation/tasks/source-close/reference/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/source-close/reference/index.js +0 -310
- package/benches/contrib/oss-skill-validation/tasks/source-close/reference/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/source-close/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-skill-validation/tasks/source-close/reference/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/source-close/reference/readme.md +0 -190
- package/benches/contrib/oss-skill-validation/tasks/source-close/reference/regression.test.mjs +0 -115
- package/benches/contrib/oss-skill-validation/tasks/source-close/reference/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/source-close/verify.mjs +0 -2
- package/benches/contrib/oss-skill-validation/tasks/source-error/fixture/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/source-error/fixture/index.js +0 -293
- package/benches/contrib/oss-skill-validation/tasks/source-error/fixture/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/source-error/fixture/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/source-error/fixture/readme.md +0 -190
- package/benches/contrib/oss-skill-validation/tasks/source-error/fixture/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/source-error/prompt.md +0 -3
- package/benches/contrib/oss-skill-validation/tasks/source-error/reference/UPSTREAM.package.json +0 -57
- package/benches/contrib/oss-skill-validation/tasks/source-error/reference/index.js +0 -292
- package/benches/contrib/oss-skill-validation/tasks/source-error/reference/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/source-error/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-skill-validation/tasks/source-error/reference/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/source-error/reference/readme.md +0 -190
- package/benches/contrib/oss-skill-validation/tasks/source-error/reference/regression.test.mjs +0 -115
- package/benches/contrib/oss-skill-validation/tasks/source-error/reference/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/source-error/verify.mjs +0 -2
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/fixture/UPSTREAM.package.json +0 -51
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/fixture/index.js +0 -261
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/fixture/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/fixture/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/fixture/readme.md +0 -143
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/fixture/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/prompt.md +0 -3
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/reference/UPSTREAM.package.json +0 -51
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/reference/index.js +0 -265
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/reference/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/reference/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/reference/readme.md +0 -143
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/reference/regression.test.mjs +0 -115
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/reference/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/ttl-duration/verify.mjs +0 -2
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/fixture/UPSTREAM.package.json +0 -51
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/fixture/index.js +0 -261
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/fixture/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/fixture/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/fixture/readme.md +0 -143
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/fixture/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/prompt.md +0 -3
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/reference/UPSTREAM.package.json +0 -51
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/reference/index.js +0 -261
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/reference/license +0 -9
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/reference/oracle.mjs +0 -4
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/reference/package.json +0 -8
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/reference/readme.md +0 -143
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/reference/regression.test.mjs +0 -115
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/reference/test.mjs +0 -5
- package/benches/contrib/oss-skill-validation/tasks/ttl-refresh/verify.mjs +0 -2
- package/benches/contrib/oss-skill-validation/upstream/async-concurrency.patch +0 -77
- package/benches/contrib/oss-skill-validation/upstream/cold-thenable.patch +0 -162
- package/benches/contrib/oss-skill-validation/upstream/consumer-stop.patch +0 -217
- package/benches/contrib/oss-skill-validation/upstream/mapper-index.patch +0 -48
- package/benches/contrib/oss-skill-validation/upstream/source-close.patch +0 -179
- package/benches/contrib/oss-skill-validation/upstream/source-error.patch +0 -132
- package/benches/contrib/oss-skill-validation/upstream/ttl-duration.patch +0 -73
- package/benches/contrib/oss-skill-validation/upstream/ttl-refresh.patch +0 -41
- package/benches/contrib/oss-skill-validation/verifiers/cases.mjs +0 -111
- package/benches/contrib/oss-skill-validation/verifiers/grade.mjs +0 -35
- package/benches/contrib/oss-skill-validation/verifiers/probe.mjs +0 -10
- package/benches/contrib/oss-skill-validation/verifiers/regression-evidence.mjs +0 -98
- package/benches/contrib/oss-skill-validation/verifiers/test-reporter.mjs +0 -29
- package/benches/contrib/waza-behavior/LICENSE.upstream +0 -21
- package/benches/contrib/waza-behavior/README.md +0 -36
- package/benches/contrib/waza-behavior/bench.json +0 -34
- package/benches/contrib/waza-behavior/tasks/explicit-hold/fixture/README.md +0 -1
- package/benches/contrib/waza-behavior/tasks/explicit-hold/fixture/notes.txt +0 -1
- package/benches/contrib/waza-behavior/tasks/explicit-hold/prompt.md +0 -1
- package/benches/contrib/waza-behavior/tasks/receipt-current/fixture/README.md +0 -1
- package/benches/contrib/waza-behavior/tasks/receipt-current/fixture/docs/guide.md +0 -2
- package/benches/contrib/waza-behavior/tasks/receipt-current/fixture/notes.txt +0 -1
- package/benches/contrib/waza-behavior/tasks/receipt-current/fixture/scripts/check-links.mjs +0 -16
- package/benches/contrib/waza-behavior/tasks/receipt-current/fixture/validation-receipt.json +0 -10
- package/benches/contrib/waza-behavior/tasks/receipt-current/prompt.md +0 -1
- package/benches/contrib/waza-behavior/tasks/receipt-stale/fixture/README.md +0 -1
- package/benches/contrib/waza-behavior/tasks/receipt-stale/fixture/docs/guide.md +0 -3
- package/benches/contrib/waza-behavior/tasks/receipt-stale/fixture/notes.txt +0 -1
- package/benches/contrib/waza-behavior/tasks/receipt-stale/fixture/scripts/check-links.mjs +0 -16
- package/benches/contrib/waza-behavior/tasks/receipt-stale/fixture/validation-receipt.json +0 -10
- package/benches/contrib/waza-behavior/tasks/receipt-stale/prompt.md +0 -1
- package/benches/contrib/waza-behavior/verifiers/behavior.mjs +0 -59
- package/benches/contrib/waza-behavior/verifiers/oracle.mjs +0 -24
|
@@ -1,404 +0,0 @@
|
|
|
1
|
-
# p-map
|
|
2
|
-
|
|
3
|
-
> Map over promises concurrently
|
|
4
|
-
|
|
5
|
-
Useful when you need to run promise-returning & async functions multiple times with different inputs concurrently.
|
|
6
|
-
|
|
7
|
-
This is different from `Promise.all()` in that you can control the concurrency and also decide whether or not to stop iterating when there's an error.
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
npm install p-map
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
import pMap from 'p-map';
|
|
19
|
-
import got from 'got';
|
|
20
|
-
|
|
21
|
-
const sites = [
|
|
22
|
-
getWebsiteFromUsername('sindresorhus'), //=> Promise
|
|
23
|
-
'https://avajs.dev',
|
|
24
|
-
'https://github.com'
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
const mapper = async site => {
|
|
28
|
-
const {requestUrl} = await got.head(site);
|
|
29
|
-
return requestUrl;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const result = await pMap(sites, mapper, {concurrency: 2});
|
|
33
|
-
|
|
34
|
-
console.log(result);
|
|
35
|
-
//=> ['https://sindresorhus.com/', 'https://avajs.dev/', 'https://github.com/']
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## API
|
|
39
|
-
|
|
40
|
-
Except for `pMapIterable`, each function is a version of a `Promise` method that maps each element and limits the concurrency:
|
|
41
|
-
|
|
42
|
-
| `Promise` | p-map |
|
|
43
|
-
| --- | --- |
|
|
44
|
-
| `Promise.all()` | [`pMap`](#pmapinput-mapper-options) |
|
|
45
|
-
| `Promise.allSettled()` | [`pMapSettled`](#pmapsettledinput-mapper-options) |
|
|
46
|
-
| `Promise.allKeyed()` | [`pMapKeyed`](#pmapkeyedinput-mapper-options) |
|
|
47
|
-
| `Promise.allSettledKeyed()` | [`pMapSettledKeyed`](#pmapsettledkeyedinput-mapper-options) |
|
|
48
|
-
|
|
49
|
-
`Promise.allKeyed()` and `Promise.allSettledKeyed()` are a [Stage 3 proposal](https://github.com/tc39/proposal-await-dictionary), so they may not be in your JavaScript engine yet. `pMapKeyed` and `pMapSettledKeyed` work without them.
|
|
50
|
-
|
|
51
|
-
### pMap(input, mapper, options?)
|
|
52
|
-
|
|
53
|
-
Returns a `Promise` that is fulfilled when all promises in `input` and the ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order.
|
|
54
|
-
|
|
55
|
-
### pMapSettled(input, mapper, options?)
|
|
56
|
-
|
|
57
|
-
A version of `pMap` for [`Promise.allSettled()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled): an error from `mapper`, or an element of `input` that rejects, does not reject the returned `Promise`.
|
|
58
|
-
|
|
59
|
-
Returns a `Promise` that is fulfilled when all promises in `input` and the ones returned from `mapper` are settled. The fulfilled value is an `Array` of objects in `input` order, the same as from `Promise.allSettled()`: `{status: 'fulfilled', value}` for each value returned from `mapper`, and `{status: 'rejected', reason}` for each error from `mapper` or from `input`.
|
|
60
|
-
|
|
61
|
-
```js
|
|
62
|
-
import {pMapSettled} from 'p-map';
|
|
63
|
-
|
|
64
|
-
const results = await pMapSettled(urls, async url => {
|
|
65
|
-
const response = await fetch(url);
|
|
66
|
-
return response.json();
|
|
67
|
-
}, {concurrency: 4});
|
|
68
|
-
|
|
69
|
-
for (const result of results) {
|
|
70
|
-
if (result.status === 'fulfilled') {
|
|
71
|
-
console.log(result.value);
|
|
72
|
-
} else {
|
|
73
|
-
console.error(result.reason);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
An element of `input` that rejects gets a `{status: 'rejected', reason}` result, and `mapper` is not called for it. A [`pMapSkip`](#pmapskip) result is left out, and [`pMapStop`](#pmapstop) stops like in `pMap`.
|
|
79
|
-
|
|
80
|
-
The returned `Promise` still rejects when iterating `input` throws, like `Promise.allSettled()`, and when the [`signal`](#signal) aborts.
|
|
81
|
-
|
|
82
|
-
It takes the same options as `pMap`, except [`stopOnError`](#stoponerror).
|
|
83
|
-
|
|
84
|
-
> [!NOTE]
|
|
85
|
-
> Promises that are already in `input` are already running, so `concurrency` cannot limit them. With a finite `concurrency`, a promise that rejects before `pMapSettled` reaches it is reported as an unhandled rejection. For promises you already have, use `Promise.allSettled()`. With `pMapSettled`, give the values in `input` and start the async work in `mapper`.
|
|
86
|
-
|
|
87
|
-
### pMapKeyed(input, mapper, options?)
|
|
88
|
-
|
|
89
|
-
A version of `pMap` for the values of an object or a `Map`, like [`Promise.allKeyed()`](https://github.com/tc39/proposal-await-dictionary) is for `Promise.all()`.
|
|
90
|
-
|
|
91
|
-
Returns a `Promise` that is fulfilled with an object with the same keys, in the same order, and the values returned from `mapper`, or rejects if any of the values or the mappers reject. The object has a `null` prototype, like the one from `Promise.allKeyed()`. For a `Map`, it is a new `Map`.
|
|
92
|
-
|
|
93
|
-
```js
|
|
94
|
-
import {pMapKeyed} from 'p-map';
|
|
95
|
-
|
|
96
|
-
const {user, posts} = await pMapKeyed({
|
|
97
|
-
user: 'https://example.com/api/user',
|
|
98
|
-
posts: 'https://example.com/api/posts',
|
|
99
|
-
}, async url => {
|
|
100
|
-
const response = await fetch(url);
|
|
101
|
-
return response.json();
|
|
102
|
-
}, {concurrency: 2});
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
`input` is an object or a `Map`. For an object, it uses the own enumerable keys, strings and symbols, like `Promise.allKeyed()`. For a `Map`, it uses the entries, and a key can be any value. A `Map` from another realm, like from `node:vm` or an iframe, is used as an object, so its entries are not mapped. All the values are read right away, and each value is `await`'d before `mapper` is called for it, so a value may be a `Promise`. With TypeScript, give an `input` of type `any`, like the result of `response.json()`, a specific type, like `as Record<string, string>`, as the result type is not useful otherwise.
|
|
106
|
-
|
|
107
|
-
`mapper(value, key)` is called with each value and its key. Expected to return a `Promise` or value.
|
|
108
|
-
|
|
109
|
-
A value that rejects gets a handler right away, so it is never an unhandled rejection, even when `concurrency` has not reached it yet.
|
|
110
|
-
|
|
111
|
-
A [`pMapSkip`](#pmapskip) result leaves out the key, and [`pMapStop`](#pmapstop) keeps only the keys before it.
|
|
112
|
-
|
|
113
|
-
It takes the same options as `pMap`.
|
|
114
|
-
|
|
115
|
-
### pMapSettledKeyed(input, mapper, options?)
|
|
116
|
-
|
|
117
|
-
A version of `pMapKeyed` for [`Promise.allSettledKeyed()`](https://github.com/tc39/proposal-await-dictionary): an error from `mapper`, or a value of `input` that rejects, does not reject the returned `Promise`.
|
|
118
|
-
|
|
119
|
-
Returns a `Promise` that is fulfilled with an object with the same keys, in the same order, when all the values and mappers are settled. Each value is `{status: 'fulfilled', value}` with the value returned from `mapper`, or `{status: 'rejected', reason}` with the error from `mapper` or from `input`, the same as from `Promise.allSettledKeyed()`. The object has a `null` prototype. For a `Map`, it is a new `Map`.
|
|
120
|
-
|
|
121
|
-
```js
|
|
122
|
-
import {pMapSettledKeyed} from 'p-map';
|
|
123
|
-
|
|
124
|
-
const {user, posts} = await pMapSettledKeyed({
|
|
125
|
-
user: 'https://example.com/api/user',
|
|
126
|
-
posts: 'https://example.com/api/posts',
|
|
127
|
-
}, async url => {
|
|
128
|
-
const response = await fetch(url);
|
|
129
|
-
return response.json();
|
|
130
|
-
}, {concurrency: 2});
|
|
131
|
-
|
|
132
|
-
if (user.status === 'fulfilled') {
|
|
133
|
-
console.log(user.value);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
if (posts.status === 'rejected') {
|
|
137
|
-
console.error(posts.reason);
|
|
138
|
-
}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
It takes the same `input` and `mapper` as `pMapKeyed`, and the same options as `pMap`, except [`stopOnError`](#stoponerror).
|
|
142
|
-
|
|
143
|
-
A value of `input` that rejects gets a `{status: 'rejected', reason}` result, and `mapper` is not called for it. Each value gets a handler right away, so it is never an unhandled rejection. A [`pMapSkip`](#pmapskip) result leaves out the key, and [`pMapStop`](#pmapstop) keeps only the keys before it.
|
|
144
|
-
|
|
145
|
-
The returned `Promise` still rejects when reading `input` throws, and when the [`signal`](#signal) aborts.
|
|
146
|
-
|
|
147
|
-
### pMapIterable(input, mapper, options?)
|
|
148
|
-
|
|
149
|
-
Returns an async iterable that streams each return value from `mapper` in order, or as soon as each is ready when [`preserveOrder`](#preserveorder) is `false`.
|
|
150
|
-
|
|
151
|
-
```js
|
|
152
|
-
import {pMapIterable} from 'p-map';
|
|
153
|
-
|
|
154
|
-
// Multiple posts are fetched concurrently, with limited concurrency and backpressure
|
|
155
|
-
for await (const post of pMapIterable(postIds, getPostMetadata, {concurrency: 8})) {
|
|
156
|
-
console.log(post);
|
|
157
|
-
};
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
> [!NOTE]
|
|
161
|
-
> Like an async generator, a `return()` or `throw()` on the iterator that comes while a `next()` call is still pending waits for that `next()` to settle. A `break` in a `for await` loop is not affected, as the loop only stops between results. If `input` can block in `next()` for good, like a queue that waits for an item, stop it at the source, for example with an `AbortSignal` that it listens to.
|
|
162
|
-
>
|
|
163
|
-
> The iterable itself has no `Symbol.asyncDispose`, so `await using` on it throws a `TypeError`, and it can be iterated again, so there is no one iteration it could dispose. To get the cleanup of `await using` without a `for await` loop, apply it to the iterator from `[Symbol.asyncIterator]()`; on runtimes where async generators have `Symbol.asyncDispose`, closing that iterator closes the source, like on a real async generator.
|
|
164
|
-
|
|
165
|
-
#### input
|
|
166
|
-
|
|
167
|
-
Type: `AsyncIterable<Promise<unknown> | unknown> | Iterable<Promise<unknown> | unknown>`
|
|
168
|
-
|
|
169
|
-
Synchronous or asynchronous iterable that is iterated over concurrently, calling the `mapper` function for each element. Each iterated item is `await`'d before the `mapper` is invoked so the iterable may return a `Promise` that resolves to an item.
|
|
170
|
-
|
|
171
|
-
Asynchronous iterables (different from synchronous iterables that return `Promise` that resolves to an item) can be used when the next item may not be ready without waiting for an asynchronous process to complete and/or the end of the iterable may be reached after the asynchronous process completes. For example, reading from a remote queue when the queue has reached empty, or reading lines from a stream.
|
|
172
|
-
|
|
173
|
-
For `pMapKeyed` and `pMapSettledKeyed`, see [`pMapKeyed`](#pmapkeyedinput-mapper-options).
|
|
174
|
-
|
|
175
|
-
#### mapper(element, index)
|
|
176
|
-
|
|
177
|
-
Type: `Function`
|
|
178
|
-
|
|
179
|
-
Expected to return a `Promise` or value.
|
|
180
|
-
|
|
181
|
-
For `pMapKeyed` and `pMapSettledKeyed`, see [`pMapKeyed`](#pmapkeyedinput-mapper-options).
|
|
182
|
-
|
|
183
|
-
#### options
|
|
184
|
-
|
|
185
|
-
Type: `object`
|
|
186
|
-
|
|
187
|
-
##### concurrency
|
|
188
|
-
|
|
189
|
-
Type: `number` *(Integer)*\
|
|
190
|
-
Default: `Infinity`\
|
|
191
|
-
Minimum: `1`
|
|
192
|
-
|
|
193
|
-
Number of concurrently pending promises returned by `mapper`.
|
|
194
|
-
|
|
195
|
-
The right value depends on the work. Rules of thumb:
|
|
196
|
-
|
|
197
|
-
- Network or database: the pool size or rate limit of the other side.
|
|
198
|
-
- File system: tens to low hundreds, to avoid `EMFILE` errors.
|
|
199
|
-
- Child processes or worker threads: [`os.availableParallelism()`](https://nodejs.org/api/os.html#osavailableparallelism).
|
|
200
|
-
- Synchronous CPU-bound work: concurrency does not help.
|
|
201
|
-
|
|
202
|
-
If unsure, start low and measure. See also [Dynamic concurrency](#dynamic-concurrency).
|
|
203
|
-
|
|
204
|
-
> [!NOTE]
|
|
205
|
-
> `pMap` and `pMapSettled` can drop items that pulls from `input` already had in flight: when they stop early, because a mapper returns `pMapStop`, a mapper throws (only for `pMap`), or the `signal` aborts, and, with `concurrency` above 1, when one pull reports `done` while another still gets an item. That is invisible for a re-readable input, like an array or a string, but a source that cannot be re-read, such as a queue, loses those items. With `concurrency: 1`, only an abort can drop an item.
|
|
206
|
-
|
|
207
|
-
##### backpressure
|
|
208
|
-
|
|
209
|
-
**Only for `pMapIterable`**
|
|
210
|
-
|
|
211
|
-
Type: `number` *(Integer)*\
|
|
212
|
-
Default: `options.concurrency`\
|
|
213
|
-
Minimum: `options.concurrency`
|
|
214
|
-
|
|
215
|
-
Maximum number of elements taken from `input` that the consumer of the async iterable has not collected yet. That counts the elements being read, waiting for `mapper`, being mapped, and the results waiting to be collected. Calls to `mapper` will be limited so that there is never too much backpressure.
|
|
216
|
-
|
|
217
|
-
Useful whenever you are consuming the iterable slower than what the mapper function can produce concurrently. For example, to avoid making an overwhelming number of HTTP requests if you are saving each of the results to a database.
|
|
218
|
-
|
|
219
|
-
A `backpressure` above `concurrency` also lets `pMapIterable` read ahead: up to `backpressure - concurrency` elements, but no more than `concurrency`, are read from `input` while the mappers run, so a slow `input` does not leave a mapper waiting for its next element. Useful when reading `input` is slow, for example when it is another `pMapIterable`. With `concurrency: 1`, `backpressure: 2` overlaps reading each element with mapping the one before it. When the iteration ends early, the elements read ahead are not mapped, so a source that cannot be re-read, such as a queue, loses them.
|
|
220
|
-
|
|
221
|
-
A result of `pMapSkip` is collected by the consumer stepping over it, so it counts towards the limit until then. A mapper that skips most elements therefore still reads no further ahead than `backpressure` allows.
|
|
222
|
-
|
|
223
|
-
> [!NOTE]
|
|
224
|
-
> `backpressure` defaults to `concurrency`, which defaults to `Infinity`, so by default nothing bounds how far `input` is read ahead of the consumer. A source that never ends is then read without limit until memory runs out. Give such a source a finite `concurrency`. That also bounds `backpressure`, since it defaults to `concurrency`.
|
|
225
|
-
|
|
226
|
-
##### preserveOrder
|
|
227
|
-
|
|
228
|
-
**Only for `pMapIterable`**
|
|
229
|
-
|
|
230
|
-
Type: `boolean`\
|
|
231
|
-
Default: `true`
|
|
232
|
-
|
|
233
|
-
Whether to yield the results in `input` order.
|
|
234
|
-
|
|
235
|
-
When `false`, each result is yielded as soon as it is ready. A slow element then no longer holds back the results after it, and those results no longer fill up `backpressure` while they wait, so `mapper` keeps running at full `concurrency`. Use it when the order of the results does not matter.
|
|
236
|
-
|
|
237
|
-
An error from `mapper` is then also thrown as soon as it happens, instead of after the results before it. The `index` passed to `mapper` is still the position in `input`.
|
|
238
|
-
|
|
239
|
-
```js
|
|
240
|
-
import {pMapIterable} from 'p-map';
|
|
241
|
-
|
|
242
|
-
// Each page is saved as soon as it is downloaded, without waiting for slower pages before it
|
|
243
|
-
for await (const page of pMapIterable(urls, downloadPage, {concurrency: 8, preserveOrder: false})) {
|
|
244
|
-
await savePage(page);
|
|
245
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
##### stopOnError
|
|
249
|
-
|
|
250
|
-
**Only for `pMap` and `pMapKeyed`**
|
|
251
|
-
|
|
252
|
-
Type: `boolean`\
|
|
253
|
-
Default: `true`
|
|
254
|
-
|
|
255
|
-
When `true`, the first mapper rejection will be rejected back to the consumer.
|
|
256
|
-
|
|
257
|
-
When `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [`AggregateError`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) containing all the errors from the rejected promises.
|
|
258
|
-
|
|
259
|
-
The errors are listed in the order of the input, not in the order the promises happened to settle in, so the same input always produces the same `AggregateError`.
|
|
260
|
-
|
|
261
|
-
Caveat: When `true`, any already-started async mappers will continue to run until they resolve or reject. In the case of infinite concurrency with sync iterables, *all* mappers are invoked on startup and will continue after the first rejection. Use the `signal` option for abort control.
|
|
262
|
-
|
|
263
|
-
##### signal
|
|
264
|
-
|
|
265
|
-
**Not for `pMapIterable`**
|
|
266
|
-
|
|
267
|
-
Type: [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)
|
|
268
|
-
|
|
269
|
-
You can abort the promises using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
|
|
270
|
-
|
|
271
|
-
```js
|
|
272
|
-
import pMap from 'p-map';
|
|
273
|
-
import delay from 'delay';
|
|
274
|
-
|
|
275
|
-
const abortController = new AbortController();
|
|
276
|
-
|
|
277
|
-
setTimeout(() => {
|
|
278
|
-
abortController.abort();
|
|
279
|
-
}, 500);
|
|
280
|
-
|
|
281
|
-
const mapper = async value => value;
|
|
282
|
-
|
|
283
|
-
await pMap([delay(1000), delay(1000)], mapper, {signal: abortController.signal});
|
|
284
|
-
// Throws AbortError (DOMException) after 500 ms.
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
> [!NOTE]
|
|
288
|
-
> An abort that comes from a timer or an I/O callback, like a `setTimeout`, cannot take effect while the mapping is inside a stretch of work that never waits on a timer or I/O. Draining a large input with mappers that just return a value is one such stretch, and there the run finishes first. This is the same for `Promise.all` and for a plain loop, and it goes away as soon as the mapper or the source waits on a timer or I/O.
|
|
289
|
-
|
|
290
|
-
### pMapSkip
|
|
291
|
-
|
|
292
|
-
Return this value from a `mapper` function to skip including the value in the returned array, or, for `pMapKeyed` and `pMapSettledKeyed`, to leave out the key.
|
|
293
|
-
|
|
294
|
-
```js
|
|
295
|
-
import pMap, {pMapSkip} from 'p-map';
|
|
296
|
-
import got from 'got';
|
|
297
|
-
|
|
298
|
-
const sites = [
|
|
299
|
-
getWebsiteFromUsername('sindresorhus'), //=> Promise
|
|
300
|
-
'https://avajs.dev',
|
|
301
|
-
'https://example.invalid',
|
|
302
|
-
'https://github.com'
|
|
303
|
-
];
|
|
304
|
-
|
|
305
|
-
const mapper = async site => {
|
|
306
|
-
try {
|
|
307
|
-
const {requestUrl} = await got.head(site);
|
|
308
|
-
return requestUrl;
|
|
309
|
-
} catch {
|
|
310
|
-
return pMapSkip;
|
|
311
|
-
}
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
const result = await pMap(sites, mapper, {concurrency: 2});
|
|
315
|
-
|
|
316
|
-
console.log(result);
|
|
317
|
-
//=> ['https://sindresorhus.com/', 'https://avajs.dev/', 'https://github.com/']
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### pMapStop
|
|
321
|
-
|
|
322
|
-
Return this value from a `mapper` function to stop iterating, like `break` in a loop.
|
|
323
|
-
|
|
324
|
-
`pMap` resolves with the results of the elements before it, in order, without waiting for the elements after it. Like in a loop, an error from an earlier element still rejects. An error from a later element rejects only if it happens before the stop. With `stopOnError: false`, only the errors from earlier elements are collected.
|
|
325
|
-
|
|
326
|
-
`pMapKeyed` stops the same way, and keeps only the keys before it. `pMapSettled` and `pMapSettledKeyed` also stop the same way, but an error from an element before the stop gives a `{status: 'rejected', reason}` result instead of a rejection.
|
|
327
|
-
|
|
328
|
-
`pMapIterable` ends the stream where the stop would have been yielded: after the elements before it with [`preserveOrder`](#preserveorder), or after the results that were ready before it without.
|
|
329
|
-
|
|
330
|
-
`pMap`, `pMapSettled`, and `pMapIterable` then read no more elements from `input`, and close `input`. `pMapKeyed` and `pMapSettledKeyed` have read all the values already. Mappers that are still running are not canceled, and their results are dropped. The element that returns `pMapStop` adds no value to the result.
|
|
331
|
-
|
|
332
|
-
```js
|
|
333
|
-
import pMap, {pMapStop} from 'p-map';
|
|
334
|
-
|
|
335
|
-
function * pageNumbers() {
|
|
336
|
-
for (let pageNumber = 1; ; pageNumber++) {
|
|
337
|
-
yield pageNumber;
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
const mapper = async pageNumber => {
|
|
342
|
-
const page = await getPage(pageNumber);
|
|
343
|
-
return page.items.length === 0 ? pMapStop : page;
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
const pages = await pMap(pageNumbers(), mapper, {concurrency: 4});
|
|
347
|
-
|
|
348
|
-
console.log(pages);
|
|
349
|
-
//=> Every page before the first empty page, in order
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
## Recipes
|
|
353
|
-
|
|
354
|
-
### Rate limiting
|
|
355
|
-
|
|
356
|
-
This package controls how many mapper promises run concurrently. To limit how often the mapper starts, compose it with a rate limiter like [`p-throttle`](https://github.com/sindresorhus/p-throttle):
|
|
357
|
-
|
|
358
|
-
```js
|
|
359
|
-
import pThrottle from 'p-throttle';
|
|
360
|
-
import pMap from 'p-map';
|
|
361
|
-
|
|
362
|
-
const throttle = pThrottle({
|
|
363
|
-
limit: 1,
|
|
364
|
-
interval: 1000,
|
|
365
|
-
strict: true,
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
const result = await pMap(input, throttle(mapper), {concurrency: 2});
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
For more advanced scheduling, use [`p-queue`](https://github.com/sindresorhus/p-queue).
|
|
372
|
-
|
|
373
|
-
### Dynamic concurrency
|
|
374
|
-
|
|
375
|
-
To change the concurrency while mapping, compose the mapper with [`p-limit`](https://github.com/sindresorhus/p-limit), whose `concurrency` can be changed at any time:
|
|
376
|
-
|
|
377
|
-
```js
|
|
378
|
-
import pLimit from 'p-limit';
|
|
379
|
-
import pMap from 'p-map';
|
|
380
|
-
|
|
381
|
-
const limit = pLimit(2);
|
|
382
|
-
|
|
383
|
-
// For example, raise it when the server is less busy
|
|
384
|
-
setTimeout(() => {
|
|
385
|
-
limit.concurrency = 8;
|
|
386
|
-
}, 10_000);
|
|
387
|
-
|
|
388
|
-
try {
|
|
389
|
-
// The `concurrency` option is the highest value `limit.concurrency` can have
|
|
390
|
-
await pMap(input, (element, index) => limit(mapper, element, index), {concurrency: 8});
|
|
391
|
-
} finally {
|
|
392
|
-
// Do not start the queued elements after a stop or an error
|
|
393
|
-
limit.clearQueue();
|
|
394
|
-
}
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
## Related
|
|
398
|
-
|
|
399
|
-
- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
|
|
400
|
-
- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently
|
|
401
|
-
- [p-times](https://github.com/sindresorhus/p-times) - Run promise-returning & async functions a specific number of times concurrently
|
|
402
|
-
- [p-props](https://github.com/sindresorhus/p-props) - Like `Promise.all()` but for `Map` and `Object`
|
|
403
|
-
- [p-map-series](https://github.com/sindresorhus/p-map-series) - Map over promises serially
|
|
404
|
-
- [More…](https://github.com/sindresorhus/promise-fun)
|
package/benches/contrib/oss-skill-validation/tasks/cold-thenable/reference/regression.test.mjs
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import * as api from './index.js';
|
|
3
|
-
import assert from 'node:assert/strict';
|
|
4
|
-
const turns=async()=>{for(let i=0;i<24;i++) await new Promise(setImmediate);};
|
|
5
|
-
const deferred=()=>Promise.withResolvers();
|
|
6
|
-
const collect=async iterable=>{const values=[];for await(const value of iterable) values.push(value);return values;};
|
|
7
|
-
const observe=promise=>{const state={settled:false};promise.then(value=>Object.assign(state,{settled:true,value}),error=>Object.assign(state,{settled:true,error}));return state;};
|
|
8
|
-
async function indexed(api, order, options={}) {
|
|
9
|
-
const waits=order.map(deferred);
|
|
10
|
-
const state=observe(collect(api.pMapIterable(waits.map(row=>row.promise),(value,index)=>[value,index],{concurrency:order.length,...options})));
|
|
11
|
-
await turns();
|
|
12
|
-
for(const index of order) {waits[index].resolve(String(index));await turns();}
|
|
13
|
-
assert.ok(state.settled && !state.error,'mapping did not complete');return state.value;
|
|
14
|
-
}
|
|
15
|
-
async function concurrency(api, limit, backpressure) {
|
|
16
|
-
const waits=Array.from({length:5},deferred);let active=0,peak=0;
|
|
17
|
-
async function* source(){for(let i=0;i<5;i++) yield i;}
|
|
18
|
-
const state=observe(collect(api.pMapIterable(source(),async value=>{active++;peak=Math.max(peak,active);await waits[value].promise;active--;return value;},{concurrency:limit,backpressure})));
|
|
19
|
-
await turns();const initialPeak=peak;for(const wait of waits) {wait.resolve();await turns();}
|
|
20
|
-
assert.ok(state.settled && !state.error);assert.deepEqual(state.value,[0,1,2,3,4]);assert.ok(initialPeak<=limit && peak<=limit,`peak ${peak} exceeds ${limit}`);
|
|
21
|
-
}
|
|
22
|
-
async function consumerStop(api, mode) {
|
|
23
|
-
const gate=deferred();let pulls=0,mapped=0;
|
|
24
|
-
const source={[Symbol.iterator](){return{next(){const value=pulls++;return{value,done:value>=12};}};}};
|
|
25
|
-
const mapper=async value=>{mapped++;if(value===0) return value;await gate.promise;return api.pMapSkip;};
|
|
26
|
-
const output=api.pMapIterable(source,mapper,{concurrency:3,backpressure:6});
|
|
27
|
-
if(mode==='return') {const iterator=output[Symbol.asyncIterator]();assert.deepEqual(await iterator.next(),{done:false,value:0});await iterator.return();}
|
|
28
|
-
else {try {for await(const value of output) {assert.equal(value,0);if(mode==='throw') throw new Error('consumer stopped');break;}} catch(error){assert.equal(error.message,'consumer stopped');}}
|
|
29
|
-
const stoppedPulls=pulls,stoppedMapped=mapped;gate.resolve();await turns();
|
|
30
|
-
assert.equal(pulls,stoppedPulls,'new source pull after consumer stopped');assert.equal(mapped,stoppedMapped,'new mapper after consumer stopped');
|
|
31
|
-
}
|
|
32
|
-
function infiniteSource({returnError}={}) {
|
|
33
|
-
let index=0;const state={returns:0,pulls:0};
|
|
34
|
-
state.source={[Symbol.asyncIterator](){return{async next(){state.pulls++;return{done:false,value:index++};},async return(){state.returns++;if(returnError) throw returnError;return{done:true};}};}};return state;
|
|
35
|
-
}
|
|
36
|
-
async function sourceRejection(api, options={}) {
|
|
37
|
-
const failure=new Error('original mapper failure'), state=infiniteSource(options);
|
|
38
|
-
const observed=observe(api.default(state.source,async()=>{throw failure;},{concurrency:1}));await turns();
|
|
39
|
-
assert.ok(observed.settled);assert.equal(observed.error,failure);assert.equal(state.returns,1);
|
|
40
|
-
}
|
|
41
|
-
async function sourceError(api, asyncInput=false) {
|
|
42
|
-
const error=new Error('source failed'), waits=Array.from({length:3},deferred);let index=0;const mapped=[];
|
|
43
|
-
const iterator={next(){const value=index++;if(value===3) throw error;return{value,done:value>=6};}};
|
|
44
|
-
const source=asyncInput?{[Symbol.asyncIterator](){return{async next(){return iterator.next();}};}}:{[Symbol.iterator](){return iterator;}};
|
|
45
|
-
const result=observe(api.default(source,async value=>{mapped.push(value);await waits[value]?.promise;return value;},{concurrency:2,stopOnError:false}));
|
|
46
|
-
await turns();waits[0].resolve();await turns();waits[1].resolve();await turns();
|
|
47
|
-
const stoppedIndex=index;for(const wait of waits) wait.resolve();await turns();
|
|
48
|
-
assert.ok(result.settled);assert.equal(result.error,error);assert.equal(stoppedIndex,4);assert.equal(index,4);assert.deepEqual(mapped,[0,1,2]);
|
|
49
|
-
}
|
|
50
|
-
function coldSource(error) {
|
|
51
|
-
let value=0,done=false;const state={nextCalls:0,thenCalls:0,afterDone:0};
|
|
52
|
-
state.source={[Symbol.asyncIterator](){return{next(){state.nextCalls++;if(done) state.afterDone++;return{then(resolve,reject){state.thenCalls++;if(value<3){resolve({done:false,value:++value});return;}done=true;if(error)reject(error);else resolve({done:true,value:undefined});}};}};}};return state;
|
|
53
|
-
}
|
|
54
|
-
async function coldMap(api,kind,options={}) {
|
|
55
|
-
const state=coldSource();let result;
|
|
56
|
-
if(kind==='default') result=await api.default(state.source,value=>value,{concurrency:1,...options});
|
|
57
|
-
else if(kind==='settled') result=(await api.pMapSettled(state.source,value=>value,{concurrency:1,...options})).map(row=>row.value);
|
|
58
|
-
else result=await collect(api.pMapIterable(state.source,value=>value,{concurrency:1,...options}));
|
|
59
|
-
assert.deepEqual(kind==='unordered'?[...result].sort():result,[1,2,3]);assert.equal(state.thenCalls,state.nextCalls);if(options.concurrency===undefined){assert.equal(state.nextCalls,4);assert.equal(state.afterDone,0);}
|
|
60
|
-
}
|
|
61
|
-
function clock(fn) {const real=Date.now;let now=10000;Date.now=()=>now;try{return fn(value=>{now=value;});}finally{Date.now=real;}}
|
|
62
|
-
|
|
63
|
-
export function casesFor(api,task) {
|
|
64
|
-
if(task==='mapper-index') return [
|
|
65
|
-
['out-of-order values retain input-position mapper indices',async()=>assert.deepEqual(await indexed(api,[2,0,1]),[['0',0],['1',1],['2',2]])],
|
|
66
|
-
['reverse promise settlement does not change output order or index',async()=>assert.deepEqual(await indexed(api,[3,2,1,0]),[['0',0],['1',1],['2',2],['3',3]])],
|
|
67
|
-
['indexing also works with bounded concurrency',async()=>assert.deepEqual(await indexed(api,[1,0],{concurrency:1}),[['0',0],['1',1]])],
|
|
68
|
-
['ordinary synchronous input keeps mapper index and skip semantics',async()=>assert.deepEqual(await collect(api.pMapIterable(['a','b','c'],(value,index)=>index===1?api.pMapSkip:[value,index])),[['a',0],['c',2]])],
|
|
69
|
-
];
|
|
70
|
-
if(task==='async-concurrency') return [
|
|
71
|
-
['async source cannot exceed one active mapper with larger backpressure',()=>concurrency(api,1,3)],
|
|
72
|
-
['async source respects a concurrency limit of two',()=>concurrency(api,2,5)],
|
|
73
|
-
['equal backpressure and concurrency remain supported',()=>concurrency(api,2,2)],
|
|
74
|
-
['empty async source completes without invoking a mapper',async()=>{let calls=0;async function* empty(){}assert.deepEqual(await collect(api.pMapIterable(empty(),()=>{calls++;})),[]);assert.equal(calls,0);}],
|
|
75
|
-
];
|
|
76
|
-
if(task==='consumer-stop') return [
|
|
77
|
-
['explicit return prevents new pulls after pending skips settle',()=>consumerStop(api,'return')],
|
|
78
|
-
['breaking the consumer loop stops further mapping',()=>consumerStop(api,'break')],
|
|
79
|
-
['consumer throw stops further source pulls',()=>consumerStop(api,'throw')],
|
|
80
|
-
['normal completion and skips still produce all remaining values',async()=>assert.deepEqual(await collect(api.pMapIterable([0,1,2,3],value=>value===1?api.pMapSkip:value,{concurrency:2})),[0,2,3])],
|
|
81
|
-
];
|
|
82
|
-
if(task==='source-close') return [
|
|
83
|
-
['mapper rejection closes its source once and preserves error identity',()=>sourceRejection(api)],
|
|
84
|
-
['abort closes its source once and preserves abort reason',async()=>{const state=infiniteSource(), controller=new AbortController(), reason=new Error('abort requested');const result=observe(api.default(state.source,()=>{controller.abort(reason);return new Promise(()=>{});},{concurrency:1,signal:controller.signal}));await turns();assert.ok(result.settled);assert.equal(result.error,reason);assert.equal(state.returns,1);}],
|
|
85
|
-
['source return rejection does not replace the mapper failure',()=>sourceRejection(api,{returnError:new Error('cleanup failed')})],
|
|
86
|
-
['normal exhaustion does not call source return',async()=>{let i=0,returns=0;const source={[Symbol.iterator](){return{next(){return{done:i===3,value:i++};},return(){returns++;return{done:true};}};}};assert.deepEqual(await api.default(source,value=>value,{concurrency:2}),[0,1,2]);assert.equal(returns,0);}],
|
|
87
|
-
];
|
|
88
|
-
if(task==='source-error') return [
|
|
89
|
-
['sync iterator failure after mapper resolution rejects with source error',()=>sourceError(api)],
|
|
90
|
-
['async iterator failure stops pulls and retains the source error',()=>sourceError(api,true)],
|
|
91
|
-
['mapper failures still aggregate after all mapping settles',async()=>{const failures=[new Error('a'),new Error('b')];await assert.rejects(api.default([0,1,2],value=>{if(value!==1)throw failures[value===0?0:1];return value;},{concurrency:2,stopOnError:false}),error=>error instanceof AggregateError && error.errors.length===2 && failures.every(f=>error.errors.includes(f)));}],
|
|
92
|
-
['rejected input promises remain aggregated while valid inputs are mapped',async()=>{const failure=new Error('input rejected'), mapped=[];await assert.rejects(api.default([Promise.reject(failure),1,2],value=>{mapped.push(value);return value;},{concurrency:2,stopOnError:false}),error=>error instanceof AggregateError && error.errors.length===1 && error.errors[0]===failure);assert.deepEqual(mapped,[1,2]);}],
|
|
93
|
-
];
|
|
94
|
-
if(task==='cold-thenable') return [
|
|
95
|
-
['pMap subscribes once per cold pull and preserves every item',()=>coldMap(api,'default')],
|
|
96
|
-
['settled mapping preserves all cold-source values',()=>coldMap(api,'settled')],
|
|
97
|
-
['ordered and unordered iterable mapping consume each thenable once',async()=>{await coldMap(api,'iterable');await coldMap(api,'unordered',{concurrency:3,backpressure:6,preserveOrder:false});}],
|
|
98
|
-
['cold-source rejection remains the original error for all mapping forms',async()=>{const error=new Error('cold source failure');for(const kind of ['default','settled','iterable']) {const state=coldSource(error);const promise=kind==='default'?api.default(state.source,v=>v,{concurrency:1}):kind==='settled'?api.pMapSettled(state.source,v=>v,{concurrency:1}):collect(api.pMapIterable(state.source,v=>v,{concurrency:1}));await assert.rejects(promise,e=>e===error);assert.equal(state.nextCalls,state.thenCalls);}}],
|
|
99
|
-
];
|
|
100
|
-
if(task==='ttl-refresh') return [
|
|
101
|
-
['replacement value expires at its renewed global lifetime',()=>clock(set=>{const c=new api.default({maxSize:10,maxAge:150});c.set('a','old');set(10100);c.set('a','new');set(10200);assert.equal(c.get('a'),'new');set(10251);assert.equal(c.has('a'),false);})],
|
|
102
|
-
['expiration callback receives the replaced application value once',()=>clock(set=>{const calls=[],c=new api.default({maxSize:10,maxAge:20,onEviction:(...args)=>calls.push(args)});c.set('a','old');set(10010);c.set('a','new');set(10031);assert.equal(c.get('a'),undefined);assert.equal(c.get('a'),undefined);assert.deepEqual(calls,[['a','new']]);})],
|
|
103
|
-
['refreshing one key does not renew another key',()=>clock(set=>{const c=new api.default({maxSize:10,maxAge:30});c.set('a','a');c.set('b','b');set(10020);c.set('a','updated');set(10031);assert.equal(c.has('b'),false);assert.equal(c.get('a'),'updated');set(10051);assert.equal(c.has('a'),false);})],
|
|
104
|
-
['non-expiring replacements and manual removals retain existing semantics',()=>clock(set=>{const calls=[],c=new api.default({maxSize:10,onEviction:(...args)=>calls.push(args)});c.set('a',1);c.set('a',2);set(999999);assert.equal(c.get('a'),2);c.delete('a');assert.deepEqual(calls,[]);})],
|
|
105
|
-
];
|
|
106
|
-
if(task==='ttl-duration') return [
|
|
107
|
-
['per-item maxAge is a duration relative to insertion',()=>clock(set=>{const c=new api.default({maxSize:10});c.set('a','value',{maxAge:30});set(10020);assert.equal(c.get('a'),'value');set(10031);assert.equal(c.has('a'),false);})],
|
|
108
|
-
['per-item maxAge also applies relative to replacement writes',()=>clock(set=>{const c=new api.default({maxSize:10,maxAge:100});c.set('a','old');set(10050);c.set('a','new',{maxAge:20});set(10060);assert.equal(c.get('a'),'new');set(10071);assert.equal(c.has('a'),false);})],
|
|
109
|
-
['per-item duration overrides the global duration without changing other keys',()=>clock(set=>{const c=new api.default({maxSize:10,maxAge:100});c.set('a','short',{maxAge:20});c.set('b','global');set(10021);assert.equal(c.has('a'),false);assert.equal(c.get('b'),'global');set(10101);assert.equal(c.has('b'),false);})],
|
|
110
|
-
['explicit infinite lifetime remains non-expiring with a finite default',()=>clock(set=>{const c=new api.default({maxSize:10,maxAge:20});c.set('a','long',{maxAge:Infinity});set(999999);assert.equal(c.get('a'),'long');})],
|
|
111
|
-
];
|
|
112
|
-
throw new Error('Unknown task '+task);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
for(const [name,run] of casesFor(api,'cold-thenable')) test(name,run);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import test from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
import pMap,{pMapIterable,pMapSkip} from './index.js';
|
|
4
|
-
test('ordinary map and iterable keep input order',async()=>{assert.deepEqual(await pMap([1,2,3],value=>value*2),[2,4,6]);const values=[];for await(const value of pMapIterable([1,2,3],value=>value*2)) values.push(value);assert.deepEqual(values,[2,4,6]);});
|
|
5
|
-
test('skip remains distinct from an ordinary value',async()=>{assert.deepEqual(await pMap([0,1,2],value=>value===1?pMapSkip:value),[0,2]);});
|
package/benches/contrib/oss-skill-validation/tasks/consumer-stop/fixture/UPSTREAM.package.json
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "p-map",
|
|
3
|
-
"version": "7.0.7",
|
|
4
|
-
"description": "Map over promises concurrently",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/p-map",
|
|
7
|
-
"funding": "https://github.com/sponsors/sindresorhus",
|
|
8
|
-
"author": {
|
|
9
|
-
"name": "Sindre Sorhus",
|
|
10
|
-
"email": "sindresorhus@gmail.com",
|
|
11
|
-
"url": "https://sindresorhus.com"
|
|
12
|
-
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"exports": {
|
|
15
|
-
"types": "./index.d.ts",
|
|
16
|
-
"default": "./index.js"
|
|
17
|
-
},
|
|
18
|
-
"sideEffects": false,
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=18"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "xo && ava && tsd"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
"index.js",
|
|
27
|
-
"index.d.ts"
|
|
28
|
-
],
|
|
29
|
-
"keywords": [
|
|
30
|
-
"promise",
|
|
31
|
-
"map",
|
|
32
|
-
"resolved",
|
|
33
|
-
"wait",
|
|
34
|
-
"collection",
|
|
35
|
-
"iterable",
|
|
36
|
-
"iterator",
|
|
37
|
-
"race",
|
|
38
|
-
"fulfilled",
|
|
39
|
-
"async",
|
|
40
|
-
"await",
|
|
41
|
-
"promises",
|
|
42
|
-
"concurrently",
|
|
43
|
-
"concurrency",
|
|
44
|
-
"parallel",
|
|
45
|
-
"bluebird"
|
|
46
|
-
],
|
|
47
|
-
"devDependencies": {
|
|
48
|
-
"ava": "^5.2.0",
|
|
49
|
-
"chalk": "^5.3.0",
|
|
50
|
-
"delay": "^6.0.0",
|
|
51
|
-
"in-range": "^3.0.0",
|
|
52
|
-
"random-int": "^3.0.0",
|
|
53
|
-
"time-span": "^5.1.0",
|
|
54
|
-
"tsd": "^0.29.0",
|
|
55
|
-
"xo": "^0.56.0"
|
|
56
|
-
}
|
|
57
|
-
}
|