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

@bemoje/monorepo

v2.0.0

Published

Monorepo workspace management, package discovery, and TypeScript code processing utilities.

Readme

@mono/monorepo

Monorepo workspace management, package discovery, and TypeScript code processing utilities.

TypeScript Module

Exports

  • AbstractBase: Abstract base class that provides common functionality for monorepo management including parenting and inspection capabilities.
  • AbstractCode: Abstract base class for representing code structures in the monorepo with inspection and preview capabilities.
  • CodeBlock: Represents a block of code within a larger code structure, defined by an index range.
  • File: Represents a file in a workspace with various utility methods to check file types and read contents.
  • ImportKeywords: Represents the imported keywords/specifiers in an import statement.
  • ImportSpecifiers: Represents and analyzes import specifiers in TypeScript/JavaScript code. This class parses and categorizes different types of import statements such as default imports, named imports, namespace imports, mixed imports, and side effect imports. It provides methods to retrieve specific parts of import statements and to manipulate them.
  • ImportStatement: Represents an import statement in TypeScript code with parsing and manipulation capabilities.
  • ModuleSpecifier: Represents a module specifier in an import statement. Module specifiers are the strings that indicate where to import from, such as './path/to/file', '
  • MonoRepo: Represents a monorepo with workspace management, TypeScript configuration, and dependency analysis capabilities.
  • SemanticExtnamePrefix: Constants for semantic filename prefixes used to categorize files by their purpose.
  • SemanticExtnamePrefixDescriptions
  • TestFile: Represents a test file in the monorepo with TypeScript code analysis capabilities.
  • TsCode: Represents TypeScript code with import parsing and manipulation capabilities.
  • TsFile: Represents a TypeScript file in the monorepo with code analysis and dependency tracking capabilities.
  • Workspace: Represents a workspace within a monorepo, providing functionality to analyze and manage workspace dependencies. A workspace is a directory containing a package.json file and typically source code files. This class provides methods and properties for analyzing: - Source and test files in the workspace - Dependencies declared in package.json - Dependencies imported in source and test files - Missing, unused, and incorrectly imported dependencies
  • findWorkspacePackageName: Finds the full package name for a workspace given a partial name.
  • getAllImports: Retrieves all import statements from TypeScript source files across all workspaces in the monorepo.
  • getAllWorkspacePackageJsonPaths: Gets all workspace package.json file paths.
  • getAllWorkspacePackageJsons: Gets all workspace package.json contents.
  • getAllWorkspacePackageNames: Gets all workspace package names.
  • getAllWorkspacePaths: Returns an array of all workspace directory paths.
  • getImportsRecursively: Recursively retrieves all imports for the given entry points, categorizing them into external, builtin, and internal dependencies.
  • getRepoPackageJson: Reads the repository's root package.json file.
  • getRepoPackageJsonPath: Gets the absolute path to the repository's package.json file.
  • getRepoRootDirpath: Get the root directory path of the monorepo by finding the package.json with workspaces configuration.
  • getWorkspaceDirpaths: Get all workspace directory paths by reading the workspace patterns from the root package.json.
  • hasExtnamePrefix.
  • resolveModuleImportPath
  • semverVersionBump of a given version string or array based on the specified level. The function supports 'major', 'minor', and 'patch' levels.

Usage

Managing the Repository & Workspaces

The MonoRepo class allows structured, automated tasks against packages and workspaces in a typical monorepo environment (e.g. yarn, npm, pnpm workspaces).

import { MonoRepo } from '@mono/monorepo'

const repo = new MonoRepo()

// Access all registered packages/workspaces
const workspaces = repo.workspaces
console.log(`Found ${workspaces.length} workspaces`)

// Get specific workspaces by name or type
const packageJson = repo.getWorkspace('my-package')?.packageJson

// Bump version for all packages (semver)
repo.bumpVersions('patch')

Script & File Operations

import { TsFile, findWorkspacePackageName } from '@mono/monorepo'

const tsFile = new TsFile('path/to/my-file.ts')

// Read structural code representations (imports, blocks, components)
const imports = tsFile.imports

// Use utility functions independently of classes
const packageName = findWorkspacePackageName('libs/my-feature')