Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump minimum required TS version #2004

Merged
merged 1 commit into from May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 <3.9.0"
"typescript": "3.8.3"
},
"resolutions": {
"typescript": "^3.8.3"
"typescript": "3.8.3"
}
}
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 <3.9.0", typescript@^3.8.3:
typescript@*, typescript@3.8.3:
version "3.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
Expand Down