-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update
tsutils
to version 3.21.0
`tsetse` - `check-return-value` rule is returning false positives due because the short-circuit code in https://github.com/bazelbuild/rules_nodejs/blob/9b454e38f7e2bbc64f75ee9a7dcb6ff45f1c7a12/third_party/github.com/bazelbuild/rules_typescript/internal/tsetse/rules/check_return_value_rule.ts#L60-L62 is not working as expected for certain usecases. Example: ```ts get content() { try { return expect(harness.readFile(path)).withContext(`With file content for '${path}'`); } catch (e) { if (e.code !== 'ENOENT') { throw e; } // File does not exist so always fail the expectation return createFailureExpectation( expect(''), `Expected file content but file does not exist: '${path}'`, ); } }, ``` WIll cause tsetse to fail with the bellow; ``` ~~~~~~~~~~ packages/angular_devkit/build_angular/src/testing/jasmine-helpers.ts:112:16 - error TS21222: [tsetse] return value is unused. See http://tsetse.info/check-return-value 112 return expect(Buffer.byteLength(harness.readFile(path))).withContext( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 113 `With file size for '${path}'`, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 114 ); ```
- Loading branch information
1 parent
9b454e3
commit bba5494
Showing
6 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters