24 KiB
24 KiB
Changelog
Tags:
- [New Feature]
- [Bug Fix]
- [Spec Compliancy]
- [Breaking Change]
- [Documentation]
- [Internal]
- [Polish]
Note: Gaps between patch versions are faulty/broken releases.
3.0.0
- Polish
- Generated code autoindentation.
- Moved global uid registry to a scope registry resulting in nicer uids.
thisis now illegal in the top level scope when using the defaultuseStricttransformer.- New
asyncToGeneratorhelper that's much more compact. - Throw errors on unknown options.
- More reliable default parameter scope.
- Helpers are now compact and have no newlines.
- Internal
- Rewritten a lot of the internals to much simpler.
- Removed TDZ from default parameters as it was very wonky and unreliable.
- Upgrade
core-jsto0.4.6. - Upgrade
acorn-6to5. - JSX support is now on-par with react-tools/esprima.
- Shorthand destructuring.
- Bug Fix
- Generators now work flawlessly with any parameter transformers.
- Optional async function transformers should not name their functions.
- Remove
unlinkevent watching inbin/6to5. - Fix regenerator variable declarations being incorrectly hoisted breaking scope.
- 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.
- New Feature
- New
selfContainedtransformer. - New
undeclaredVariableCheckoptional transformer. - Added
--blacklistand--whitelistoptions to6to5-node. - Breaking Change
- Caching is now always enabled for the require hook. It also now no longer caches require resolutions.
- Bare
super();only works inside of constructors. - Removed the optional runtime in favor of the
selfContainedtransformer. - This shorthand has been removed from the playground.
6to5/polyfillcan now only be required once.- CLI
--indentoption has been removed.--include-regeneratoroption has been removed.--amd-modules-idoption has been removed, use--module-idsinstead.- Options
amdModuleIdsoption has been removed, usemoduleIdsinstead.includeRegeneratorhas been removed.ignoreRegexfallback has now been dropped from the require hook.register(/foo/);,register({ ignoreRegex: /foo/ })->register({ ignore: /foo/ }).- Modules
- Module interop now only collapses to
module.exportswhen there's a single export that's default. - Imports and exports are now illegal anywhere except the root level by default. Set
modulesto loose mode to allow them everywhere.
- Module interop now only collapses to
- Transformers
- Optional fast transformer backwards compatibility support has been removed. Use loose mode.
- Removed the
coreAliasingtransformer in favor ofselfContained. - Renamed transformers:
specNoForInOfAssignment->validation.noForInOfAssignmentspecSetters->validation.settersspecBlockScopedFunctions->spec.blockScopedFunctionsmalletOperator->playground.malletOperatormethodBinding->playground.methodBindingmemoizationOperator->playground.memoizationOperatorobjectGetterMemoization->playground.objectGetterMemoizationmodules->es6.modulespropertyNameShorthand->es6.properties.shorthandarrayComprehension->es7.comprehensionsgeneratorComprehension->es7.comprehensionsarrowFunctions->es6.arrowFunctionsclasses->es6.classesobjectSpread->es7.objectSpreadexponentiationOperator->es7.exponentiationOperatorspread->es6.spreadtemplateLiterals->es6.templateLiteralspropertyMethodAssignment->es6.properties.shorthandcomputedPropertyNames->es6.properties.computeddefaultParameters->es6.parameters.defaultrestParameters->es6.parameters.restdestructuring->es6.destructuringforOf->es6.forOfunicodeRegex->es6.unicodeRegexabstractReferences->es7.abstractReferencesconstants->es6.constantsletScoping->es6.blockScopingblockScopingTDZ->es6.blockScopingTDZgenerators->regeneratorprotoToAssign->spec.protoToAssigntypeofSymbol->spec.typeofSymbolcoreAliasing->selfContainedundefinedToVoid->spec.undefinedToVoidundeclaredVariableCheck->validation.undeclaredVariableCheckspecPropertyLiterals->minification.propertyLiteralsspecMemberExpressionLiterals->minification.memberExpressionLiterals
2.13.7
- Bug Fix
- Don't realias variables that are already declared in optional
coreAliasingtransformer.
2.13.6
- Bug Fix
- Add
NewExpressionas a valid parent for parentheses insertion forConditionalExpression.
2.13.5
- Bug Fix
- Allow rest parameters to be destructuring patterns.
- Internal
- Upgrade
kexecto1.1.0.
2.13.4
- Bug Fix
- Fix ordering of destructuring and default params.
- Fix loop body scope.
- Fix
for...oftransformation not retaining it's scope. - Add destructuring assignment support to scope tracking.
- Polish
- More reliable newlines for pretty printing variable declarations.
2.13.3
- Internal
- Add
coverageandvendorto npmignore.
2.13.2
- Bug Fix
- Fix
superinside of nested functions. - Internal
- Move let scoping TDZ into a separate transformer until it's more solid.
- Use
process.stdin.writeinstead ofconsole.loginbinto avoid sprintfification.
2.13.1
- New Feature
- Temporal dead zone for block binding.
2.13.0
- New Feature
- Block scoped functions.
- Add
--loose alloption. - Add playground mallet operator thanks to @jridgewell.
- Bug Fix
- Rewrote large parts of the let scoping transformer. Now passes all known tests.
- Internal
- Even more optimisations thanks to the awesome @gaearon.
- Upgrade
acorn-6to5.- Fixes exponentation operator thanks to @charliesome.
- Fix flow optional parameters with types.
- Upgrade
chokidarto0.12.6. - Upgrade
commanderto2.6.0. - Upgrade
core-jsto0.4.5. - Upgrade
estraverseto1.9.1. - Upgrade
jshintto2.5.11. - Upgrade
regeneratorto0.8.9. - Upgrade
regexputo1.0.0. - Upgrade
source-mapto0.1.43. - Upgrade
source-map-supportto0.2.9. - Upgrade
browserifyto8.1.1. - Upgrade
chaito1.10.0. - Upgrade
istanbulto0.3.5. - Upgrade
mochato2.1.0. - Upgrade
uglify-jsto2.4.16.
2.12.6
- Bug Fix
- Add missing flow type traversal keys.
2.12.5
- Internal
- Fix incorrect
for...inloop still causingember-scriptissues.
2.12.4
- Polish
- Rest parameters now allocate the array before populating.
- Internal
for...inloops have been changed to optimisedforloops - better performance and no enumeration of protoype keys.- Parts of the code generator have now been optimised thanks to gaearon.
2.12.3
- Spec Compliancy
- Optional
typeoftransformer checks forundefinedbefore passing it to the helper. - Class methods are now named.
2.12.2
- Internal
- Exclude nodes in function parameters and catch clauses from
isReferencedcheck.
2.12.1
- Internal
- Add
.jsxto list of allowed extensions.
2.12.0
- Bug Fix
- Support non-string JSX literals.
- New Feature
- Loose mode for some transformers that enables non-spec behaviour.
- Internal
- Uglify
--mangle sorthas been added to the build script, cutting minified scripts in half.
2.11.4
- Internal
- Make all dependency versions fixed.
2.11.3
- Bug Fix
- Allow a string to be passed as the
optionaloption.
2.11.2
- Bug Fix
- Support esprima-style catch clause handlers.
- Polish
- Don't print a stacktrace for syntax errors in the CLI.
2.11.1
- Bug Fix
- Remove stray
console.logoutputting debug code. - Remove
DictfromcoreAliasing.
2.11.0
- Bug Fix
- Fix unnecessary IIFE in default parameters on method calls.
- Add support for supers inside of closures.
- New Feature
- Add
--keep-module-id-extensions/keepModuleIdExtensionsoption to keep extensions in module ids. - Polish
- Special case single argument spread properties in
superinside classes. - Don't use a variable declaration for class declaration IFFE.
- Rename
inheritshelper parameters. coreAliasingtransformer now aliasesPromise,Set,Mapand more. Thanks @AluisioASG.
2.10.1
- Internal
- Upgrade
core-jsto0.4.4. - New Feature
- Added
--include-regeneratoroption to CLI andincludeRegeneratoroption to API that includes the regenerator runtime if necessary.
2.10.0
- New Feature
- Add
classesFastSuperoptional transformer that doesn't support parent getters and prototype changing. - Add
forOfFasttransformer that speeds upfor...ofon arrays but produces more code. - Add
--react-compattobin/6to5. - Spec Compliancy
- Disallow setters without a single parameter.
- Add
configurableandwritableto defined properties. - Use define instead of assignment for class methods.
- Polish
- Fix bin name in
6to5-node --help. - Fix shorthand
--whitelistname inbin/6to5. - Internal
- Hot code optimisation of traversal etc thanks to gaearon.
2.9.4
- Bug Fix
- Support
UpdateExpressions asMemberExpressionobjects.
2.9.3
- Bug Fix
- Remove
exportsWildcardhelper in favor ofdefaults.
2.9.2
- Bug Fix
- Pass
exportstoexportWildcardhelper to allow for use inside the optional runtime.
2.9.1
- Bug Fix
- Fix runtime generator breaking the helper inclusion loop.
2.9.0
- Internal
- Upgrade
acorn-6to5.- Now supports destructuring shorthand properties.
2.8.1
- Bug Fix
- Fix computed accessors on object literals.
2.8.0
- New Feature
- Add
commonStrict,amdStrictandumdStrictmodule formatters that removemodule.exportsinterop assignment. - Add
--indentoption to the 6to5 CLI.
2.7.4
- Polish
- Inherit assignments from their declaration in destructuring.
- Properly align multi-declarator variable declarations.
2.7.3
- Polish
- Indent and add newlines to
React.createElementcalls inreacttransformer. - Remove
Object.assigncalls and replace it with anextendshelper.
2.7.1
- New Feature
- Expose
versionon browser and node API. - Internal
- Upgrade
core-jsto 0.4.1
2.7.0
- Spec Compliancy
- Disallow reassignments of imports.
- New Feature
reactCompatoption to enable pre-v0.12 react components.
2.6.3
- Bug Fix
- Fix 2.6.0 regression caused by faulty export default from a source handling.
2.6.2
- Bug Fix
- Fix rest parameter keys when on functions with params.
2.6.1
- Bug Fix
- Fix rest parameter arguments key.
2.6.0
- Bug Fix
- Better handling of number literal property keys.
- Handle
NewExpressionparen insertion edegcases better. - Internal
- Fix incorrect AST node
identifier("this"). - Better
toIdentifiermethod that handles reserved words. - Upgrade
acorn-6to5.- Fix exponentiation operator precedence.
- Fix line terminators after async contextual keywords.
- Add semicolons as class elements inside of a class body.
- Upgrade to
core-js4.0.0. - Upgrade to
regenerator0.8.3.- Fix non-loop labeled statements.
- New Feature
- Basic destructuring defaults
- Add
.esto list of supported extensions. - Add optional
typeofSymboltransformer. - Use a
forloop for rest parameters instead ofArray.prototype.slice. - Polish
- Move
"use strict";to inside module bodies instead of at the top of the file. - Better handling of dynamic imports.
- Spec Compliancy
- Class inheritance now has a
functionornulltype check. - Add
interopRequireWildcardaround wildcard imports and exports to handle non-object exports.
2.5.0
- Remove
noDuplicatePropertiestransformer. - Better generated UIDs based on nodes.
- Default parameters now use
arguments[i], conditionals and variable declarations instead of using long-form if statements.
2.4.10
- Upgrade
acorn-6to5.
2.4.9
- Upgrade
acorn-6to5. - Add optional
protoToAssigntransformer. - Fix missing properties from computed property keys.
- Make ES7 comprehensions
letvariables.
2.4.8
2.4.7
- Upgrade
acorn-6to5.
2.4.6
- Move
coreAliasingandundefinedToVoidtransformers down to catchmoduleFormattertransforms.
2.4.5
- Avoid printing comments if they've already been output.
2.4.4
- Add
moduletype to browser build<script>handler. - Fix some
MemberExpressionmodifying incorrectly settingpropertyto aMemberExpression.
2.4.3
- Upgrade
acorn-6to5. - Add support for
FunctionDeclarations inbluebirdCoroutinesandasyncToGeneratorstransformers.
2.4.2
- Upgrade
acorn-6to5. - Better uids generated for various transformers based on parent node.
- Alias flat references in
coreAliasingtransformer.
2.4.1
- Better whitespace handling of parenthesized expressions due to trailing comments.
- Fix
yieldinside of comprehensions.
2.4.0
- Use a closure always for classes with a super.
- Always use native loops for array comprehensions.
- Allow
yieldinside of comprehensions. - Add optional
bluebirdCoroutinetransformer. - Add optional
asyncToGeneratortransformer. - Move
useStricttransformer to before_moduleFormattercausing"use strict";to always be placed the very top.
2.3.2
- Add parens on expressions with trailing comments.
2.3.1
- Add
undefinedToVoidoptional transformer. - Use
Object.definePropertyfor computed properties.
2.3.0
- Upgrade
acorn-6to5. - Support circular references and hoist variable declarations in
systemmodule formatter. - Add optional transformers, including a new
coreAliasingtransformer that aliases native ES6 static properties to theircore-jsequivalent.
2.2.0
- Make
systemmodule formatter modules anonymous by default. - Fix duplicate comments being output, breaking code.
2.1.0
- Add
cacheoption to register hook. - Update
core-js. - Fix starting newline not being added on case statements.
- Fix destructuring
VariableDeclarations not insideBlockStatements andProgram.
2.0.4
- Avoid being greedy when destructuring array iterables.
2.0.3
- Hoist function declarations in system module formatter for circular references.
- Hoist default function declarations in umd and amd module formatters for circular references.
2.0.2
- Inherit comments in
for-oftransformer. - Remove
interopRequirefromsystemmodule formatter.
2.0.1
- Remap
UpdateExpressionmodule export binding. - Fix automatic closure on
PrivateDeclarationin classes.
2.0.0
- Make string literal generation only escapes unicode that it has to.
- Internal code generation format options have been exposed.
- Change playground method binding operator from
:to#removing ambiguous syntax with terns. - Fix rest parameters in async and generator functions.
- Export/import declarations replace by the modules transformer now inherit comments.
- Added playground flag to
6to5-node. 6to5-nodenow behaves the same asnode.6to5-nodenow useskexecto become the forked process to correctly propagate signals on unix.- Constants are now block scoped.
- Exposed ast transformer.
- Merged
commonInteropandcommonmodule formatters. - Fix generator comprehensions not inheriting
arguments,thisetc. - Object and class mutator shorthand are now enumerable.
- Remove regenerator
Generator has already finishederror which isn't spec-compliant. - Expose internal
spectransformers that nicen up code output. - Add export variable declaration default initializers.
- Propagate export declaration reassignments.
- Add initializer default to block scoped variable declarations within a loop.
- Flow type support.
- Make async/await contextual keywords.
- Allow
yielding of non-objects. - Class declarations now lack an IIFE.
- Support falsy and
nullsuper classes. - Add support for experimental abstract references
privatedeclarations. - Leave out IIFE for class declarations.
- Switched to core-js from es6-symbol and es6-shim for built-in polyfill.
amdandumdmodule formatters now behave the same ascommonwithinteropRequire.- Micro-optimizations to boost performance by 200%.
- Rename module formatter methods
importtoimportDeclarationandexporttoexportDeclaration. - Support multiple declarators in export variable declarations.
- Freeze tagged template literal object.
- Remove inlined
regeneratorfork. - Remove
ParenthesizedExpression. - Rename
object-spreadhelper toobject-without-properties. - Rename
class-propshelper toprototype-properties. - Rename
extendshelper toinherits. - Completely rewritten
systemmodule formatter.
1.15.0
- Don't alias
GeneratorFunctionand check the name which causes minifiers to remove the name and throw an error later on when we check if it's set.
1.14.18
- Fix files only containg comments not being output.
- Fix duplicate comments on property key shorthands.
1.14.17
- Add default initializer to let variables within loop bodies.
- Fix excessive
breakreplacement inside of switches in let scoping.
1.14.16
- Add object getter memos and this shorthand to playground.
- Fix while loops in let scoping.
- Upgrade
acorn-6to5.
1.14.14
- Fix template literals escaping.
1.14.13
- Fix let scoping of
whileloops. - Make class methods enumerable.
1.14.12
- Fix duplicate dynamic expressions in call spread.
1.14.10
- Fix let scoping unneccesary override.
1.14.6
- Avoid ensuring a block on non-array node replacements.
1.14.5
- Upgrade
acorn-6to5. - Fix JSON recursion error for unknown code generator node types.
- Ensure that a statement is a block on block/statement types when replacing them with multiple nodes.
1.14.4
- Merge pretzel maps and method binding.
1.14.3
- Add playground pretzel maps.
1.14.2
- Fix
commonInteropdefault export handling. - Fix keyworded property key identifiers being turned into computed property key literals.
1.14.1
- Inherit comments from
ClassDeclaration.
1.14.0
- Add playground.
1.13.13
- Fix
--debuginbin/6to5-node. Thanks @timoxley.
1.13.12
- Ignore
XJSEmptyExpressions inreacttransformer output.
1.13.11
- Fix
util.regexifyon falsy values. - Fix
_aliasFunctionwith rest parameters. - Export as
module.exportsinstead ofexports.defaultif there are no otherExportDeclarations incommonInteropmodule formatter. - Add
systemmodule formatter. Thanks @douglasduteil.
1.13.10
- Add support for
AssignmentExpressiondestructuring outside ofExpressionStatement.
1.13.9
- Fix
VirtualPropertyExpressionvisitor keys.
1.13.8
- Only use a single reference in abstract references.
1.13.7
- Upgrade
acorn-6to5. - Add experimental exponentiation operator support.
1.13.6
- Fix experimental object spread/rest helper.
1.13.5
- Upgrade
acorn-6to5. - Add experimental support for object spread/rest.
- Change
argumentsto array to an additional helper method.
1.13.4
- Fix single spread element returning itself.
1.13.3
- Upgrade
acorn-6to5. - Add experimental support for abstract references.
1.13.2
- Optimise
Array.fromusage by adding a helper method. - Upgrade
acorn-6to5.
1.13.1
- Fix constructor spread optimisation. Thanks @zloirock.
1.13.0
- Put experimental ES7 features behind a flag
--experimentalandexperimentaloption. - Constructor spread performance increase. Thanks @RReverser.
- Use
selfinstead ofwindowin the optional 6to5 runtime. Thanks @RReverser.
1.12.26
- Support computed property destructuring.
1.12.25
- Update
acorn-6to5,ast-types,es6-shim,chokidar,estraverseandprivate.
1.12.24
- Collect references that haven't been declared in scope.
1.12.23
- Fix generator function export hoisting.
1.12.22
- Update
fs-readdir-recursiveandchokidar. - Support array destructuring on iterables.
- Make amd module id optional. Thanks @webpro.
1.12.21
- Fix unneccesary let scoping replacement.
- Add
commonInteropmodule formatter. Thanks @Naddiseo. - Fix
returnoutside of function body bug. Thanks @brentburg. - Add more flexible option types.
1.12.20
- Append
sourceMappingURLwhen usingbin/6to5and output sourcemaps.
1.12.19
- Add
commentsoption and--remove-commentsflag. Thanks @webpro. - Embed
regenerator.
1.12.18
- Use
globalreference instead ofwindow.
1.12.17
- Add
moduleName,sourceRootandfilenameRelativeoptions. Thanks @darvelo. - Traversal optimisations.
1.12.16
- Fix comments not being retained from
MethodDefinitionin classes. - Add temporal dead zone in default parameters.
1.12.15
- Update
acorn-6to5.
1.12.14
- Fix duplicate let scoping in functions.
- Make JSX whitespace more React-compliant.
- Add
_memberExpressionKeywordstransformer that turns keyword identifiers to computed literals. - Upgrade
regenerator-6to5.
1.12.13
- Support duplicate constants within different block scopes.
- Fix for-head duplication testing and replacement.
- Support
rawproperty on tagged template literals.
1.12.12
- Make scope tracker more reliable to handle all edgecases.
1.12.11
- Block scope classes.
- Fix generation of integer
Literals inMemberExpression.
1.12.10
- Fix let scoping var hoisting.
1.12.9
- Escape unicode characters when generating string
Literals. - Fix semicolons being output for statements in
ExportDeclaration. - Fix
WithStatementmissing parenthesis.
1.12.8
- Temporarily forbid
AssignmentExpressiondestructuring outside ofExpressionStatement.
1.12.7
- Update to latest
acorn-6to5.
1.12.6
- Update to latest
acorn-6to5.
1.12.5
- Fix excessive whitespace trimming resulting in innaccurate sourcemap line.
1.12.4
- Add
docfolder for documentation.
1.12.3
- Support generator comprehensions.
- Use
Array.frominstead ofArray.prototype.slicein spread transformer. - Support spread in
NewExpressions.
1.12.2
- Upgrade
matchato0.6.0andbrowserifyto6.3.2. - Add own
trimRighthelper instead of relying on the string instance method. - Support JSX spreads that aren't the first.
1.12.1
- Fix
thisandargumentsmapping in the_aliasFunctionstransformer.
1.12.0
- Combine
jsxandreacttransformers toreact. - Update
reactsyntax output to React v0.12.
1.11.15
- Fix JSX literal whitespace generation.
1.11.14
- Avoid using a switch for let-scoping continue and break statements and use an if statement instead.
- Remove excess whitespace and newlines from JSX literals.
1.11.13
- Update regenerator-6to5
- Add support for most escodegen formatting options