UNPKG

14.8 kBMarkdownView Raw
1# 3.18.2 (2021-06-07)
2
3* Properly handle imports like `import {default as myFunc} from './myFunc';`
4 when importing from files that are not ES modules. ([#619]) (Patrik Oldsberg)
5* Fix bug where other transforms were not being applied to enum value
6 expressions, so enum declarations like `A = EnumInOtherFile.A` didn't work.
7 ([#621])
8
9# 3.18.1 (2021-04-12)
10
11* Fix regression causing incomplete nullish coalescing and optional chaining in
12 some cases. ([#610])
13
14# 3.18.0 (2021-04-11)
15
16* Add `jest` transform analogous to `babel-plugin-jest-hoist`. ([#540]) (Patrik Oldsberg)
17* When calling a `register` function or `addHook`, return a function that
18 reverts the hook. ([#604]) (Anthony Fu)
19
20# 3.17.1 (2021-01-31)
21
22* Fix bug where TS method overloads in a class would cause later class fields to
23 not be handled properly. ([#593])
24
25# 3.17.0 (2020-12-29)
26
27* Fix incorrect export removal when exporting a variable defined using a
28 destructure declaration. ([#564])
29* Add support for new type syntax in TypeScript 4.1: template interpolations in
30 string literal types and `as` to remap keys in mapped types. Also add parsing
31 for static blocks and pass them through in the output. ([#567])
32* Allow passing `pirates` options `matcher` and `ignoreNodeModules` when
33 directly calling `registerJS` and related functions. ([#571], [#573])
34 (Gordon Leigh)
35* Properly emit private class field declarations in the output code so that
36 private fields can be used when they're supported by the target JS engine.
37 ([#574])
38* Fix parse error when a method or field has the name `declare`. ([#575])
39
40# 3.16.0 (2020-10-12)
41
42* Add support for TypeScript 4.0 type syntax: labeled tuples, catch clause
43 `unknown`. ([#556]) (Patrik Oldsberg)
44
45# 3.15.0 (2020-05-18)
46
47* Add support for `declare` class fields in TypeScript. ([#537])
48
49# 3.14.1 (2020-05-17)
50
51* Add support for `export type {T} from './T';` type-only export syntax. ([#533]) (Patrik Oldsberg)
52
53# 3.14.0 (2020-05-10)
54
55* Add support for TypeScript 3.8 type-only imports and exports. ([#523], [#532])
56* Add a `--production` flag to the CLI. ([#529]) (Matthew Phillips)
57* Fix crash when using `+` or `-` in constructor parameter defaults. ([#531])
58
59# 3.13.0 (2020-03-28)
60
61* Properly escape file paths in the react-hot-loader transform. ([#512]) (Jan Zípek)
62* Fix nullish coalescing when the RHS is an object literal. ([#516])
63* Support reading CLI configuration from tsconfig.json. ([#509], [#519]) (Jake Verbaten)
64
65# 3.12.1 (2020-01-13)
66
67* Fix crash when parsing `asserts b` TypeScript return signatures. ([#504])
68
69# 3.12.0 (2020-01-01)
70
71* Add support for TypeScript assertion signature syntax, other parser
72 improvements. ([#485], [#487])
73* Implement optional chaining and nullish coalescing.
74 ([#488], [#490], [#492], [#496], [#497], [#498],
75 [tech plan](https://github.com/alangpierce/sucrase/wiki/Sucrase-Optional-Chaining-and-Nullish-Coalescing-Technical-Plan))
76
77# 3.11.0 (2019-12-22)
78
79* Add runtime validation for options. ([#468])
80* Allow `.tsx` and `.jsx` options when running `sucrase` from the command line. ([#448]) (Ricardo Tomasi, Alexander Mextner)
81* Fix bug where generator markers in methods were removed. ([#463]) (Bjørn Tore Håvie)
82
83# 3.10.1 (2019-03-31)
84
85* Fix parsing of `a<b>c` in TypeScript. ([#438])
86* Add support for new TypeScript 3.4 syntax, other parser improvements. ([#439], [#440])
87* Elide TS `import =` statements that are only used as a type. ([#441])
88* Properly handle async arrow functions with multiline type parameters. ([#443])
89
90# 3.10.0 (2019-03-11)
91
92* Fix bug where `/*/` was being parsed incorrectly. ([#430])
93* Properly parse and compile JSX spread children. ([#431])
94* Implement TypeScript export elision for exported types. ([#433])
95
96# 3.9.6 (2019-03-01)
97
98* Fix Flow bug where `implements` caused the class name to be incorrectly recognized. ([#409])
99* Correctly handle `!:` in TS variable declarations. ([#410])
100* Move more import code into helper functions in prep for some upcoming changes.
101* Fix bug where some JSX component names were incorrectly turned into strings. ([#425]) (Yang Zhang)
102
103# 3.9.5 (2019-01-13)
104
105* Fix bug when processing a declaration that looks like an export assignment. ([#402])
106* Fix TS import elision for JSX fragments and custom pragmas. ([#403])
107* Treat reserved words as invalid identifiers when handling enums. ([#405])
108
109# 3.9.4 (2019-01-07)
110
111* Avoid false positive when detecting if a class has a superclass. ([#399])
112
113# 3.9.3 (2019-01-06)
114
115* Fix syntax error on arrow functions with multiline return types. ([#393])
116
117# 3.9.2 (2019-01-02)
118
119* Fix crash on optional arrow function params without type annotations. ([#389])
120* Usability bug fixes for website. ([#390])
121
122# 3.9.1 (2018-12-31)
123
124* Fix react-hot-loader transform syntax error with some export styles. ([#384])
125* Fix website to properly show react-hot-loader Babel transform output. ([#386])
126
127# 3.9.0 (2018-12-30)
128
129* Add a react-hot-loader transform. ([#376])
130* Add support for dynamic `import()` syntax in TS types. ([#380])
131* Many improvements to the website, including faster initial pageloads.
132* Small performance improvements.
133
134# 3.8.1 (2018-12-03)
135
136* Fix infinite loop when a file ends with a short identifier ([#363])
137* Small perf improvements.
138
139# 3.8.0 (2018-11-25)
140
141* Various simplifications in prep for compiling the project with AssemblyScript.
142* Performance improvements, varying from 10% to 70% better performance depending
143 on use case.
144* Fix infinite loop in flow `declare module` parsing ([#359])
145
146# 3.7.1 (2018-11-18)
147
148* Fix crash on empty export expressions ([#338])
149* Fix crash on TypeScript `declare global` ([#339])
150* Fix crash when using overloaded constructors in TypeScript ([#340])
151* Fix TypeScript import elision when imported names are shadowed by variables
152 ([#342])
153* Fix import name transform to work in code without semicolons ([#337])
154 (Alec Larson)
155
156# 3.7.0 (2018-11-11)
157
158* Fix perf regression in TypeScript parsing ([#327])
159* Fix broken line numbers in syntax errors, improve parser backtracking
160 performance ([#331])
161* Add Parser features and bugfixes from the Babel parser, including TypeScript
162 3.0 support ([#333])
163
164# 3.6.0 (2018-10-29)
165
166* Add CLI support for jsx pragmas ([#321]) (Josiah Savary)
167* Allow super.method() calls in constructor ([#324]) (Erik Arvidsson)
168
169# 3.5.0 (2018-09-30)
170
171* Change class field implementation to use initializer methods ([#313])
172* Update TypeScript and Flow support to include new language features recently
173 supported by Babel. ([#314], [#315], [#316])
174* Properly handle function name inference in named exports ([#317])
175
176# 3.4.2 (2018-08-27)
177
178* Implement destructuring in export declarations ([#305])
179* Properly handle function name inference in named exports ([#308])
180
181# 3.4.1 (2018-07-06)
182
183* Quote shorthand prop keys that contain a hyphen ([#292]) (Kevin Gao)
184* Fix infinite loop on incomplete JSX. ([#296])
185
186# 3.4.0 (2018-07-01)
187
188* Add a sucrase-node CLI that wraps node. ([#288])
189* Allow exported generator functions. ([#290])
190
191# 3.3.0 (2018-06-28)
192
193* Add a --out-extension option to the CLI. ([#282])
194* Add a -q/--quiet option in the CLI and use it in the build script. ([#284])
195* Don't emit semicolons in class bodies. ([#285])
196* Fix ugly emitted comments when removing code between tokens. ([#286])
197
198# 3.2.1 (2018-06-27)
199
200* Allow TS type parameters on object member methods. ([#276])
201* Simplify identity source map generator. ([#265])
202* Fix crash on destructured params in arrow function types. ([#278])
203* Remove @flow directives from comments when the flow transform is enabled.
204 ([#279])
205
206# 3.2.0 (2018-06-25)
207
208* Fix crash when using JSX elements as props. ([#268]) (Erik Arvidsson)
209* Fix incorrect compilation of TypeScript optional class properties with an
210 initializer. ([#264])
211* Fix crash on class fields that don't end in a semicolon. ([#271])
212* Allow trailing commas after rest elements. ([#272])
213* Don't crash on class bodies with an index signature. ([#273])
214* Allow member expression identifiers when determining React displayName.
215 ([#274])
216* Add production option and use it for JSX. ([#270]) (Erik Arvidsson)
217* Fix off-by-one error in parsing JSX fragments. ([#275])
218
219# 3.1.0 (2018-06-18)
220
221* Add basic support for source maps ([#257], [#261])
222
223# 3.0.1 (2018-06-11)
224
225* Fix crash in `getVersion`.
226
227# 3.0.0 (2018-06-10)
228
229### Breaking Changes
230
231* `transform` now returns an object ([#244]). You now should write
232 `transform(...).code` instead of just `transform(...)`. `code` is the only
233 property for now, but this allows Sucrase to return source maps and possibly
234 other values.
235* The package's `dist` folder has been restructured, so direct internal module
236 imports may break.
237
238### Other changes
239
240* Overhaul build system to use Sucrase for everything ([#243])
241* Omit import helpers when unused ([#237]) (Alec Larson)
242* Fix files accidentally included in final package ([#233])
243* Various refactors and performance improvements.
244
245# 2.2.0 (2018-05-19)
246
247* Add support for JSX fragment syntax.
248* Add support for custom JSX pragmas rather than defaulting to
249 `React.createElement` and `React.Fragment`.
250
251[#233]: https://github.com/alangpierce/sucrase/pull/233
252[#237]: https://github.com/alangpierce/sucrase/pull/237
253[#243]: https://github.com/alangpierce/sucrase/pull/243
254[#244]: https://github.com/alangpierce/sucrase/pull/244
255[#257]: https://github.com/alangpierce/sucrase/pull/257
256[#261]: https://github.com/alangpierce/sucrase/pull/261
257[#264]: https://github.com/alangpierce/sucrase/pull/264
258[#265]: https://github.com/alangpierce/sucrase/pull/265
259[#268]: https://github.com/alangpierce/sucrase/pull/268
260[#270]: https://github.com/alangpierce/sucrase/pull/270
261[#271]: https://github.com/alangpierce/sucrase/pull/271
262[#272]: https://github.com/alangpierce/sucrase/pull/272
263[#273]: https://github.com/alangpierce/sucrase/pull/273
264[#274]: https://github.com/alangpierce/sucrase/pull/274
265[#275]: https://github.com/alangpierce/sucrase/pull/275
266[#276]: https://github.com/alangpierce/sucrase/pull/276
267[#278]: https://github.com/alangpierce/sucrase/pull/278
268[#279]: https://github.com/alangpierce/sucrase/pull/279
269[#282]: https://github.com/alangpierce/sucrase/pull/282
270[#284]: https://github.com/alangpierce/sucrase/pull/284
271[#285]: https://github.com/alangpierce/sucrase/pull/285
272[#286]: https://github.com/alangpierce/sucrase/pull/286
273[#288]: https://github.com/alangpierce/sucrase/pull/288
274[#290]: https://github.com/alangpierce/sucrase/pull/290
275[#292]: https://github.com/alangpierce/sucrase/pull/292
276[#296]: https://github.com/alangpierce/sucrase/pull/296
277[#305]: https://github.com/alangpierce/sucrase/pull/305
278[#308]: https://github.com/alangpierce/sucrase/pull/308
279[#313]: https://github.com/alangpierce/sucrase/pull/313
280[#314]: https://github.com/alangpierce/sucrase/pull/314
281[#315]: https://github.com/alangpierce/sucrase/pull/315
282[#316]: https://github.com/alangpierce/sucrase/pull/316
283[#317]: https://github.com/alangpierce/sucrase/pull/317
284[#321]: https://github.com/alangpierce/sucrase/pull/321
285[#324]: https://github.com/alangpierce/sucrase/pull/324
286[#327]: https://github.com/alangpierce/sucrase/pull/327
287[#331]: https://github.com/alangpierce/sucrase/pull/331
288[#333]: https://github.com/alangpierce/sucrase/pull/333
289[#337]: https://github.com/alangpierce/sucrase/pull/337
290[#338]: https://github.com/alangpierce/sucrase/pull/338
291[#339]: https://github.com/alangpierce/sucrase/pull/339
292[#340]: https://github.com/alangpierce/sucrase/pull/340
293[#342]: https://github.com/alangpierce/sucrase/pull/342
294[#359]: https://github.com/alangpierce/sucrase/pull/359
295[#363]: https://github.com/alangpierce/sucrase/pull/363
296[#376]: https://github.com/alangpierce/sucrase/pull/376
297[#380]: https://github.com/alangpierce/sucrase/pull/380
298[#384]: https://github.com/alangpierce/sucrase/pull/384
299[#386]: https://github.com/alangpierce/sucrase/pull/386
300[#389]: https://github.com/alangpierce/sucrase/pull/389
301[#390]: https://github.com/alangpierce/sucrase/pull/390
302[#393]: https://github.com/alangpierce/sucrase/pull/393
303[#399]: https://github.com/alangpierce/sucrase/pull/399
304[#402]: https://github.com/alangpierce/sucrase/pull/402
305[#403]: https://github.com/alangpierce/sucrase/pull/403
306[#405]: https://github.com/alangpierce/sucrase/pull/405
307[#409]: https://github.com/alangpierce/sucrase/pull/409
308[#410]: https://github.com/alangpierce/sucrase/pull/410
309[#425]: https://github.com/alangpierce/sucrase/pull/425
310[#430]: https://github.com/alangpierce/sucrase/pull/430
311[#431]: https://github.com/alangpierce/sucrase/pull/431
312[#433]: https://github.com/alangpierce/sucrase/pull/433
313[#438]: https://github.com/alangpierce/sucrase/pull/438
314[#439]: https://github.com/alangpierce/sucrase/pull/439
315[#440]: https://github.com/alangpierce/sucrase/pull/440
316[#441]: https://github.com/alangpierce/sucrase/pull/441
317[#443]: https://github.com/alangpierce/sucrase/pull/443
318[#448]: https://github.com/alangpierce/sucrase/pull/448
319[#463]: https://github.com/alangpierce/sucrase/pull/463
320[#468]: https://github.com/alangpierce/sucrase/pull/468
321[#485]: https://github.com/alangpierce/sucrase/pull/485
322[#487]: https://github.com/alangpierce/sucrase/pull/487
323[#488]: https://github.com/alangpierce/sucrase/pull/488
324[#490]: https://github.com/alangpierce/sucrase/pull/490
325[#492]: https://github.com/alangpierce/sucrase/pull/492
326[#496]: https://github.com/alangpierce/sucrase/pull/496
327[#497]: https://github.com/alangpierce/sucrase/pull/497
328[#498]: https://github.com/alangpierce/sucrase/pull/498
329[#504]: https://github.com/alangpierce/sucrase/pull/504
330[#509]: https://github.com/alangpierce/sucrase/pull/509
331[#512]: https://github.com/alangpierce/sucrase/pull/512
332[#516]: https://github.com/alangpierce/sucrase/pull/516
333[#519]: https://github.com/alangpierce/sucrase/pull/519
334[#523]: https://github.com/alangpierce/sucrase/pull/523
335[#529]: https://github.com/alangpierce/sucrase/pull/529
336[#531]: https://github.com/alangpierce/sucrase/pull/531
337[#532]: https://github.com/alangpierce/sucrase/pull/532
338[#533]: https://github.com/alangpierce/sucrase/pull/533
339[#537]: https://github.com/alangpierce/sucrase/pull/537
340[#556]: https://github.com/alangpierce/sucrase/pull/556
341[#564]: https://github.com/alangpierce/sucrase/pull/564
342[#567]: https://github.com/alangpierce/sucrase/pull/567
343[#571]: https://github.com/alangpierce/sucrase/pull/571
344[#573]: https://github.com/alangpierce/sucrase/pull/573
345[#574]: https://github.com/alangpierce/sucrase/pull/574
346[#575]: https://github.com/alangpierce/sucrase/pull/575
347[#593]: https://github.com/alangpierce/sucrase/pull/593
348[#540]: https://github.com/alangpierce/sucrase/pull/540
349[#604]: https://github.com/alangpierce/sucrase/pull/604
350[#610]: https://github.com/alangpierce/sucrase/pull/610
351[#619]: https://github.com/alangpierce/sucrase/pull/619
352[#621]: https://github.com/alangpierce/sucrase/pull/621