UNPKG

33 kBMarkdownView Raw
1# 6to5 Changelog
2
3## 3.6.6
4
5 * **Internal**
6 * Upgrade `core-js`.
7 * **Bug Fix**
8 * Fix temp variables not being properly pushed inside of `while` loops.
9 * **New Feature**
10 * Add `auxiliaryComment`/`--auxiliary-comment` option that prepends comments to auxiliary helpers.
11
12## 3.6.5
13
14 * **Internal**
15 * Upgrade `core-js`.
16 * **Bug Fix**
17 * Fix block scoping leaking variables in IIFE mode.
18 * Fix tail call transformer exploding on return statements as the consequent of an if statement.
19 * **New Feature**
20 * Add `validation.react` transformer.
21
22## 3.6.4
23
24 * **New Feature**
25 * Add support for flow type casts and module types.
26
27## 3.6.3
28
29 * **Internal**
30 * Upgrade `acorn-6to5`.
31 * Use `default` property on `6to5-runtime`.
32
33## 3.6.2
34
35 * **Polish**
36 * Use better iterator detection in `slicedToArray` helper and add support for it to the `selfContained` transformer.
37
38## 3.6.1
39
40 * **Bug Fix**
41 * Multiline JSX string literals are now supported.
42 * Fix scope tracking import specifiers incorrectly.
43 * Fix templates incorrectly recursing into their replacements.
44 * **Internal**
45 * Type inferrence now extends to function return types.
46 * Upgrade `acorn-6to5`.
47
48## 3.6.0
49
50 * **New Feature**
51 * Add playground class property initializers.
52 * **Polish**
53 * Completely reimplemented scope tracking, can now track types and optimise certain helpers based on it.
54 * Extremely fast tail recursion optimisation implementation. Thanks [@RReverser](https://github.com/RReverser)!
55 * **Internal**
56 * `kexec` has been removed as an optional dependency and must be user installed.
57 * Upgrade `regenerator-6to5`.
58 * Upgrade `acorn-6to5`.
59 * Upgrade `core-js`.
60
61## 3.5.3
62
63 * Enable `es6.tailCall` transformer with the first implementation that only works with self referencing calls until we can implement nested tail calls elegantly.
64
65## 3.5.2
66
67 * Disable `es6.tailCall` temporairly after reports of it breaking.
68
69## 3.5.1
70
71 * **Polish**
72 * Allow tail calls to work across files without the runtime.
73 * **Internal**
74 * Upgrade `acorn-6to5`.
75
76## 3.5.0
77
78 * **Bug Fix**
79 * Destructuring patterns as the left operator in `ForInStatement`/`ForOfStatement`.
80 * **Polish**
81 * Make default parameter IIFE invocation smarter.
82 * Make `__esModule` flag non-enumerable. Thanks [@daliwali](https://github.com/daliwali)!
83 * **Internal**
84 * More performance improvements.
85 * Parsing is now ~30% faster thanks to [marijnh/acorn@7264bc0178e7e6af7cfe02e9e0c6b26ee0e6007f](https://github.com/marijnh/acorn/commit/7264bc0178e7e6af7cfe02e9e0c6b26ee0e6007f).
86 * **New Feature**
87 * Optional `es6.blockScopingTDZ` is now completely functional and handles all edgecases.
88 * `super` in object literals.
89 * Tail call optimisation. Thanks [@RReverser](https://github.com/RReverser)!
90
91## 3.4.1
92
93 * **Bug Fix**
94 * Fix conflicting `--module-ids` shorthand arg in `$ 6to5`.
95 * Add require hook options to cache key.
96 * Fix strict module formatter.
97
98## 3.4.0
99
100 * **New Feature**
101 * Add `commonStandard` module formatter.
102 * **Bug Fix**
103 * Fix conflicting `--module-ids` shorthand arg in `$ 6to5`.
104 * **Internal**
105 * Lots of internal refactoring with scope tracking and traversal.
106 * **Polish**
107 * Don't return `map` in the API result if `sourceMap` was set to `"inline"`.
108
109## 3.3.12
110
111 * **Bug Fix**
112 * Don't override `MemberExpression`s with `core-js` in `selfContained` if a local binding exists.
113
114## 3.3.11
115
116 * **Bug Fix**
117 * Fix the require cache.
118
119## 3.3.10
120
121 * **Internal**
122 * Restructure transformers so they're only ran if the AST contains nodes that they need to worry about. Improves transpilation speed significantly.
123 * **Bug Fix**
124 * Fix source maps not tracking end of node locations.
125 * **Spec Compliancy**
126 * Use static super references as the home object is actually done at definition time.
127 * **Polish**
128 * Force the `es6.destructuring` transformer to be whitelisted when the `es7.objectSpread` transformer is.
129 * Join sibling string literals when creating JSX.
130
131## 3.3.9
132
133 * **Bug Fix**
134 * Fix super inside of functions.
135 * Fix super constructor inheritance.
136
137## 3.3.7
138
139 * **Bug Fix**
140 * Add `--use-strict` to valid node flags in `6to5-node`.
141 * Fix booleans not being properly stripped from the arguments in `6to5-node`.
142 * Force `.js` extension when writing files to directories with `6to5`.
143
144## 3.3.5
145
146 * **Bug Fix**
147 * Fix block scoping inside of while loops.
148 * Make module name regex more conservative. Thanks [@johlrich](https://github.com/johlrich)!
149 * Fix block scoping of constants.
150 * Fix istanbul interop.
151 * Make JSX transforming more inline with the official transformer with spaces after non-empty last lines.
152 * **Polish**
153 * Make it illegal to export a property called `__esModule`.
154
155## 3.3.4
156
157 * **Polish**
158 * Add istanbul `require` interop.
159 * **Bug Fix**
160 * Fix incorrect source map column tracking in specific scenarios.
161
162## 3.3.3
163
164 * **Polish**
165 * Remap top level `this` to `undefined` instead of throwing an error.
166 * **Bug Fix**
167 * Run `selfContained` transformer over the regenerator runtime when building `6to5-runtime`.
168 * Fix `t.isReferenced` not properly allowing `value` nodes.
169
170## 3.3.1
171
172 * **Bug Fix**
173 * Block hoist assignment pattern destructuring.
174
175## 3.3.0
176
177 * **Bug Fix**
178 * Do all transforms before the regenerator transform is ran.
179 * **New Feature**
180 * Added back the 2.x optional runtime.
181
182## 3.2.1
183
184 * **Bug Fix**
185 * Fix block scoping transformer rewriting breaks and continues to inner labels.
186
187## 3.2.0
188
189 * **Bug Fix**
190 * Fixed scope tracking for default parameters IIFE.
191 * Fixed block scoped functions.
192 * Improved `bin/6to5` path resolution.
193 * **New Feature**
194 * You can now trigger super setters in classes. Thanks [@kruppel](https://github.com/kruppel)!
195 * Add `resolveSourceMap` option.
196 * Better support and output for block scoping loops with labels.
197
198## 3.1.1
199
200 * **Polish**
201 * Drop `enumerable: false` clause from class method definitions as `enumerable` already defaults to `false`.
202 * **Bug Fix**
203 * Properly transform `XJSIdentifier` nodes referencing `this` into a `ThisExpression`.
204
205## 3.1.0
206
207 * **Breaking Change**
208 * [Make class methods unenumerable](https://esdiscuss.org/topic/classes-and-enumerability#content-61).
209
210## 3.0.16
211
212 * **Bug Fix**
213 * Don't ignore dynamic import specifiers.
214 * **Internal**
215 * Upgrade `regenerator-6to5`.
216 * **Polish**
217 * Use `Object.assign` in place of extends helper if it exists.
218 * Require individual `lodash` methods. Thanks [@stefanpenner](https://github.com/stefanpenner)!
219
220## 3.0.15
221
222 * **Bug Fix**
223 * Use `debug/node` instead of `debug` to avoid browserify using the browser version that references `window`.
224
225## 3.0.14
226
227 * **New Feature**
228 * Add `--optional` argument to `6to5-node`.
229 * **Bug Fix**
230 * Fix bug in `asyncToGenerator` helper where it was incorrectly calling generator iterator functions.
231
232## 3.0.13
233
234 * **Bug Fix**
235 * Fix modules loose mode using `modules` instead of `es6.modules`.
236
237## 3.0.12
238
239 * **Internal**
240 * Add internal debug messages.
241 * **Bug Fix**
242 * Add `noScope` option to `traverse.clearProperties`.
243
244## 3.0.11
245
246 * **Bug Fix**
247 * Fix `ast-types` `RestElement` definition.
248 * Make `es6.forOf` loose mode more versatile and support destructuring.
249
250## 3.0.10
251
252 * **Bug Fix**
253 * In `types.getIds` make sure the `declaration` inside of `ExportDeclaration` is actually a `Declaration`.
254
255## 3.0.9
256
257 * **Bug Fix**
258 * Make `t.isReferenced` more powerful, actually take into consideration all contexts were identifier nodes aren't actually references.
259 * Don't camelcase underscores when converting a string to a valid identifier.
260
261## 3.0.8
262
263 * **Bug Fix**
264 * Split up default function declaration exports due to regenerator destroying the parent export declaration.
265
266## 3.0.7
267
268 * **Internal**
269 * Upgrade `core-js` to `0.4.9`.
270 * **Bug Fix**
271 * Add id to function express scope tracking.
272
273## 3.0.6
274
275 * **Bug Fix**
276 * Fix block scope variable tracking stopping whenever it hits a new scope.
277 * Fix block scope variable tracking breaking on all block statement scopes that have a for loop parent.
278
279## 3.0.5
280
281 * **Internal**
282 * More reliable default parameter scope.
283
284## 3.0.4
285
286 * **Bug Fix**
287 * Remove traversal stops from block scope tracking.
288
289## 3.0.3
290
291 * **Internal**
292 * Ignore options starting with `_`.
293
294## 3.0.2
295
296 * **Internal**
297 * Add common plugin options to valid options list.
298
299## 3.0.1
300
301 * **Internal**
302 * Downgrade `kexec` as `1.1.0` throws compilation errors.
303
304## 3.0.0
305
306 * **Polish**
307 * Generated code autoindentation.
308 * Moved global uid registry to a scope registry resulting in nicer uids.
309 * `this` is now illegal in the top level scope when using the default `useStrict` transformer.
310 * New `asyncToGenerator` helper that's much more compact.
311 * Throw errors on unknown options.
312 * More reliable default parameter scope.
313 * Helpers are now compact and have no newlines.
314 * **Internal**
315 * Rewritten a lot of the internals to much simpler.
316 * Removed TDZ from default parameters as it was very wonky and unreliable.
317 * Upgrade `core-js` to `0.4.6`.
318 * Upgrade `acorn-6to5`.
319 * JSX support is now on-par with react-tools/esprima.
320 * Shorthand destructuring.
321 * **Bug Fix**
322 * Generators now work flawlessly with any parameter transformers.
323 * Optional async function transformers should not name their functions.
324 * Remove `unlink` event watching in `bin/6to5`.
325 * Fix regenerator variable declarations being incorrectly hoisted breaking scope.
326 * Transformers that attempted to simplify expressions that had no consequence now take into account whether it's one of the last statements/expressions in the script.
327 * **New Feature**
328 * New `selfContained` transformer.
329 * New `undeclaredVariableCheck` optional transformer.
330 * Added `--blacklist` and `--whitelist` options to `6to5-node`.
331 * **Breaking Change**
332 * Caching is now always enabled for the require hook. It also now no longer caches require resolutions.
333 * Bare `super();` only works inside of constructors.
334 * Removed the optional runtime in favor of the `selfContained` transformer.
335 * This shorthand has been removed from the playground.
336 * `6to5/polyfill` can now only be required **once**.
337 * **CLI**
338 * `--indent` option has been removed.
339 * `--include-regenerator` option has been removed.
340 * `--amd-modules-id` option has been removed, use `--module-ids` instead.
341 * **Options**
342 * `amdModuleIds` option has been removed, use `moduleIds` instead.
343 * `includeRegenerator` has been removed.
344 * `ignoreRegex` fallback has now been dropped from the require hook. `register(/foo/);`, `register({ ignoreRegex: /foo/ })` -> `register({ ignore: /foo/ })`.
345 * **Modules**
346 * Module interop now only collapses to `module.exports` when there's a **single** export that's default.
347 * Imports and exports are now illegal anywhere except the root level by default. Set `modules` to [loose mode](http://6to5.org/docs/usage/loose) to allow them everywhere.
348 * **Transformers**
349 * Optional fast transformer backwards compatibility support has been removed. Use [loose mode](https://6to5.org/docs/usage/loose).
350 * Removed the `coreAliasing` transformer in favor of `selfContained`.
351 * Renamed transformers:
352 * `specNoForInOfAssignment` -> `validation.noForInOfAssignment`
353 * `specSetters` -> `validation.setters`
354 * `specBlockScopedFunctions` -> `spec.blockScopedFunctions`
355 * `malletOperator` -> `playground.malletOperator`
356 * `methodBinding` -> `playground.methodBinding`
357 * `memoizationOperator` -> `playground.memoizationOperator`
358 * `objectGetterMemoization` -> `playground.objectGetterMemoization`
359 * `modules` -> `es6.modules`
360 * `propertyNameShorthand` -> `es6.properties.shorthand`
361 * `arrayComprehension` -> `es7.comprehensions`
362 * `generatorComprehension` -> `es7.comprehensions`
363 * `arrowFunctions` -> `es6.arrowFunctions`
364 * `classes` -> `es6.classes`
365 * `objectSpread` -> `es7.objectSpread`
366 * `exponentiationOperator` -> `es7.exponentiationOperator`
367 * `spread` -> `es6.spread`
368 * `templateLiterals` -> `es6.templateLiterals`
369 * `propertyMethodAssignment` -> `es6.properties.shorthand`
370 * `computedPropertyNames` -> `es6.properties.computed`
371 * `defaultParameters` -> `es6.parameters.default`
372 * `restParameters` -> `es6.parameters.rest`
373 * `destructuring` -> `es6.destructuring`
374 * `forOf` -> `es6.forOf`
375 * `unicodeRegex` -> `es6.unicodeRegex`
376 * `abstractReferences` -> `es7.abstractReferences`
377 * `constants` -> `es6.constants`
378 * `letScoping` -> `es6.blockScoping`
379 * `blockScopingTDZ` -> `es6.blockScopingTDZ`
380 * `generators` -> `regenerator`
381 * `protoToAssign` -> `spec.protoToAssign`
382 * `typeofSymbol` -> `spec.typeofSymbol`
383 * `coreAliasing` -> `selfContained`
384 * `undefinedToVoid` -> `spec.undefinedToVoid`
385 * `undeclaredVariableCheck` -> `validation.undeclaredVariableCheck`
386 * `specPropertyLiterals` -> `minification.propertyLiterals`
387 * `specMemberExpressionLiterals` -> `minification.memberExpressionLiterals`
388
389## 2.13.7
390
391 * **Bug Fix**
392 * Don't realias variables that are already declared in optional `coreAliasing` transformer.
393
394## 2.13.6
395
396 * **Bug Fix**
397 * Add `NewExpression` as a valid parent for parentheses insertion for `ConditionalExpression`.
398
399## 2.13.5
400
401 * **Bug Fix**
402 * Allow rest parameters to be destructuring patterns.
403 * **Internal**
404 * Upgrade `kexec` to `1.1.0`.
405
406## 2.13.4
407
408 * **Bug Fix**
409 * Fix ordering of destructuring and default params.
410 * Fix loop body scope.
411 * Fix `for...of` transformation not retaining it's scope.
412 * Add destructuring assignment support to scope tracking.
413 * **Polish**
414 * More reliable newlines for pretty printing variable declarations.
415
416## 2.13.3
417
418 * **Internal**
419 * Add `coverage` and `vendor` to npmignore.
420
421## 2.13.2
422
423 * **Bug Fix**
424 * Fix `super` inside of nested functions.
425 * **Internal**
426 * Move let scoping TDZ into a separate transformer until it's more solid.
427 * Use `process.stdin.write` instead of `console.log` in `bin` to avoid sprintfification.
428
429## 2.13.1
430
431 * **New Feature**
432 * Temporal dead zone for block binding.
433
434## 2.13.0
435
436 * **New Feature**
437 * Block scoped functions.
438 * Add `--loose all` option.
439 * Add playground mallet operator thanks to [@jridgewell](https://github.com/jridgewell).
440 * **Bug Fix**
441 * Rewrote large parts of the let scoping transformer. Now passes all known tests.
442 * **Internal**
443 * Even more optimisations thanks to the awesome [@gaearon](https://github.com/gaearon).
444 * Upgrade `acorn-6to5`.
445 * Fixes exponentation operator thanks to [@charliesome](https://github.com/charliesome).
446 * Fix flow optional parameters with types.
447 * Upgrade `chokidar` to `0.12.6`.
448 * Upgrade `commander` to `2.6.0`.
449 * Upgrade `core-js` to `0.4.5`.
450 * Upgrade `estraverse` to `1.9.1`.
451 * Upgrade `jshint` to `2.5.11`.
452 * Upgrade `regenerator` to `0.8.9`.
453 * Upgrade `regexpu` to `1.0.0`.
454 * Upgrade `source-map` to `0.1.43`.
455 * Upgrade `source-map-support` to `0.2.9`.
456 * Upgrade `browserify` to `8.1.1`.
457 * Upgrade `chai` to `1.10.0`.
458 * Upgrade `istanbul` to `0.3.5`.
459 * Upgrade `mocha` to `2.1.0`.
460 * Upgrade `uglify-js` to `2.4.16`.
461
462## 2.12.6
463
464 * **Bug Fix**
465 * Add missing flow type traversal keys.
466
467## 2.12.5
468
469 * **Internal**
470 * Fix incorrect `for...in` loop still causing `ember-script` issues.
471
472## 2.12.4
473
474 * **Polish**
475 * Rest parameters now allocate the array before populating.
476 * **Internal**
477 * `for...in` loops have been changed to optimized `for` loops - better performance and no enumeration of protoype keys.
478 * Parts of the code generator have now been optimized thanks to [gaearon](https://github.com/gaearon).
479
480## 2.12.3
481
482 * **Spec Compliancy**
483 * Optional `typeof` transformer checks for `undefined` before passing it to the helper.
484 * Class methods are now named.
485
486## 2.12.2
487
488 * **Internal**
489 * Exclude nodes in function parameters and catch clauses from `isReferenced` check.
490
491## 2.12.1
492
493 * **Internal**
494 * Add `.jsx` to list of allowed extensions.
495
496## 2.12.0
497
498 * **Bug Fix**
499 * Support non-string JSX literals.
500 * **New Feature**
501 * Loose mode for some transformers that enables non-spec behavior.
502 * **Internal**
503 * Uglify `--mangle sort` has been added to the build script, cutting minified scripts in half.
504
505## 2.11.4
506
507 * **Internal**
508 * Make all dependency versions fixed.
509
510## 2.11.3
511
512 * **Bug Fix**
513 * Allow a string to be passed as the `optional` option.
514
515## 2.11.2
516
517 * **Bug Fix**
518 * Support esprima-style catch clause handlers.
519 * **Polish**
520 * Don't print a stacktrace for syntax errors in the CLI.
521
522## 2.11.1
523
524 * **Bug Fix**
525 * Remove stray `console.log` outputting debug code.
526 * Remove `Dict` from `coreAliasing`.
527
528## 2.11.0
529
530 * **Bug Fix**
531 * Fix unnecessary IIFE in default parameters on method calls.
532 * Add support for supers inside of closures.
533 * **New Feature**
534 * Add `--keep-module-id-extensions`/`keepModuleIdExtensions` option to keep extensions in module ids.
535 * **Polish**
536 * Special case single argument spread properties in `super` inside classes.
537 * Don't use a variable declaration for class declaration IFFE.
538 * Rename `inherits` helper parameters.
539 * `coreAliasing` transformer now aliases `Promise`, `Set`, `Map` and more. Thanks [@AluisioASG](https://github.com/AluisioASG).
540
541## 2.10.1
542
543 * **Internal**
544 * Upgrade `core-js` to `0.4.4`.
545 * **New Feature**
546 * Added `--include-regenerator` option to CLI and `includeRegenerator` option to API that includes the regenerator runtime if necessary.
547
548## 2.10.0
549
550 * **New Feature**
551 * Add `classesFastSuper` optional transformer that doesn't support parent getters and prototype changing.
552 * Add `forOfFast` transformer that speeds up `for...of` on arrays but produces more code.
553 * Add `--react-compat` to `bin/6to5`.
554 * **Spec Compliancy**
555 * Disallow setters without a single parameter.
556 * Add `configurable` and `writable` to defined properties.
557 * Use define instead of assignment for class methods.
558 * **Polish**
559 * Fix bin name in `6to5-node --help`.
560 * Fix shorthand `--whitelist` name in `bin/6to5`.
561 * **Internal**
562 * Hot code optimisation of traversal etc thanks to [gaearon](https://github.com/gaearon).
563
564## 2.9.4
565
566 * **Bug Fix**
567 * Support `UpdateExpression`s as `MemberExpression` objects.
568
569## 2.9.3
570
571 * **Bug Fix**
572 * Remove `exportsWildcard` helper in favor of `defaults`.
573
574## 2.9.2
575
576 * **Bug Fix**
577 * Pass `exports` to `exportWildcard` helper to allow for use inside the optional runtime.
578
579## 2.9.1
580
581 * **Bug Fix**
582 * Fix runtime generator breaking the helper inclusion loop.
583
584## 2.9.0
585
586 * **Internal**
587 * Upgrade `acorn-6to5`.
588 * Now supports destructuring shorthand properties.
589
590## 2.8.1
591
592 * **Bug Fix**
593 * Fix computed accessors on object literals.
594
595## 2.8.0
596
597 * **New Feature**
598 * Add `commonStrict`, `amdStrict` and `umdStrict` module formatters that remove `module.exports` interop assignment.
599 * Add `--indent` option to the 6to5 CLI.
600
601## 2.7.4
602
603 * **Polish**
604 * Inherit assignments from their declaration in destructuring.
605 * Properly align multi-declarator variable declarations.
606
607## 2.7.3
608
609 * **Polish**
610 * Indent and add newlines to `React.createElement` calls in `react` transformer.
611 * Remove `Object.assign` calls and replace it with an `extends` helper.
612
613## 2.7.1
614
615 * **New Feature**
616 * Expose `version` on browser and node API.
617 * **Internal**
618 * Upgrade `core-js` to 0.4.1
619
620## 2.7.0
621
622 * **Spec Compliancy**
623 * Disallow reassignments of imports.
624 * **New Feature**
625 * `reactCompat` option to enable pre-v0.12 react components.
626
627## 2.6.3
628
629 * **Bug Fix**
630 * Fix 2.6.0 regression caused by faulty export default from a source handling.
631
632## 2.6.2
633
634 * **Bug Fix**
635 * Fix rest parameter keys when on functions with params.
636
637## 2.6.1
638
639 * **Bug Fix**
640 * Fix rest parameter arguments key.
641
642## 2.6.0
643
644 * **Bug Fix**
645 * Better handling of number literal property keys.
646 * Handle `NewExpression` paren insertion edegcases better.
647 * **Internal**
648 * Fix incorrect AST node `identifier("this")`.
649 * Better `toIdentifier` method that handles reserved words.
650 * Upgrade `acorn-6to5`.
651 * Fix exponentiation operator precedence.
652 * Fix line terminators after async contextual keywords.
653 * Add semicolons as class elements inside of a class body.
654 * Upgrade to `core-js` 4.0.0.
655 * Upgrade to `regenerator` 0.8.3.
656 * Fix non-loop labeled statements.
657 * **New Feature**
658 * Basic destructuring defaults
659 * Add `.es` to list of supported extensions.
660 * Add optional `typeofSymbol` transformer.
661 * Use a `for` loop for rest parameters instead of `Array.prototype.slice`.
662 * **Polish**
663 * Move `"use strict";` to inside module bodies instead of at the top of the file.
664 * Better handling of dynamic imports.
665 * **Spec Compliancy**
666 * Class inheritance now has a `function` or `null` type check.
667 * Add `interopRequireWildcard` around wildcard imports and exports to handle non-object exports.
668
669## 2.5.0
670
671 * Remove `noDuplicateProperties` transformer.
672 * Better generated UIDs based on nodes.
673 * Default parameters now use `arguments[i]`, conditionals and variable declarations instead of using long-form if statements.
674
675## 2.4.10
676
677 * Upgrade `acorn-6to5`.
678
679## 2.4.9
680
681 * Upgrade `acorn-6to5`.
682 * Add optional `protoToAssign` transformer.
683 * Fix missing properties from computed property keys.
684 * Make ES7 comprehensions `let` variables.
685
686## 2.4.8
687
688 * Make `require("6to5/register")` work with browserify - [#370](https://github.com/6to5/6to5/pull/370). Thanks [@hughsk](https://github.com/hughsk)!
689
690## 2.4.7
691
692 * Upgrade `acorn-6to5`.
693
694## 2.4.6
695
696 * Move `coreAliasing` and `undefinedToVoid` transformers down to catch `moduleFormatter` transforms.
697
698## 2.4.5
699
700 * Avoid printing comments if they've already been output.
701
702## 2.4.4
703
704 * Add `module` type to browser build `<script>` handler.
705 * Fix some `MemberExpression` modifying incorrectly setting `property` to a `MemberExpression`.
706
707## 2.4.3
708
709 * Upgrade `acorn-6to5`.
710 * Add support for `FunctionDeclaration`s in `bluebirdCoroutines` and `asyncToGenerators` transformers.
711
712## 2.4.2
713
714 * Upgrade `acorn-6to5`.
715 * Better uids generated for various transformers based on parent node.
716 * Alias flat references in `coreAliasing` transformer.
717
718## 2.4.1
719
720 * Better whitespace handling of parenthesized expressions due to trailing comments.
721 * Fix `yield` inside of comprehensions.
722
723## 2.4.0
724
725 * Use a closure always for classes with a super.
726 * Always use native loops for array comprehensions.
727 * Allow `yield` inside of comprehensions.
728 * Add optional `bluebirdCoroutine` transformer.
729 * Add optional `asyncToGenerator` transformer.
730 * Move `useStrict` transformer to before `_moduleFormatter` causing `"use strict";` to always be placed the very top.
731
732## 2.3.2
733
734 * Add parens on expressions with trailing comments.
735
736## 2.3.1
737
738 * Add `undefinedToVoid` optional transformer.
739 * Use `Object.defineProperty` for computed properties.
740
741## 2.3.0
742
743 * Upgrade `acorn-6to5`.
744 * Support circular references and hoist variable declarations in `system` module formatter.
745 * Add optional transformers, including a new `coreAliasing` transformer that aliases native ES6 static properties to their `core-js` equivalent.
746
747## 2.2.0
748
749 * Make `system` module formatter modules anonymous by default.
750 * Fix duplicate comments being output, breaking code.
751
752## 2.1.0
753
754 * Add `cache` option to register hook.
755 * Update `core-js`.
756 * Fix starting newline not being added on case statements.
757 * Fix destructuring `VariableDeclaration`s not inside `BlockStatement`s and `Program`.
758
759## 2.0.4
760
761 * Avoid being greedy when destructuring array iterables.
762
763## 2.0.3
764
765 * Hoist function declarations in system module formatter for circular references.
766 * Hoist default function declarations in umd and amd module formatters for circular references.
767
768## 2.0.2
769
770 * Inherit comments in `for-of` transformer.
771 * Remove `interopRequire` from `system` module formatter.
772
773## 2.0.1
774
775 * Remap `UpdateExpression` module export binding.
776 * Fix automatic closure on `PrivateDeclaration` in classes.
777
778## 2.0.0
779
780 * Make string literal generation only escapes unicode that it has to.
781 * Internal code generation format options have been exposed.
782 * Change playground method binding operator from `:` to `#` removing ambiguous syntax with terns.
783 * Fix rest parameters in async and generator functions.
784 * Export/import declarations replace by the modules transformer now inherit comments.
785 * Added playground flag to `6to5-node`.
786 * `6to5-node` now behaves the same as `node`.
787 * `6to5-node` now uses `kexec` to become the forked process to correctly propagate signals on unix.
788 * Constants are now block scoped.
789 * Exposed ast transformer.
790 * Merged `commonInterop` and `common` module formatters.
791 * Fix generator comprehensions not inheriting `arguments`, `this` etc.
792 * Object and class mutator shorthand are now enumerable.
793 * Remove regenerator `Generator has already finished` error which isn't spec-compliant.
794 * Expose internal `spec` transformers that nicen up code output.
795 * Add export variable declaration default initializers.
796 * Propagate export declaration reassignments.
797 * Add initializer default to block scoped variable declarations within a loop.
798 * Flow type support.
799 * Make async/await contextual keywords.
800 * Allow `yield`ing of non-objects.
801 * Class declarations now lack an IIFE.
802 * Support falsy and `null` super classes.
803 * Add support for experimental abstract references `private` declarations.
804 * Leave out IIFE for class declarations.
805 * Switched to [core-js](https://github.com/zloirock/core-js) from [es6-symbol](https://github.com/medikoo/es6-symbol) and [es6-shim](https://github.com/paulmillr/es6-shim/) for built-in polyfill.
806 * `amd` and `umd` module formatters now behave the same as `common` with `interopRequire`.
807 * Micro-optimizations to boost performance by 200%.
808 * Rename module formatter methods `import` to `importDeclaration` and `export` to `exportDeclaration`.
809 * Support multiple declarators in export variable declarations.
810 * Freeze tagged template literal object.
811 * Remove inlined `regenerator` fork.
812 * Remove `ParenthesizedExpression`.
813 * Rename `object-spread` helper to `object-without-properties`.
814 * Rename `class-props` helper to `prototype-properties`.
815 * Rename `extends` helper to `inherits`.
816 * Completely rewritten `system` module formatter.
817
818## 1.15.0
819
820 * Don't alias `GeneratorFunction` and check the name which causes minifiers to remove the name and throw an error later on when we check if it's set.
821
822## 1.14.18
823
824 * Fix files only containg comments not being output.
825 * Fix duplicate comments on property key shorthands.
826
827## 1.14.17
828
829 * Add default initializer to let variables within loop bodies.
830 * Fix excessive `break` replacement inside of switches in let scoping.
831
832## 1.14.16
833
834 * Add object getter memos and this shorthand to playground.
835 * Fix while loops in let scoping.
836 * Upgrade `acorn-6to5`.
837
838## 1.14.14
839
840 * Fix template literals escaping.
841
842## 1.14.13
843
844 * Fix let scoping of `while` loops.
845 * Make class methods enumerable.
846
847## 1.14.12
848
849 * Fix duplicate dynamic expressions in call spread.
850
851## 1.14.10
852
853 * Fix let scoping unneccesary override.
854
855## 1.14.6
856
857 * Avoid ensuring a block on non-array node replacements.
858
859## 1.14.5
860
861 * Upgrade `acorn-6to5`.
862 * Fix JSON recursion error for unknown code generator node types.
863 * Ensure that a statement is a block on block/statement types when replacing them with multiple nodes.
864
865## 1.14.4
866
867 * Merge pretzel maps and method binding.
868
869## 1.14.3
870
871 * Add playground pretzel maps.
872
873## 1.14.2
874
875 * Fix `commonInterop` default export handling.
876 * Fix keyworded property key identifiers being turned into computed property key literals.
877
878## 1.14.1
879
880 * Inherit comments from `ClassDeclaration`.
881
882## 1.14.0
883
884 * Add [playground](https://6to5.github.io/playground.html).
885
886## 1.13.13
887
888 * Fix `--debug` in `bin/6to5-node`. Thanks [@timoxley](https://github.com/timoxley).
889
890## 1.13.12
891
892 * Ignore `XJSEmptyExpression`s in `react` transformer output.
893
894## 1.13.11
895
896 * Fix `util.regexify` on falsy values.
897 * Fix `_aliasFunction` with rest parameters.
898 * Export as `module.exports` instead of `exports.default` if there are no other `ExportDeclaration`s in `commonInterop` module formatter.
899 * Add `system` module formatter. Thanks [@douglasduteil](https://github.com/douglasduteil).
900
901## 1.13.10
902
903 * Add support for `AssignmentExpression` destructuring outside of `ExpressionStatement`.
904
905## 1.13.9
906
907 * Fix `VirtualPropertyExpression` visitor keys.
908
909## 1.13.8
910
911 * Only use a single reference in abstract references.
912
913## 1.13.7
914
915 * Upgrade `acorn-6to5`.
916 * Add experimental exponentiation operator support.
917
918## 1.13.6
919
920 * Fix experimental object spread/rest helper.
921
922## 1.13.5
923
924 * Upgrade `acorn-6to5`.
925 * Add experimental support for object spread/rest.
926 * Change `arguments` to array to an additional helper method.
927
928## 1.13.4
929
930 * Fix single spread element returning itself.
931
932## 1.13.3
933
934 * Upgrade `acorn-6to5`.
935 * Add experimental support for abstract references.
936
937## 1.13.2
938
939 * Optimize `Array.from` usage by adding a helper method.
940 * Upgrade `acorn-6to5`.
941
942## 1.13.1
943
944 * Fix constructor spread optimisation. Thanks [@zloirock](https://github.com/zloirock).
945
946## 1.13.0
947
948 * Put experimental ES7 features behind a flag `--experimental` and `experimental` option.
949 * Constructor spread performance increase. Thanks [@RReverser](https://github.com/RReverser).
950 * Use `self` instead of `window` in the optional 6to5 runtime. Thanks [@RReverser](https://github.com/RReverser).
951
952## 1.12.26
953
954 * Support computed property destructuring.
955
956## 1.12.25
957
958 * Update `acorn-6to5`, `ast-types`, `es6-shim`, `chokidar`, `estraverse` and `private`.
959
960## 1.12.24
961
962 * Collect references that haven't been declared in scope.
963
964## 1.12.23
965
966 * Fix generator function export hoisting.
967
968## 1.12.22
969
970 * Update `fs-readdir-recursive` and `chokidar`.
971 * Support array destructuring on iterables.
972 * Make amd module id optional. Thanks [@webpro](https://github.com/webpro).
973
974## 1.12.21
975
976 * Fix unneccesary let scoping replacement.
977 * Add `commonInterop` module formatter. Thanks [@Naddiseo](https://github.com/Naddiseo).
978 * Fix `return` outside of function body bug. Thanks [@brentburg](https://github.com/brentburg).
979 * Add more flexible option types.
980
981## 1.12.20
982
983 * Append `sourceMappingURL` when using `bin/6to5` and output sourcemaps.
984
985## 1.12.19
986
987 * Add `comments` option and `--remove-comments` flag. Thanks [@webpro](htps://github.com/webpro).
988 * Embed `regenerator`.
989
990## 1.12.18
991
992 * Use `global` reference instead of `window`.
993
994## 1.12.17
995
996 * Add `moduleName`, `sourceRoot` and `filenameRelative` options. Thanks [@darvelo](https://github.com/darvelo).
997 * Traversal optimisations.
998
999## 1.12.16
1000
1001 * Fix comments not being retained from `MethodDefinition` in classes.
1002 * Add temporal dead zone in default parameters.
1003
1004## 1.12.15
1005
1006 * Update `acorn-6to5`.
1007
1008## 1.12.14
1009
1010 * Fix duplicate let scoping in functions.
1011 * Make JSX whitespace more React-compliant.
1012 * Add `_memberExpressionKeywords` transformer that turns keyword identifiers to computed literals.
1013 * Upgrade `regenerator-6to5`.
1014
1015## 1.12.13
1016
1017 * Support duplicate constants within different block scopes.
1018 * Fix for-head duplication testing and replacement.
1019 * Support `raw` property on tagged template literals.
1020
1021## 1.12.12
1022
1023 * Make scope tracker more reliable to handle all edgecases.
1024
1025## 1.12.11
1026
1027 * Block scope classes.
1028 * Fix generation of integer `Literal`s in `MemberExpression`.
1029
1030## 1.12.10
1031
1032 * Fix let scoping var hoisting.
1033
1034## 1.12.9
1035
1036 * Escape unicode characters when generating string `Literal`s.
1037 * Fix semicolons being output for statements in `ExportDeclaration`.
1038 * Fix `WithStatement` missing parenthesis.
1039
1040## 1.12.8
1041
1042 * Temporarily forbid `AssignmentExpression` destructuring outside of `ExpressionStatement`.
1043
1044## 1.12.7
1045
1046 * Update to latest `acorn-6to5`.
1047
1048## 1.12.6
1049
1050 * Update to latest `acorn-6to5`.
1051
1052## 1.12.5
1053
1054 * Fix excessive whitespace trimming resulting in innaccurate sourcemap line.
1055
1056## 1.12.4
1057
1058 * Add `doc` folder for documentation.
1059
1060## 1.12.3
1061
1062 * Support generator comprehensions.
1063 * Use `Array.from` instead of `Array.prototype.slice` in spread transformer.
1064 * Support spread in `NewExpression`s.
1065
1066## 1.12.2
1067
1068 * Upgrade `matcha` to `0.6.0` and `browserify` to `6.3.2`.
1069 * Add own `trimRight` helper instead of relying on the string instance method.
1070 * Support JSX spreads that aren't the first.
1071
1072## 1.12.1
1073
1074 * Fix `this` and `arguments` mapping in the `_aliasFunctions` transformer.
1075
1076## 1.12.0
1077
1078 * Combine `jsx` and `react` transformers to `react`.
1079 * Update `react` syntax output to React v0.12.
1080
1081## 1.11.15
1082
1083 * Fix JSX literal whitespace generation.
1084
1085## 1.11.14
1086
1087 * Avoid using a switch for let-scoping continue and break statements and use an if statement instead.
1088 * Remove excess whitespace and newlines from JSX literals.
1089
1090## 1.11.13
1091
1092 * Update regenerator-6to5
1093 * Add support for most escodegen formatting options