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

@hashicorp/versioned-docs

v0.0.22

Published

Utilities to support versioned docs integration

Readme

@hashicorp/versioned-docs

Welcome to the home of the tools and utilities necessary to power versioned docs for HashiCorp's products!

Scripts

versioned-docs-ingest <product> <contentDir>

Kicks off the ingestion process based on the data preset in version-manifest.json. Any versions in the manifest which are not found in the database are marked for ingestion.

versioned-docs-add-version <version> [ref=version] [slug=version] [display=version]

Adds a new entry to the local version manifest file. version is a required argument, the rest are optional and default to the value of version.

Methods

This package is broken into several separate entry points to ensure proper tree-shaking and to provide clear buckets of functionality.

@hashicorp/versioned-docs/ingest


Exposes methods to execute the full ingestion process for a version of a product's documentation.

extractDocuments(directory: string)

Extracts document content from the specified directory. Returns a flat array of all content files.

extractNavData(directory: string, version: Version)

Extracts nav data from the specified directory. Returns the nav data in the updated JSON format.

getVersionsToBeIngested(product: string)

Determines which versions in version-manifest.json are not yet in the database and are eligible to be ingested.

ingestDocumentationVersion({ product: string, version: Version, directory: string })

Runs the full ingestion process for the specified product and version. Extracts the documents, applies transforms, and loads them into the database.

@hashicorp/versioned-docs/transforms


Exposes transforms and the utilities to execute them on VersionedDocument objects.

applyTransformToDocument(document: VersionedDocument, transform: string | Transform, rootDir: string)

Applies a transform to a given document and updates the documents mdxTransforms list.

BASE_TRANSFORMS: string[]

An array of the transform IDs which are applied to all documents.

@hashicorp/versioned-docs/server


Exposes methods to get versioned document data from the database in an application server environment.

loadVersionListFromManifest()

Returns a structured array of versions based on the data in version-manifest.json.

loadVersionedNavData(product: string, basePath: string, version: string)

Loads nav data for the provided product and version from the database.

loadVersionedDocument(product: string, fullPath: string)

Loads a versioned document from the database.

@hashicorp/versioned-docs/client


Exposes methods to handle versioned document concerns on the client or within the runtime application.

getVersionFromPath(path: string | string[] = [])

Extracts the version from a path string or path segment array.