sh-ast 0.4.0 → 0.6.0
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/README.md +124 -9
- package/dist/analyze/brace-observation.d.ts +18 -0
- package/dist/analyze/brace-observation.d.ts.map +1 -0
- package/dist/analyze/brace-observation.js +59 -0
- package/dist/analyze/brace-observation.js.map +1 -0
- package/dist/analyze/resolve-argv0.d.ts +32 -8
- package/dist/analyze/resolve-argv0.d.ts.map +1 -1
- package/dist/analyze/resolve-argv0.js +49 -9
- package/dist/analyze/resolve-argv0.js.map +1 -1
- package/dist/analyze/resolve-word.d.ts +21 -13
- package/dist/analyze/resolve-word.d.ts.map +1 -1
- package/dist/analyze/resolve-word.js +8 -3
- package/dist/analyze/resolve-word.js.map +1 -1
- package/dist/analyze.d.ts +53 -21
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/sh-ast.d.ts +120 -0
- package/dist/syntax-print-errors.d.ts +35 -0
- package/dist/syntax-print-errors.d.ts.map +1 -0
- package/dist/syntax-print-errors.js +37 -0
- package/dist/syntax-print-errors.js.map +1 -0
- package/dist/syntax-print.d.ts +49 -0
- package/dist/syntax-print.d.ts.map +1 -0
- package/dist/syntax-print.js +86 -0
- package/dist/syntax-print.js.map +1 -0
- package/dist/syntax-walk-bounds.d.ts +18 -0
- package/dist/syntax-walk-bounds.d.ts.map +1 -0
- package/dist/syntax-walk-bounds.js +188 -0
- package/dist/syntax-walk-bounds.js.map +1 -0
- package/dist/syntax-walk-errors.d.ts +19 -0
- package/dist/syntax-walk-errors.d.ts.map +1 -0
- package/dist/syntax-walk-errors.js +23 -0
- package/dist/syntax-walk-errors.js.map +1 -0
- package/dist/syntax-walk-license.d.ts +3 -0
- package/dist/syntax-walk-license.d.ts.map +1 -0
- package/dist/syntax-walk-license.js +37 -0
- package/dist/syntax-walk-license.js.map +1 -0
- package/dist/syntax-walk.d.ts +46 -0
- package/dist/syntax-walk.d.ts.map +1 -0
- package/dist/syntax-walk.js +322 -0
- package/dist/syntax-walk.js.map +1 -0
- package/dist/syntax-wire.d.ts +2 -0
- package/dist/syntax-wire.d.ts.map +1 -1
- package/dist/syntax-wire.js +28 -4
- package/dist/syntax-wire.js.map +1 -1
- package/package.json +1 -1
- package/shim/sh-ast.wasm +0 -0
package/README.md
CHANGED
|
@@ -6,6 +6,11 @@ mutable records preserving upstream fields, defaults, nulls, numeric operators,
|
|
|
6
6
|
byte strings, and token positions. First use initializes WebAssembly synchronously
|
|
7
7
|
in Node.js; no initialization promise is required.
|
|
8
8
|
|
|
9
|
+
Traversal uses ordinary TypeScript arrays with explicit mutation limits. The
|
|
10
|
+
[accepted representation decision](../../design/WALK-MUTATION-DECISION.md) records
|
|
11
|
+
which live edits are supported and why this interface does not model Go storage
|
|
12
|
+
capacity, reslicing, or value-slot addresses.
|
|
13
|
+
|
|
9
14
|
```ts
|
|
10
15
|
import { LangBash, nodeEnd, parseSync } from 'sh-ast';
|
|
11
16
|
|
|
@@ -58,30 +63,122 @@ Positions }`. `Positions.get(node)` reads immutable original bounds by node
|
|
|
58
63
|
a value does not promise every upstream operation accepts it.
|
|
59
64
|
- `SYNTAX_SCHEMA` and `SYNTAX_INTERFACES` are deeply frozen field/interface
|
|
60
65
|
metadata. Their order is not upstream Walk order.
|
|
66
|
+
- `walk(node, callback)` calls the callback synchronously on entry and with `null`
|
|
67
|
+
on exit. Return `false` on entry to prune that occurrence, including its exit;
|
|
68
|
+
exit boolean values do not control traversal. Every callback result must be a
|
|
69
|
+
boolean; Promises and other values throw `InputError`. Child reads happen live, and
|
|
70
|
+
nested calls keep independent state. Specialized statement/item comment loops
|
|
71
|
+
visit value copies; ordinary comment lists visit their stored objects. The
|
|
72
|
+
array reference and initial length are captured when each list starts. Future
|
|
73
|
+
existing slots are read live; indices added beyond the captured extent are
|
|
74
|
+
ignored by that active traversal. Replacing the owner's array field does not retarget an active list.
|
|
75
|
+
See the mutation limits below.
|
|
76
|
+
- `printSync(node, options?)` reconstructs the current edited tree and collects a
|
|
77
|
+
fresh upstream printer's output as `GoString`. Supported roots are File, Stmt,
|
|
78
|
+
Word, Assign, Command and WordPart alternatives. Only File gets a guaranteed
|
|
79
|
+
final newline. Printing applies upstream formatting; it does not replay the
|
|
80
|
+
original source or promise source-byte identity.
|
|
81
|
+
- `PrintOptions` exposes `Indent`, `BinaryNextLine`, `SwitchCaseIndent`,
|
|
82
|
+
`SpaceRedirects`, `KeepPadding`, `Minify`, `SingleLine`, and `FunctionNextLine`.
|
|
83
|
+
Indent accepts an exact uint64 as a safe number or bigint, with zero selecting
|
|
84
|
+
tabs. Boolean defaults are false. KeepPadding is upstream's best-effort,
|
|
85
|
+
deprecated option; Minify and SingleLine together return an upstream error.
|
|
61
86
|
|
|
62
87
|
`ParseError` and `LangError` preserve upstream fields, exact `Message` bytes, and
|
|
63
88
|
any partial `File`. Their ordinary `Error.message` is a display string.
|
|
64
89
|
`InputError` reports invalid binding inputs, upstream option constraints, or
|
|
65
90
|
unsupported constructed nodes whose requested bound panics upstream.
|
|
66
91
|
`ShInternalError` reports transport failures or unexpected upstream panics.
|
|
92
|
+
`PrintError` retains ordinary upstream printer failures, and `PrintPanicError`
|
|
93
|
+
retains panics from printing representable inputs. `WalkPanicError` represents
|
|
94
|
+
upstream-equivalent traversal panics; callback exceptions retain their identity.
|
|
67
95
|
All extend `ShAstError`. The conservative structural-depth guard throws
|
|
68
96
|
`ShParseMaxDepthError` before potentially exhausting the WASM stack. It is a
|
|
69
97
|
binding resource constraint and can reject deeply nested quoted or commented text.
|
|
98
|
+
Printing collects complete output; large trees or indentation widths can consume
|
|
99
|
+
substantial memory and time. The parse guard does not bound arbitrary constructed
|
|
100
|
+
printing inputs. No arbitrary writer, partial-output, or reusable-printer protocol
|
|
101
|
+
is exposed.
|
|
102
|
+
|
|
103
|
+
## Traversal mutation limits
|
|
104
|
+
|
|
105
|
+
Supported edits preserve a node's kind and shape: change syntax fields, replace
|
|
106
|
+
pointer children before their read, replace future existing list slots, append
|
|
107
|
+
beyond an active list's captured extent, or assign a new array to the owner field.
|
|
108
|
+
Changes before a list starts are included in its captured reference and length.
|
|
109
|
+
Pruning and synchronous nested walks retain their control behavior; nested walks
|
|
110
|
+
see the tree at their own entry, while edits to shared objects remain live.
|
|
111
|
+
|
|
112
|
+
Keep every index in an active list's captured extent present. Removing one,
|
|
113
|
+
leaving a hole there, or shrinking below that extent is outside the supported
|
|
114
|
+
contract, including through aliases. Truncation, `delete`, `pop`, `shift`, or a
|
|
115
|
+
length-reducing `splice` can do this; removing appended indices beyond the captured
|
|
116
|
+
extent does not affect the active list. No mutation detector or specific
|
|
117
|
+
error/result is promised for those edits. Assign a new owner array
|
|
118
|
+
instead; the active list keeps its original array and later walks see the new one.
|
|
119
|
+
Length-preserving replacement or reordering, including `sort` and `reverse`,
|
|
120
|
+
follows live slot reads and may revisit an object moved into a later slot. Walk
|
|
121
|
+
does not promise to visit each object only once. An appended object moved into an
|
|
122
|
+
original future slot is visited through that slot.
|
|
123
|
+
|
|
124
|
+
Stored Comment callbacks receive JavaScript objects. Replacing a Comment slot
|
|
125
|
+
leaves a retained callback object unchanged; it does not behave as a pointer to a
|
|
126
|
+
Go value slot. Specialized Stmt/CaseItem/ArrayElem comment callbacks receive
|
|
127
|
+
copies, so editing those callback values does not edit the original comments.
|
|
128
|
+
Ordinary JavaScript aliases remain live; this interface does not clone shared
|
|
129
|
+
arrays or objects. It does not model Go slice capacity, distinct slice headers
|
|
130
|
+
sharing backing stores, or reslicing. These limits preclude unrestricted Go
|
|
131
|
+
storage mutation parity while preserving live field edits and upstream traversal control.
|
|
132
|
+
|
|
133
|
+
## Editing and printing
|
|
134
|
+
|
|
135
|
+
```ts
|
|
136
|
+
import { parseSync, printSync, walk } from 'sh-ast';
|
|
137
|
+
|
|
138
|
+
const file = parseSync("printf '%s\\n' 'old 🎉'\n", { KeepComments: true });
|
|
139
|
+
walk(file, (node) => {
|
|
140
|
+
if (node?.Type === 'SglQuoted' && node.Value === 'old 🎉') {
|
|
141
|
+
node.Value = 'new 🎉';
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
});
|
|
145
|
+
const output = printSync(file);
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
This edits a field without replacing array storage. Node positions still describe
|
|
149
|
+
their upstream token values; live `nodePos` and `nodeEnd` compute from current
|
|
150
|
+
fields, while a separately captured parse snapshot remains tied to original
|
|
151
|
+
source. Consumers such as ESLint can edit a separate tree and use printed output
|
|
152
|
+
as a fix without mutating their original lint view or traversal cache.
|
|
70
153
|
|
|
71
154
|
`sh-ast/analyze` remains a separate syntactic interpretation layer. Its word,
|
|
72
155
|
command, and wrapper analysis consumes the faithful records; it does not define
|
|
73
156
|
parser behavior or the core tree representation.
|
|
74
157
|
|
|
158
|
+
`resolveArgv0` follows only documented wrapper grammars. The default `env` and
|
|
159
|
+
`sudo` entries accept assignment names beyond shell identifiers, such as `A-B`
|
|
160
|
+
or `名`. `env` recognizes assignments after `--` and ends option scanning at its
|
|
161
|
+
first assignment; `sudo` permits options between assignments, excludes names
|
|
162
|
+
beginning with `/` or `=`, and stops recognizing assignments after `--`. An empty
|
|
163
|
+
`env` assignment name (`=value`) reports `ambiguous-assignment`, since supported
|
|
164
|
+
implementations differ. These are syntactic facts, not execution guarantees.
|
|
165
|
+
Custom tables can choose `WrapperSpec.assignmentOperands` (`'shell-identifier'`,
|
|
166
|
+
`'env'`, or `'sudo'`); this explicit grammar overrides `skipAssignmentOperands`.
|
|
167
|
+
Existing `skipAssignmentOperands: true` tables retain their ASCII shell-identifier
|
|
168
|
+
rule before `--`. Wrapper assignment operands do not change `assignmentsSkipped`,
|
|
169
|
+
which counts only shell-level prefixes.
|
|
170
|
+
|
|
75
171
|
## Migration from 0.3
|
|
76
172
|
|
|
77
173
|
Fields now use upstream spelling (`Type`, `Stmts`, `Cmd`, `Value`) and explicit
|
|
78
174
|
null/default values. Replace dialect strings with numeric `Variant` constants,
|
|
79
175
|
request comments explicitly, and handle structured errors and byte positions.
|
|
80
|
-
The root no longer exports normalized `ShNode`/`ShNodes`, `range`/`loc`,
|
|
81
|
-
`visitorKeys`.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
176
|
+
The root no longer exports normalized `ShNode`/`ShNodes`, `range`/`loc`, or
|
|
177
|
+
`visitorKeys`. The new walker uses entry/null-exit callbacks rather than the former
|
|
178
|
+
structural helper's protocol. Consumers such as ESLint own their source-coordinate
|
|
179
|
+
and traversal views. Whole-file parsing, collected printing and the live walker
|
|
180
|
+
with the mutation limits above form this candidate's scope. Stateful/incremental parser protocols
|
|
181
|
+
and full syntax-package parity are deferred.
|
|
85
182
|
|
|
86
183
|
The [design collection](../../design/ARCHITECTURE.md) and
|
|
87
184
|
[implementation evidence](../../design/IMPLEMENTATION.md) describe the release
|
|
@@ -116,16 +213,34 @@ guessing at current behavior, and is pinned by `test/dialect-matrix.test.ts`.
|
|
|
116
213
|
reaches the regex-test parser at all — `=~` is just another literal argument to a command named
|
|
117
214
|
`[[`.
|
|
118
215
|
|
|
119
|
-
\*\*
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
`
|
|
216
|
+
\*\* Parsing preserves upstream output: `{a,b}` remains an ordinary `Lit` word part,
|
|
217
|
+
not a `BraceExp`, in every dialect. The analysis layer separately asks mvdan/sh v3.13.1's
|
|
218
|
+
`syntax.SplitBraces` to recognize potential expansions on a private copy. `resolveWord`,
|
|
219
|
+
`enumerateCommands`, and `resolveArgv0` report `static: false, reason: 'brace'` when actual
|
|
220
|
+
brace-expansion parts are found, without changing the caller's tree. A bare Word carries no
|
|
221
|
+
dialect or shell-option state, so this conservative observation also applies to POSIX-parsed
|
|
222
|
+
records; it does not assert that POSIX sh performs brace expansion.
|
|
223
|
+
|
|
224
|
+
Quoted or fully escaped opening braces within one literal part remain literal. Brace candidates containing other
|
|
225
|
+
backslashes report `unsupported`: pinned upstream's escape handling differs from Bash, and
|
|
226
|
+
analysis does not guess through that discrepancy. For example, `\{a,b\}` remains static,
|
|
227
|
+
while `a{b\,c}` is conservatively unsupported. Any unquoted backslash escape crossing word-part boundaries in a constructed
|
|
228
|
+
word is also unsupported, including boundaries into quoted parts: such a split
|
|
229
|
+
can expose otherwise quoted syntax, and analysis does not reconstruct shell
|
|
230
|
+
tokenization to infer a literal value. Malformed or singleton unescaped forms such as
|
|
231
|
+
`a{b` and `{a}` remain static. See [the brace-classification decision](../../design/BRACE-CLASSIFICATION-DECISION.md).
|
|
123
232
|
|
|
124
233
|
\*\*\* zsh's lexer never tokenizes `@(` as an extended-glob opener at all — deliberately, to avoid
|
|
125
234
|
ambiguity with zsh's own glob qualifiers like `*(N)`. So `ls @(a|b)` parses without error under
|
|
126
235
|
`Variant: LangZsh`, but produces plain `Lit` word parts rather than an `ExtGlob` node; the
|
|
127
236
|
`checkLang` gate that rejects extended globs under posix is never reached for zsh.
|
|
128
237
|
|
|
238
|
+
Reason descriptions do not promise universal precedence. Whole-word `unsupported`
|
|
239
|
+
preflight still applies when a constructed word already contains a `BraceExp`.
|
|
240
|
+
Independently quoted or fully protected literal siblings preserve `brace`; an
|
|
241
|
+
escape crossing parts or an escape-uncertain brace candidate remains unsupported.
|
|
242
|
+
Existing tilde/glob resolution order also remains applicable.
|
|
243
|
+
|
|
129
244
|
### `[[ ... ]]` and `let` under posix: accepted by design
|
|
130
245
|
|
|
131
246
|
`Variant: LangPOSIX` accepting `[[ a == b ]]` and `let x=1` is **intentional upstream behavior, not
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observes potential brace syntax without rewriting caller-owned words. The
|
|
3
|
+
* pinned Go operation decides brace grammar; this module only excludes words
|
|
4
|
+
* with no unescaped opening brace and marks upstream escape discrepancies as
|
|
5
|
+
* uncertainty. Ordinary words never cross the WASM boundary for this check.
|
|
6
|
+
*/
|
|
7
|
+
import type { Word } from '../../generated/syntax-types.js';
|
|
8
|
+
/** A positive observation is distinct from inability to trust upstream escape handling. @internal */
|
|
9
|
+
export type BraceObservation = boolean | 'unsupported';
|
|
10
|
+
/**
|
|
11
|
+
* Reports current word content, never an identity cache. Go reconstructs an
|
|
12
|
+
* isolated Word before SplitBraces mutates it. v3.13.1's SplitBraces mishandles
|
|
13
|
+
* escapes, so candidates containing backslashes remain unknown instead of
|
|
14
|
+
* introducing a competing brace grammar or claiming a false static value.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function observeBraces(word: Word): BraceObservation;
|
|
18
|
+
//# sourceMappingURL=brace-observation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brace-observation.d.ts","sourceRoot":"","sources":["../../src/analyze/brace-observation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAK5D,qGAAqG;AACrG,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,aAAa,CAAC;AAEvD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,gBAAgB,CA0C1D"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ShInternalError } from '../errors.js';
|
|
2
|
+
import { decodeWire, encodeWire, isRecord } from '../syntax-wire.js';
|
|
3
|
+
import { callSyntax } from '../wasm-instance.js';
|
|
4
|
+
/**
|
|
5
|
+
* Reports current word content, never an identity cache. Go reconstructs an
|
|
6
|
+
* isolated Word before SplitBraces mutates it. v3.13.1's SplitBraces mishandles
|
|
7
|
+
* escapes, so candidates containing backslashes remain unknown instead of
|
|
8
|
+
* introducing a competing brace grammar or claiming a false static value.
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export function observeBraces(word) {
|
|
12
|
+
let candidate = false;
|
|
13
|
+
let escaped = false;
|
|
14
|
+
let escapeCrossesPart = false;
|
|
15
|
+
// Adjacent literal records concatenate without a quote boundary. Carry the
|
|
16
|
+
// backslash state across them: two one-backslash records expose the next
|
|
17
|
+
// opening just as two backslashes in one Lit do. Nonliteral parts protect
|
|
18
|
+
// their own content and break this unquoted lexical run.
|
|
19
|
+
let protectedNext = false;
|
|
20
|
+
for (const part of word.Parts ?? []) {
|
|
21
|
+
escapeCrossesPart ||= protectedNext;
|
|
22
|
+
if (part?.Type !== 'Lit' || typeof part.Value !== 'string') {
|
|
23
|
+
protectedNext = false;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
for (const character of part.Value) {
|
|
27
|
+
if (protectedNext) {
|
|
28
|
+
protectedNext = false;
|
|
29
|
+
}
|
|
30
|
+
else if (character === '\\') {
|
|
31
|
+
protectedNext = true;
|
|
32
|
+
escaped = true;
|
|
33
|
+
}
|
|
34
|
+
else if (character === '{') {
|
|
35
|
+
candidate = true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// A split escape crosses the analyzer's per-part unquoting boundary. It can
|
|
40
|
+
// expose syntax inside a following quoted part, so uncertainty must not
|
|
41
|
+
// depend on finding a literal brace first. Decline every such constructed
|
|
42
|
+
// word instead of rebuilding shell tokenization or claiming static text.
|
|
43
|
+
if (escapeCrossesPart)
|
|
44
|
+
return 'unsupported';
|
|
45
|
+
if (!candidate)
|
|
46
|
+
return false;
|
|
47
|
+
if (escaped)
|
|
48
|
+
return 'unsupported';
|
|
49
|
+
const response = decodeWire(callSyntax('word-braces', new TextEncoder().encode(encodeWire(word))));
|
|
50
|
+
if (!isRecord(response))
|
|
51
|
+
throw new ShInternalError('Invalid brace observation response');
|
|
52
|
+
if (isRecord(response.Error) && response.Error.Kind === 'InputError')
|
|
53
|
+
return 'unsupported';
|
|
54
|
+
if (typeof response.Brace !== 'boolean' || Object.keys(response).length !== 1) {
|
|
55
|
+
throw new ShInternalError('Invalid brace observation response');
|
|
56
|
+
}
|
|
57
|
+
return response.Brace;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=brace-observation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brace-observation.js","sourceRoot":"","sources":["../../src/analyze/brace-observation.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKjD;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,IAAU;IACtC,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,iBAAiB,GAAG,KAAK,CAAC;IAC9B,2EAA2E;IAC3E,yEAAyE;IACzE,0EAA0E;IAC1E,yDAAyD;IACzD,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;QACpC,iBAAiB,KAAK,aAAa,CAAC;QACpC,IAAI,IAAI,EAAE,IAAI,KAAK,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC3D,aAAa,GAAG,KAAK,CAAC;YACtB,SAAS;QACX,CAAC;QACD,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACnC,IAAI,aAAa,EAAE,CAAC;gBAClB,aAAa,GAAG,KAAK,CAAC;YACxB,CAAC;iBAAM,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;gBAC9B,aAAa,GAAG,IAAI,CAAC;gBACrB,OAAO,GAAG,IAAI,CAAC;YACjB,CAAC;iBAAM,IAAI,SAAS,KAAK,GAAG,EAAE,CAAC;gBAC7B,SAAS,GAAG,IAAI,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;IACD,4EAA4E;IAC5E,wEAAwE;IACxE,0EAA0E;IAC1E,yEAAyE;IACzE,IAAI,iBAAiB;QAAE,OAAO,aAAa,CAAC;IAC5C,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IAC7B,IAAI,OAAO;QAAE,OAAO,aAAa,CAAC;IAClC,MAAM,QAAQ,GAAG,UAAU,CACzB,UAAU,CAAC,aAAa,EAAE,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CACtE,CAAC;IACF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,MAAM,IAAI,eAAe,CAAC,oCAAoC,CAAC,CAAC;IACzF,IAAI,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,YAAY;QAAE,OAAO,aAAa,CAAC;IAC3F,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9E,MAAM,IAAI,eAAe,CAAC,oCAAoC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,QAAQ,CAAC,KAAK,CAAC;AACxB,CAAC"}
|
|
@@ -44,15 +44,34 @@ export interface WrapperSpec {
|
|
|
44
44
|
*/
|
|
45
45
|
readonly names: readonly string[];
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* counts.
|
|
47
|
+
* Legacy shorthand for {@link WrapperSpec.assignmentOperands}'s
|
|
48
|
+
* `'shell-identifier'` grammar: skip statically resolved `NAME=value`
|
|
49
|
+
* words with an ASCII shell identifier before `--`. Options may follow
|
|
50
|
+
* these operands. Quote removal has already happened during word resolution.
|
|
51
|
+
* An explicit `assignmentOperands` takes precedence, even when this is false.
|
|
52
|
+
* These operands never contribute to shell-prefix `assignmentsSkipped`.
|
|
54
53
|
*/
|
|
55
54
|
readonly skipAssignmentOperands?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Assignment-operand scanning grammar, independent of the wrapper's name.
|
|
57
|
+
* Each preset defines both which static words are assignments and where
|
|
58
|
+
* option scanning stops; it does not model the utility's other options.
|
|
59
|
+
*
|
|
60
|
+
* - `'shell-identifier'`: the legacy ASCII `NAME=value` rule before `--`;
|
|
61
|
+
* options may resume after an assignment.
|
|
62
|
+
* - `'env'`: after options, consume words containing `=` (including after
|
|
63
|
+
* `--`). The first assignment ends option scanning permanently. Empty
|
|
64
|
+
* names (`=value`) produce `'ambiguous-assignment'` because GNU/glibc
|
|
65
|
+
* and BSD differ on whether they can be installed in the environment.
|
|
66
|
+
* - `'sudo'`: before `--`, consume words containing `=` unless they start
|
|
67
|
+
* with `/` or `=`; option scanning may resume after each assignment.
|
|
68
|
+
*
|
|
69
|
+
* Active option parsing always takes precedence over utility assignments:
|
|
70
|
+
* `--unset=NAME` is an option, whereas `env A=1 --unset=NAME cmd` treats
|
|
71
|
+
* that same word as an assignment. This field overrides the legacy
|
|
72
|
+
* {@link WrapperSpec.skipAssignmentOperands} boolean when present.
|
|
73
|
+
*/
|
|
74
|
+
readonly assignmentOperands?: 'shell-identifier' | 'env' | 'sudo';
|
|
56
75
|
/** Exact flag tokens that take no operand of their own (e.g. `-i`, `-c`). */
|
|
57
76
|
readonly noArgFlags?: readonly string[];
|
|
58
77
|
/**
|
|
@@ -197,6 +216,11 @@ export interface ResolveArgv0Options {
|
|
|
197
216
|
* the real command rather than naming it as a separate word (e.g.
|
|
198
217
|
* `env -S 'rm -rf /'` — see {@link WrapperSpec.unresolvableFlags}'s doc
|
|
199
218
|
* comment).
|
|
219
|
+
* - `'ambiguous-assignment'` — a statically known assignment operand whose
|
|
220
|
+
* acceptance differs across supported utility implementations, such as
|
|
221
|
+
* `env =value cmd` (GNU/glibc accepts an empty name; BSD rejects it).
|
|
222
|
+
* Neither the following command nor the operand itself is guessed as
|
|
223
|
+
* the effective command.
|
|
200
224
|
*
|
|
201
225
|
* This union may grow in a **minor** release (mirroring
|
|
202
226
|
* `WordResolutionReason`'s and `CommandContext`'s semver policy in
|
|
@@ -206,7 +230,7 @@ export interface ResolveArgv0Options {
|
|
|
206
230
|
*
|
|
207
231
|
* @public
|
|
208
232
|
*/
|
|
209
|
-
export type Argv0UnresolvedReason = 'unknown-flag' | 'embedded-command';
|
|
233
|
+
export type Argv0UnresolvedReason = 'unknown-flag' | 'embedded-command' | 'ambiguous-assignment';
|
|
210
234
|
/**
|
|
211
235
|
* A word position {@link resolveArgv0} could not resolve to either a known
|
|
212
236
|
* static text or one of {@link WordResolution}'s own `static: false`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-argv0.d.ts","sourceRoot":"","sources":["../../src/analyze/resolve-argv0.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-argv0.d.ts","sourceRoot":"","sources":["../../src/analyze/resolve-argv0.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAElC;;;;;;;OAOG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAE1C;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,KAAK,GAAG,MAAM,CAAC;IAElE,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAExC;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAEnC;;;;;;;;;;;;;;;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;;;;;;GAwDG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,eAAe,CAgC9F"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves command-word provenance through caller-configurable wrapper grammars.
|
|
3
|
+
* Only statically known operands may be skipped; syntax facts never imply that
|
|
4
|
+
* a command is safe, permitted, installed, or guaranteed to execute successfully.
|
|
5
|
+
*/
|
|
1
6
|
import { ShAnalyzeInvalidWrapperSpecError } from '../errors.js';
|
|
2
7
|
import { deepFreeze } from '../deep-freeze.js';
|
|
3
8
|
import { nodeArray } from './node-helpers.js';
|
|
@@ -67,7 +72,11 @@ export const DEFAULT_TRANSPARENT_WRAPPERS = deepFreeze([
|
|
|
67
72
|
// `argFlags` entry — see `unresolvableFlags` below.
|
|
68
73
|
{
|
|
69
74
|
names: ['env'],
|
|
70
|
-
|
|
75
|
+
// GNU env v9.8 src/env.c and FreeBSD releng/14.3 usr.bin/env/env.c
|
|
76
|
+
// scan strchr(word, '=') after getopt; options never resume afterward.
|
|
77
|
+
// https://github.com/coreutils/coreutils/blob/v9.8/src/env.c#L797
|
|
78
|
+
// https://github.com/freebsd/freebsd-src/blob/releng/14.3/usr.bin/env/env.c#L188
|
|
79
|
+
assignmentOperands: 'env',
|
|
71
80
|
noArgFlags: ['-i', '--ignore-environment', '-0', '--null', '-v', '--debug'],
|
|
72
81
|
argFlags: ['-u', '--unset', '-C', '--chdir'],
|
|
73
82
|
// GNU env(1) `-S`/`--split-string=S`: processes and splits `S` into
|
|
@@ -145,7 +154,10 @@ export const DEFAULT_TRANSPARENT_WRAPPERS = deepFreeze([
|
|
|
145
154
|
// environment-setting mechanism, "similar to env" per sudo(8).
|
|
146
155
|
{
|
|
147
156
|
names: ['sudo'],
|
|
148
|
-
|
|
157
|
+
// is_envar rejects '/' and '=' prefixes; !got_end_of_args prevents
|
|
158
|
+
// assignments after --, while the enclosing loop resumes getopt.
|
|
159
|
+
// https://github.com/sudo-project/sudo/blob/v1.9.17p2/src/parse_args.c#L263
|
|
160
|
+
assignmentOperands: 'sudo',
|
|
149
161
|
noArgFlags: ['-A', '-b', '-E', '-H', '-k', '-n', '-P', '-S'],
|
|
150
162
|
argFlags: ['-g', '-p', '-u'],
|
|
151
163
|
},
|
|
@@ -255,7 +267,8 @@ function findWrapperSpec(wrappers, text) {
|
|
|
255
267
|
* `argv` with no wrapped-command word found (a malformed or truncated
|
|
256
268
|
* invocation, e.g. bare `env` with nothing else, or `sudo -u` with no
|
|
257
269
|
* operand for `-u`).
|
|
258
|
-
* - `{ kind: 'unresolvable', reason }` —
|
|
270
|
+
* - `{ kind: 'unresolvable', reason }` — an ambiguous assignment, or a
|
|
271
|
+
* *statically known* word that
|
|
259
272
|
* looks like a flag for this wrapper (unquoted, unescaped `-` prefix,
|
|
260
273
|
* not `--`) but matches none of `spec`'s recognized flag/operand shapes,
|
|
261
274
|
* or matches one of `spec.unresolvableFlags` (see
|
|
@@ -268,7 +281,7 @@ function findWrapperSpec(wrappers, text) {
|
|
|
268
281
|
* A literal `--` (the standard getopt(3)/getopt_long(3) end-of-options
|
|
269
282
|
* marker — POSIX Utility Syntax Guidelines, guideline 10) is skipped like
|
|
270
283
|
* any other recognized token, but — critically — everything *after* it is
|
|
271
|
-
* no longer eligible for **any** flag
|
|
284
|
+
* no longer eligible for **any** flag recognition at all
|
|
272
285
|
* (`noArgFlags`, `noArgFlagPattern`, `argFlags` in every form,
|
|
273
286
|
* `unresolvableFlags`, `stopsChainFlags`, or the generic
|
|
274
287
|
* flag-shape/`'unknown-flag'` check): once options end, a later word that
|
|
@@ -278,15 +291,17 @@ function findWrapperSpec(wrappers, text) {
|
|
|
278
291
|
* `--` for every wrapper here. A wrapper's mandatory positional operand
|
|
279
292
|
* (e.g. `timeout`'s `DURATION`) is a distinct, non-flag concept and is
|
|
280
293
|
* still consumed normally after `--` — only *flag* recognition stops.
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
294
|
+
* Assignment recognition follows the explicit grammar: `env` scans
|
|
295
|
+
* assignments even after `--` and stops option parsing at its first
|
|
296
|
+
* assignment; `sudo` and the legacy shell-identifier grammar recognize
|
|
297
|
+
* assignments only before `--` and allow later options.
|
|
285
298
|
*/
|
|
286
299
|
function advancePastWrapperOperands(argv, startIndex, spec) {
|
|
287
300
|
let index = startIndex;
|
|
288
301
|
let positionalSeen = 0;
|
|
289
302
|
let optionsEnded = false;
|
|
303
|
+
const assignmentGrammar = spec.assignmentOperands ??
|
|
304
|
+
(spec.skipAssignmentOperands === true ? 'shell-identifier' : undefined);
|
|
290
305
|
const requiredPositional = spec.positionalOperandsBeforeCommand ?? 0;
|
|
291
306
|
while (index < argv.length) {
|
|
292
307
|
// `index < argv.length` just checked above, so this is a real element.
|
|
@@ -304,7 +319,24 @@ function advancePastWrapperOperands(argv, startIndex, spec) {
|
|
|
304
319
|
index += 1;
|
|
305
320
|
continue;
|
|
306
321
|
}
|
|
307
|
-
|
|
322
|
+
// An '=' in an active option (e.g. --unset=NAME) does not make it an
|
|
323
|
+
// assignment. After env's option phase, however, even '-x=y' is one.
|
|
324
|
+
const canRecognizeAssignment = (assignmentGrammar === 'env' || !optionsEnded) &&
|
|
325
|
+
(assignmentGrammar === 'shell-identifier' || optionsEnded || !looksLikeFlag(text));
|
|
326
|
+
if (canRecognizeAssignment && assignmentGrammar === 'env' && text.startsWith('=')) {
|
|
327
|
+
// glibc putenv accepts an empty name, while FreeBSD setenv rejects
|
|
328
|
+
// it. The grammar therefore cannot identify a portable invocation.
|
|
329
|
+
return { kind: 'unresolvable', reason: 'ambiguous-assignment' };
|
|
330
|
+
}
|
|
331
|
+
const isAssignment = assignmentGrammar === 'shell-identifier'
|
|
332
|
+
? isAssignmentShapedText(text)
|
|
333
|
+
: text.includes('=') &&
|
|
334
|
+
(assignmentGrammar === 'env' ||
|
|
335
|
+
(assignmentGrammar === 'sudo' && !text.startsWith('/') && !text.startsWith('=')));
|
|
336
|
+
if (canRecognizeAssignment && isAssignment) {
|
|
337
|
+
if (assignmentGrammar === 'env') {
|
|
338
|
+
optionsEnded = true;
|
|
339
|
+
}
|
|
308
340
|
index += 1;
|
|
309
341
|
continue;
|
|
310
342
|
}
|
|
@@ -404,6 +436,14 @@ function validateWrapperSpec(spec, index) {
|
|
|
404
436
|
typeof spec.skipAssignmentOperands !== 'boolean') {
|
|
405
437
|
throw new ShAnalyzeInvalidWrapperSpecError(`${context}.skipAssignmentOperands must be a boolean when present`);
|
|
406
438
|
}
|
|
439
|
+
// JavaScript callers can bypass the declared union; validate raw boundary data.
|
|
440
|
+
const assignmentOperands = spec.assignmentOperands;
|
|
441
|
+
if (assignmentOperands !== undefined &&
|
|
442
|
+
assignmentOperands !== 'shell-identifier' &&
|
|
443
|
+
assignmentOperands !== 'env' &&
|
|
444
|
+
assignmentOperands !== 'sudo') {
|
|
445
|
+
throw new ShAnalyzeInvalidWrapperSpecError(`${context}.assignmentOperands must be shell-identifier, env, or sudo when present`);
|
|
446
|
+
}
|
|
407
447
|
if (spec.noArgFlagPattern !== undefined && !(spec.noArgFlagPattern instanceof RegExp)) {
|
|
408
448
|
throw new ShAnalyzeInvalidWrapperSpecError(`${context}.noArgFlagPattern must be a RegExp when present`);
|
|
409
449
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-argv0.js","sourceRoot":"","sources":["../../src/analyze/resolve-argv0.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AA8H9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAA2B,UAAU,CAAC;IAC7E,uEAAuE;IACvE,wEAAw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AE,CAAC;QAC3B,uEAAuE;QACvE,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,MAAM;QACxB,MAAM,IAAI,GAAG,eAAe,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,IAAI,IAAI,KAAK,SAAS;YAAE,MAAM;QAC9B,MAAM,MAAM,GAAG,0BAA0B,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;QACjE,IAAI,MAAM,CAAC,IAAI,KAAK,WAAW;YAAE,MAAM;QACvC,IAAI,MAAM,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;YACrD,MAAM;QACR,CAAC;QACD,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IACvB,CAAC;IACD,yEAAyE;IACzE,yEAAyE;IACzE,mCAAmC;IACnC,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Node } from '../../generated/syntax-types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Why a {@link resolveWord} result is `static: false`: the word's exact
|
|
5
|
-
*
|
|
5
|
+
* value cannot be classified as one reliably known literal word.
|
|
6
6
|
*
|
|
7
7
|
* - `'expansion'` — the word contains a `ParamExp` (`$x`, `${x}`), a
|
|
8
8
|
* `CmdSubst` (command substitution, either `$(...)` or backtick form), an
|
|
@@ -24,15 +24,12 @@ import type { Node } from '../../generated/syntax-types.js';
|
|
|
24
24
|
* Reference Manual §3.5.8.1, "Pattern Matching"), or an `ExtGlob` part
|
|
25
25
|
* (Bash Reference Manual §3.5.8, "Filename Expansion"): its value depends
|
|
26
26
|
* on which filesystem entries exist at run time.
|
|
27
|
-
* - `'brace'` — the word contains a `BraceExp` part
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* from literal `{`/`,`/`}` characters) rather than as a `BraceExp` part.
|
|
34
|
-
* This reason is handled here for forward-compatibility with that node
|
|
35
|
-
* type and is not reachable through {@link resolveWord} today.
|
|
27
|
+
* - `'brace'` — the word contains a `BraceExp` part or the pinned upstream
|
|
28
|
+
* `syntax.SplitBraces` produces one on a private observation copy (Bash
|
|
29
|
+
* Reference Manual §3.5.1, "Brace Expansion"). Parser output is unchanged.
|
|
30
|
+
* This reports potential expansion in supporting dialects; a bare Word has
|
|
31
|
+
* no dialect or shell-option state, so even POSIX-parsed words receive the
|
|
32
|
+
* conservative classification. It does not claim POSIX sh expands braces.
|
|
36
33
|
* - `'locale'` — the word contains a `$"..."` locale-translated string
|
|
37
34
|
* (Bash Reference Manual §3.1.2.5, "Locale-Specific Translation"): its
|
|
38
35
|
* value is looked up in the current locale's translation catalog at run
|
|
@@ -41,7 +38,10 @@ import type { Node } from '../../generated/syntax-types.js';
|
|
|
41
38
|
* `$"..."` word's *contents* would otherwise report — the `DblQuoted`
|
|
42
39
|
* node's own `dollar` flag is checked before its children are visited at
|
|
43
40
|
* all, so e.g. `$"hi $x"` reports `'locale'`, never `'expansion'`.
|
|
44
|
-
* - `'unsupported'` — a
|
|
41
|
+
* - `'unsupported'` — a brace candidate contains backslashes whose handling
|
|
42
|
+
* differs between pinned mvdan/sh and Bash (rather than guessing through
|
|
43
|
+
* that discrepancy), an unquoted backslash escape crosses word-part
|
|
44
|
+
* boundaries in a caller-constructed word, a word contains a nil or typed nil part, a literal carries a byte-preserving `Uint8Array`
|
|
45
45
|
* rather than Unicode text, or the word contains a `$'...'` (ANSI-C quoted) `\u`/`\U`
|
|
46
46
|
* escape whose value has no corresponding Unicode character (greater than
|
|
47
47
|
* `U+10FFFF`, e.g. `$'\UFFFFFFFF'`): real bash's output for this case is
|
|
@@ -51,6 +51,14 @@ import type { Node } from '../../generated/syntax-types.js';
|
|
|
51
51
|
* package declines to claim a `static: true` text bash never actually
|
|
52
52
|
* produces.
|
|
53
53
|
*
|
|
54
|
+
* Reason descriptions do not establish universal precedence among features.
|
|
55
|
+
* Whole-word `unsupported` preflight takes precedence even when a caller has
|
|
56
|
+
* already supplied a `BraceExp`: an escape crossing parts can invalidate the
|
|
57
|
+
* apparent quoting boundaries, and an escape-uncertain brace candidate remains
|
|
58
|
+
* uncertain. Independently quoted or fully protected literal siblings do not
|
|
59
|
+
* suppress a known `BraceExp`. After preflight, existing resolution order can
|
|
60
|
+
* select a triggering tilde or earlier glob before visiting that part.
|
|
61
|
+
*
|
|
54
62
|
* This union may grow in a **minor** release — new mvdan/sh word-part node
|
|
55
63
|
* types, or new statically-shaped-but-dynamic categories, can add new reason
|
|
56
64
|
* strings without that being a breaking change. It is deliberately not
|
|
@@ -78,7 +86,7 @@ export type WordResolution = {
|
|
|
78
86
|
/** The word's exact resolved text (quotes and escapes removed). */
|
|
79
87
|
readonly text: string;
|
|
80
88
|
} | {
|
|
81
|
-
/** The word
|
|
89
|
+
/** The word has potential expansion or cannot be resolved reliably by this analyzer. */
|
|
82
90
|
readonly static: false;
|
|
83
91
|
/** Why this word cannot be statically resolved. */
|
|
84
92
|
readonly reason: WordResolutionReason;
|
|
@@ -132,7 +140,7 @@ export interface ResolveWordOptions {
|
|
|
132
140
|
* resolves to `"rm"`). A word containing any expansion (`ParamExp`,
|
|
133
141
|
* `CmdSubst`, `ArithmExp`, `ProcSubst`), a triggering unquoted `~` (see
|
|
134
142
|
* `options.context`), an unquoted glob metacharacter/bracket
|
|
135
|
-
* expression/`ExtGlob`, a `$"..."` locale translation, or an unrepresentable
|
|
143
|
+
* expression/`ExtGlob`, potential brace expansion, a `$"..."` locale translation, or an unrepresentable
|
|
136
144
|
* `$'\U...'` escape is `static: false` with a reason — never an error, and
|
|
137
145
|
* never a safety judgment (see {@link WordResolution}).
|
|
138
146
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-word.d.ts","sourceRoot":"","sources":["../../src/analyze/resolve-word.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-word.d.ts","sourceRoot":"","sources":["../../src/analyze/resolve-word.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAM5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AACH,MAAM,MAAM,oBAAoB,GAC9B,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GACtB;IACE,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC;IACtB,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,GACD;IACE,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;CACvC,CAAC;AAEN;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,kBAAkB,CAAC;CAC5D;AAuKD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,cAAc,CAwCpF"}
|