Repository navigation
docs: add a p-limit/p-map migration guide - #397
Merged
Merged
Conversation
escapeYamlString handled quotes and newlines but not backslashes, so
the escapeRegExp JSDoc summary produced `\,` inside the YAML
description and broke the vitepress website build ("unknown escape
sequence"). Escape backslashes first, then quotes.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Semantics verified empirically before writing: concurrentPool matches p-map exactly (pool refill on completion, input-order results, first rejection aborts - 455ms vs 458ms on an uneven-duration benchmark at concurrency 2), while concurrent evaluates in fixed windows (653ms on the same benchmark) and is therefore explicitly not recommended as the p-map replacement. The guide is honest about non-goals: shared ad-hoc limiters, stopOnError: false aggregation, and AbortSignal. Adds the page in en/ko/ja/zh with sidebar entries; vitepress build verified locally. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a migration guide (en/ko/ja/zh + sidebar entries) targeting the largest adjacent audience: p-limit (313M weekly downloads), p-map (78M), and p-queue (32M) users.
Semantics were verified empirically before writing. On an uneven-duration benchmark (concurrency 2):
concurrentPool(2): 458ms — same pool semantics, input-order results, first rejection aborts → this is the documented replacementconcurrent(2): 653ms — fixed windows; the guide explicitly warns migrators away from it for this use caseThe guide is honest about non-goals: shared ad-hoc limiters (keep p-limit),
stopOnError: falseaggregation (Result-object pattern shown instead), andAbortSignal. It closes with what p-map cannot express: streaming consumption witheach, early termination withtake(unstarted work is never scheduled), and AsyncIterable sources.Test plan
vitepress build docspasses locally with the new pages and sidebar entries🤖 Generated with Claude Code