.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / tslint / node_modules / tsutils / CHANGELOG.md
1 # 2.29.0
2
3 **Features:**
4
5 * added utility `isCompilerOptionEnabled`
6
7 # 2.28.0
8
9 Typeguards are now split into multiple submodules for each version of TypeScript (starting with 2.8.0).
10 That means you can now import directly from `"tsutils/typeguard/2.8"` to get compatible declaraton files for TypeScript@2.8.
11 For more information please read the relevant section in [README.md](README.md).
12
13 **Features:**
14
15 * added typeguards: `isTupleType`, `isOptionalTypeNode`, `isRestTypeNode`, `isSyntheticExpression` (currently available from `"tsutils/typeguard/3.0"`)
16 * added utility `isStrictCompilerOptionEnabled`
17
18 # 2.27.2
19
20 Avoid crash caused by removed function in `typescript@3.0.0`.
21
22 # 2.27.1
23
24 Added support for TypeScript@3.0.0 nightly builds.
25
26 # 2.27.0
27
28 **Features:**
29
30 * added `getIIFE` utility
31
32 # 2.26.2
33
34 **Bugfixes:**
35
36 * `forEachComment` and `forEachTokenWithTrivia` no longer duplicate comments around missing nodes
37
38 # 2.26.1
39
40 **Bugfixes:**
41
42 * fixed crash in `hasSideEffects` with tagged template literal without substitution: ``tag`template` ``
43
44 # 2.26.0
45
46 **Features:**
47
48 * added typeguard `isLiteralTypeNode`
49 * added support for type imports (`type T = import('foo')`) to `findImports` via `ImportKind.ImportType`
50
51 # 2.25.1
52
53 **Bugfixes:**
54
55 * `collectVariableUsage`: fixed name lookup in function signatures to match runtime behavior. Note that this is not completely fixed in TypeScript, yet. See: [Microsoft/TypeScript#22825](https://github.com/Microsoft/TypeScript/issues/22825) and [Microsoft/TypeScript#22769](https://github.com/Microsoft/TypeScript/issues/22769)
56
57 # 2.25.0
58
59 **Features:**
60
61 * added utilities: `isStatementInAmbientContext` and `isAmbientModuleBlock`
62
63 # 2.24.0
64
65 **Features:**
66
67 * added typeguards for typescript@2.8: `isConditionalTypeNode`, `isInferTypeNode`, `isConditionalType`, `isInstantiableType`, `isSubstitutionType`
68
69 # 2.23.0
70
71 **Features:**
72
73 * added typeguard `isForInOrOfStatement`
74
75 **Bugfixes:**
76
77 * correctly handle comments in generic JSX elements: `<MyComponent<string>/*comment*/></MyComponent>`
78 * fixed a bug with false positive trailing comments at the end of JSX self closing element: `<div><br/>/*no comment*/</div>`
79
80 # 2.22.2
81
82 **Bugfixes:**
83
84 * `collectVariableUsage`: handle ConditionalTypes and `infer T`, which will be introduced in TypeScript@2.8.0 and are already available in nightly builds
85 * `isLiteralType` no longer returns true for `ts.TypeFlags.BooleanLiteral` as this is not a `ts.LiteralType`
86
87 # 2.22.1
88
89 **Bugfixes:**
90
91 * `endsControlFlow`:
92   * handle loops that might not even run a single iteration
93   * handle constant boolean conditions in loops and if
94
95 # 2.22.0
96
97 **Features:**
98
99 * added `isFalsyType` utility
100
101 # 2.21.2
102
103 **Bugfixes:**
104
105 * fixed compile error with `typescript@2.8.0-dev`
106
107 # 2.21.1
108
109 **Bugfixes:**
110
111 * `isReassignmentTarget`: handle type assertions and non-null assertion
112
113 # 2.21.0
114
115 **Bugfixes:**
116
117 * `forEachDeclaredVariable` uses a more precise type for the callback parameter to make it useable again with typescript@2.7.1
118
119 **Features:**
120
121 * added `isUniqueESSymbolType` typeguard
122
123 # 2.20.0
124
125 **Features:**
126
127 * added `isThenableType` utility
128 * added `unionTypeParts` utility
129
130 # 2.19.1
131
132 **Bugfixes:**
133
134 * `forEachComment`, `getCommentAtPosition` and `isPositionInComment`: skip shebang (`#! something`) to not miss following comments at the start of the file
135
136 # 2.19.0
137
138 **Features:**
139
140 * added `WrappedAst` interface that models the type of a wrapped SourceFile more accurate
141 * added `getWrappedNodeAtPosition` utiltiy that takes a `NodeWrap` and returns the most deeply nested NodeWrap that contains the given position
142
143 # 2.18.0
144
145 **Features:**
146
147 * `getControlFlowEnd` accepts BlockLike as argument
148
149 **Bugfixes:**
150
151 * `getControlFlowEnd` and `endsControlFlow`: correctly handle nested LabeledStatements
152 * `endsControlFlow` removed erroneous special case when an IterationStatement is passed as argument whose parent is a LabeledStatement.
153   * if you want labels of an IterationStatement (or SwitchStatement) to be handled, you need to pass the LabeledStatement as argument.
154   * :warning: this fix may change the returned value if you relied on the buggy behavior
155
156 **Deprecations:**
157
158 * deprecated overload of `getControlFlowEnd` that contains the `label` parameter. This parameter is no longer used and should no longer be passed to the function.
159
160 # 2.17.1
161
162 **Bugfixes:**
163
164 * `getControlFlowEnd` and `endsControlFlow` (#22)
165   * ThrowStatements inside `try` are filtered out if there is a `catch` clause
166   * TryStatements with `catch` only end control flow if `try` AND `catch` definitely end control flow
167
168 # 2.17.0
169
170 **Features:**
171
172 * added `kind` property to `NodeWrap`
173 * added `getControlFlowEnd` to public API
174
175 # 2.16.0
176
177 **Features:**
178
179 * added `isDecorator` and `isCallLikeExpression` typeguards
180
181 # 2.15.0
182
183 **Features:**
184
185 * added `convertAst` utility to produce a flattened and wrapped version of the AST
186
187 # 2.14.0
188
189 **Features:**
190
191 * added `isDeleteExpression`
192 * added `getLineBreakStyle`
193
194 # 2.13.1
195
196 **Bugfixes:**
197
198 * fixed name of `isJsxFragment`
199
200 # 2.13.0
201
202 **Features:**
203
204 * added support for `JsxFragment` introduced in typescript@2.6.2
205 * added corresponding typeguard functions
206
207 # 2.12.2
208
209 **Bugfixes:**
210
211 * `endsControlFlow`
212   * added missing logic for labeled statement, iteration statements and try-catch
213   * added missing logic for `break` and `continue` with labels
214   * take all jump statements into account, not only the last statement
215 * `isValidIdentifier` and `isValidNumericLiteral` handle irregular whitespace
216 * `findImports` searches in ambient modules inside regular `.ts` files (not only `.d.ts`)
217 * `canHaveJsDoc` is now a typeguard
218
219 # 2.12.1
220
221 **Bugfixes:**
222
223 * `forEachTokenWithTrivia`
224   * handles irregular whitespace and no longer visits some tokens twice
225   * correctly calculates the range of JsxText
226
227 # 2.12.0
228
229 **API-Changes:**
230
231 * deprecated `ImportOptions` if favor of the new `ImportKind` enum
232
233 # 2.11.2
234
235 **Bugfixes:**
236
237 * `parseJsDocOfNode`: set correct `pos`, `end` and `parent` properties. Also affects `getJsDoc` of `EndOfFileToken`
238
239 # 2.11.1
240
241 **Bugfixes:**
242
243 * `collectVariableUsage`: correctly consider catch binding as block scoped declaration inside catch block
244
245 # 2.11.0
246
247 **Bugfixes:**
248
249 * `getJsDoc` now correctly returns JsDoc for `EndOfFileToken`
250
251 **Features:**
252
253 * added utility `parseJsDocOfNode`
254
255 # 2.10.0
256
257 **Features:**
258
259 * added utility `findImports` to find all kinds of imports in a source file
260
261 # 2.9.0
262
263 **Features:**
264
265 * added typeguard `isMappedTypeNode`
266 * added utilities `canHaveJsDoc` and `getJsDoc`
267
268 # 2.8.2
269
270 **Bugfixes:**
271
272 * `collectVariableUsage`: handle global augmentation like other module augmentations
273
274 # 2.8.1
275
276 **Bugfixes:**
277
278 * Support `typescript@2.5.1` with optional catch binding
279 * `collectVariableUsage` fixed a bug where method decorator had method's parameters in scope
280
281 # 2.8.0
282
283 * Compatibility with the latest typescript nightly
284 * Added `getIdentifierText` to unescape identifiers across typescript versions
285
286 # 2.7.1
287
288 **Bugfixes:**
289
290 * `isReassignmentTarget` don't return `true` for right side of assignment
291
292 # 2.7.0
293
294 **Features:**
295
296 * Added `isReassignmentTarget` utility
297
298 # 2.6.1
299
300 **Bugfixes:**
301
302 * `getDeclarationDomain` now returns `undefined` for Parameter in IndexSignature
303 * `collectVariableUsage` ignores Parameter in IndexSignature
304
305 # 2.6.0
306
307 **Bugfixes:**
308
309 * `collectVariableUsage`:
310   * don't merge imports with global declarations
311   * treat everything in a declaration file as exported if there is no explicit `export {};`
312 * `isExpressionValueUsed`: handle destructuring in `for...of`
313
314 **Features:**
315
316 * Added `getModifier` utility
317 * Added `DeclarationDomain.Import` to distinguish imports from other declarations
318
319 # 2.5.1
320
321 **Bugfixes:**
322
323 * `collectVariableUsage` ignore jump labels as in `break label;`
324
325 # 2.5.0
326
327 **Bugfixes:**
328
329 * `isFunctionWithBody` handles constructor overload correctly.
330
331 **Features:**
332
333 * Implemented `isExpressionValueUsed` to check whether the result of an expression is actually used.
334 * Implemented `getDeclarationDomain` to determine if a given declaration introduces a new symbol in the value or type domain.
335
336 **`collectVariableUses` is now usable**
337
338 * no longer ignores signatures and its parameters
339 * don't merge declarations and uses across domains
340 * no longer marks exceptions in catch clause or parameter properties as exported
341 * fixed exports of namespaces
342 * fixed scoping of ClassExpression name
343 * correcly handle ambient namespaces and module augmentations
344 * fixed how `: typeof foo` is handled for parameters and function return type
345 * **still WIP**: `export {Foo as Bar}` inside ambient namespaces and modules
346
347 # 2.4.0
348
349 **Bugfixes:**
350
351 * `getLineRanges`: `contentLength` now contains the correct line length when there are multiple consecutive line break characters
352 * `getTokenAtPosition`: don't match tokens that end at the specified position (because that's already outside of their range)
353 * deprecated the misnamed `isModfierFlagSet`, use the new `isModifierFlagSet` instead
354
355 **Features:**
356
357 * Added typeguard: `isJsDoc`
358 * Added experimental scope and usage analysis (`getUsageDomain` and `collectVariableUsage`)
359
360 # 2.3.0
361
362 **Bugfixes:**
363
364 * `forEachComment` no longer omits some comments when callback returns a truthy value
365 * `isPositionInComment` fixed false positive inside JSXText
366
367 **Features:**
368
369 * Added utility: `getCommentAtPosition`
370
371 # 2.2.0
372
373 **Bugfixes:**
374
375 * Fixed bit value of `SideEffectOptions.JsxElement` to be a power of 2
376
377 **Features:**
378
379 * Added utilities: `getTokenAtPosition` and `isPositionInComment`
380
381 # 2.1.0
382
383 **Features:**
384
385 * Added typeguard `isExpression`
386 * Added utilities: `hasSideEffects`, `getDeclarationOfBindingElement`
387
388 # 2.0.0
389
390 **Breaking Changes:**
391
392 * Dropped compatibility with `typescript@<2.1.0`
393 * Removed misnamed `isNumericliteral`, use `isNumericLiteral` instead (notice the uppercase L)
394 * Removed `isEnumLiteralType` which will cause compile errors with typescript@2.4.0
395 * Refactored directory structure: all imports that referenced subdirectories (e.g. `require('tsutils/src/typeguard')` will be broken
396
397 **Features:**
398
399 * New directory structure allows imports of typeguards or utils independently, e.g. (`require('tsutils/typeguard')`)
400
401 # 1.9.1
402
403 **Bugfixes:**
404
405 * `isObjectFlagSet` now uses the correct `objectFlags` property
406
407 # 1.9.0
408
409 **Bugfixes:**
410
411 * `getNextToken` no longer omits `EndOfFileToken` when there is no trivia before EOF. That means the only inputs where `getNextToken` returns `undefined` are `SourceFile` and `EndOfFileToken`
412
413 **Features**:
414
415 * Added typeguards for types
416 * Added utilities for flag checking: `isNodeFlagSet`, `isTypeFlagSet`, `isSymbolFlagSet`,`isObjectFlagSet`, `isModifierFlagSet`
417
418 # 1.8.0
419
420 **Features:**
421
422 * Support peer dependency of typescript nightlies of 2.4.0
423 * Added typeguards: `isJsxAttributes`, `isIntersectionTypeNode`, `isTypeOperatorNode`, `isTypePredicateNode`, `isTypeQueryNode`, `isUnionTypeNode`
424
425 # 1.7.0
426
427 **Bugfixes:**
428
429 * `isFunctionScopeBoundary` now handles Interfaces, TypeAliases, FunctionSignatures, etc
430
431 **Features:**
432
433 * Added utilities: `isThisParameter`, `isSameLine` and `isFunctionWithBody`
434
435 # 1.6.0
436
437 **Features:**
438
439 * Add `isValidPropertyAccess`, `isValidNumericLiteral` and `isValidPropertyName`
440
441 # 1.5.0
442
443 **Features:**
444
445 * Add `isValidIdentifier`
446
447 # 1.4.0
448
449 **Features:**
450
451 * Add `contentLength` property to the result of `getLineRanges`
452
453 # 1.3.0
454
455 **Bugfixes:**
456
457 * `canHaveLeadingTrivia`:
458   * Fix property access on undefined parent reference
459   * Fixes: [palantir/tslint#2330](https://github.com/palantir/tslint/issues/2330)
460 * `hasOwnThisReference`: now includes accessors on object literals
461
462 **Features:**
463
464 * Typeguards:
465   * isTypeParameterDeclaration
466   * isEnitityName
467
468 # 1.2.2
469
470 **Bugfixes:**
471
472 * `hasOwnThisReference`:
473   * exclude overload signatures of function declarations
474   * add method declarations on object literals
475
476 # 1.2.1
477
478 **Bugfixes:**
479
480 * Fix name of `isNumericLiteral`
481
482 # 1.2.0
483
484 **Features:**
485
486 * Typeguards:
487   * isEnumMember
488   * isExpressionWithTypeArguments
489   * isImportSpecifier
490 * Utilities:
491   * isJsDocKind, isTypeNodeKind
492 * Allow typescript@next in peerDependencies
493
494 # 1.1.0
495
496 **Bugfixes:**
497
498 * Fix isBlockScopeBoundary: Remove WithStatement, IfStatment, DoStatement and WhileStatement because they are no scope boundary whitout a block.
499
500 **Features:**
501
502 * Added more typeguards:
503   * isAssertionExpression
504   * isEmptyStatement
505   * isJsxAttributeLike
506   * isJsxOpeningLikeElement
507   * isNonNullExpression
508   * isSyntaxList
509 * Utilities:
510   * getNextToken, getPreviousToken
511   * hasOwnThisReference
512   * getLineRanges
513
514 # 1.0.0
515
516 **Features:**
517
518 * Initial implementation of typeguards
519 * Utilities:
520   * getChildOfKind
521   * isNodeKind, isAssignmentKind
522   * hasModifier, isParameterProperty, hasAccessModifier
523   * getPreviousStatement, getNextStatement
524   * getPropertyName
525   * forEachDestructuringIdentifier, forEachDeclaredVariable
526   * getVariableDeclarationKind, isBlockScopedVariableDeclarationList, isBlockScopedVariableDeclaration
527   * isScopeBoundary, isFunctionScopeBoundary, isBlockScopeBoundary
528   * forEachToken, forEachTokenWithTrivia, forEachComment
529   * endsControlFlow