Skip to content

Commit

Permalink
fix supported TS version
Browse files Browse the repository at this point in the history
  • Loading branch information
saberduck committed Jul 31, 2020
1 parent ee48d96 commit 4cd6ae2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion eslint-bridge/src/parser.ts
Expand Up @@ -28,7 +28,8 @@ import * as semver from 'semver';
// still we might consider extending this range
// if everything which we need is working on older/newer versions
const TYPESCRIPT_MINIMUM_VERSION = '3.3.1';
const TYPESCRIPT_MAXIMUM_VERSION = '4.0.0';
// next released version is 4.0.0, we need version which is above current 3.9.x and below 4.0.0
const TYPESCRIPT_MAXIMUM_VERSION = '3.10.0';

export const PARSER_CONFIG_MODULE: Linter.ParserOptions = {
tokens: true,
Expand Down
2 changes: 1 addition & 1 deletion eslint-bridge/tests/parser.test.ts
Expand Up @@ -196,7 +196,7 @@ describe('parseTypeScriptSourceFile', () => {
resetReportedNewerTypeScriptVersion();
checkTypeScriptVersionCompatibility('5.0.0');
expect(console.log).toHaveBeenCalledWith(
'WARN You are using version of TypeScript 5.0.0 which is not officially supported; supported versions >=3.3.1 <4.0.0',
'WARN You are using version of TypeScript 5.0.0 which is not officially supported; supported versions >=3.3.1 <3.10.0',
);
console.log = jest.fn();
checkTypeScriptVersionCompatibility('5.0.0');
Expand Down
Expand Up @@ -164,7 +164,7 @@ public void test_new_typescript() throws Exception {
Tests.setProfile(projectKey, "eslint-based-rules-profile", "ts");
BuildResult result = orchestrator.executeBuild(build);
assertThat(result.isSuccess()).isTrue();
assertThat(result.getLogsLines(l -> l.contains("You are using version of TypeScript " + tsVersion + " which is not officially supported; supported versions >=3.3.1 <4.0.0"))).hasSize(1);
assertThat(result.getLogsLines(l -> l.contains("You are using version of TypeScript " + tsVersion + " which is not officially supported; supported versions >=3.3.1 <3.10.0"))).hasSize(1);
}

@Test
Expand Down

0 comments on commit 4cd6ae2

Please sign in to comment.