worsier 2.4.1 → 2.6.0

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
@@ -2,7 +2,8 @@
2
2
 
3
3
  A focused JavaScript, TypeScript, JSX, and TSX formatter powered by Rust. It formats static imports,
4
4
  TypeScript interface layout, statement and member semicolons, trailing commas, and the boundaries
5
- around runtime variable declarations while preserving source text outside the enabled rules.
5
+ around TypeScript type aliases and runtime variable declarations while preserving source text
6
+ outside the enabled rules.
6
7
  Node.js 24.0.0 or newer is required.
7
8
 
8
9
  ```sh
@@ -13,6 +14,8 @@ pnpm exec worsier --write .
13
14
 
14
15
  The CLI uses its opinionated defaults without a configuration file. An optional `worsier.jsonc`
15
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.
16
19
 
17
20
  By default, every nonempty TypeScript interface is expanded with one member per line. Set
18
21
  `rules.interfaceLayout` to a member threshold from `0` through `4294967295`, or to `"off"` to
@@ -34,6 +34,7 @@
34
34
  },
35
35
  "statementSpacing": {
36
36
  "imports": "separate",
37
+ "typeAliases": "separate",
37
38
  "variableDeclarations": "separate"
38
39
  },
39
40
  "trailingCommas": "never"
@@ -88,6 +89,7 @@
88
89
  "$ref": "#/$defs/StatementSpacingConfig",
89
90
  "default": {
90
91
  "imports": "separate",
92
+ "typeAliases": "separate",
91
93
  "variableDeclarations": "separate"
92
94
  }
93
95
  },
@@ -131,6 +133,10 @@
131
133
  "$ref": "#/$defs/StatementSpacingMode",
132
134
  "default": "separate"
133
135
  },
136
+ "typeAliases": {
137
+ "$ref": "#/$defs/StatementSpacingMode",
138
+ "default": "separate"
139
+ },
134
140
  "variableDeclarations": {
135
141
  "$ref": "#/$defs/StatementSpacingMode",
136
142
  "default": "separate"
package/dist/types.d.ts CHANGED
@@ -20,5 +20,6 @@ export interface SemicolonConfig {
20
20
  }
21
21
  export interface StatementSpacingConfig {
22
22
  imports?: 'separate' | 'compact' | 'off';
23
+ typeAliases?: 'separate' | 'compact' | 'off';
23
24
  variableDeclarations?: 'separate' | 'compact' | 'off';
24
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "worsier",
3
- "version": "2.4.1",
3
+ "version": "2.6.0",
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.4.1",
53
- "worsier-win32-arm64-msvc": "2.4.1",
54
- "worsier-linux-arm64-gnu": "2.4.1",
55
- "worsier-linux-arm64-musl": "2.4.1",
56
- "worsier-darwin-x64": "2.4.1",
57
- "worsier-win32-x64-msvc": "2.4.1",
58
- "worsier-linux-x64-gnu": "2.4.1",
59
- "worsier-linux-x64-musl": "2.4.1"
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"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/node": "26.2.0",