mediasnacks 0.12.1 → 0.12.2
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.
- package/package.json +1 -1
- package/src/utils/fs-utils.js +1 -1
- package/src/utils/parseOptions.js +2 -5
- package/src/vconcat.sh +1 -1
package/package.json
CHANGED
package/src/utils/fs-utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { lstatSync } from 'node:fs'
|
|
1
2
|
import { randomUUID } from 'node:crypto'
|
|
2
3
|
import { unlink, rename } from 'node:fs/promises'
|
|
3
4
|
import { dirname, extname, join } from 'node:path'
|
|
4
|
-
import { lstatSync } from 'node:fs'
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
export const lstat = f => lstatSync(f, { throwIfNoEntry: false })
|
|
@@ -17,8 +17,8 @@ export async function parseOptions(options = {}, config = {}) {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
async function resolveGlobs(arr, tokens) {
|
|
21
|
-
const terminatorIndex =
|
|
20
|
+
async function resolveGlobs(arr, tokens = []) {
|
|
21
|
+
const terminatorIndex = tokens.find(t => t.kind === 'option-terminator')?.index ?? -1
|
|
22
22
|
const set = new Set()
|
|
23
23
|
|
|
24
24
|
const globable = terminatorIndex === -1
|
|
@@ -37,6 +37,3 @@ async function resolveGlobs(arr, tokens) {
|
|
|
37
37
|
return Array.from(set)
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
function findTerminatorIndex(tokens) {
|
|
41
|
-
return (tokens || []).find(t => t.kind === 'option-terminator')?.index ?? -1
|
|
42
|
-
}
|