npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wpkernel/pipeline

v2.0.0

Published

Framework-agnostic pipeline orchestration primitives for WPKernel

Readme

@wpkernel/pipeline

@wpkernel/pipeline v2 evaluates one immutable dataflow graph for each process-local run. A Pipeline token admits the run; the compiled graph owns readiness and execution. Nodes receive declared external inputs and direct predecessor outputs, then return their own values. They do not share a draft, thread a current output, or call the rest of the graph.

Version boundary

The package root is the native v2 dataflow contract. Existing helper, fragment-builder, next and lifecycle consumers can use @wpkernel/pipeline/v1, an explicitly serial compatibility boundary for the 1.x standard runtime.

That subpath preserves selected serial semantics through a new immutable adapter API. It is not source-compatible with v1. Mutable createPipeline, registration through .use() and instance .run() become a static createSerialPipeline({ fragments, builders, extensions }) programme plus the top-level runPipeline({ pipeline, options }) function.

The captured programme runs through one native v2 node with one aggregate native effect participant. It does not turn helpers into immutable nodes, make stages concurrent, or make next anything other than node-local serial composition. Pause/resume and independent rollback authority are intentionally unsupported there. New code should model its dataflow at the package root rather than use /v1 to hide a new serial programme.

A small graph

import {
	createPipeline,
	runPipeline,
	type GraphDeclaration,
	type NodeContract,
} from '@wpkernel/pipeline';

type Inputs = { readonly name: string };
type Nodes = {
	readonly greeting: NodeContract<'name', string>;
	readonly punctuation: NodeContract<never, string>;
	readonly message: NodeContract<never, string>;
};

const declaration = {
	inputKeys: ['name'],
	nodes: {
		greeting: { externalInputs: ['name'], effectKeys: [], priority: 0 },
		punctuation: { externalInputs: [], effectKeys: [], priority: 0 },
		message: { externalInputs: [], effectKeys: [], priority: 0 },
	},
	edges: [
		{ from: 'greeting', to: 'message' },
		{ from: 'punctuation', to: 'message' },
	] as const,
	effects: {},
	outputs: { message: 'message' },
	policy: { maxConcurrency: 'unbounded' },
	executors: {
		greeting: ({ input }) => ({
			kind: 'success',
			output: `Hello, ${input.external.name}`,
			effects: [],
		}),
		punctuation: () => ({ kind: 'success', output: '!', effects: [] }),
		message: ({ input }) => ({
			kind: 'success',
			output: `${input.dependencies.greeting}${input.dependencies.punctuation}`,
			effects: [],
		}),
	},
} satisfies GraphDeclaration<
	Inputs,
	Nodes,
	readonly [
		{ readonly from: 'greeting'; readonly to: 'message' },
		{ readonly from: 'punctuation'; readonly to: 'message' },
	],
	{},
	{ readonly message: 'message' },
	{}
>;

const pipeline = createPipeline({ declaration, participants: {} });
const outcome = runPipeline({
	pipeline,
	inputs: { name: 'Ada' },
	capabilities: {},
});

outcome remains direct for all-synchronous work; see Synchronous settlement. The package root also exports MaybePromise, AwaitedTuple, adoptMaybePromise, isPromiseLike, maybeThen, maybeAll, maybeTry and processSequentially, so application composition can preserve that boundary without copying Pipeline internals or defaulting to async.

greeting and punctuation are independent. message is the explicit join: its executor receives both outputs by node key. Its value cannot depend on which sibling settled first.

A target may intentionally ignore an available predecessor output, including undefined, when predecessor success is itself the causal prerequisite. This does not turn an edge into arbitrary sequencing.

Contract limits

  • Edges are data dependencies, not ordering hints, resource locks or middleware selectors.
  • Readiness permits concurrent work. Canonical node and effect ordinals define journal chronology, forward commit order and reverse compensation order. Wall-clock settlement cannot choose node values or reorder those semantics.
  • Graph inputs, node outputs and effect payloads are copied and frozen at the owning boundary. Capabilities are live host-owned services, not graph data.
  • Pipeline is process-local. Suspension is a live, single-use value, not a portable checkpoint.
  • Effects prepare during node work, commit after graph success, and compensate in reverse journal chronology on failure or abandonment. This is compensation, not a transaction over an external system.

Pipeline does not provide durable restart, multiprocess ownership, idempotency keys, a guarantee that an external effect is delivered only once, or settlement-order semantics. Those are host concerns. The graph is deliberately not pretending to be a small distributed state department.

Documentation

License

EUPL-1.2 © The Geekist