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

@wtf/release-oci

v4.0.1

Published

The OCI images of a repo released and tagged in their registry, of no release tool and no rebuild, each function by the platform it is given: the ecosystem of OCI images, its default export (., ./ecosystem), a releasing ecosystem of the contract of @wtf/r

Readme

@wtf/release-oci

Releases the OCI images of a repo, with no release tool and no rebuild. A pipeline builds and tests an image; a release copies that tested image, by its digest, to the tag of its version in the registry, and points the tags that move at it, so the bytes released are the bytes tested. This library reads the images of a repo, finds the tested image of each, and copies it by crane. It is the library of @wtf/semantic-release-oci, with no dependency on semantic-release nor on the trains; each function runs git and crane by the platform its caller gives it, in the folder of the repo, as @wtf/release has them.

The ecosystem

Its default export is the ecosystem of OCI images, ociEcosystem of ./ecosystem, a ReleasingEcosystem of @wtf/release/contract, which a config names in ecosystems as '@wtf/release-oci'. The trains then read the images of the repo as they read npm packages and crates: which train holds each, the order of the trains, and the checks of a release (Ecosystems).

  • packages gives a package for each folder of a file an image is built of that git tracks: a Dockerfile or a Containerfile, or a .devcontainer/devcontainer.json, which the devcontainer CLI builds. A folder of more than one of them is one image. Its name is its repository in the registry: the registry image of the project, CI_REGISTRY_IMAGE of a pipeline, for an image at the root, and that and its folder for another, as GitLab names the images of a project; its folder where the environment names no registry image. Every image is published, and none depends on another: a FROM or a base pins a tag of a registry, not a package of the repo. It reads the working tree by default, or a commit by git ls-tree.
  • resolve gives the tag a release publishes, the version itself: 1.4.0 for 1.4.0.
  • satisfies takes a tag of the one version it names.
import type { ReleasePlatform, RepoContext } from '@wtf/release'
import oci from '@wtf/release-oci'

oci.resolve('0.0.0', '1.4.0') // '1.4.0'
oci.satisfies('1.4.0', '1.4.0') // true

/** The images of the repo at the tag of a release, as the trains read them. */
export const imagesAt = (repo: RepoContext<ReleasePlatform>, tag: string) =>
  oci.packages({ ...repo, ref: tag })

A release of images

No version is written into git: the tags of the registry are the versions. A driver, as runStep of @wtf/release/driver, runs the steps of the ecosystem over the images of the plan it gives, plan.own, each with the same options, OciOptions:

| Option | What it is | | ----------- | ------------------------------------------------------------------------------------------- | | moving | The tags that move to the version, as ['1.4', '1'] or ['12.12', 'latest']: [] of none | | source | The tested image of each: its repository, {image} the image's own, and its tag | | platforms | The platforms each tested image must be of, as linux/amd64: any by default | | crane | The command of crane: crane by default |

Each step:

  • verify checks that the version and each tag of moving is a tag of an image (EOCIVERSION), and that each image has a repository (EOCIIMAGE). It asks the registry nothing.
  • smoke finds the tested image of each by its digest (crane digest), and the platforms of its index (crane manifest). A source the registry has not, or of fewer platforms than platforms names, fails (EOCISMOKE).
  • publish smokes each image, then copies the digest of its tested image to the tag of the version, crane copy <source>@<digest> <image>:<version>, which mounts each blob of the source's repository rather than moving it. It gives each image, a Released of @wtf/release/forge: of its page on Docker Hub or Quay, which its URL alone names; else of its registry, of the type container, whose page the forge of the release knows, as the container registry of GitLab or ghcr.io of GitHub (./pages). An image is linked where it lives, never uploaded.
  • move points each tag of moving at the digest the registry has of the version, crane copy <image>@<digest> <image>:<tag>. A version the registry has not fails (EOCIMOVE).

