Skip to content

chore: update typescript to 4.3-rc #3426

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
May 22, 2021
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ The latest version under the `canary` tag **(latest commit to master)** is:

## Supported TypeScript Version

**The version range of TypeScript currently supported by this parser is `>=3.3.1 <4.3.0`.**
**The version range of TypeScript currently supported by this parser is `>=3.3.1 <4.4.0`.**

These versions are what we test against.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@
"ts-jest": "^26.5.1",
"ts-node": "^9.0.0",
"tslint": "^6.1.3",
"typescript": ">=3.3.1 <4.3.0"
"typescript": ">=3.3.1 <4.4.0 || 4.3.1-rc"
},
"resolutions": {
"typescript": "4.2.2"
"typescript": "4.3.1-rc"
}
}
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/dot-notation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default createRule<Options, MessageIds>({
(options.allowIndexSignaturePropertyAccess ?? false) ||
tsutils.isCompilerOptionEnabled(
program.getCompilerOptions(),
// @ts-expect-error - TS is refining the type to never for some reason
'noPropertyAccessFromIndexSignature',
);

Expand Down
4 changes: 2 additions & 2 deletions packages/typescript-estree/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
},
"devDependencies": {
"@babel/code-frame": "^7.12.13",
"@babel/parser": "^7.13.11",
"@babel/types": "^7.13.0",
"@babel/parser": "^7.14.3",
"@babel/types": "^7.14.2",
"@types/babel__code-frame": "*",
"@types/debug": "*",
"@types/glob": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-estree/src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ export class Converter {
Object.entries<any>(node)
.filter(
([key]) =>
!/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc|type|typeArguments|typeParameters|decorators)$/.test(
!/^(?:_children|kind|parent|pos|end|flags|modifierFlagsCache|jsDoc|type|typeArguments|typeParameters|decorators|transformFlags)$/.test(
key,
),
)
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript-estree/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,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.3.1 <4.3.0';
const SUPPORTED_TYPESCRIPT_VERSIONS = '>=3.3.1 <4.4.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[] = ['4.1.1-rc', '4.1.0-beta'];
const SUPPORTED_PRERELEASE_RANGES: string[] = ['4.3.0-beta', '4.3.1-rc'];
const ACTIVE_TYPESCRIPT_VERSION = ts.version;
const isRunningSupportedTypeScriptVersion = semver.satisfies(
ACTIVE_TYPESCRIPT_VERSION,
Expand Down
4 changes: 4 additions & 0 deletions packages/typescript-estree/tests/ast-alignment/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ export function preprocessBabylonAST(ast: BabelTypes.File): any {
node.params = node.parameters;
delete node.parameters;
}
if (node.kind) {
// TODO - remove this once we support accessor signatures
delete node.kind;
}
},
/**
* We want this node to be different
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Object {
12,
12,
],
"transformFlags": 0,
"type": "TSEndOfFileToken",
},
"externalModuleIndicator": undefined,
Expand Down Expand Up @@ -170,7 +169,6 @@ Object {
},
],
"text": "new foo<T>()",
"transformFlags": 9,
"type": "TSSourceFile",
"typeReferenceDirectives": Array [],
}
Expand Down Expand Up @@ -210,7 +208,6 @@ Object {
5,
8,
],
"transformFlags": 0,
"type": "TSUnparsedPrologue",
},
"nextContainer": undefined,
Expand All @@ -219,7 +216,6 @@ Object {
35,
],
"symbol": undefined,
"transformFlags": 1,
"type": "TSUnparsedPrologue",
"typeAnnotation": null,
"typeParameters": null,
Expand Down Expand Up @@ -322,7 +318,6 @@ Object {
18,
],
"symbol": undefined,
"transformFlags": 2305,
"type": "TSClassDeclaration",
"typeParameters": null,
}
Expand Down Expand Up @@ -363,7 +358,6 @@ Object {
0,
12,
],
"transformFlags": 9,
"type": "TSNewExpression",
"typeParameters": Object {
"loc": Object {
Expand Down Expand Up @@ -464,7 +458,6 @@ Object {
15,
],
"symbol": undefined,
"transformFlags": 257,
"type": "TSClassDeclaration",
"typeParameters": Object {
"loc": Object {
Expand Down
3 changes: 1 addition & 2 deletions packages/typescript-estree/tests/lib/convert.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ describe('convert', () => {

function fakeUnknownKind(node: ts.Node): void {
ts.forEachChild(node, fakeUnknownKind);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- intentionally writing to a readonly field
// @ts-expect-error
// @ts-expect-error -- intentionally writing to a readonly field
node.kind = ts.SyntaxKind.UnparsedPrologue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Object {
1,
9,
],
"type": "Keyword",
"type": "JSXIdentifier",
"value": "this:bar",
},
Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Object {
7,
14,
],
"transformFlags": 1,
"type": "TSPrivateKeyword",
},
Object {
Expand All @@ -68,7 +67,6 @@ Object {
15,
21,
],
"transformFlags": 1,
"type": "TSPublicKeyword",
},
Object {
Expand All @@ -86,7 +84,6 @@ Object {
22,
31,
],
"transformFlags": 1,
"type": "TSProtectedKeyword",
},
Object {
Expand All @@ -104,7 +101,6 @@ Object {
32,
38,
],
"transformFlags": 256,
"type": "TSStaticKeyword",
},
Object {
Expand All @@ -122,7 +118,6 @@ Object {
39,
47,
],
"transformFlags": 1,
"type": "TSReadonlyKeyword",
},
Object {
Expand Down Expand Up @@ -157,7 +152,6 @@ Object {
57,
62,
],
"transformFlags": 96,
"type": "TSAsyncKeyword",
},
],
Expand Down
17 changes: 11 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,16 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10", "@babel/parser@^7.13.11":
"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.10":
version "7.13.15"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.15.tgz#8e66775fb523599acb6a289e12929fa5ab0954d8"
integrity sha512-b9COtcAlVEQljy/9fbcMHpG+UIW9ReF+gpaxDHTlZd0c6/UU9ng8zdySAW9sRTzpvcdCHn6bUcbuYUgGzLAWVQ==

"@babel/parser@^7.14.3":
version "7.14.3"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.3.tgz#9b530eecb071fd0c93519df25c5ff9f14759f298"
integrity sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ==

"@babel/plugin-syntax-async-generators@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"
Expand Down Expand Up @@ -291,7 +296,7 @@
globals "^11.1.0"
lodash "^4.17.19"

"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3":
"@babel/types@^7.0.0", "@babel/types@^7.12.13", "@babel/types@^7.13.0", "@babel/types@^7.14.2", "@babel/types@^7.3.0", "@babel/types@^7.3.3":
version "7.14.2"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.2.tgz#4208ae003107ef8a057ea8333e56eb64d2f6a2c3"
integrity sha512-SdjAG/3DikRHpUOjxZgnkbR11xUlyDMUFJdvnIgZEE16mqmY0BINMmc4//JMJglEmn6i7sq6p+mGrFWyZ98EEw==
Expand Down Expand Up @@ -8858,10 +8863,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@*, typescript@4.2.2, "typescript@>=3.3.1 <4.3.0", typescript@^4.1.0-dev.20201026, typescript@~4.2.4:
version "4.2.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c"
integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ==
typescript@*, typescript@4.3.1-rc, "typescript@>=3.3.1 <4.4.0 || 4.3.1-rc", typescript@^4.1.0-dev.20201026, typescript@~4.2.4:
version "4.3.1-rc"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.1-rc.tgz#925149c8d8514e20a6bd8d4bd7f42adac67ab59c"
integrity sha512-L3uJ0gcntaRaKni9aV2amYB+pCDVodKe/B5+IREyvtKGsDOF7cYjchHb/B894skqkgD52ykRuWatIZMqEsHIqA==

uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.6"
Expand Down