Comparing version 2.12.0 to 2.12.1
# Change Log | ||
## v2.12.1 | ||
**Bugfixes:** | ||
* `forEachTokenWithTrivia` | ||
* handles irregular whitespace and no longer visits some tokens twice | ||
* correctly calculates the range of JsxText | ||
## v2.12.0 | ||
**API-Changes:** | ||
* deprecated `ImportOptions` if favor of the new `ImportKind` enum | ||
## v2.11.2 | ||
**Bugfixes:** | ||
* `parseJsDocOfNode`: set correct `pos`, `end` and `parent` properties. Also affects `getJsDoc` of `EndOfFileToken` | ||
## v2.11.1 | ||
**Bugfixes:** | ||
* `collectVariableUsage`: correctly consider catch binding as block scoped declaration inside catch block | ||
## v2.11.0 | ||
**Bugfixes:** | ||
* `getJsDoc` now correctly returns JsDoc for `EndOfFileToken` | ||
**Features:** | ||
* added utility `parseJsDocOfNode` | ||
## v2.10.0 | ||
**Features:** | ||
* added utility `findImports` to find all kinds of imports in a source file | ||
## v2.9.0 | ||
**Features:** | ||
* added typeguard `isMappedTypeNode` | ||
@@ -32,7 +53,11 @@ * added utilities `canHaveJsDoc` and `getJsDoc` | ||
## v2.8.2 | ||
**Bugfixes:** | ||
* `collectVariableUsage`: handle global augmentation like other module augmentations | ||
## v2.8.1 | ||
**Bugfixes:** | ||
* Support `typescript@2.5.1` with optional catch binding | ||
@@ -42,2 +67,3 @@ * `collectVariableUsage` fixed a bug where method decorator had method's parameters in scope | ||
## v2.8.0 | ||
* Compatibility with the latest typescript nightly | ||
@@ -47,11 +73,17 @@ * Added `getIdentifierText` to unescape identifiers across typescript versions | ||
## v2.7.1 | ||
**Bugfixes:** | ||
* `isReassignmentTarget` don't return `true` for right side of assignment | ||
## v2.7.0 | ||
**Features:** | ||
* Added `isReassignmentTarget` utility | ||
## v2.6.1 | ||
**Bugfixes:** | ||
* `getDeclarationDomain` now returns `undefined` for Parameter in IndexSignature | ||
@@ -61,3 +93,5 @@ * `collectVariableUsage` ignores Parameter in IndexSignature | ||
## v2.6.0 | ||
**Bugfixes:** | ||
* `collectVariableUsage`: | ||
@@ -69,2 +103,3 @@ * don't merge imports with global declarations | ||
**Features:** | ||
* Added `getModifier` utility | ||
@@ -74,10 +109,15 @@ * Added `DeclarationDomain.Import` to distinguish imports from other declarations | ||
## v2.5.1 | ||
**Bugfixes:** | ||
* `collectVariableUsage` ignore jump labels as in `break label;` | ||
## v2.5.0 | ||
**Bugfixes:** | ||
* `isFunctionWithBody` handles constructor overload correctly. | ||
**Features:** | ||
* Implemented `isExpressionValueUsed` to check whether the result of an expression is actually used. | ||
@@ -87,2 +127,3 @@ * Implemented `getDeclarationDomain` to determine if a given declaration introduces a new symbol in the value or type domain. | ||
**`collectVariableUses` is now usable** | ||
* no longer ignores signatures and its parameters | ||
@@ -98,3 +139,5 @@ * don't merge declarations and uses across domains | ||
## v2.4.0 | ||
**Bugfixes:** | ||
* `getLineRanges`: `contentLength` now contains the correct line length when there are multiple consecutive line break characters | ||
@@ -105,2 +148,3 @@ * `getTokenAtPosition`: don't match tokens that end at the specified position (because that's already outside of their range) | ||
**Features:** | ||
* Added typeguard: `isJsDoc` | ||
@@ -110,3 +154,5 @@ * Added experimental scope and usage analysis (`getUsageDomain` and `collectVariableUsage`) | ||
## v2.3.0 | ||
**Bugfixes:** | ||
* `forEachComment` no longer omits some comments when callback returns a truthy value | ||
@@ -116,13 +162,19 @@ * `isPositionInComment` fixed false positive inside JSXText | ||
**Features:** | ||
* Added utility: `getCommentAtPosition` | ||
## v2.2.0 | ||
**Bugfixes:** | ||
* Fixed bit value of `SideEffectOptions.JsxElement` to be a power of 2 | ||
**Features:** | ||
* Added utilities: `getTokenAtPosition` and `isPositionInComment` | ||
## v2.1.0 | ||
**Features:** | ||
* Added typeguard `isExpression` | ||
@@ -132,3 +184,5 @@ * Added utilities: `hasSideEffects`, `getDeclarationOfBindingElement` | ||
## v2.0.0 | ||
**Breaking Changes:** | ||
* Dropped compatibility with `typescript@<2.1.0` | ||
@@ -140,13 +194,19 @@ * Removed misnamed `isNumericliteral`, use `isNumericLiteral` instead (notice the uppercase L) | ||
**Features:** | ||
* New directory structure allows imports of typeguards or utils independently, e.g. (`require('tsutils/typeguard')`) | ||
## v1.9.1 | ||
**Bugfixes:** | ||
* `isObjectFlagSet` now uses the correct `objectFlags` property | ||
## v1.9.0 | ||
**Bugfixes:** | ||
* `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` | ||
**Features**: | ||
* Added typeguards for types | ||
@@ -156,3 +216,5 @@ * Added utilities for flag checking: `isNodeFlagSet`, `isTypeFlagSet`, `isSymbolFlagSet`,`isObjectFlagSet`, `isModifierFlagSet` | ||
## v1.8.0 | ||
**Features:** | ||
* Support peer dependency of typescript nightlies of 2.4.0 | ||
@@ -162,28 +224,40 @@ * Added typeguards: `isJsxAttributes`, `isIntersectionTypeNode`, `isTypeOperatorNode`, `isTypePredicateNode`, `isTypeQueryNode`, `isUnionTypeNode` | ||
## v1.7.0 | ||
**Bugfixes:** | ||
* `isFunctionScopeBoundary` now handles Interfaces, TypeAliases, FunctionSignatures, etc | ||
**Features:** | ||
* Added utilities: `isThisParameter`, `isSameLine` and `isFunctionWithBody` | ||
## v1.6.0 | ||
**Features:** | ||
* Add `isValidPropertyAccess`, `isValidNumericLiteral` and `isValidPropertyName` | ||
## v1.5.0 | ||
**Features:** | ||
* Add `isValidIdentifier` | ||
## v1.4.0 | ||
**Features:** | ||
* Add `contentLength` property to the result of `getLineRanges` | ||
## v1.3.0 | ||
**Bugfixes:** | ||
* canHaveLeadingTrivia: | ||
* `canHaveLeadingTrivia`: | ||
* Fix property access on undefined parent reference | ||
* Fixes: https://github.com/palantir/tslint/issues/2330 | ||
* hasOwnThisReference: now includes accessors on object literals | ||
* Fixes: [palantir/tslint#2330](https://github.com/palantir/tslint/issues/2330) | ||
* `hasOwnThisReference`: now includes accessors on object literals | ||
**Features:** | ||
* Typeguards: | ||
@@ -194,4 +268,6 @@ * isTypeParameterDeclaration | ||
## v1.2.2 | ||
**Bugfixes:** | ||
* hasOwnThisReference: | ||
* `hasOwnThisReference`: | ||
* exclude overload signatures of function declarations | ||
@@ -201,7 +277,11 @@ * add method declarations on object literals | ||
## v1.2.1 | ||
**Bugfixes:** | ||
* Fix name of isNumericLiteral | ||
* Fix name of `isNumericLiteral` | ||
## v1.2.0 | ||
**Features:** | ||
* Typeguards: | ||
@@ -216,6 +296,9 @@ * isEnumMember | ||
## v1.1.0 | ||
**Bugfixes:** | ||
* Fix isBlockScopeBoundary: Remove WithStatement, IfStatment, DoStatement and WhileStatement because they are no scope boundary whitout a block. | ||
**Features:** | ||
* Added more typeguards: | ||
@@ -233,4 +316,4 @@ * isAssertionExpression | ||
## v1.0.0 | ||
## v1.0.0 | ||
**Features:** | ||
@@ -237,0 +320,0 @@ |
{ | ||
"name": "tsutils", | ||
"version": "2.12.0", | ||
"version": "2.12.1", | ||
"description": "utilities for working with typescript's AST", | ||
@@ -5,0 +5,0 @@ "scripts": { |
import * as ts from 'typescript'; | ||
export declare function getChildOfKind(node: ts.Node, kind: ts.SyntaxKind, sourceFile?: ts.SourceFile): ts.Node | undefined; | ||
export declare function getChildOfKind<T extends ts.SyntaxKind>(node: ts.Node, kind: T, sourceFile?: ts.SourceFile): ts.Token<T> | undefined; | ||
export declare function isTokenKind(kind: ts.SyntaxKind): boolean; | ||
@@ -4,0 +4,0 @@ export declare function isNodeKind(kind: ts.SyntaxKind): boolean; |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
252470
2788