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

feat: support parsingsatisfies operators#5717

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
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
be7a623
feat: update typescript to 4.9.1
sosukesuzukiOct 2, 2022
00882c2
fix: add patch file for 4.9.1-beta
sosukesuzukiOct 2, 2022
692b86c
feat(typescript-estree): update version range
sosukesuzukiOct 2, 2022
7e68835
feat: run `generate-lib` script
sosukesuzukiOct 2, 2022
2b3bbcd
chore: update patch for typescript
sosukesuzukiOct 2, 2022
154f540
fix: run `lint-fix`
sosukesuzukiOct 2, 2022
e6432a9
feat(ast-spec): add `TSSatisfiesExpression` node
sosukesuzukiOct 2, 2022
eee4b69
feat(typescript-estree): support `satisfies` operator
sosukesuzukiOct 2, 2022
d97f5a2
feat(visitor-keys): add `TSSatisfiesExpression`
sosukesuzukiOct 2, 2022
687d1cd
test(typescript-estree): add tests for `satisfies`
sosukesuzukiOct 2, 2022
2ea0aac
fix: fix type-only imports
sosukesuzukiOct 3, 2022
816ebe8
Merge branch 'main' into support-satisfies-operators
JoshuaKGoldbergNov 17, 2022
3e69a54
Increased ranges to stable
JoshuaKGoldbergNov 17, 2022
fd6bb05
Added one more line to satisfies-expression test
JoshuaKGoldbergNov 17, 2022
21d9a62
Correct range to <5.0.0
JoshuaKGoldbergNov 17, 2022
94fbc45
Merge branch 'main' into pr/sosukesuzuki/5717
bradzacherNov 17, 2022
e39feeb
switch tests to ast-spec fixtures and update babel
bradzacherNov 18, 2022
5419dea
ignore satisfies fixtures from prettier
bradzacherNov 18, 2022
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
3 changes: 3 additions & 0 deletions.prettierignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@ packages/eslint-plugin/src/configs/*.json
CONTRIBUTORS.md
packages/ast-spec/src/*/*/fixtures/_error_/*/fixture.ts

# prettier doesn't yet support satisfies
packages/ast-spec/src/expression/TSSatisfiesExpression/fixtures/

# Ignore CHANGELOG.md files to avoid issues with automated release job
CHANGELOG.md

Expand Down
2 changes: 1 addition & 1 deletionREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,7 +51,7 @@ The latest version under the `canary` tag **(latest commit to `main`)** is:

### Supported TypeScript Version

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

These versions are what we test against.

Expand Down
12 changes: 6 additions & 6 deletionspackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,10 +49,11 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"devDependencies": {
"@babel/code-frame": "^7.16.7",
"@babel/eslint-parser": "^7.18.2",
"@babel/parser": "^7.18.0",
"@babel/types": "^7.18.2",
"@babel/code-frame": "^7.18.6",
"@babel/core": "^7.20.2",
"@babel/eslint-parser": "^7.19.1",
"@babel/parser": "^7.20.3",
"@babel/types": "^7.20.2",
"@nrwl/nx-cloud": "14.7.0",
"@nrwl/workspace": "14.8.4",
"@swc/core": "^1.3.1",
Expand DownExpand Up@@ -109,7 +110,7 @@
"resolutions": {
"typescript": "~4.9.3",
"@types/node": "^18.11.9",
"//": "Pin jesttov29 across the repo",
"//": "Stub out unnecessary swc packagestoimprove install size and speed",
"@jest/create-cache-key-function": "^29",
"@jest/reporters": "^29",
"@jest/test-result": "^29",
Expand All@@ -121,7 +122,6 @@
"jest-snapshot": "^29",
"jest-util": "^29",
"pretty-format": "^29",
"//": "Stub out unnecessary swc packages to improve install size and speed",
"@swc/core-android-arm-eabi": "npm:dummypkg-a@1.0.0",
"@swc/core-android-arm64": "npm:dummypkg-a@1.0.0",
"@swc/core-freebsd-x64": "npm:dummypkg-a@1.0.0",
Expand Down
1 change: 1 addition & 0 deletionspackages/ast-spec/src/ast-node-types.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -145,6 +145,7 @@ export enum AST_NODE_TYPES {
TSQualifiedName = 'TSQualifiedName',
TSReadonlyKeyword = 'TSReadonlyKeyword',
TSRestType = 'TSRestType',
TSSatisfiesExpression = 'TSSatisfiesExpression',
TSStaticKeyword = 'TSStaticKeyword',
TSStringKeyword = 'TSStringKeyword',
TSSymbolKeyword = 'TSSymbolKeyword',
Expand Down
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
[1,2,3] satisfies [1, 2, 3];
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures expression TSSatisfiesExpression array-array TSESTree - AST 1`] = `
Program {
type: "Program",
body: Array [
ExpressionStatement {
type: "ExpressionStatement",
expression: TSSatisfiesExpression {
type: "TSSatisfiesExpression",
expression: ArrayExpression {
type: "ArrayExpression",
elements: Array [
Literal {
type: "Literal",
raw: "1",
value: 1,

range: [1, 2],
loc: {
start: { column: 1, line: 1 },
end: { column: 2, line: 1 },
},
},
Literal {
type: "Literal",
raw: "2",
value: 2,

range: [3, 4],
loc: {
start: { column: 3, line: 1 },
end: { column: 4, line: 1 },
},
},
Literal {
type: "Literal",
raw: "3",
value: 3,

range: [5, 6],
loc: {
start: { column: 5, line: 1 },
end: { column: 6, line: 1 },
},
},
],

range: [0, 7],
loc: {
start: { column: 0, line: 1 },
end: { column: 7, line: 1 },
},
},
typeAnnotation: TSTupleType {
type: "TSTupleType",
elementTypes: Array [
TSLiteralType {
type: "TSLiteralType",
literal: Literal {
type: "Literal",
raw: "1",
value: 1,

range: [19, 20],
loc: {
start: { column: 19, line: 1 },
end: { column: 20, line: 1 },
},
},

range: [19, 20],
loc: {
start: { column: 19, line: 1 },
end: { column: 20, line: 1 },
},
},
TSLiteralType {
type: "TSLiteralType",
literal: Literal {
type: "Literal",
raw: "2",
value: 2,

range: [22, 23],
loc: {
start: { column: 22, line: 1 },
end: { column: 23, line: 1 },
},
},

range: [22, 23],
loc: {
start: { column: 22, line: 1 },
end: { column: 23, line: 1 },
},
},
TSLiteralType {
type: "TSLiteralType",
literal: Literal {
type: "Literal",
raw: "3",
value: 3,

range: [25, 26],
loc: {
start: { column: 25, line: 1 },
end: { column: 26, line: 1 },
},
},

range: [25, 26],
loc: {
start: { column: 25, line: 1 },
end: { column: 26, line: 1 },
},
},
],

range: [18, 27],
loc: {
start: { column: 18, line: 1 },
end: { column: 27, line: 1 },
},
},

range: [0, 27],
loc: {
start: { column: 0, line: 1 },
end: { column: 27, line: 1 },
},
},

range: [0, 28],
loc: {
start: { column: 0, line: 1 },
end: { column: 28, line: 1 },
},
},
],
sourceType: "script",

range: [0, 29],
loc: {
start: { column: 0, line: 1 },
end: { column: 0, line: 2 },
},
}
`;
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AST Fixtures expression TSSatisfiesExpression array-array TSESTree - Tokens 1`] = `
Array [
Punctuator {
type: "Punctuator",
value: "[",

range: [0, 1],
loc: {
start: { column: 0, line: 1 },
end: { column: 1, line: 1 },
},
},
Numeric {
type: "Numeric",
value: "1",

range: [1, 2],
loc: {
start: { column: 1, line: 1 },
end: { column: 2, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: ",",

range: [2, 3],
loc: {
start: { column: 2, line: 1 },
end: { column: 3, line: 1 },
},
},
Numeric {
type: "Numeric",
value: "2",

range: [3, 4],
loc: {
start: { column: 3, line: 1 },
end: { column: 4, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: ",",

range: [4, 5],
loc: {
start: { column: 4, line: 1 },
end: { column: 5, line: 1 },
},
},
Numeric {
type: "Numeric",
value: "3",

range: [5, 6],
loc: {
start: { column: 5, line: 1 },
end: { column: 6, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: "]",

range: [6, 7],
loc: {
start: { column: 6, line: 1 },
end: { column: 7, line: 1 },
},
},
Identifier {
type: "Identifier",
value: "satisfies",

range: [8, 17],
loc: {
start: { column: 8, line: 1 },
end: { column: 17, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: "[",

range: [18, 19],
loc: {
start: { column: 18, line: 1 },
end: { column: 19, line: 1 },
},
},
Numeric {
type: "Numeric",
value: "1",

range: [19, 20],
loc: {
start: { column: 19, line: 1 },
end: { column: 20, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: ",",

range: [20, 21],
loc: {
start: { column: 20, line: 1 },
end: { column: 21, line: 1 },
},
},
Numeric {
type: "Numeric",
value: "2",

range: [22, 23],
loc: {
start: { column: 22, line: 1 },
end: { column: 23, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: ",",

range: [23, 24],
loc: {
start: { column: 23, line: 1 },
end: { column: 24, line: 1 },
},
},
Numeric {
type: "Numeric",
value: "3",

range: [25, 26],
loc: {
start: { column: 25, line: 1 },
end: { column: 26, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: "]",

range: [26, 27],
loc: {
start: { column: 26, line: 1 },
end: { column: 27, line: 1 },
},
},
Punctuator {
type: "Punctuator",
value: ";",

range: [27, 28],
loc: {
start: { column: 27, line: 1 },
end: { column: 28, line: 1 },
},
},
]
`;
Loading

[8]ページ先頭

©2009-2025 Movatter.jp