Skip to content

Commit eabfe28

Browse files
committed
Add missing tests and messages.
1 parent 298bd2d commit eabfe28

File tree

4 files changed

+218
-1
lines changed

4 files changed

+218
-1
lines changed

messages.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"install": "messages/install.md",
33
"2.0.0": "messages/2.0.0.md",
44
"4.0.0": "messages/4.0.0.md",
5-
"4.1.0": "messages/4.1.0.md"
5+
"4.1.0": "messages/4.1.0.md",
6+
"4.2.1": "messages/4.2.1.md"
67
}

messages/4.2.1.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
v4.2.0 (2021-10-29)
2+
-------------------
3+
4+
- Implement arrow function type parameters in TypeScript and Flow (#29, #125).
5+
- Add a new command, “JS Custom — Report Syntax Issue With Current File”, to pre-fill a GitHub issue template.
6+
- Add a new option, “first_line_match”.
7+
- If a configuration specifies a nonexistent top-level option, then raise an error when building the syntax.
8+
9+
## Upstream changes
10+
11+
- Implement `static` blocks. (https://github.com/sublimehq/Packages/pull/2954)
12+
- Correctly scope methods that are template tags. (https://github.com/sublimehq/Packages/pull/2998)
13+
- Give an extra `native` scope to lowercase JSX/TSX tags. (https://github.com/sublimehq/Packages/pull/3000)
14+
- Implement TypeScript arrow function type parameters. (https://github.com/sublimehq/Packages/pull/2923, https://github.com/sublimehq/Packages/pull/2994)
15+
- Improvements to TypeScript exports/declarations. (https://github.com/sublimehq/Packages/pull/3061, https://github.com/sublimehq/Packages/pull/3068, https://github.com/sublimehq/Packages/pull/3085)
16+
- Implement quotes member names in object types. (https://github.com/sublimehq/Packages/pull/3022)
17+
- Implement triple-slash directives in TypeScript. (https://github.com/sublimehq/Packages/pull/3018)
18+
- Fix a TypeScript bug with generic array types. (https://github.com/sublimehq/Packages/pull/3063)
19+
- Fix a TypeScript bug with function types. (https://github.com/sublimehq/Packages/pull/3062)
20+
- Fix a TSX corner case for the ternary operator. (https://github.com/sublimehq/Packages/pull/2930)
21+
- Optimize a regexp. (https://github.com/sublimehq/Packages/pull/3071)
22+
- Fix some test compatibility issues. (https://github.com/sublimehq/Packages/pull/2987, https://github.com/sublimehq/Packages/pull/3104, https://github.com/sublimehq/Packages/pull/3106)
23+
24+
## Internal changes
25+
26+
- The core TSX extension now has code of its own, so JS Custom will load it if a configuration specifies both `jsx` and `typescript`.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// SYNTAX TEST "Packages/JavaScript/JavaScript.sublime-syntax"
2+
3+
/// <foo bar="baz"/>
4+
// <- comment.line.triple-slash.js punctuation.definition.comment.js
5+
//^^^^^^^^^^^^^^^^^^^ comment.line.triple-slash.js - meta.preprocessor
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
// SYNTAX TEST "Packages/JavaScript/TypeScript.sublime-syntax"
2+
3+
export as namespace O;
4+
// ^^^^^^^^^^^^^^^^^^^^^ meta.export
5+
// ^^^^^^ keyword.control.import-export
6+
// ^^ storage.modifier
7+
// ^^^^^^^^^ keyword.declaration
8+
// ^ entity.name.namespace
9+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
10+
11+
export const x: any;
12+
// ^^^^^^^^^^^^^^^^^^^^ meta.export
13+
// ^^^^^^ keyword.control.import-export
14+
// ^^^^^ keyword.declaration
15+
// ^ meta.binding.name variable.other.readwrite
16+
// ^ punctuation.separator.type
17+
// ^^^ meta.type support.type.any
18+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
19+
20+
export let y: any;
21+
// ^^^^^^^^^^^^^^^^^^ meta.export
22+
// ^^^^^^ keyword.control.import-export
23+
// ^^^ keyword.declaration
24+
// ^ meta.binding.name variable.other.readwrite
25+
// ^ punctuation.separator.type
26+
// ^^^ meta.type support.type.any
27+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
28+
29+
export var z: any;
30+
// ^^^^^^^^^^^^^^^^^^ meta.export
31+
// ^^^^^^ keyword.control.import-export
32+
// ^^^ keyword.declaration
33+
// ^ meta.binding.name variable.other.readwrite
34+
// ^ punctuation.separator.type
35+
// ^^^ meta.type support.type.any
36+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
37+
38+
export function f(x: any): any;
39+
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.export
40+
// ^^^^^^ keyword.control.import-export
41+
// ^^^^^^^^^^^^^^^^^^^^^^^ meta.function
42+
// ^^^^^^^^ keyword.declaration.function
43+
// ^ entity.name.function
44+
// ^^^^^^^^ meta.function.parameters
45+
// ^ punctuation.section.group.begin
46+
// ^ meta.binding.name variable.parameter.function
47+
// ^ punctuation.separator.type
48+
// ^^^ meta.type support.type.any
49+
// ^ punctuation.section.group.end
50+
// ^ punctuation.separator.type
51+
// ^^^ meta.type support.type.any
52+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
53+
54+
export class C {
55+
// ^^^^^^^^^^^^^^^^ meta.export
56+
// ^^^^^^ keyword.control.import-export
57+
// ^^^^^^^^^ meta.class
58+
// ^^^^^ keyword.declaration.class
59+
// ^ entity.name.class
60+
// ^ meta.block punctuation.section.block.begin
61+
62+
x: any;
63+
// ^ variable.other.readwrite
64+
// ^ punctuation.separator.type
65+
// ^^^^ meta.type
66+
// ^^^ support.type.any
67+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
68+
69+
f(x: any): any;
70+
// ^^^^^^^^^^^^^^ meta.function
71+
// ^ entity.name.function
72+
// ^^^^^^^^ meta.function.parameters
73+
// ^ punctuation.section.group.begin
74+
// ^ meta.binding.name
75+
// ^ variable.parameter.function
76+
// ^ punctuation.separator.type
77+
// ^^^^ meta.type
78+
// ^^^ support.type.any
79+
// ^ punctuation.section.group.end
80+
// ^ punctuation.separator.type
81+
// ^^^^ meta.type
82+
// ^^^ support.type.any
83+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
84+
}
85+
// ^ punctuation.section.block.end
86+
87+
export interface I {}
88+
// ^^^^^^^^^^^^^^^^^^^^^ meta.export
89+
// ^^^^^^ keyword.control.import-export
90+
// ^^^^^^^^^^^^^^ meta.interface
91+
// ^^^^^^^^^ keyword.declaration
92+
// ^ entity.name.interface
93+
// ^^ meta.block
94+
// ^ punctuation.section.block.begin
95+
// ^ punctuation.section.block.end
96+
97+
98+
export namespace N {
99+
// ^^^^^^^^^^^^^^^^^^^^ meta.export
100+
// ^^^^^^ keyword.control.import-export
101+
// ^^^^^^^^^^^^^ meta.namespace
102+
// ^^^^^^^^^ keyword.declaration
103+
// ^ entity.name.namespace
104+
// ^ meta.block punctuation.section.block.begin
105+
106+
const x: any;
107+
// ^^^^^ keyword.declaration
108+
// ^ meta.binding.name
109+
// ^ variable.other.readwrite
110+
// ^ punctuation.separator.type
111+
// ^^^^ meta.type
112+
// ^^^ support.type.any
113+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
114+
115+
}
116+
// ^ punctuation.section.block.end
117+
118+
declare const a: any;
119+
// ^^^^^^^ storage.modifier
120+
// ^^^^^ keyword.declaration
121+
// ^ meta.binding.name variable.other.readwrite
122+
// ^ punctuation.separator.type
123+
// ^^^^ meta.type
124+
// ^^^ support.type.any
125+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
126+
127+
declare let b: any;
128+
// ^^^^^^^ storage.modifier
129+
// ^^^ keyword.declaration
130+
// ^ meta.binding.name variable.other.readwrite
131+
// ^ punctuation.separator.type
132+
// ^^^^ meta.type
133+
// ^^^ support.type.any
134+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
135+
136+
declare var c: any;
137+
// ^^^^^^^ storage.modifier
138+
// ^^^ keyword.declaration
139+
// ^ meta.binding.name variable.other.readwrite
140+
// ^ punctuation.separator.type
141+
// ^^^^ meta.type
142+
// ^^^ support.type.any
143+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
144+
145+
declare function g(x: any): any;
146+
// ^^^^^^^ storage.modifier
147+
// ^^^^^^^^^^^^^^^^^^^^^^^ meta.function
148+
// ^^^^^^^^ keyword.declaration.function
149+
// ^ entity.name.function
150+
// ^^^^^^^^ meta.function.parameters
151+
// ^ punctuation.section.group.begin
152+
// ^ meta.binding.name variable.parameter.function
153+
// ^ punctuation.separator.type
154+
// ^^^^ meta.type
155+
// ^^^ support.type.any
156+
// ^ punctuation.section.group.end
157+
// ^ punctuation.separator.type
158+
// ^^^^ meta.type
159+
// ^^^ support.type.any
160+
// ^ punctuation.terminator.statement - punctuation.terminator.statement.empty
161+
162+
declare class D {}
163+
// ^^^^^^^ storage.modifier
164+
// ^^^^^^^^^^ meta.class
165+
// ^^^^^ keyword.declaration.class
166+
// ^ entity.name.class
167+
// ^^ meta.block
168+
// ^ punctuation.section.block.begin
169+
// ^ punctuation.section.block.end
170+
171+
declare namespace M {}
172+
// ^^^^^^^ storage.modifier
173+
// ^^^^^^^^^^^^^^ meta.namespace
174+
// ^^^^^^^^^ keyword.declaration
175+
// ^ entity.name.namespace
176+
// ^^ meta.block
177+
// ^ punctuation.section.block.begin
178+
// ^ punctuation.section.block.end
179+
180+
declare module 'module' {}
181+
// ^^^^^^^ storage.modifier
182+
// ^^^^^^^^^^^^^^^^^^ meta.module
183+
// ^^^^^^ keyword.declaration.module
184+
// ^^^^^^^^ meta.string string.quoted.single
185+
// ^^ meta.block

0 commit comments

Comments
 (0)