Skip to content

chore: bump minimum TS to 4.3.5 #6923

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

Merged
merged 1 commit into from
Apr 17, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ _ts4.2
# the downlevel-dts output folders
_ts3.4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get rid of _ts3.4 now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep it in gitignore until we merge it, as it will prevent us from accidently pushing those files while switching between v6 and main

_ts4.2
_ts4.3

# Files copied as part of the build
packages/types/src/generated/**/*.ts
Expand Down
2 changes: 1 addition & 1 deletion docs/maintenance/Versioning.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Support for specific Current status releases are considered periodically.

### TypeScript

> The version range of TypeScript currently supported is `>=4.2.4 <5.1.0`.
> The version range of TypeScript currently supported is `>=4.3.5 <5.1.0`.

Note that we mirror [DefinitelyTyped's version support window](https://github.com/DefinitelyTyped/DefinitelyTyped/#support-window) - meaning we only support versions of TypeScript less than 2 years old.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@
"ts-node": "10.7.0",
"tslint": "^6.1.3",
"tsx": "^3.12.1",
"typescript": ">=4.2.4 <5.1.0"
"typescript": ">=4.3.5 <5.1.0"
},
"resolutions": {
"typescript": "~5.0.2",
"typescript": "~5.0.4",
"@types/node": "^18.11.9",
"@jest/reporters": "^29",
"@jest/test-result": "^29",
Expand Down
8 changes: 4 additions & 4 deletions packages/parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "An ESLint custom parser which leverages TypeScript ESTree",
"files": [
"dist",
"_ts4.2",
"_ts4.3",
"README.md",
"LICENSE"
],
Expand Down Expand Up @@ -39,9 +39,9 @@
],
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand Down Expand Up @@ -74,7 +74,7 @@
"typesVersions": {
"<4.7": {
"*": [
"_ts4.2/*"
"_ts4.3/*"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/scope-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"typesVersions": {
"<4.7": {
"*": [
"_ts4.2/*"
"_ts4.3/*"
]
}
}
Expand Down
9 changes: 4 additions & 5 deletions packages/scope-manager/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"targets": {
"build": {
"executor": "nx:run-commands",
"outputs": ["{projectRoot}/dist", "{projectRoot}/_ts4.2"],
"outputs": ["{projectRoot}/dist", "{projectRoot}/_ts4.3"],
"options": {
"parallel": false,
"cwd": "packages/scope-manager",
"commands": [
"rimraf _ts4.2",
"rimraf _ts4.3",
"tsc -b tsconfig.build.json",
"downlevel-dts dist _ts4.2/dist --to=4.2"
"downlevel-dts dist _ts4.3/dist --to=4.3"
]
}
},
Expand All @@ -36,8 +36,7 @@
"commands": [
"tsc -b tsconfig.build.json --clean",
"rimraf dist",
"rimraf _ts4.2",
"rimraf _ts3.4",
"rimraf _ts4.3",
"rimraf coverage"
]
}
Expand Down
8 changes: 4 additions & 4 deletions packages/type-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Type utilities for working with TypeScript + ESLint together",
"files": [
"dist",
"_ts4.2",
"_ts4.3",
"package.json",
"README.md",
"LICENSE"
Expand Down Expand Up @@ -36,9 +36,9 @@
],
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand Down Expand Up @@ -70,7 +70,7 @@
"typesVersions": {
"<4.7": {
"*": [
"_ts4.2/*"
"_ts4.3/*"
]
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Types for the TypeScript-ESTree AST spec",
"files": [
"dist",
"_ts4.2",
"_ts4.3",
"package.json",
"README.md",
"LICENSE"
Expand Down Expand Up @@ -37,9 +37,9 @@
"scripts": {
"copy-ast-spec": "tsx ./tools/copy-ast-spec.ts",
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"generate-lib": "nx run scope-manager:generate-lib",
"lint": "nx lint",
Expand Down Expand Up @@ -82,7 +82,7 @@
"typesVersions": {
"<4.7": {
"*": [
"_ts4.2/*"
"_ts4.3/*"
]
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/typescript-estree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "A parser that converts TypeScript source code into an ESTree compatible form",
"files": [
"dist",
"_ts4.2",
"_ts4.3",
"README.md",
"LICENSE"
],
Expand Down Expand Up @@ -43,9 +43,9 @@
],
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand Down Expand Up @@ -87,7 +87,7 @@
"typesVersions": {
"<4.7": {
"*": [
"_ts4.2/*"
"_ts4.3/*"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import type { ParseSettings } from './index';
* This needs to be kept in sync with /docs/maintenance/Versioning.md
* in the typescript-eslint monorepo
*/
const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.2.4 <5.1.0';
const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.1.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: string[] = ['5.0.1-rc'];
const SUPPORTED_PRERELEASE_RANGES: string[] = [];
const ACTIVE_TYPESCRIPT_VERSION = ts.version;
const isRunningSupportedTypeScriptVersion = semver.satisfies(
ACTIVE_TYPESCRIPT_VERSION,
Expand Down
1 change: 0 additions & 1 deletion packages/typescript-estree/src/version-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ function semverCheck(version: string): boolean {
}

const versions = [
'4.2',
'4.3',
'4.4',
'4.5',
Expand Down
10 changes: 5 additions & 5 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Utilities for working with TypeScript + ESLint together",
"files": [
"dist",
"_ts4.2",
"_ts4.3",
"package.json",
"README.md",
"LICENSE"
Expand Down Expand Up @@ -56,16 +56,16 @@
],
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
"typecheck": "tsc -p tsconfig.json --noEmit"
},
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/eslint-utils": "^4.3.0",
"@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12",
"@typescript-eslint/scope-manager": "5.58.0",
Expand All @@ -88,7 +88,7 @@
"typesVersions": {
"<4.7": {
"*": [
"_ts4.2/*"
"_ts4.3/*"
]
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/visitor-keys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Visitor keys used to help traverse the TypeScript-ESTree AST",
"files": [
"dist",
"_ts4.2",
"_ts4.3",
"package.json",
"README.md",
"LICENSE"
Expand Down Expand Up @@ -36,9 +36,9 @@
],
"scripts": {
"build": "tsc -b tsconfig.build.json",
"postbuild": "downlevel-dts dist _ts4.2/dist --to=4.2",
"postbuild": "downlevel-dts dist _ts4.3/dist --to=4.3",
"clean": "tsc -b tsconfig.build.json --clean",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.2 && rimraf coverage",
"postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage",
"format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore",
"lint": "nx lint",
"test": "jest --coverage",
Expand All @@ -58,7 +58,7 @@
"typesVersions": {
"<4.7": {
"*": [
"_ts4.2/*"
"_ts4.3/*"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Several rules were changed in significant enough ways to be considered breaking

- [feat(typescript-estree): deprecate createDefaultProgram](https://github.com/typescript-eslint/typescript-eslint/pull/5890): Renames `createDefaultProgram` to `deprecated__createDefaultProgram`, with associated `@deprecated` TSDoc tags and warnings.
- [feat: drop support for node v12](https://github.com/typescript-eslint/typescript-eslint/pull/5918)
- [feat: bump minimum supported TS version to 4.2.4](https://github.com/typescript-eslint/typescript-eslint/pull/5915): this matches [DefinitelyTyped's 2-year support window](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window).
- [feat: bump minimum supported TS version to 4.3.5](https://github.com/typescript-eslint/typescript-eslint/issues/6923): this matches [DefinitelyTyped's 2-year support window](https://github.com/DefinitelyTyped/DefinitelyTyped#support-window).
- [chore: drop support for ESLint v6](https://github.com/typescript-eslint/typescript-eslint/pull/5972)
- [feat(eslint-plugin): [prefer-readonly-parameter-types] added an optional type allowlist](https://github.com/typescript-eslint/typescript-eslint/pull/4436): changes the public `isTypeReadonlyArrayOrTuple` function's first argument from a `checker: ts.TypeChecker` to a full `program: ts.Program`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const useSandboxServices = (
Array.from(
new Set([...sandboxInstance.supportedVersions, window.ts.version]),
)
.filter(item => parseFloat(item) >= 4.2)
.filter(item => parseFloat(item) >= 4.3)
.sort((a, b) => b.localeCompare(a)),
);

Expand Down
68 changes: 4 additions & 64 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5478,12 +5478,7 @@ color-support@^1.1.3:
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==

colord@^2.9.1:
version "2.9.1"
resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.1.tgz#c961ea0efeb57c9f0f4834458f26cb9cc4a3f90e"
integrity sha512-4LBMSt09vR0uLnPVkOUBnmxgoaeN4ewRbx801wY/bXcltXfpR/G46OdWn96XpYmCWuYvO46aBZP4NgX8HpNAcw==

colord@^2.9.3:
colord@^2.9.1, colord@^2.9.3:
version "2.9.3"
resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43"
integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==
Expand Down Expand Up @@ -7030,7 +7025,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc"
integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==

eslint@*:
eslint@*, eslint@^8.34.0:
version "8.38.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.38.0.tgz#a62c6f36e548a5574dd35728ac3c6209bd1e2f1a"
integrity sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==
Expand Down Expand Up @@ -7076,52 +7071,6 @@ eslint@*:
strip-json-comments "^3.1.0"
text-table "^0.2.0"

eslint@^8.34.0:
version "8.36.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.36.0.tgz#1bd72202200a5492f91803b113fb8a83b11285cf"
integrity sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.4.0"
"@eslint/eslintrc" "^2.0.1"
"@eslint/js" "8.36.0"
"@humanwhocodes/config-array" "^0.11.8"
"@humanwhocodes/module-importer" "^1.0.1"
"@nodelib/fs.walk" "^1.2.8"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
debug "^4.3.2"
doctrine "^3.0.0"
escape-string-regexp "^4.0.0"
eslint-scope "^7.1.1"
eslint-visitor-keys "^3.3.0"
espree "^9.5.0"
esquery "^1.4.2"
esutils "^2.0.2"
fast-deep-equal "^3.1.3"
file-entry-cache "^6.0.1"
find-up "^5.0.0"
glob-parent "^6.0.2"
globals "^13.19.0"
grapheme-splitter "^1.0.4"
ignore "^5.2.0"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
is-path-inside "^3.0.3"
js-sdsl "^4.1.4"
js-yaml "^4.1.0"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
lodash.merge "^4.6.2"
minimatch "^3.1.2"
natural-compare "^1.4.0"
optionator "^0.9.1"
strip-ansi "^6.0.1"
strip-json-comments "^3.1.0"
text-table "^0.2.0"

espree@^9.5.0, espree@^9.5.1:
version "9.5.1"
resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4"
Expand Down Expand Up @@ -12099,16 +12048,7 @@ postcss-zindex@^5.1.0:
resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-5.1.0.tgz#4a5c7e5ff1050bd4c01d95b1847dfdcc58a496ff"
integrity sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A==

postcss@^8.3.11, postcss@^8.4.13, postcss@^8.4.14, postcss@^8.4.7:
version "8.4.14"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf"
integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==
dependencies:
nanoid "^3.3.4"
picocolors "^1.0.0"
source-map-js "^1.0.2"

postcss@^8.4.21:
postcss@^8.3.11, postcss@^8.4.13, postcss@^8.4.14, postcss@^8.4.21, postcss@^8.4.7:
version "8.4.21"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4"
integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==
Expand Down Expand Up @@ -14453,7 +14393,7 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@*, "typescript@>=4.2.4 <5.1.0", "typescript@^3 || ^4", typescript@next, typescript@~4.8.4, typescript@~5.0.2:
typescript@*, "typescript@>=4.3.5 <5.1.0", "typescript@^3 || ^4", typescript@next, typescript@~4.8.4, typescript@~5.0.4:
version "5.0.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b"
integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==
Expand Down