Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
feat: bump minimum required TS version (#2004)
  • Loading branch information
bradzacher committed May 21, 2020
1 parent 264b017 commit 7ad4d7c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -21,6 +21,7 @@ module.exports = {
sourceType: 'module',
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
tsconfigRootDir: __dirname,
warnOnUnsupportedTypeScriptVersion: false,
},
rules: {
//
Expand Down
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -234,11 +234,13 @@ The latest version under the `canary` tag **(latest commit to master)** is:

## Supported TypeScript Version

We will always endeavor to support the latest stable version of TypeScript. Sometimes, but not always, changes in TypeScript will not require breaking changes in this project, and so we are able to support more than one version of TypeScript. In some cases, we may even be able to support additional pre-releases (i.e. betas and release candidates) of TypeScript, but only if doing so does not require us to compromise on support for the latest stable version.
**The version range of TypeScript currently supported by this parser is `>=3.3.1 <3.8.0`.**

These versions are what we test against.

**The version range of TypeScript currently supported by this parser is `>=3.2.1 <3.8.0`.**
We will always endeavor to support the latest stable version of TypeScript. Sometimes, but not always, changes in TypeScript will not require breaking changes in this project, and so we are able to support more than one version of TypeScript. In some cases, we may even be able to support additional pre-releases (i.e. betas and release candidates) of TypeScript, but only if doing so does not require us to compromise on support for the latest stable version.

This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript.
Note that our packages have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript.

If you use a non-supported version of TypeScript, the parser will log a warning to the console. If you want to disable this warning, you can configure this in your `parserOptions`. See: [`@typescript-eslint/parser`](./packages/parser/) and [`@typescript-eslint/typescript-estree`](./packages/typescript-estree/).

Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -32,7 +32,7 @@
"lint:markdown:fix": "lint:markdown --fix",
"lint:markdown": "markdownlint '**/*.md' --config=.markdownlint.json --ignore-path=.markdownlintignore",
"lint": "eslint . --ext .js,.ts",
"postinstall": "yarn lerna-init && yarn build",
"postinstall": "yarn lerna:init && yarn build",
"pre-commit": "yarn lint-staged",
"pre-push": "yarn check:format",
"test": "lerna run test --concurrency 1",
Expand Down Expand Up @@ -79,9 +79,9 @@
"ts-jest": "^25.5.1",
"ts-node": "^8.10.1",
"tslint": "^6.1.2",
"typescript": ">=3.2.1 <4.0.0"
"typescript": ">=3.3.1 <4.0.0"
},
"resolutions": {
"typescript": "^3.8.3"
"typescript": "3.9.2"
}
}
4 changes: 1 addition & 3 deletions packages/typescript-estree/README.md
Expand Up @@ -249,9 +249,7 @@ Types for the AST produced by the parse functions.

## Supported TypeScript Version

We will always endeavor to support the latest stable version of TypeScript.

The version of TypeScript currently supported by this parser is `~3.2.1`. This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript.
See the [Supported TypeScript Version](../../README.md#supported-typescript-version) section in the project root.

If you use a non-supported version of TypeScript, the parser will log a warning to the console.

Expand Down
4 changes: 2 additions & 2 deletions packages/typescript-estree/src/parser.ts
Expand Up @@ -20,12 +20,12 @@ const log = debug('typescript-eslint:typescript-estree:parser');
* This needs to be kept in sync with the top-level README.md in the
* typescript-eslint monorepo
*/
const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.2.1 <3.8.0';
const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <3.8.0';
/*
* The semver package will ignore prerelease ranges, and we don't want to explicitly document every one
* List them all separately here, so we can automatically create the full string
*/
const SUPPORTED_PRERELEASE_RANGES = ['>3.7.0-dev.0', '3.7.1-rc'];
const SUPPORTED_PRERELEASE_RANGES: string[] = [];
const ACTIVE_TYPESCRIPT_VERSION = ts.version;
const isRunningSupportedTypeScriptVersion = semver.satisfies(
ACTIVE_TYPESCRIPT_VERSION,
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Expand Up @@ -8451,7 +8451,7 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@*, "typescript@>=3.2.1 <4.0.0", typescript@^3.8.3:
typescript@*, typescript@3.9.2, "typescript@>=3.3.1 <4.0.0":
version "3.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9"
integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==
Expand Down

0 comments on commit 7ad4d7c

Please sign in to comment.