An open API service indexing awesome lists of open source software.

https://github.com/yiming-liao/soron

📝 Opinionated, human-first package.json sorter.
https://github.com/yiming-liao/soron

json package sort

Last synced: 2 months ago
JSON representation

📝 Opinionated, human-first package.json sorter.

Awesome Lists containing this project

README

          

Soron

A tiny, opinionated CLI to sort `package.json` fields in a stable, human-first order.

[![NPM version](https://img.shields.io/npm/v/soron?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/soron)
[![TypeScript](https://img.shields.io/badge/TypeScript-%E2%9C%94-blue?style=flat&colorA=000000&colorB=000000)](https://www.typescriptlang.org/)
[![License](https://img.shields.io/npm/l/soron?style=flat&colorA=000000&colorB=000000)](LICENSE)

## Usage

```bash
npx soron
```

## Field Order

`soron` applies a fixed, opinionated order to top-level fields in `package.json`:

```ini
# Identity
name
version
description
author
homepage
repository
bugs
funding
keywords
license

# Module system
type
exports
main
module
types

# Publish & runtime
files
sideEffects
engines

# Tooling
scripts
bin

# Dependencies
dependencies
devDependencies
peerDependencies
optionalDependencies
```

_Any remaining fields not listed above are preserved and sorted alphabetically._

## Philosophy

- **Opinionated but stable**
- **Human-readable over tool-generated**
- **Maintainer-first, not ecosystem-driven**