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

@danieljaurellmevorach/javascript-recipe-starter

v1.0.5

Published

Example OpenRewrite JavaScript recipes and tests to help you get started

Readme

JavaScript Recipe Starter

A starter repository for learning how to create OpenRewrite recipes for JavaScript and TypeScript. This repo includes example recipes with comprehensive tests, demonstrating the full project setup you need to author and test your own recipes.

Getting started

New to OpenRewrite JavaScript recipe development? Start by checking out the OpenRewrite documentation and our JavaScript LST examples doc.

Quick start

Clone this repository and install dependencies:

git clone [email protected]:moderneinc/javascript-recipe-starter.git
cd javascript-recipe-starter
npm install

Run the tests:

npm test

Example recipes

This repository includes example recipes that demonstrate different authoring approaches and OpenRewrite capabilities:

Transformation recipes

  • MigrateUtilFunctions - Replaces deprecated Node.js util type checking methods (like util.isArray()) with native JavaScript equivalents (like Array.isArray()). Demonstrates pattern-based, declarative recipe authoring using pattern and rewrite() rules with type context.

  • SayHelloRecipe - Adds a hello() method to JavaScript/TypeScript classes that don't already have one. Demonstrates visitor-based recipe authoring with manual LST manipulation and the template API.

  • SemanticForwardRefMigration - Wraps React forwardRef() calls with memo() for better performance. Demonstrates semantic type matching that works across different import styles (named, namespace, default, and aliased imports). Shows how one pattern with type context can match syntactically different but semantically equivalent code.

Search recipes

  • FindMethodCalls - Finds and records all calls to a specified method name in a data table. Demonstrates search recipes that collect findings without modifying code, useful for impact analysis before migrations. Shows the @Option decorator for configurable recipes and @Column for data table structure. Results can be exported to CSV.

Project structure

javascript-recipe-starter/
├── src/
│   ├── migrate-util-functions.ts
│   ├── say-hello-recipe.ts
│   ├── semantic-matching.ts
│   ├── find-method-calls.ts
│   └── index.ts
├── test/
│   ├── migrate-util-functions.test.ts
│   ├── say-hello-recipe.test.ts
│   ├── semantic-matching.test.ts
│   └── find-method-calls.test.ts
├── package.json
├── tsconfig.json
└── jest.config.js

Running your recipes

To run these recipes against your own JavaScript/TypeScript codebase, you'll need to use the Moderne CLI and configure it to use JavaScript LSTs:

mod run . --recipe=MigrateUtilFunctions

License

See LICENSE file for details.