prettier-plugin-insert-comma 1.1.5 → 1.1.6

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -2
package/dist/index.js CHANGED
@@ -84,6 +84,9 @@ function fixMissingCommas(code, skipTrailing = false) {
84
84
  prev === '(' ||
85
85
  prev === ':' ||
86
86
  prev === ';' ||
87
+ prev === '>' ||
88
+ prev === '=' ||
89
+ prev === '?' ||
87
90
  prev === undefined;
88
91
  if (isNextKeyOrClosing && !isPrevSeparator && !lastWasComment) {
89
92
  const isTrailing = nextSlice[0] === '}' || nextSlice[0] === ']';
@@ -100,12 +103,9 @@ function fixMissingCommas(code, skipTrailing = false) {
100
103
  return out;
101
104
  }
102
105
  function wrapParser(parser) {
103
- const isRunningCLI = process.argv[1]?.includes('prettier');
104
106
  return {
105
107
  ...parser,
106
108
  async preprocess(text, options) {
107
- if (isRunningCLI)
108
- return text;
109
109
  let next = text;
110
110
  if (parser.preprocess) {
111
111
  const result = await parser.preprocess(text, options);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "prettier-plugin-insert-comma",
4
- "version": "1.1.5",
4
+ "version": "1.1.6",
5
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",
@@ -36,7 +36,6 @@
36
36
  "prettier": "^3.7.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@types/node": "^25.3.5",
40
39
  "typescript": "^5.9.3"
41
40
  },
42
41
  "publishConfig": {