Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: bump typescript dependency to 3.8#1696

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
bradzacher merged 1 commit intomasterfrombump-ts-3-8
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes fromall 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
4 changes: 2 additions & 2 deletionspackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,9 +74,9 @@
"ts-jest": "^25.0.0",
"ts-node": "^8.5.0",
"tslint": "^5.20.1",
"typescript": ">=3.2.1 <3.8.0"
"typescript": ">=3.2.1 <3.9.0"
},
"resolutions": {
"typescript": "^3.7.2"
"typescript": "^3.8.3"
}
}
2 changes: 2 additions & 0 deletionspackages/parser/tests/lib/__snapshots__/jsx.ts.snap
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -651,6 +651,8 @@ Object {
}
`;

exports[`JSX useJSXTextNode: false fixtures/member-expression-private.src 1`] = `"Identifier expected."`;

exports[`JSX useJSXTextNode: false fixtures/member-expression-this.src 1`] = `
Object {
"$id": 1,
Expand Down
2 changes: 2 additions & 0 deletionspackages/parser/tests/lib/__snapshots__/tsx.ts.snap
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,6 +50,8 @@ Object {
}
`;

exports[`TSX fixtures/generic-jsx-member-expression-private.src 1`] = `"Identifier expected."`;

exports[`TSX fixtures/generic-jsx-opening-element.src 1`] = `
Object {
"$id": 1,
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
<this.#foo/>;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
const foo = <this.#foo<string>/>
11 changes: 11 additions & 0 deletionspackages/typescript-estree/src/convert.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -458,6 +458,12 @@ export class Converter {
let result: TSESTree.JSXMemberExpression | TSESTree.JSXIdentifier;
switch (node.kind) {
case SyntaxKind.PropertyAccessExpression:
if (node.name.kind === SyntaxKind.PrivateIdentifier) {
// This is one of the few times where TS explicitly errors, and doesn't even gracefully handle the syntax.
// So we shouldn't ever get into this state to begin with.
throw new Error('Non-private identifier expected.');
}

result = this.createNode<TSESTree.JSXMemberExpression>(node, {
type: AST_NODE_TYPES.JSXMemberExpression,
object: this.convertJSXTagName(node.expression, parent),
Expand All@@ -467,12 +473,14 @@ export class Converter {
) as TSESTree.JSXIdentifier,
});
break;

case SyntaxKind.ThisKeyword:
result = this.createNode<TSESTree.JSXIdentifier>(node, {
type: AST_NODE_TYPES.JSXIdentifier,
name: 'this',
});
break;

case SyntaxKind.Identifier:
default:
result = this.createNode<TSESTree.JSXIdentifier>(node, {
Expand DownExpand Up@@ -1570,6 +1578,9 @@ export class Converter {

case SyntaxKind.ExportDeclaration:
if (node.exportClause) {
if (node.exportClause.kind !== SyntaxKind.NamedExports) {
throw new Error('`export * as ns` is not yet supported.');
}
return this.createNode<TSESTree.ExportNamedDeclaration>(node, {
type: AST_NODE_TYPES.ExportNamedDeclaration,
source: this.convertChild(node.moduleSpecifier),
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5289,6 +5289,8 @@ Object {
}
`;

exports[`JSX useJSXTextNode: false fixtures/member-expression-private.src 1`] = `"Identifier expected."`;

exports[`JSX useJSXTextNode: false fixtures/member-expression-this.src 1`] = `
Object {
"body": Array [
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1555,6 +1555,15 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-private.src 1`] = `
Object {
"column": 10,
"index": 10,
"lineNumber": 1,
"message": "Identifier expected.",
}
`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/multiple-blank-spaces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;
Expand DownExpand Up@@ -1627,6 +1636,15 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" e

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-element.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-member-expression-private.src 1`] = `
Object {
"column": 22,
"index": 22,
"lineNumber": 1,
"message": "Identifier expected.",
}
`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-opening-element.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;

exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/react-typed-props.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`;
Expand DownExpand Up@@ -1689,7 +1707,7 @@ Object {
"column": 14,
"index": 31,
"lineNumber": 2,
"message": "'await'expression is only allowed withinanasyncfunction.",
"message": "'await'expressions are only allowed within asyncfunctions and at the top levels of modules.",
}
`;

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -422,6 +422,8 @@ Object {
}
`;

exports[`TSX fixtures/generic-jsx-member-expression-private.src 1`] = `"Identifier expected."`;

exports[`TSX fixtures/generic-jsx-opening-element.src 1`] = `
Object {
"body": Array [
Expand Down
8 changes: 4 additions & 4 deletionsyarn.lock
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8152,10 +8152,10 @@ 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.8.0", typescript@^3.7.2:
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
typescript@*, "typescript@>=3.2.1 <3.9.0", 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==

uglify-js@^3.1.4:
version "3.6.0"
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp