@openrewrite/rewrite 8.69.0 → 8.69.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.
Files changed (93) hide show
  1. package/dist/java/type.d.ts +5 -0
  2. package/dist/java/type.d.ts.map +1 -1
  3. package/dist/java/type.js +12 -0
  4. package/dist/java/type.js.map +1 -1
  5. package/dist/javascript/assertions.d.ts.map +1 -1
  6. package/dist/javascript/assertions.js +9 -0
  7. package/dist/javascript/assertions.js.map +1 -1
  8. package/dist/javascript/comparator.d.ts.map +1 -1
  9. package/dist/javascript/comparator.js +5 -9
  10. package/dist/javascript/comparator.js.map +1 -1
  11. package/dist/javascript/{format.d.ts → format/format.d.ts} +15 -33
  12. package/dist/javascript/format/format.d.ts.map +1 -0
  13. package/dist/javascript/{format.js → format/format.js} +56 -313
  14. package/dist/javascript/format/format.js.map +1 -0
  15. package/dist/javascript/format/index.d.ts +3 -0
  16. package/dist/javascript/format/index.d.ts.map +1 -0
  17. package/dist/javascript/format/index.js +38 -0
  18. package/dist/javascript/format/index.js.map +1 -0
  19. package/dist/javascript/format/minimum-viable-spacing-visitor.d.ts +28 -0
  20. package/dist/javascript/format/minimum-viable-spacing-visitor.d.ts.map +1 -0
  21. package/dist/javascript/format/minimum-viable-spacing-visitor.js +308 -0
  22. package/dist/javascript/format/minimum-viable-spacing-visitor.js.map +1 -0
  23. package/dist/javascript/format/normalize-whitespace-visitor.d.ts +14 -0
  24. package/dist/javascript/format/normalize-whitespace-visitor.d.ts.map +1 -0
  25. package/dist/javascript/format/normalize-whitespace-visitor.js +65 -0
  26. package/dist/javascript/format/normalize-whitespace-visitor.js.map +1 -0
  27. package/dist/javascript/format/prettier-config-loader.d.ts +92 -0
  28. package/dist/javascript/format/prettier-config-loader.d.ts.map +1 -0
  29. package/dist/javascript/format/prettier-config-loader.js +419 -0
  30. package/dist/javascript/format/prettier-config-loader.js.map +1 -0
  31. package/dist/javascript/format/prettier-format.d.ts +111 -0
  32. package/dist/javascript/format/prettier-format.d.ts.map +1 -0
  33. package/dist/javascript/format/prettier-format.js +496 -0
  34. package/dist/javascript/format/prettier-format.js.map +1 -0
  35. package/dist/javascript/{tabs-and-indents-visitor.d.ts → format/tabs-and-indents-visitor.d.ts} +4 -4
  36. package/dist/javascript/format/tabs-and-indents-visitor.d.ts.map +1 -0
  37. package/dist/javascript/{tabs-and-indents-visitor.js → format/tabs-and-indents-visitor.js} +7 -7
  38. package/dist/javascript/format/tabs-and-indents-visitor.js.map +1 -0
  39. package/dist/javascript/format/whitespace-reconciler.d.ts +106 -0
  40. package/dist/javascript/format/whitespace-reconciler.d.ts.map +1 -0
  41. package/dist/javascript/format/whitespace-reconciler.js +291 -0
  42. package/dist/javascript/format/whitespace-reconciler.js.map +1 -0
  43. package/dist/javascript/markers.d.ts.map +1 -1
  44. package/dist/javascript/markers.js +21 -0
  45. package/dist/javascript/markers.js.map +1 -1
  46. package/dist/javascript/parser.d.ts +15 -3
  47. package/dist/javascript/parser.d.ts.map +1 -1
  48. package/dist/javascript/parser.js +107 -24
  49. package/dist/javascript/parser.js.map +1 -1
  50. package/dist/javascript/recipes/auto-format.d.ts +3 -0
  51. package/dist/javascript/recipes/auto-format.d.ts.map +1 -1
  52. package/dist/javascript/recipes/auto-format.js +22 -1
  53. package/dist/javascript/recipes/auto-format.js.map +1 -1
  54. package/dist/javascript/style.d.ts +52 -1
  55. package/dist/javascript/style.d.ts.map +1 -1
  56. package/dist/javascript/style.js +43 -2
  57. package/dist/javascript/style.js.map +1 -1
  58. package/dist/test/rewrite-test.d.ts +3 -4
  59. package/dist/test/rewrite-test.d.ts.map +1 -1
  60. package/dist/test/rewrite-test.js +6 -18
  61. package/dist/test/rewrite-test.js.map +1 -1
  62. package/dist/version.txt +1 -1
  63. package/dist/yaml/assertions.d.ts +4 -0
  64. package/dist/yaml/assertions.d.ts.map +1 -0
  65. package/dist/yaml/assertions.js +31 -0
  66. package/dist/yaml/assertions.js.map +1 -0
  67. package/dist/yaml/index.d.ts +2 -1
  68. package/dist/yaml/index.d.ts.map +1 -1
  69. package/dist/yaml/index.js +2 -1
  70. package/dist/yaml/index.js.map +1 -1
  71. package/package.json +5 -4
  72. package/src/java/type.ts +12 -0
  73. package/src/javascript/assertions.ts +9 -0
  74. package/src/javascript/comparator.ts +6 -11
  75. package/src/javascript/{format.ts → format/format.ts} +59 -267
  76. package/src/javascript/format/index.ts +21 -0
  77. package/src/javascript/format/minimum-viable-spacing-visitor.ts +256 -0
  78. package/src/javascript/format/normalize-whitespace-visitor.ts +42 -0
  79. package/src/javascript/format/prettier-config-loader.ts +422 -0
  80. package/src/javascript/format/prettier-format.ts +622 -0
  81. package/src/javascript/{tabs-and-indents-visitor.ts → format/tabs-and-indents-visitor.ts} +8 -8
  82. package/src/javascript/format/whitespace-reconciler.ts +345 -0
  83. package/src/javascript/markers.ts +19 -0
  84. package/src/javascript/parser.ts +107 -20
  85. package/src/javascript/recipes/auto-format.ts +28 -1
  86. package/src/javascript/style.ts +41 -2
  87. package/src/test/rewrite-test.ts +6 -18
  88. package/src/yaml/assertions.ts +28 -0
  89. package/src/yaml/index.ts +2 -1
  90. package/dist/javascript/format.d.ts.map +0 -1
  91. package/dist/javascript/format.js.map +0 -1
  92. package/dist/javascript/tabs-and-indents-visitor.d.ts.map +0 -1
  93. package/dist/javascript/tabs-and-indents-visitor.js.map +0 -1
