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

@soda-gql/common

v0.5.3

Published

Shared utilities for soda-gql packages

Readme

@soda-gql/common

npm version License: MIT

Shared utilities and types for the soda-gql ecosystem.

Installation

bun add @soda-gql/common

Note: This package is primarily used internally by other soda-gql packages. Direct usage is only needed for advanced integration scenarios.

Overview

This package provides shared utilities used across the soda-gql ecosystem:

  • Portable utilities for cross-environment compatibility
  • Canonical ID generation and parsing
  • Path building utilities
  • Zod validation helpers

Exports

Main Entry (@soda-gql/common)

Common types and utilities:

import { ... } from "@soda-gql/common";

Portable (@soda-gql/common/portable)

Cross-environment utilities:

import { ... } from "@soda-gql/common/portable";

Canonical ID (@soda-gql/common/canonical-id)

Canonical ID generation and parsing:

import { createCanonicalId, parseCanonicalId } from "@soda-gql/common/canonical-id";

// Create a canonical ID
const id = createCanonicalId("/path/to/file.ts", "userQuery");
// Result: "/path/to/file.ts::userQuery"

// Parse a canonical ID
const parsed = parseCanonicalId(id);
// Result: { filePath: "/path/to/file.ts", astPath: "userQuery" }

Utils (@soda-gql/common/utils)

General utility functions:

import { ... } from "@soda-gql/common/utils";

Zod (@soda-gql/common/zod)

Zod validation helpers:

import { ... } from "@soda-gql/common/zod";

Scheduler (Effect System)

Generator-based effect system for scheduling sync and async operations:

import {
  createSyncScheduler,
  createAsyncScheduler,
  PureEffect,
  DeferEffect,
  ParallelEffect,
  YieldEffect,
} from "@soda-gql/common";

// Sync usage
const syncScheduler = createSyncScheduler();
const result = syncScheduler.run(function* () {
  const a = yield* new PureEffect(1).run();
  const b = yield* new PureEffect(2).run();
  return a + b;
});

// Async usage with parallel effects
const asyncScheduler = createAsyncScheduler();
const asyncResult = await asyncScheduler.run(function* () {
  const data = yield* new DeferEffect(fetchData()).run();
  yield* new YieldEffect().run(); // Yield to event loop
  return processData(data);
});

Test Utilities (@soda-gql/common/test)

Shared test utilities for soda-gql packages (internal use):

import { createTempDir, TestSuite } from "@soda-gql/common/test";

Related Packages

License

MIT