The tag of the version is copied once: a registry that has it at the same digest is skipped, so a release that stopped part way is finished by running it again, and at another digest is refused (EOCIRETAG), as a released version never moves. The tags that move are copied every time. A dry run, release.dryRun, asks the registry, and copies nothing. The ecosystem writes nothing into git, so it has no prepare.

import type { Plan, Release } from '@wtf/release/contract'
import { runStep } from '@wtf/release/driver'
import oci from '@wtf/release-oci'

/** The images of `plan` released as `12.12-wtf.1`, `12.12` and `latest`, of a tested image. */
export async function release(of: Release, plan: Plan, tag: string) {
  const plans = new Map([['oci', plan]])
  const options = { moving: ['12.12', 'latest'], source: { repository: '{image}/snapshot', tag } }
  const ecosystems = [[oci, options]] as const
  await runStep(of, plans, ecosystems, 'verify')
  const { released } = await runStep(of, plans, ecosystems, 'publish')
  await runStep(of, plans, ecosystems, 'move')
  return released
}

The tags of a release

The ecosystem takes the tags of a release as they are given: the version, the tag that is copied once and never moved, and moving, each tag copied on every run, [] of none. It derives none: a release of a semver version, as the plugin makes it, moves its minor and its major, and a release of a version that is no semver, as 12.12-wtf.1 of an image of Debian 12.12, names its own. Each is a tag an image can have, [A-Za-z0-9_][A-Za-z0-9_.-]{0,127}, none given twice, as checkReleaseTags of ./tags checks.

The functions the steps build on take each image of its repository and its source, of no plan: smokeImages, publishImages and moveImages of ./publish.

import type { RepoPlatform } from '@wtf/release'
import { moveImages, publishImages } from '@wtf/release-oci/publish'

/** The base image of Debian 12.12, its first build of ours, as `12.12-wtf.1`, `12.12` and `latest`. */
export async function release(platform: RepoPlatform, source: string) {
  const repository = 'registry.gitlab.com/acme/images/base'
  await publishImages({
    context: { platform },
    images: [{ repository, source: { repository, tag: source } }],
    version: '12.12-wtf.1'
  })
  await moveImages({
    context: { platform },
    repositories: [repository],
    version: '12.12-wtf.1',
    moving: ['12.12', 'latest']
  })
}

The version in an image

A release stamps nothing: the image a pipeline tested is the image it publishes. A pipeline that labels an image of the version it will be, as org.opencontainers.image.version, reads the next version of its train of the dotenv semantic-release-info of @wtf/semantic-release-trains writes, and passes it to the build as an argument of its own.

Subpaths

| Subpath | What it is | | ------------- | ------------------------------------------------------------------------------------------------------------------ | | . | OciImage, and the ecosystem as the default export | | ./ecosystem | ociEcosystem, OciOptions, repositoriesOf, packagesOfImages, packagesOfRepo, resolveTag, satisfiesTag | | ./images | readImages, imagesAt, imagesOf, imageDirOf, repositoryOf | | ./tags | checkReleaseTags, isImageTag | | ./publish | smokeImages, publishImages, moveImages, digestOf, platformsOf | | ./pages | releasedImage, imagePageOf, repositoryParts | | ./errors | OciError, OCI_ERRORS |

Errors

| Code | Means | | --------------- | --------------------------------------------------------------------------------------- | | EOCIECOSYSTEM | ecosystems lists neither @wtf/semantic-release-oci/ecosystem nor this | | EOCIIMAGE | An image has no repository: neither image nor CI_REGISTRY_IMAGE names one | | EOCISOURCE | The tested image has no tag: neither sourceTag nor CI_COMMIT_REF_SLUG, nor source | | EOCIVERSION | The version, or a tag that moves, is no tag of an image, or a tag is given twice | | EOCISMOKE | The registry has not the tested image, or crane cannot ask it | | EOCIRETAG | The registry has the version already, at another digest | | EOCITAG | crane cannot copy the tested image to a tag | | EOCIMOVE | The registry has not the version, which the tags that move would point at |