Commit 03677a1
authored
feat: add v22.19.0 patch (#106)
## Node.js Patch Update to v22.19.0
This PR updates the Node.js patch to version 22.19.0.
The workflow automatically attempts to resolve patch conflicts using AI
when the OpenAI API key is available.
### AI Resolution Details
Processing section 1/1 for ./lib/internal/modules/cjs/loader.js...
Found 1 reject files to process
Processing: ./lib/internal/modules/cjs/loader.js.rej ->
./lib/internal/modules/cjs/loader.js
Prompt for OpenAI API:
I have a Git patch that failed to apply. Here's the specific section
that needs to be fixed:
REJECTED PATCH HUNK:
```
@@ -250,12 +250,16 @@
// Guard against internal bugs where a non-string filename is passed in by mistake.
assert(typeof filename === 'string');
+ const origFilename = filename;
filename = path.toNamespacedPath(filename);
if (statCache !== null) {
const result = statCache.get(filename);
if (result !== undefined) { return result; }
}
- const result = internalFsBinding.internalModuleStat(internalFsBinding, filename);
+ const fs = require('fs');
+ const result = fs.existsSync(origFilename) ?
+ (fs.statSync(origFilename).isDirectory() ? 1 : 0) : -1;
+
if (statCache !== null && result >= 0) {
// Only set cache when `internalModuleStat(internalFsBinding, filename)` succeeds.
statCache.set(filename, result);
```
CURRENT FILE SECTION (lines 245-266):
```
}
/**
* Get a path's properties, using an in-memory cache to minimize lookups.
* @param {string} filename Absolute path to the file
*/
function stat(filename) {
// Guard against internal bugs where a non-string filename is passed in by mistake.
assert(typeof filename === 'string');
filename = path.toNamespacedPath(filename);
if (statCache !== null) {
const result = statCache.get(filename);
if (result !== undefined) { return result; }
}
const result = internalFsBinding.internalModuleStat(filename);
if (statCache !== null && result >= 0) {
// Only set cache when `internalModuleStat(filename)` succeeds.
statCache.set(filename, result);
}
return result;
}
```
Please apply the intended changes from the rejected hunk to this file
section. Return ONLY the corrected file section content, preserving the
exact line structure and formatting. Do not add explanations or markdown
formatting.
RESOLVED CONTENT for ./lib/internal/modules/cjs/loader.js:
```
}
/**
* Get a path's properties, using an in-memory cache to minimize lookups.
* @param {string} filename Absolute path to the file
*/
function stat(filename) {
// Guard against internal bugs where a non-string filename is passed in by mistake.
assert(typeof filename === 'string');
const origFilename = filename;
filename = path.toNamespacedPath(filename);
if (statCache !== null) {
const result = statCache.get(filename);
if (result !== undefined) { return result; }
}
const fs = require('fs');
const result = fs.existsSync(origFilename) ?
(fs.statSync(origFilename).isDirectory() ? 1 : 0) : -1;
if (statCache !== null && result >= 0) {
// Only set cache when `internalModuleStat(internalFsBinding, filename)` succeeds.
statCache.set(filename, result);
}
return result;
}
```
✅ Successfully resolved ./lib/internal/modules/cjs/loader.js
CONFLICTS_RESOLVED=1
TOTAL_CONFLICTS=1
HAS_UNRESOLVED=False
Resolution summary: 1/1 conflicts resolved
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>1 parent 7898d82 commit 03677a1
2 files changed
Lines changed: 26 additions & 23 deletions
Lines changed: 25 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
| 338 | + | |
338 | 339 | | |
| 340 | + | |
| 341 | + | |
339 | 342 | | |
340 | | - | |
| 343 | + | |
341 | 344 | | |
342 | 345 | | |
343 | | - | |
| 346 | + | |
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
| |||
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
376 | | - | |
| 379 | + | |
377 | 380 | | |
378 | 381 | | |
379 | 382 | | |
| |||
398 | 401 | | |
399 | 402 | | |
400 | 403 | | |
401 | | - | |
| 404 | + | |
402 | 405 | | |
403 | 406 | | |
404 | 407 | | |
| |||
429 | 432 | | |
430 | 433 | | |
431 | 434 | | |
432 | | - | |
| 435 | + | |
433 | 436 | | |
434 | 437 | | |
435 | | - | |
| 438 | + | |
436 | 439 | | |
437 | 440 | | |
438 | 441 | | |
| |||
445 | 448 | | |
446 | 449 | | |
447 | 450 | | |
448 | | - | |
| 451 | + | |
449 | 452 | | |
450 | 453 | | |
451 | 454 | | |
| |||
473 | 476 | | |
474 | 477 | | |
475 | 478 | | |
476 | | - | |
| 479 | + | |
477 | 480 | | |
478 | 481 | | |
479 | 482 | | |
| |||
484 | 487 | | |
485 | 488 | | |
486 | 489 | | |
487 | | - | |
| 490 | + | |
488 | 491 | | |
489 | 492 | | |
490 | 493 | | |
| |||
501 | 504 | | |
502 | 505 | | |
503 | 506 | | |
504 | | - | |
| 507 | + | |
505 | 508 | | |
506 | 509 | | |
507 | 510 | | |
| |||
512 | 515 | | |
513 | 516 | | |
514 | 517 | | |
515 | | - | |
| 518 | + | |
516 | 519 | | |
517 | 520 | | |
518 | 521 | | |
| |||
523 | 526 | | |
524 | 527 | | |
525 | 528 | | |
526 | | - | |
| 529 | + | |
527 | 530 | | |
528 | 531 | | |
529 | 532 | | |
| |||
536 | 539 | | |
537 | 540 | | |
538 | 541 | | |
539 | | - | |
| 542 | + | |
540 | 543 | | |
541 | 544 | | |
542 | 545 | | |
| |||
658 | 661 | | |
659 | 662 | | |
660 | 663 | | |
661 | | - | |
| 664 | + | |
662 | 665 | | |
663 | 666 | | |
664 | 667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments