worsier 2.6.0 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,26 +1,22 @@
1
1
  # Worsier
2
2
 
3
- A focused JavaScript, TypeScript, JSX, and TSX formatter powered by Rust. It formats static imports,
4
- TypeScript interface layout, statement and member semicolons, trailing commas, and the boundaries
5
- around TypeScript type aliases and runtime variable declarations while preserving source text
6
- outside the enabled rules.
3
+ Worsier is a focused JavaScript, TypeScript, JSX, and TSX formatter powered by Rust. Each rule is independently configurable, and source outside enabled rules is preserved instead of being reprinted.
4
+
7
5
  Node.js 24.0.0 or newer is required.
8
6
 
7
+ [Read the complete documentation](https://github.com/Perdolique/worsier#readme).
8
+
9
+ ## Installation
10
+
9
11
  ```sh
10
12
  pnpm add -D worsier
11
13
  pnpm exec worsier --check .
12
14
  pnpm exec worsier --write .
13
15
  ```
14
16
 
15
- The CLI uses its opinionated defaults without a configuration file. An optional `worsier.jsonc`
16
- can override them; run `pnpm exec worsier --init` to create the complete typed configuration.
17
- Directory discovery skips `.git`, `node_modules`, and Wrangler's generated
18
- `worker-configuration.d.ts`. Pass an ignored file explicitly when you do want Worsier to process it.
17
+ The CLI uses its defaults when no configuration file is present. Run `pnpm exec worsier --init` to create a complete typed `worsier.jsonc`.
19
18
 
20
- By default, every nonempty TypeScript interface is expanded with one member per line. Set
21
- `rules.interfaceLayout` to a member threshold from `0` through `4294967295`, or to `"off"` to
22
- preserve interface layout. Members on the physical line governed by a preceding `// @ts-ignore`
23
- or `// @ts-expect-error` stay together so formatting does not change TypeScript diagnostics.
19
+ ## Programmatic API
24
20
 
25
21
  ```js
26
22
  import { format } from 'worsier'
@@ -28,13 +24,4 @@ import { format } from 'worsier'
28
24
  const output = await format('example.ts', "import{answer,type Value}from'pkg'")
29
25
  ```
30
26
 
31
- Pass an optional third `FormatConfig` argument to override the programmatic defaults. The
32
- programmatic API does not discover configuration files.
33
-
34
- ## Broader alternatives
35
-
36
- [Prettier](https://prettier.io/docs/) is a mature opinionated formatter that prints the complete
37
- source, while [Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html) is a fast,
38
- Prettier-compatible formatter with broader language and formatting coverage. Both provide selected
39
- configuration options, including semicolon and trailing-comma modes. Worsier instead focuses on
40
- independently configurable source-rewrite rules and preserves text outside the selected rules.
27
+ Pass an optional third `FormatConfig` argument to override the defaults. The programmatic API does not discover configuration files.
package/bin/worsier.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worsier",
3
- "version": "2.6.0",
3
+ "version": "2.7.1",
4
4
  "description": "A focused JavaScript and TypeScript import, interface-layout, semicolon, trailing-comma, and statement-boundary formatter powered by Rust",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -49,14 +49,14 @@
49
49
  ]
50
50
  },
51
51
  "optionalDependencies": {
52
- "worsier-darwin-arm64": "2.6.0",
53
- "worsier-win32-arm64-msvc": "2.6.0",
54
- "worsier-linux-arm64-gnu": "2.6.0",
55
- "worsier-linux-arm64-musl": "2.6.0",
56
- "worsier-darwin-x64": "2.6.0",
57
- "worsier-win32-x64-msvc": "2.6.0",
58
- "worsier-linux-x64-gnu": "2.6.0",
59
- "worsier-linux-x64-musl": "2.6.0"
52
+ "worsier-darwin-arm64": "2.7.1",
53
+ "worsier-win32-arm64-msvc": "2.7.1",
54
+ "worsier-linux-arm64-gnu": "2.7.1",
55
+ "worsier-linux-arm64-musl": "2.7.1",
56
+ "worsier-darwin-x64": "2.7.1",
57
+ "worsier-win32-x64-msvc": "2.7.1",
58
+ "worsier-linux-x64-gnu": "2.7.1",
59
+ "worsier-linux-x64-musl": "2.7.1"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/node": "26.2.0",