Skip to content

Commit d4c7c31

Browse files
kvzclaude
andauthored
fix(node25): fix async queue drain and indentString compatibility (#494)
- Use q.drain(cb) function form instead of property assignment (property assignment fails in Node 25 with async 2.6.4) - Handle ESM default export for indent-string in case of version mismatch - Fixes test failures on Node v25.2.1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 57a1aef commit d4c7c31

2 files changed

Lines changed: 24 additions & 34 deletions

File tree

composer.json

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,24 @@
11
{
2-
"name": "locutusjs/locutus",
3-
"description": "Locutus other languages' standard libraries to JavaScript for fun and educational purposes",
4-
"type": "library",
5-
"keywords": [
6-
"php",
7-
"golang",
8-
"c",
9-
"ruby",
10-
"python",
11-
"js",
12-
"locutus",
13-
"javascript",
14-
"polyfill",
15-
"standard-library"
16-
],
17-
"homepage": "https://locutus.io",
18-
"license": "MIT",
19-
"authors": [
20-
{
21-
"name": "Kevin van Zonneveld",
22-
"email": "kevin@vanzonneveld.net"
23-
}
24-
],
25-
"support": {
26-
"issues": "https://github.com/locutusjs/locutus/issues",
27-
"source": "https://github.com/locutusjs/locutus"
28-
},
29-
"require": {
30-
"php": ">=8.0"
31-
},
32-
"config": {
33-
"sort-packages": true
2+
"name": "locutusjs/locutus",
3+
"description": "Locutus other languages' standard libraries to JavaScript for fun and educational purposes",
4+
"type": "library",
5+
"keywords": ["php", "golang", "c", "ruby", "python", "js", "locutus", "javascript", "polyfill", "standard-library"],
6+
"homepage": "https://locutus.io",
7+
"license": "MIT",
8+
"authors": [
9+
{
10+
"name": "Kevin van Zonneveld",
11+
"email": "kevin@vanzonneveld.net"
3412
}
13+
],
14+
"support": {
15+
"issues": "https://github.com/locutusjs/locutus/issues",
16+
"source": "https://github.com/locutusjs/locutus"
17+
},
18+
"require": {
19+
"php": ">=8.0"
20+
},
21+
"config": {
22+
"sort-packages": true
23+
}
3524
}

src/_util/util.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const fsPromises = fs.promises
55
const async = require('async')
66
const YAML = require('js-yaml')
77
const debug = require('debug')('locutus:utils')
8-
const indentString = require('indent-string')
8+
const indentStringModule = require('indent-string')
9+
const indentString = indentStringModule.default || indentStringModule
910
const _ = require('lodash')
1011
const esprima = require('esprima')
1112

@@ -181,7 +182,7 @@ class Util {
181182

182183
q.push(files)
183184

184-
q.drain = cb
185+
q.drain(cb)
185186
}
186187

187188
_reindexOne(params, cb) {

0 commit comments

Comments
 (0)