open-index/open-npm huggingface dataset:
npm package: @openrewrite/generated-types
Description: TypeScript generated types for the OpenRewrite API
Latest version: 0.0.2

<p align="center" style="margin-top: 3rem;"><img src="https://github.com/openrewrite/rewrite/raw/main/doc/logo-oss.png" width="300px" alt="OpenRewrite Logo"></p>

Greetings!

The OpenRewrite project is a mass refactoring ecosystem designed to eliminate technical debt across an engineering organization. Full documentation and information is available at [OpenRewrite](https://docs.openrewrite.org/).

This project contains Typescript typings to aid in the development of OpenRewrite recipes.

### How to install

```
npm i -D @openrewrite/generated-types
```
npm package: @openrewrite/jest-environment
Description: A jest environment to support openrewrite recipe authoring
Latest version: 0.0.11

🚧 Under Construction 🚧

- Jest Environment for recipe authoring

### Install

### Setup Checklist

1. In your jest configuration add:

```
"preset": "@openrewrite/jest-environment/lib/preset"
```

2. Make sure your package.json has a main entry pointing to the index file produced with the openrewrite webpack config

3. Make sure webpack has been built, you can add your webpack command to your npm script for testing:

```
"test": "webpack --config webpack.config.js && jest"
```

### How To Use

In a test you will have access to global object `OpenRewrite`:

- `OpenRewrite.runBasicRecipeTests` - runs general validation on your recipe to make sure it is compatible with the polyglot adhoc request
- `OpenRewrite.runRecipe` - sends a target text, the language of the target text, the contents of your recipe, and any recipe options, to app.moderne.io for analysis

#### Example:

```ts
// recipe file
export class MakePrivateRecipe extends Recipe {...}

```

```ts
// test file
import { MakePrivateRecipe } from './make-private.recipe.ts';

describe('Make Private Recipe', () => {
  // Will run a suite of tests in its own describe block
  OpenRewrite.runBasicRecipeTests(ChangeLicenseRecipe);

  it(`should change private to true`, async () => {
    // arrange
    const before = `
      {
        "name": "Name",
        "private": "false"
      }
      `;
    // act
    const after = await OpenRewrite.runRecipe(before, 'json', MakePrivateRecipe, { fileMatcher: '**/package.json' });
    // assert
    const expectedAfter = `
      {
        "name": "Name",
        "private": "true"
      }
      `;
    expect(after).toBe(expectedAfter);
  });
});
```

### EnvironmentOptions

By default the OpenRewrite Jest Environment's `runRecipe` command will execute your recipe via `https://api.moderne.io/`.
If you desire to send the requests to a different endpoint you can add the following jest configuration:

```json
"testEnvironmentOptions": {
  "moderneURL": "http://localhost:4000"
}
```
npm package: @openrewrite/types
Description: Various Typescript types to aid in OpenRewrite recipe development
Latest version: 0.0.20

<p align="center" style="margin-top: 3rem;"><img src="https://github.com/openrewrite/rewrite/raw/main/doc/logo-oss.png" width="300px" alt="OpenRewrite Logo"></p>

Greetings!

The OpenRewrite project is a mass refactoring ecosystem designed to eliminate technical debt across an engineering organization. Full documentation and information is available at [OpenRewrite](https://docs.openrewrite.org/).

This project contains Typescript typings to aid in the development of OpenRewrite recipes.

### How to install

```
npm i -D @openrewrite/types
```

### How to use

Add `node_modules/@openrewrite/types/**/*.ts` to the `"include"` section of your `tsconfig.json`.
This will get you the base type definition file that covers nashorn and java bindings.

Additionally you can import types and classes specific to OpenRewrite Recipes:

```ts
import { OpenRewrite } from '@openrewrite/types';
```
npm package: @openrewrite/webpack-environment
Description: Webpack configuration and plugins for recipe authoring
Latest version: 0.0.2

🚧 Under Construction 🚧

- Webpack environment for authoring recipes.

### Install

```
npm i -D @openrewrite/webpack-environment
```

### Setup Checklist

1. Use the provided webpack configuration directly or merge it into your custom configuration:

```js
const openRewriteWebpackConfig = require('@openrewrite/webpack-environment');
const webpackConfig = () => openRewriteWebpackConfig({ sourceDir: 'ts', outputDir: 'js' });
module.exports = webpackConfig;
```

2. Make sure you tsconfig.json is extending the provided tsconfig:

```json
{
  "extends": "@openrewrite/webpack-environment/tsconfig.recipe.json",
  "include": [
    "ts/*.ts",
    "test/*.ts",
    "node_modules/@openrewrite/types/**/*.ts",
    "node_modules/@openrewrite/**/jest.d.ts"
  ]
}
```

3. Run webpack

### How To Use

Running webpack will compile your typescript recipes into a specific target
javascript compatible with the OpenRewrite polyglot layer.

Additionally, some extra files will be generated:

#### index.ts

This file is used to generate a final `index.js` file which contains your recipes.
The `index.js` is what your package.json's `main` property should point to.

#### categories.ts

This is generated from a `.openrewriterc` file. We use
[Cosmic Config](https://github.com/davidtheclark/cosmiconfig) so you can supply
the categories config multiple ways. A category should be defined for your
recipes to identify with.