prettier-plugin-insert-comma 1.1.2 → 1.1.4

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.
@@ -4,6 +4,10 @@ A [Prettier](https://prettier.io/) plugin that automatically inserts missing com
4
4
 
5
5
  Prettier cannot format code with syntax errors like missing commas in objects. This plugin runs as a preprocessor to insert commas between properties, allowing Prettier to format your code successfully.
6
6
 
7
+ ## Requirements
8
+
9
+ - Prettier 3.7.0 or higher
10
+
7
11
  ## Example
8
12
 
9
13
  **Before** — Prettier would throw a parse error:
@@ -68,10 +72,10 @@ For JSON files, you need to specify the parser explicitly with `overrides`:
68
72
  }
69
73
  ```
70
74
 
71
- ## Supported Parsers
75
+ ## Supported Languages
72
76
 
73
- | Parser | Languages |
74
- | ------------ | --------------- |
75
- | `typescript` | TypeScript, TSX |
76
- | `babel` | JavaScript, JSX |
77
- | `json` | JSON |
77
+ | Language |
78
+ | --------------- |
79
+ | TypeScript, TSX |
80
+ | JavaScript, JSX |
81
+ | JSON |
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import typescriptParser from 'prettier/parser-typescript';
2
- import babelParser from 'prettier/parser-babel';
1
+ import typescriptParser from 'prettier/plugins/typescript';
2
+ import babelParser from 'prettier/plugins/babel';
3
3
  function fixMissingCommas(code) {
4
4
  let depth = 0;
5
5
  let inString = false;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "prettier-plugin-insert-comma",
4
- "version": "1.1.2",
5
- "description": "A Prettier plugin for inserting missing commas in multi-line object.",
4
+ "version": "1.1.4",
5
+ "description": "A Prettier plugin for inserting missing commas in multi-line objects.",
6
6
  "funding": "https://github.com/sponsors/refirst11",
7
7
  "author": "Refirst11",
8
8
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "build": "pnpm tsc"
34
34
  },
35
35
  "peerDependencies": {
36
- "prettier": "^3.0"
36
+ "prettier": "^3.7.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "typescript": "^5.9.3"