@@ -0,0 +1,419 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.PrettierConfigLoader = void 0;
46
+ exports.clearPrettierModuleCache = clearPrettierModuleCache;
47
+ exports.loadPrettierVersion = loadPrettierVersion;
48
+ /*
49
+ * Copyright 2025 the original author or authors.
50
+ * <p>
51
+ * Licensed under the Moderne Source Available License (the "License");
52
+ * you may not use this file except in compliance with the License.
53
+ * You may obtain a copy of the License at
54
+ * <p>
55
+ * https://docs.moderne.io/licensing/moderne-source-available-license
56
+ * <p>
57
+ * Unless required by applicable law or agreed to in writing, software
58
+ * distributed under the License is distributed on an "AS IS" BASIS,
59
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
60
+ * See the License for the specific language governing permissions and
61
+ * limitations under the License.
62
+ */
63
+ const path = __importStar(require("path"));
64
+ const fs = __importStar(require("fs"));
65
+ const fsp = __importStar(require("fs/promises"));
66
+ const os = __importStar(require("os"));
67
+ const child_process_1 = require("child_process");
68
+ const style_1 = require("../style");
69
+ const uuid_1 = require("../../uuid");
70
+ /**
71
+ * Cache of loaded Prettier modules by version.
72
+ * This ensures we don't reload the same version multiple times.
73
+ *
74
+ * Use `clearPrettierModuleCache()` to clear this cache if needed
75
+ * (e.g., in long-running processes to free memory).
76
+ */
77
+ const prettierModuleCache = new Map();
78
+ /**
79
+ * Cache of pending Prettier load operations.
80
+ * Prevents concurrent requests for the same version from duplicating work.
81
+ */
82
+ const pendingLoads = new Map();
83
+ /**
84
+ * Clears the in-memory Prettier module cache.
85
+ * Call this in long-running processes to free memory when Prettier
86
+ * versions are no longer needed.
87
+ */
88
+ function clearPrettierModuleCache() {
89
+ prettierModuleCache.clear();
90
+ pendingLoads.clear();
91
+ }
92
+ /**
93
+ * Gets the cache directory for a specific Prettier version.
94
+ * Uses ~/.cache/openrewrite/prettier/<version>/
95
+ */
96
+ function getPrettierCacheDir(version) {
97
+ const cacheBase = path.join(os.homedir(), '.cache', 'openrewrite', 'prettier');
98
+ return path.join(cacheBase, version);
99
+ }
100
+ /**
101
+ * Checks if a Prettier version is installed in the cache.
102
+ */
103
+ function isPrettierCached(version) {
104
+ const cacheDir = getPrettierCacheDir(version);
105
+ const prettierPath = path.join(cacheDir, 'node_modules', 'prettier', 'package.json');
106
+ if (!fs.existsSync(prettierPath)) {
107
+ return false;
108
+ }
109
+ // Verify the installed version matches
110
+ try {
111
+ const pkg = JSON.parse(fs.readFileSync(prettierPath, 'utf8'));
112
+ return pkg.version === version;
113
+ }
114
+ catch (_a) {
115
+ return false;
116
+ }
117
+ }
118
+ /**
119
+ * Installs a specific Prettier version to the cache directory.
120
+ */
121
+ function installPrettierToCache(version) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ var _a;
124
+ const cacheDir = getPrettierCacheDir(version);
125
+ // Create directory structure
126
+ yield fsp.mkdir(cacheDir, { recursive: true });
127
+ // Create minimal package.json
128
+ const packageJson = {
129
+ name: `prettier-cache-${version}`,
130
+ version: '1.0.0',
131
+ private: true,
132
+ dependencies: {
133
+ prettier: version
134
+ }
135
+ };
136
+ yield fsp.writeFile(path.join(cacheDir, 'package.json'), JSON.stringify(packageJson, null, 2));
137
+ // Run npm install
138
+ const result = (0, child_process_1.spawnSync)('npm', ['install', '--silent'], {
139
+ cwd: cacheDir,
140
+ encoding: 'utf-8',
141
+ stdio: ['pipe', 'pipe', 'pipe'],
142
+ timeout: 120000 // 2 minutes
143
+ });
144
+ if (result.error) {
145
+ throw new Error(`Failed to install Prettier ${version}: ${result.error.message}`);
146
+ }
147
+ if (result.status !== 0) {
148
+ const stderr = ((_a = result.stderr) === null || _a === void 0 ? void 0 : _a.trim()) || '';
149
+ throw new Error(`Failed to install Prettier ${version}: npm exited with code ${result.status}${stderr ? '\n' + stderr : ''}`);
150
+ }
151
+ // Verify installation
152
+ if (!isPrettierCached(version)) {
153
+ throw new Error(`Prettier ${version} installation verification failed`);
154
+ }
155
+ });
156
+ }
157
+ /**
158
+ * Loads Prettier from the cache directory for a specific version.
159
+ */
160
+ function loadPrettierFromCache(version) {
161
+ const cacheDir = getPrettierCacheDir(version);
162
+ const prettierPath = path.join(cacheDir, 'node_modules', 'prettier');
163
+ // Clear require cache for this path to ensure fresh load
164
+ // (in case the version was reinstalled)
165
+ const resolvedPath = require.resolve(prettierPath);
166
+ delete require.cache[resolvedPath];
167
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
168
+ return require(prettierPath);
169
+ }
170
+ /**
171
+ * Manages Prettier configuration detection and loading for a parse session.
172
+ *
173
+ * This class:
174
+ * 1. Detects if Prettier is installed in the project
175
+ * 2. Resolves Prettier config per-file (with overrides)
176
+ * 3. Caches resolved configs for marker deduplication
177
+ * 4. Creates PrettierStyle markers for source files
178
+ *
179
+ * The marker only stores the version and resolved config - at formatting time,
180
+ * the correct version of Prettier will be loaded dynamically (like npx).
181
+ */
182
+ class PrettierConfigLoader {
183
+ /**
184
+ * Creates a new PrettierConfigLoader for a project.
185
+ *
186
+ * @param projectRoot The root directory of the project (where package.json is)
187
+ */
188
+ constructor(projectRoot) {
189
+ this.projectRoot = projectRoot;
190
+ this.configCache = new Map();
191
+ }
192
+ /**
193
+ * Detects Prettier in the project and loads our bundled version for config resolution.
194
+ * Call this once at the start of parsing.
195
+ */
196
+ detectPrettier() {
197
+ return __awaiter(this, void 0, void 0, function* () {
198
+ if (this.detection) {
199
+ return this.detection;
200
+ }
201
+ this.detection = { available: false };
202
+ try {
203
+ // Get the project's Prettier version from package.json or node_modules
204
+ const version = this.getPrettierVersionFromProject();
205
+ if (!version) {
206
+ return this.detection;
207
+ }
208
+ // Load our bundled Prettier for config resolution
209
+ // We use dynamic require to handle cases where Prettier isn't installed
210
+ let bundledPrettier;
211
+ try {
212
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
213
+ bundledPrettier = require('prettier');
214
+ }
215
+ catch (e) {
216
+ // Our bundled Prettier isn't available
217
+ console.warn('PrettierConfigLoader: Failed to load bundled Prettier:', e);
218
+ return this.detection;
219
+ }
220
+ this.detection = {
221
+ available: true,
222
+ version,
223
+ bundledPrettier
224
+ };
225
+ }
226
+ catch (_a) {
227
+ // Any error means Prettier isn't properly set up
228
+ this.detection = { available: false };
229
+ }
230
+ return this.detection;
231
+ });
232
+ }
233
+ /**
234
+ * Gets the Prettier version from the project's package.json or node_modules.
235
+ * Scans upward from projectRoot to support monorepo structures where Prettier
236
+ * is installed at the repository root.
237
+ */
238
+ getPrettierVersionFromProject() {
239
+ // Scan upward from projectRoot to find Prettier
240
+ // This handles monorepos where Prettier is at the root but files are in subdirectories
241
+ let dir = this.projectRoot;
242
+ while (true) {
243
+ // First, check for prettier in node_modules (actual installation)
244
+ const prettierPackageJson = path.join(dir, 'node_modules', 'prettier', 'package.json');
245
+ if (fs.existsSync(prettierPackageJson)) {
246
+ try {
247
+ const pkg = JSON.parse(fs.readFileSync(prettierPackageJson, 'utf8'));
248
+ return pkg.version;
249
+ }
250
+ catch (_a) {
251
+ // Corrupted package.json, continue scanning
252
+ }
253
+ }
254
+ // Check package.json for prettier dependency (might be a range like ^3.0.0)
255
+ const packageJsonPath = path.join(dir, 'package.json');
256
+ if (fs.existsSync(packageJsonPath)) {
257
+ try {
258
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
259
+ const deps = Object.assign(Object.assign({}, packageJson.dependencies), packageJson.devDependencies);
260
+ if (deps.prettier) {
261
+ // Found prettier as a dependency, but node_modules wasn't found
262
+ // This might mean dependencies aren't installed yet
263
+ // Continue scanning upward in case there's a parent with node_modules
264
+ }
265
+ }
266
+ catch (_b) {
267
+ // package.json parse error, continue
268
+ }
269
+ }
270
+ // Move up to parent directory
271
+ const parent = path.dirname(dir);
272
+ if (parent === dir) {
273
+ // Reached filesystem root
274
+ break;
275
+ }
276
+ dir = parent;
277
+ }
278
+ return undefined;
279
+ }
280
+ /**
281
+ * Finds the .prettierignore file by scanning upward from projectRoot.
282
+ * Returns undefined if no .prettierignore file is found.
283
+ */
284
+ findPrettierIgnore() {
285
+ let dir = this.projectRoot;
286
+ while (true) {
287
+ const ignorePath = path.join(dir, '.prettierignore');
288
+ if (fs.existsSync(ignorePath)) {
289
+ return ignorePath;
290
+ }
291
+ const parent = path.dirname(dir);
292
+ if (parent === dir) {
293
+ // Reached filesystem root
294
+ break;
295
+ }
296
+ dir = parent;
297
+ }
298
+ return undefined;
299
+ }
300
+ /**
301
+ * Gets or creates a PrettierStyle marker for the given source file.
302
+ * Returns undefined if Prettier is not available or no config applies to this file.
303
+ *
304
+ * @param filePath Absolute path to the source file
305
+ */
306
+ getConfigMarker(filePath) {
307
+ return __awaiter(this, void 0, void 0, function* () {
308
+ var _a, _b;
309
+ if (!((_a = this.detection) === null || _a === void 0 ? void 0 : _a.available) || !this.detection.bundledPrettier) {
310
+ return undefined;
311
+ }
312
+ try {
313
+ // Resolve path against projectRoot if not absolute
314
+ const absolutePath = path.isAbsolute(filePath)
315
+ ? filePath
316
+ : path.join(this.projectRoot, filePath);
317
+ // Check if file is ignored by .prettierignore
318
+ const ignorePath = this.findPrettierIgnore();
319
+ let ignored = false;
320
+ if (ignorePath) {
321
+ const fileInfo = yield this.detection.bundledPrettier.getFileInfo(absolutePath, { ignorePath });
322
+ ignored = fileInfo.ignored;
323
+ }
324
+ // Resolve config for this specific file (applies overrides)
325
+ // If no config file exists, use empty config (Prettier defaults)
326
+ const config = (_b = yield this.detection.bundledPrettier.resolveConfig(absolutePath)) !== null && _b !== void 0 ? _b : {};
327
+ // Create a cache key from the resolved config + version + ignored status
328
+ const configKey = JSON.stringify({ config, version: this.detection.version, ignored });
329
+ // Check cache for existing marker with same config
330
+ let marker = this.configCache.get(configKey);
331
+ if (marker) {
332
+ return marker;
333
+ }
334
+ // Create new PrettierStyle instance
335
+ marker = new style_1.PrettierStyle((0, uuid_1.randomId)(), config, this.detection.version, ignored);
336
+ // Cache and return
337
+ this.configCache.set(configKey, marker);
338
+ return marker;
339
+ }
340
+ catch (e) {
341
+ // Config resolution failed for this file
342
+ console.warn(`PrettierConfigLoader: Failed to resolve config for ${filePath}:`, e);
343
+ return undefined;
344
+ }
345
+ });
346
+ }
347
+ /**
348
+ * Clears the config cache. Call this between parse batches if needed.
349
+ */
350
+ clearCache() {
351
+ this.configCache.clear();
352
+ }
353
+ }
354
+ exports.PrettierConfigLoader = PrettierConfigLoader;
355
+ /**
356
+ * Dynamically loads a specific version of Prettier for formatting.
357
+ *
358
+ * This function will attempt to load Prettier in this order:
359
+ * 1. From the in-memory cache (if already loaded)
360
+ * 2. From the current working directory's node_modules (if version matches)
361
+ * 3. From the cached npm project at ~/.cache/openrewrite/prettier/<version>/
362
+ * 4. Install to cache and load from there
363
+ *
364
+ * Concurrent requests for the same version are deduplicated.
365
+ *
366
+ * @param version The Prettier version to load (e.g., "3.4.2")
367
+ * @returns The loaded Prettier module
368
+ */
369
+ function loadPrettierVersion(version) {
370
+ return __awaiter(this, void 0, void 0, function* () {
371
+ // Check in-memory cache first
372
+ const cached = prettierModuleCache.get(version);
373
+ if (cached) {
374
+ return cached;
375
+ }
376
+ // Check if there's already a pending load for this version
377
+ const pending = pendingLoads.get(version);
378
+ if (pending) {
379
+ return pending;
380
+ }
381
+ // Create and cache the load promise to prevent concurrent duplicate loads
382
+ const loadPromise = loadPrettierVersionInternal(version);
383
+ pendingLoads.set(version, loadPromise);
384
+ try {
385
+ const prettier = yield loadPromise;
386
+ prettierModuleCache.set(version, prettier);
387
+ return prettier;
388
+ }
389
+ finally {
390
+ pendingLoads.delete(version);
391
+ }
392
+ });
393
+ }
394
+ /**
395
+ * Internal implementation of Prettier version loading.
396
+ */
397
+ function loadPrettierVersionInternal(version) {
398
+ return __awaiter(this, void 0, void 0, function* () {
399
+ // Try to load from local node_modules if version matches
400
+ try {
401
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
402
+ const localPrettier = require('prettier');
403
+ if (localPrettier.version === version) {
404
+ return localPrettier;
405
+ }
406
+ }
407
+ catch (_a) {
408
+ // Local prettier not available
409
+ }
410
+ // Check if version is cached on disk
411
+ if (isPrettierCached(version)) {
412
+ return loadPrettierFromCache(version);
413
+ }
414
+ // Install to cache and load
415
+ yield installPrettierToCache(version);
416
+ return loadPrettierFromCache(version);
417
+ });
418
+ }
419
+ //# sourceMappingURL=prettier-config-loader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier-config-loader.js","sourceRoot":"","sources":["../../../src/javascript/format/prettier-config-loader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,4DAGC;AAsUD,kDAwBC;AA5YD;;;;;;;;;;;;;;GAcG;AACH,2CAA6B;AAC7B,uCAAyB;AACzB,iDAAmC;AACnC,uCAAyB;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,OAAO,KAAK,OAAO,EAAE,CAAC;gBACpC,OAAO,aAAa,CAAC;YACzB,CAAC;QACL,CAAC;QAAC,WAAM,CAAC;YACL,+BAA+B;QACnC,CAAC;QAED,qCAAqC;QACrC,IAAI,gBAAgB,CAAC,OAAO,CAAC,EAAE,CAAC;YAC5B,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;QAED,4BAA4B;QAC5B,MAAM,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;CAAA"}
@@ -0,0 +1,111 @@
1
+ import { JS } from '../tree';
2
+ import { J } from '../../java';
3
+ import { Cursor, Tree } from '../../tree';
4
+ import { PrettierStyle } from '../style';
5
+ import { NamedStyles } from '../../style';
6
+ /**
7
+ * Options for Prettier formatting.
8
+ */
9
+ export interface PrettierFormatOptions {
10
+ /**
11
+ * Tab width for indentation. Defaults to 2.
12
+ */
13
+ tabWidth?: number;
14
+ /**
15
+ * Use tabs instead of spaces. Defaults to false.
16
+ */
17
+ useTabs?: boolean;
18
+ /**
19
+ * Print semicolons at the ends of statements. Defaults to true.
20
+ */
21
+ semi?: boolean;
22
+ /**
23
+ * Use single quotes instead of double quotes. Defaults to false.
24
+ */
25
+ singleQuote?: boolean;
26
+ /**
27
+ * Print trailing commas wherever possible. Defaults to 'all'.
28
+ */
29
+ trailingComma?: 'all' | 'es5' | 'none';
30
+ /**
31
+ * Print width for line wrapping. Defaults to 80.
32
+ */
33
+ printWidth?: number;
34
+ /**
35
+ * Change when properties in objects are quoted.
36
+ * - "as-needed" - Only add quotes around object properties where required.
37
+ * - "consistent" - If at least one property in an object requires quotes, quote all properties.
38
+ * - "preserve" - Respect the input use of quotes in object properties.
39
+ * Defaults to "as-needed".
40
+ */
41
+ quoteProps?: 'as-needed' | 'consistent' | 'preserve';
42
+ /**
43
+ * The Prettier version to use (e.g., "3.4.2").
44
+ * If specified, loads that version from cache or installs it.
45
+ * If not specified, uses the bundled Prettier.
46
+ */
47
+ prettierVersion?: string;
48
+ }
49
+ /**
50
+ * Formats a JavaScript/TypeScript AST using Prettier.
51
+ *
52
+ * This function:
53
+ * 1. Prints the AST to a string
54
+ * 2. Formats the string using Prettier
55
+ * 3. Parses the formatted string back to an AST (without type attribution for performance)
56
+ * 4. Reconciles the whitespace from the formatted AST back into the original AST
57
+ *
58
+ * The result preserves the original AST's structure, types, and markers while
59
+ * applying Prettier's formatting rules for whitespace.
60
+ *
61
+ * @param sourceFile The source file to format
62
+ * @param options Prettier formatting options
63
+ * @param stopAfter Optional node to stop formatting after. Once this node is exited,
64
+ * no more whitespace changes are applied to subsequent nodes.
65
+ * @returns The formatted source file with reconciled whitespace
66
+ */
67
+ export declare function prettierFormat(sourceFile: JS.CompilationUnit, options?: PrettierFormatOptions, stopAfter?: J): Promise<JS.CompilationUnit>;
68
+ /**
69
+ * Formats a subtree of a JavaScript/TypeScript AST using Prettier.
70
+ *
71
+ * This function is optimized for formatting a small part of a larger tree:
72
+ * 1. Extracts the path from compilation unit to target
73
+ * 2. Prunes the tree (replaces siblings with placeholders)
74
+ * 3. Formats the pruned tree with Prettier
75
+ * 4. Finds the target in the formatted tree
76
+ * 5. Reconciles only the target subtree's whitespace
77
+ *
78
+ * @param target The subtree to format
79
+ * @param cursor The cursor pointing to or near the target
80
+ * @param options Prettier formatting options
81
+ * @param stopAfter Optional node to stop formatting after
82
+ * @returns The formatted subtree, or undefined if formatting failed
83
+ */
84
+ export declare function prettierFormatSubtree<T extends J>(target: T, cursor: Cursor, options?: PrettierFormatOptions, stopAfter?: J): Promise<T | undefined>;
85
+ /**
86
+ * Gets the PrettierStyle from the styles array or source file markers.
87
+ *
88
+ * @param tree The tree being formatted
89
+ * @param cursor Optional cursor for walking up to find source file
90
+ * @param styles Optional styles array to check first
91
+ * @returns PrettierStyle if found, undefined otherwise
92
+ */
93
+ export declare function getPrettierStyle(tree: Tree, cursor?: Cursor, styles?: NamedStyles<string>[]): PrettierStyle | undefined;
94
+ /**
95
+ * Applies Prettier formatting to a tree.
96
+ *
97
+ * Configuration is resolved from the PrettierStyle marker on the source file.
98
+ *
99
+ * For compilation units, formats and reconciles the entire tree.
100
+ * For subtrees, uses prettierFormatSubtree which prunes the tree for efficiency,
101
+ * formats the pruned tree, and reconciles only the target subtree.
102
+ *
103
+ * @param tree The tree to format
104
+ * @param prettierStyle The PrettierStyle containing config
105
+ * @param p The visitor parameter
106
+ * @param cursor Optional cursor for subtree formatting
107
+ * @param stopAfter Optional tree to stop after
108
+ * @returns The formatted tree
109
+ */
110
+ export declare function applyPrettierFormatting<R extends J, P>(tree: R, prettierStyle: PrettierStyle, p: P, cursor?: Cursor, stopAfter?: Tree): Promise<R | undefined>;
111
+ //# sourceMappingURL=prettier-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prettier-format.d.ts","sourceRoot":"","sources":["../../../src/javascript/format/prettier-format.ts"],"names":[],"mappings":"AAeA,OAAO,EAAC,EAAE,EAAC,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAC,CAAC,EAAY,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,YAAY,CAAC;AAMxC,OAAO,EAAC,aAAa,EAAY,MAAM,UAAU,CAAC;AAClD,OAAO,EAAC,WAAW,EAAC,MAAM,aAAa,CAAC;AAyBxC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;IAEvC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;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