
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
@_all_docs/cache
Advanced tools
Fetch, cache, & map/reduce :origin/{_all_docs,:packument}` documents for a set of lexographically sorted pivots by range or partition
Stability: NaN β
Array(16).join("wat" - 1) + " Batman!"
Fetch & cache :origin/_all_docs using a set of lexographically sorted keys
Features Β· How It Works Β· Thanks
start_key
and end_key
CouchDB APIs to harness the power of partition-tolerance from the b-tree_all_docs
and packument
entries by key range or cache partitioncache-control: immutable
"Pouch-like" [{ _id, _rev, ...doc }*]
JSON documents out of the box!pnpm install @_all_docs/cache
π² π Here. Be. Dragons π€― Letting the interface(s) reveal themselves for now. No official interface π€
_all_docs_*
bin scripts fornpx
included below
DEBUG=_all_docs* PIVOTS=a.string.array.js npx _all_docs_from_origin
# Inspect partitions fetched to _all_docs cache
ls -al cache/*__*.json
a.string.array.js (naive)
module.exports = [
null,
...numbers,
...atoz
];
_all_docs
partitionDEBUG=_all_docs* npx _all_docs_partipacku A___Z
_all_docs
for pivotsnpm
origin, lexographic pivots, & location for existing cache (if any)[{ start_key, end_key, id, filename }]
partition ranges from lexographic pivots[start_key, end_key]
partition:
${start_key}___${end_key}.json
from local disk cache
max-age=${now-last.now}
s to HTTP headers
for the outbound undici
options.GET :npm-origin/_all_docs?start_key={start_key}&end_key={end_key}&include_docs=false
304 Not Modified
Local Cache Valid. No update necessary200 OK
Update cache contents for ${start_key}___${end_key}.json
partition_all_docs
partitionπ
Many thanks to bmeck, guybedford, mylesborins, mikeal, jhs, jchris, darcyclarke, isaacs, & mcollina for all the code, docs, & past conversations that contributed to this technique working so well, 10 years later β€οΈ
FAQs
Fetch, cache, & map/reduce :origin/{_all_docs,:packument}` documents for a set of lexographically sorted pivots by range or partition
We found that @_all_docs/cache demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.