open-index/open-npm huggingface dataset:
npm package: @fern-api/replay
Description: Automatically preserves SDK customizations across Fern regenerations
Latest version: 0.10.3

# @fern-api/replay

Automatically preserves SDK customizations across Fern regenerations.

## What it does

Fern Replay detects user edits to generated SDK code, stores them as patches, and re-applies them after each regeneration using 3-way merge. This means your customizations survive `fern generate` without manual intervention.

## Pipeline

1. **Detect** — Find commits since last generation
2. **Store** — Save patches to `replay.lock`
3. **Generate** — Run generator (overwrites all)
4. **Replay** — Apply patches via 3-way merge
5. **Commit** — Commit the merged result (or surface conflicts)

## Install

```bash
npm install @fern-api/replay
```

## Development

```bash
npm install
npm run build
npm test
```

## Local Development with Fern CLI

To use a local version of `@fern-api/replay` with the Fern CLI monorepo:

```bash
# From the fern-replay directory
cd /path/to/fern-replay
pnpm link --global

# From the fern monorepo root
cd /path/to/fern
pnpm link --global @fern-api/replay
```

Verify the link is working:

```bash
ls -la node_modules/@fern-api/replay
# Should show a symlink pointing to your local fern-replay directory
```

Any changes you make in `fern-replay` will be picked up immediately without reinstalling.

To unlink and restore the published npm version:

```bash
pnpm unlink @fern-api/replay
pnpm install
```

## License

MIT
npm package: @fern-api/ruff_fmt
Description: A WASM Based Python Formatter
Latest version: 0.0.5

[![Test](https://github.com/wasm-fmt/ruff_fmt/actions/workflows/test.yml/badge.svg)](https://github.com/wasm-fmt/ruff_fmt/actions/workflows/test.yml)

# Install

[![npm](https://img.shields.io/npm/v/@wasm-fmt/ruff_fmt?color=3572A5)](https://www.npmjs.com/package/@wasm-fmt/ruff_fmt)

```bash
npm install @wasm-fmt/ruff_fmt
```

[![jsr.io](https://jsr.io/badges/@fmt/ruff-fmt?color=3572A5)](https://jsr.io/@fmt/ruff-fmt)

```bash
npx jsr add @fmt/ruff-fmt
```

# Usage

```javascript
import init, { format } from "@wasm-fmt/ruff_fmt";

await init();

const input = `x = {  'a':37,'b':42,

'c':927}

y = 'hello ''world'
z = 'hello '+'world'
a = 'hello {}'.format('world')
class foo  (     object  ):
  def f    (self   ):
    return       37*-+2
  def g(self, x,y=42):
      return y
def f  (   a ) :
  return      37+-+a[42-x :  y**3]`;

const formatted = format(input);
console.log(formatted);
```

with custom options:

```javascript
import init, { format } from "@wasm-fmt/ruff_fmt";

// ...
const formatted = format(input, {
    indent_style: "space",
    indent_width: 4,
    line_width: 88,
    quote_style: "double",
    magic_trailing_comma: "respect",
});
console.log(formatted);
```

For Vite users:

```JavaScript
import init, { format } from "@wasm-fmt/ruff_fmt/vite";

// ...
```

# dprint plugin

```bash
dprint config add wasm-fmt/ruff_fmt
```

# How does it work?

[Ruff] is an extremely fast Python linter, written in Rust.

This package is a WebAssembly build of Ruff formatter, with a JavaScript wrapper.

[Ruff]: https://github.com/astral-sh/ruff