From f312026c23f47c8e86d0183bbeccfa5de63ed938 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 21 Jan 2015 23:04:31 +1100 Subject: [PATCH] move transformers into their corresponding type folder --- lib/6to5/transformation/transform.js | 83 ++++++++++--------- .../properties.mutators.js} | 4 +- .../arrow-functions.js} | 2 +- .../block-scoping.js} | 6 +- .../{es6-classes.js => es6/classes.js} | 8 +- .../{es6-constants.js => es6/constants.js} | 4 +- .../destructuring.js} | 2 +- .../{es6-for-of.js => es6/for-of.js} | 4 +- .../{es6-generators.js => es6/generators.js} | 0 .../{es6-modules.js => es6/modules.js} | 2 +- .../parameters.default.js} | 6 +- .../parameters.rest.js} | 4 +- .../properties.computed.js} | 4 +- .../properties.shorthand.js} | 4 +- .../{es6-spread.js => es6/spread.js} | 2 +- .../template-literals.js} | 2 +- .../unicode-regex.js} | 0 .../abstract-references.js} | 4 +- .../comprehensions.js} | 20 +++-- .../exponentiation-operator.js} | 4 +- .../object-spread.js} | 2 +- .../async-to-generator.js} | 4 +- .../block-scoping-tdz.js} | 4 +- .../bluebird-coroutines.js} | 4 +- .../proto-to-assign.js} | 2 +- .../self-contained.js} | 6 +- .../typeof-symbol.js} | 2 +- .../undeclared-variable-check.js} | 0 .../undefined-to-void.js} | 2 +- .../transformers/{ => other}/react.js | 2 +- .../transformers/{ => other}/use-strict.js | 4 +- .../mallet-operator.js} | 4 +- .../memoization-operator.js} | 4 +- .../method-binding.js} | 2 +- .../object-getter-memoization.js} | 4 +- .../block-scoped-functions.js} | 2 +- .../member-expression-literals.js} | 2 +- .../no-for-in-of-assignment.js} | 2 +- .../property-literals.js} | 2 +- .../{spec-setters.js => spec/setters.js} | 0 .../getter-and-setter/actual.js | 0 .../getter-and-setter/expected.js | 0 .../getter/actual.js | 0 .../getter/expected.js | 0 .../setter/actual.js | 0 .../setter/expected.js | 0 .../options.json | 3 - .../destructuring/exec.js | 0 .../multiple/actual.js | 0 .../multiple/expected.js | 0 .../single/actual.js | 0 .../single/expected.js | 0 .../tdz-2/actual.js | 0 .../tdz-2/options.json | 0 .../tdz-3/exec.js | 0 .../tdz/actual.js | 0 .../tdz/options.json | 0 .../arrow-functions/actual.js | 0 .../arrow-functions/expected.js | 0 .../multiple/actual.js | 0 .../multiple/expected.js | 0 .../single/actual.js | 0 .../single/expected.js | 0 .../argument/actual.js | 0 .../argument/expected.js | 0 .../assignment/actual.js | 0 .../assignment/expected.js | 0 .../ignore-symbol/actual.js | 0 .../ignore-symbol/expected.js | 0 .../method/actual.js | 0 .../method/expected.js | 0 .../mixed/actual.js | 0 .../mixed/expected.js | 0 .../multiple/actual.js | 0 .../multiple/expected.js | 0 .../options.json | 3 + .../single/actual.js | 0 .../single/expected.js | 0 .../this/actual.js | 0 .../this/expected.js | 0 .../two/actual.js | 0 .../two/expected.js | 0 .../variable/actual.js | 0 .../variable/expected.js | 0 .../argument/actual.js | 0 .../argument/expected.js | 0 .../assignment/actual.js | 0 .../assignment/expected.js | 0 .../ignore-symbol/actual.js | 0 .../ignore-symbol/expected.js | 0 .../method/actual.js | 0 .../method/expected.js | 0 .../mixed/actual.js | 0 .../mixed/expected.js | 0 .../multiple/actual.js | 0 .../multiple/expected.js | 0 .../single/actual.js | 0 .../single/expected.js | 0 .../this/actual.js | 0 .../this/expected.js | 0 .../two/actual.js | 0 .../two/expected.js | 0 .../variable/actual.js | 0 .../variable/expected.js | 0 .../method-computed}/actual.js | 0 .../method-computed}/expected.js | 0 .../method-plain}/actual.js | 0 .../method-plain}/expected.js | 0 .../method-self-reference/actual.js | 0 .../method-self-reference/expected.js | 0 .../shorthand-comments}/actual.js | 0 .../shorthand-comments}/expected.js | 0 .../shorthand-mixed}/actual.js | 0 .../shorthand-mixed}/expected.js | 0 .../shorthand-multiple}/actual.js | 0 .../shorthand-multiple}/expected.js | 0 .../shorthand-single}/actual.js | 0 .../shorthand-single}/expected.js | 0 .../arguments/actual.js | 0 .../arguments/expected.js | 0 .../array-expression-single-if/actual.js | 0 .../array-expression-single-if/expected.js | 0 .../array-expression-single/actual.js | 0 .../array-expression-single/expected.js | 0 .../array-multiple-if}/actual.js | 0 .../array-multiple-if}/expected.js | 0 .../array-multiple}/actual.js | 0 .../array-multiple}/expected.js | 0 .../array-single-if}/actual.js | 0 .../array-single-if}/expected.js | 0 .../array-single}/actual.js | 0 .../array-single}/expected.js | 0 .../array-this}/actual.js | 0 .../array-this}/expected.js | 0 .../generator}/exec.js | 0 .../options.json | 0 .../es7-generator-comprehension/options.json | 3 - 137 files changed, 115 insertions(+), 113 deletions(-) rename lib/6to5/transformation/transformers/{es5-property.mutators.js => es5/properties.mutators.js} (88%) rename lib/6to5/transformation/transformers/{es6-arrow-functions.js => es6/arrow-functions.js} (85%) rename lib/6to5/transformation/transformers/{es6-block-scoping.js => es6/block-scoping.js} (98%) rename lib/6to5/transformation/transformers/{es6-classes.js => es6/classes.js} (96%) rename lib/6to5/transformation/transformers/{es6-constants.js => es6/constants.js} (96%) rename lib/6to5/transformation/transformers/{es6-destructuring.js => es6/destructuring.js} (99%) rename lib/6to5/transformation/transformers/{es6-for-of.js => es6/for-of.js} (97%) rename lib/6to5/transformation/transformers/{es6-generators.js => es6/generators.js} (100%) rename lib/6to5/transformation/transformers/{es6-modules.js => es6/modules.js} (97%) rename lib/6to5/transformation/transformers/{es6-parameters.default.js => es6/parameters.default.js} (94%) rename lib/6to5/transformation/transformers/{es6-parameters.rest.js => es6/parameters.rest.js} (96%) rename lib/6to5/transformation/transformers/{es6-property.computed.js => es6/properties.computed.js} (96%) rename lib/6to5/transformation/transformers/{es6-property.shorthand.js => es6/properties.shorthand.js} (68%) rename lib/6to5/transformation/transformers/{es6-spread.js => es6/spread.js} (98%) rename lib/6to5/transformation/transformers/{es6-template-literals.js => es6/template-literals.js} (97%) rename lib/6to5/transformation/transformers/{es6-unicode-regex.js => es6/unicode-regex.js} (100%) rename lib/6to5/transformation/transformers/{es7-abstract-references.js => es7/abstract-references.js} (97%) rename lib/6to5/transformation/transformers/{es7-comprehensions.js => es7/comprehensions.js} (71%) rename lib/6to5/transformation/transformers/{es7-exponentiation-operator.js => es7/exponentiation-operator.js} (71%) rename lib/6to5/transformation/transformers/{es7-object-spread.js => es7/object-spread.js} (96%) rename lib/6to5/transformation/transformers/{optional-async-to-generator.js => optional/async-to-generator.js} (67%) rename lib/6to5/transformation/transformers/{optional-block-scoping-tdz.js => optional/block-scoping-tdz.js} (93%) rename lib/6to5/transformation/transformers/{optional-bluebird-coroutines.js => optional/bluebird-coroutines.js} (74%) rename lib/6to5/transformation/transformers/{optional-proto-to-assign.js => optional/proto-to-assign.js} (98%) rename lib/6to5/transformation/transformers/{optional-self-contained.js => optional/self-contained.js} (94%) rename lib/6to5/transformation/transformers/{optional-typeof-symbol.js => optional/typeof-symbol.js} (94%) rename lib/6to5/transformation/transformers/{optional-undeclared-variable-check.js => optional/undeclared-variable-check.js} (100%) rename lib/6to5/transformation/transformers/{optional-undefined-to-void.js => optional/undefined-to-void.js} (86%) rename lib/6to5/transformation/transformers/{ => other}/react.js (99%) rename lib/6to5/transformation/transformers/{ => other}/use-strict.js (66%) rename lib/6to5/transformation/transformers/{playground-mallet-operator.js => playground/mallet-operator.js} (77%) rename lib/6to5/transformation/transformers/{playground-memoization-operator.js => playground/memoization-operator.js} (77%) rename lib/6to5/transformation/transformers/{playground-method-binding.js => playground/method-binding.js} (97%) rename lib/6to5/transformation/transformers/{playground-object-getter-memoization.js => playground/object-getter-memoization.js} (88%) rename lib/6to5/transformation/transformers/{spec-block-scoped-functions.js => spec/block-scoped-functions.js} (94%) rename lib/6to5/transformation/transformers/{spec-member-expression-literals.js => spec/member-expression-literals.js} (92%) rename lib/6to5/transformation/transformers/{spec-no-for-in-of-assignment.js => spec/no-for-in-of-assignment.js} (90%) rename lib/6to5/transformation/transformers/{spec-property-literals.js => spec/property-literals.js} (92%) rename lib/6to5/transformation/transformers/{spec-setters.js => spec/setters.js} (100%) rename test/fixtures/transformation/{es6-property-method-assignment => es5-property.mutators}/getter-and-setter/actual.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment => es5-property.mutators}/getter-and-setter/expected.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment => es5-property.mutators}/getter/actual.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment => es5-property.mutators}/getter/expected.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment => es5-property.mutators}/setter/actual.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment => es5-property.mutators}/setter/expected.js (100%) delete mode 100644 test/fixtures/transformation/es6-computed-property-names-loose/options.json rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/destructuring/exec.js (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/multiple/actual.js (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/multiple/expected.js (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/single/actual.js (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/single/expected.js (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/tdz-2/actual.js (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/tdz-2/options.json (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/tdz-3/exec.js (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/tdz/actual.js (100%) rename test/fixtures/transformation/{es6-default-parameters => es6-parameters.default}/tdz/options.json (100%) rename test/fixtures/transformation/{es6-rest-parameters => es6-parameters.rest}/arrow-functions/actual.js (100%) rename test/fixtures/transformation/{es6-rest-parameters => es6-parameters.rest}/arrow-functions/expected.js (100%) rename test/fixtures/transformation/{es6-rest-parameters => es6-parameters.rest}/multiple/actual.js (100%) rename test/fixtures/transformation/{es6-rest-parameters => es6-parameters.rest}/multiple/expected.js (100%) rename test/fixtures/transformation/{es6-rest-parameters => es6-parameters.rest}/single/actual.js (100%) rename test/fixtures/transformation/{es6-rest-parameters => es6-parameters.rest}/single/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/argument/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/argument/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/assignment/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/assignment/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/ignore-symbol/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/ignore-symbol/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/method/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/method/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/mixed/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/mixed/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/multiple/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/multiple/expected.js (100%) create mode 100644 test/fixtures/transformation/es6-properties.computed-loose/options.json rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/single/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/single/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/this/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/this/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/two/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/two/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/variable/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names-loose => es6-properties.computed-loose}/variable/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/argument/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/argument/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/assignment/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/assignment/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/ignore-symbol/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/ignore-symbol/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/method/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/method/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/mixed/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/mixed/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/multiple/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/multiple/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/single/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/single/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/this/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/this/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/two/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/two/expected.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/variable/actual.js (100%) rename test/fixtures/transformation/{es6-computed-property-names => es6-properties.computed}/variable/expected.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment/computed => es6-properties.shorthand/method-computed}/actual.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment/computed => es6-properties.shorthand/method-computed}/expected.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment/method => es6-properties.shorthand/method-plain}/actual.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment/method => es6-properties.shorthand/method-plain}/expected.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment => es6-properties.shorthand}/method-self-reference/actual.js (100%) rename test/fixtures/transformation/{es6-property-method-assignment => es6-properties.shorthand}/method-self-reference/expected.js (100%) rename test/fixtures/transformation/{es6-property-name-shorthand/comments => es6-properties.shorthand/shorthand-comments}/actual.js (100%) rename test/fixtures/transformation/{es6-property-name-shorthand/comments => es6-properties.shorthand/shorthand-comments}/expected.js (100%) rename test/fixtures/transformation/{es6-property-name-shorthand/mixed => es6-properties.shorthand/shorthand-mixed}/actual.js (100%) rename test/fixtures/transformation/{es6-property-name-shorthand/mixed => es6-properties.shorthand/shorthand-mixed}/expected.js (100%) rename test/fixtures/transformation/{es6-property-name-shorthand/multiple => es6-properties.shorthand/shorthand-multiple}/actual.js (100%) rename test/fixtures/transformation/{es6-property-name-shorthand/multiple => es6-properties.shorthand/shorthand-multiple}/expected.js (100%) rename test/fixtures/transformation/{es6-property-name-shorthand/single => es6-properties.shorthand/shorthand-single}/actual.js (100%) rename test/fixtures/transformation/{es6-property-name-shorthand/single => es6-properties.shorthand/shorthand-single}/expected.js (100%) rename test/fixtures/transformation/{es7-array-comprehension => es7-comprehensions}/arguments/actual.js (100%) rename test/fixtures/transformation/{es7-array-comprehension => es7-comprehensions}/arguments/expected.js (100%) rename test/fixtures/transformation/{es7-array-comprehension => es7-comprehensions}/array-expression-single-if/actual.js (100%) rename test/fixtures/transformation/{es7-array-comprehension => es7-comprehensions}/array-expression-single-if/expected.js (100%) rename test/fixtures/transformation/{es7-array-comprehension => es7-comprehensions}/array-expression-single/actual.js (100%) rename test/fixtures/transformation/{es7-array-comprehension => es7-comprehensions}/array-expression-single/expected.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/multiple-if => es7-comprehensions/array-multiple-if}/actual.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/multiple-if => es7-comprehensions/array-multiple-if}/expected.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/multiple => es7-comprehensions/array-multiple}/actual.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/multiple => es7-comprehensions/array-multiple}/expected.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/single-if => es7-comprehensions/array-single-if}/actual.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/single-if => es7-comprehensions/array-single-if}/expected.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/single => es7-comprehensions/array-single}/actual.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/single => es7-comprehensions/array-single}/expected.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/this => es7-comprehensions/array-this}/actual.js (100%) rename test/fixtures/transformation/{es7-array-comprehension/this => es7-comprehensions/array-this}/expected.js (100%) rename test/fixtures/transformation/{es7-generator-comprehension/simple => es7-comprehensions/generator}/exec.js (100%) rename test/fixtures/transformation/{es7-array-comprehension => es7-comprehensions}/options.json (100%) delete mode 100644 test/fixtures/transformation/es7-generator-comprehension/options.json diff --git a/lib/6to5/transformation/transform.js b/lib/6to5/transformation/transform.js index 99607a39f1..b64d31094a 100644 --- a/lib/6to5/transformation/transform.js +++ b/lib/6to5/transformation/transform.js @@ -44,65 +44,66 @@ transform.moduleFormatters = { }; _.each({ - specNoForInOfAssignment: require("./transformers/spec-no-for-in-of-assignment"), - specSetters: require("./transformers/spec-setters"), - specBlockScopedFunctions: require("./transformers/spec-block-scoped-functions"), + specNoForInOfAssignment: require("./transformers/spec/no-for-in-of-assignment"), + specSetters: require("./transformers/spec/setters"), + specBlockScopedFunctions: require("./transformers/spec/block-scoped-functions"), - // playground - malletOperator: require("./transformers/playground-mallet-operator"), - methodBinding: require("./transformers/playground-method-binding"), - memoizationOperator: require("./transformers/playground-memoization-operator"), - objectGetterMemoization: require("./transformers/playground-object-getter-memoization"), + malletOperator: require("./transformers/playground/mallet-operator"), + methodBinding: require("./transformers/playground/method-binding"), + memoizationOperator: require("./transformers/playground/memoization-operator"), + objectGetterMemoization: require("./transformers/playground/object-getter-memoization"), - asyncToGenerator: require("./transformers/optional-async-to-generator"), - bluebirdCoroutines: require("./transformers/optional-bluebird-coroutines"), + asyncToGenerator: require("./transformers/optional/async-to-generator"), + bluebirdCoroutines: require("./transformers/optional/bluebird-coroutines"), - react: require("./transformers/react"), - modules: require("./transformers/es6-modules"), - propertyNameShorthand: require("./transformers/es6-property-name-shorthand"), - arrayComprehension: require("./transformers/es7-array-comprehension"), - generatorComprehension: require("./transformers/es7-generator-comprehension"), - arrowFunctions: require("./transformers/es6-arrow-functions"), - classes: require("./transformers/es6-classes"), + react: require("./transformers/other/react"), + modules: require("./transformers/es6/modules"), + comprehensions: require("./transformers/es7/comprehensions"), + arrowFunctions: require("./transformers/es6/arrow-functions"), + classes: require("./transformers/es6/classes"), - objectSpread: require("./transformers/es7-object-spread"), - exponentiationOperator: require("./transformers/es7-exponentiation-operator"), - spread: require("./transformers/es6-spread"), - templateLiterals: require("./transformers/es6-template-literals"), - propertyMethodAssignment: require("./transformers/es6-property-method-assignment"), - computedPropertyNames: require("./transformers/es6-computed-property-names"), - defaultParameters: require("./transformers/es6-default-parameters"), - restParameters: require("./transformers/es6-rest-parameters"), - destructuring: require("./transformers/es6-destructuring"), - forOf: require("./transformers/es6-for-of"), - unicodeRegex: require("./transformers/es6-unicode-regex"), - abstractReferences: require("./transformers/es7-abstract-references"), + objectSpread: require("./transformers/es7/object-spread"), + exponentiationOperator: require("./transformers/es7/exponentiation-operator"), + spread: require("./transformers/es6/spread"), + templateLiterals: require("./transformers/es6/template-literals"), - constants: require("./transformers/es6-constants"), - letScoping: require("./transformers/es6-let-scoping"), - blockScopingTDZ: require("./transformers/optional-block-scoping-tdz"), + "properties.mutators": require("./transformers/es5/properties.mutators"), + "properties.shorthand": require("./transformers/es6/properties.shorthand"), + "properties.computed": require("./transformers/es6/properties.computed"), + + "parameters.default": require("./transformers/es6/parameters.default"), + "parameters.rest": require("./transformers/es6/parameters.rest"), + + destructuring: require("./transformers/es6/destructuring"), + forOf: require("./transformers/es6/for-of"), + unicodeRegex: require("./transformers/es6/unicode-regex"), + abstractReferences: require("./transformers/es7/abstract-references"), + + constants: require("./transformers/es6/constants"), + blockScoping: require("./transformers/es6/block-scoping"), + blockScopingTDZ: require("./transformers/optional/block-scoping-tdz"), _blockHoist: require("./transformers/_block-hoist"), - generators: require("./transformers/es6-generators"), + generators: require("./transformers/es6/generators"), - protoToAssign: require("./transformers/optional-proto-to-assign"), + protoToAssign: require("./transformers/optional/proto-to-assign"), _declarations: require("./transformers/_declarations"), // wrap up - useStrict: require("./transformers/use-strict"), + useStrict: require("./transformers/other/use-strict"), _aliasFunctions: require("./transformers/_alias-functions"), _moduleFormatter: require("./transformers/_module-formatter"), - typeofSymbol: require("./transformers/optional-typeof-symbol"), - selfContained: require("./transformers/optional-self-contained"), - undefinedToVoid: require("./transformers/optional-undefined-to-void"), - undeclaredVariableCheck: require("./transformers/optional-undeclared-variable-check"), + typeofSymbol: require("./transformers/optional/typeof-symbol"), + selfContained: require("./transformers/optional/self-contained"), + undefinedToVoid: require("./transformers/optional/undefined-to-void"), + undeclaredVariableCheck: require("./transformers/optional/undeclared-variable-check"), // spec - specPropertyLiterals: require("./transformers/spec-property-literals"), - specMemberExpressionLiterals: require("./transformers/spec-member-expression-literals") + specPropertyLiterals: require("./transformers/spec/property-literals"), + specMemberExpressionLiterals: require("./transformers/spec/member-expression-literals") }, function (transformer, key) { transform.transformers[key] = new Transformer(key, transformer); }); diff --git a/lib/6to5/transformation/transformers/es5-property.mutators.js b/lib/6to5/transformation/transformers/es5/properties.mutators.js similarity index 88% rename from lib/6to5/transformation/transformers/es5-property.mutators.js rename to lib/6to5/transformation/transformers/es5/properties.mutators.js index 9ca360fd94..ede62a061d 100644 --- a/lib/6to5/transformation/transformers/es5-property.mutators.js +++ b/lib/6to5/transformation/transformers/es5/properties.mutators.js @@ -1,7 +1,7 @@ "use strict"; -var util = require("../../util"); -var t = require("../../types"); +var util = require("../../../util"); +var t = require("../../../types"); exports.ObjectExpression = function (node) { var mutatorMap = {}; diff --git a/lib/6to5/transformation/transformers/es6-arrow-functions.js b/lib/6to5/transformation/transformers/es6/arrow-functions.js similarity index 85% rename from lib/6to5/transformation/transformers/es6-arrow-functions.js rename to lib/6to5/transformation/transformers/es6/arrow-functions.js index e822b42707..32dec4e25c 100644 --- a/lib/6to5/transformation/transformers/es6-arrow-functions.js +++ b/lib/6to5/transformation/transformers/es6/arrow-functions.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.ArrowFunctionExpression = function (node) { t.ensureBlock(node); diff --git a/lib/6to5/transformation/transformers/es6-block-scoping.js b/lib/6to5/transformation/transformers/es6/block-scoping.js similarity index 98% rename from lib/6to5/transformation/transformers/es6-block-scoping.js rename to lib/6to5/transformation/transformers/es6/block-scoping.js index 044be99030..b342c9a347 100644 --- a/lib/6to5/transformation/transformers/es6-block-scoping.js +++ b/lib/6to5/transformation/transformers/es6/block-scoping.js @@ -1,8 +1,8 @@ "use strict"; -var traverse = require("../../traverse"); -var util = require("../../util"); -var t = require("../../types"); +var traverse = require("../../../traverse"); +var util = require("../../../util"); +var t = require("../../../types"); var _ = require("lodash"); var isLet = function (node, parent) { diff --git a/lib/6to5/transformation/transformers/es6-classes.js b/lib/6to5/transformation/transformers/es6/classes.js similarity index 96% rename from lib/6to5/transformation/transformers/es6-classes.js rename to lib/6to5/transformation/transformers/es6/classes.js index e320d4634e..6c1b10f5b3 100644 --- a/lib/6to5/transformation/transformers/es6-classes.js +++ b/lib/6to5/transformation/transformers/es6/classes.js @@ -1,9 +1,9 @@ "use strict"; -var ReplaceSupers = require("../helpers/replace-supers"); -var nameMethod = require("../helpers/name-method"); -var util = require("../../util"); -var t = require("../../types"); +var ReplaceSupers = require("../../helpers/replace-supers"); +var nameMethod = require("../../helpers/name-method"); +var util = require("../../../util"); +var t = require("../../../types"); exports.ClassDeclaration = function (node, parent, scope, context, file) { return new Class(node, file, scope, true).run(); diff --git a/lib/6to5/transformation/transformers/es6-constants.js b/lib/6to5/transformation/transformers/es6/constants.js similarity index 96% rename from lib/6to5/transformation/transformers/es6-constants.js rename to lib/6to5/transformation/transformers/es6/constants.js index 7be895f0f2..c70ceffeef 100644 --- a/lib/6to5/transformation/transformers/es6-constants.js +++ b/lib/6to5/transformation/transformers/es6/constants.js @@ -1,7 +1,7 @@ "use strict"; -var traverse = require("../../traverse"); -var t = require("../../types"); +var traverse = require("../../../traverse"); +var t = require("../../../types"); var _ = require("lodash"); exports.Program = diff --git a/lib/6to5/transformation/transformers/es6-destructuring.js b/lib/6to5/transformation/transformers/es6/destructuring.js similarity index 99% rename from lib/6to5/transformation/transformers/es6-destructuring.js rename to lib/6to5/transformation/transformers/es6/destructuring.js index 35d5ae886b..22aad08b76 100644 --- a/lib/6to5/transformation/transformers/es6-destructuring.js +++ b/lib/6to5/transformation/transformers/es6/destructuring.js @@ -2,7 +2,7 @@ // TODO: Clean up -var t = require("../../types"); +var t = require("../../../types"); var buildVariableAssign = function (opts, id, init) { var op = opts.operator; diff --git a/lib/6to5/transformation/transformers/es6-for-of.js b/lib/6to5/transformation/transformers/es6/for-of.js similarity index 97% rename from lib/6to5/transformation/transformers/es6-for-of.js rename to lib/6to5/transformation/transformers/es6/for-of.js index 3e3f9ac0f3..f7d409241e 100644 --- a/lib/6to5/transformation/transformers/es6-for-of.js +++ b/lib/6to5/transformation/transformers/es6/for-of.js @@ -1,7 +1,7 @@ "use strict"; -var util = require("../../util"); -var t = require("../../types"); +var util = require("../../../util"); +var t = require("../../../types"); exports.ForOfStatement = function (node, parent, scope, context, file) { var callback = spec; diff --git a/lib/6to5/transformation/transformers/es6-generators.js b/lib/6to5/transformation/transformers/es6/generators.js similarity index 100% rename from lib/6to5/transformation/transformers/es6-generators.js rename to lib/6to5/transformation/transformers/es6/generators.js diff --git a/lib/6to5/transformation/transformers/es6-modules.js b/lib/6to5/transformation/transformers/es6/modules.js similarity index 97% rename from lib/6to5/transformation/transformers/es6-modules.js rename to lib/6to5/transformation/transformers/es6/modules.js index b59b191323..adcbe02d9c 100644 --- a/lib/6to5/transformation/transformers/es6-modules.js +++ b/lib/6to5/transformation/transformers/es6/modules.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.ast = { before: function (ast, file) { diff --git a/lib/6to5/transformation/transformers/es6-parameters.default.js b/lib/6to5/transformation/transformers/es6/parameters.default.js similarity index 94% rename from lib/6to5/transformation/transformers/es6-parameters.default.js rename to lib/6to5/transformation/transformers/es6/parameters.default.js index acb29933d0..e634696195 100644 --- a/lib/6to5/transformation/transformers/es6-parameters.default.js +++ b/lib/6to5/transformation/transformers/es6/parameters.default.js @@ -1,8 +1,8 @@ "use strict"; -var traverse = require("../../traverse"); -var util = require("../../util"); -var t = require("../../types"); +var traverse = require("../../../traverse"); +var util = require("../../../util"); +var t = require("../../../types"); exports.Function = function (node, parent, scope, context, file) { if (!node.defaults || !node.defaults.length) return; diff --git a/lib/6to5/transformation/transformers/es6-parameters.rest.js b/lib/6to5/transformation/transformers/es6/parameters.rest.js similarity index 96% rename from lib/6to5/transformation/transformers/es6-parameters.rest.js rename to lib/6to5/transformation/transformers/es6/parameters.rest.js index dac44731c0..3a2f226cb6 100644 --- a/lib/6to5/transformation/transformers/es6-parameters.rest.js +++ b/lib/6to5/transformation/transformers/es6/parameters.rest.js @@ -1,7 +1,7 @@ "use strict"; -var util = require("../../util"); -var t = require("../../types"); +var util = require("../../../util"); +var t = require("../../../types"); exports.Function = function (node, parent, scope, context, file) { if (!node.rest) return; diff --git a/lib/6to5/transformation/transformers/es6-property.computed.js b/lib/6to5/transformation/transformers/es6/properties.computed.js similarity index 96% rename from lib/6to5/transformation/transformers/es6-property.computed.js rename to lib/6to5/transformation/transformers/es6/properties.computed.js index 9d08092830..20fbcf6e50 100644 --- a/lib/6to5/transformation/transformers/es6-property.computed.js +++ b/lib/6to5/transformation/transformers/es6/properties.computed.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.ObjectExpression = function (node, parent, scope, context, file) { var hasComputed = false; @@ -24,7 +24,7 @@ exports.ObjectExpression = function (node, parent, scope, context, file) { // var callback = spec; - if (file.isLoose("computedPropertyNames")) callback = loose; + if (file.isLoose("properties.computed")) callback = loose; var result = callback(node, body, objId, initProps, file); if (result) return result; diff --git a/lib/6to5/transformation/transformers/es6-property.shorthand.js b/lib/6to5/transformation/transformers/es6/properties.shorthand.js similarity index 68% rename from lib/6to5/transformation/transformers/es6-property.shorthand.js rename to lib/6to5/transformation/transformers/es6/properties.shorthand.js index 9792975d8d..4c4fbeafb0 100644 --- a/lib/6to5/transformation/transformers/es6-property.shorthand.js +++ b/lib/6to5/transformation/transformers/es6/properties.shorthand.js @@ -1,6 +1,8 @@ "use strict"; -var nameMethod = require("../helpers/name-method"); +var nameMethod = require("../../helpers/name-method"); +var t = require("../../../types"); +var _ = require("lodash"); exports.Property = function (node, parent, scope, context, file) { if (node.method) { diff --git a/lib/6to5/transformation/transformers/es6-spread.js b/lib/6to5/transformation/transformers/es6/spread.js similarity index 98% rename from lib/6to5/transformation/transformers/es6-spread.js rename to lib/6to5/transformation/transformers/es6/spread.js index fff975918c..25077f9248 100644 --- a/lib/6to5/transformation/transformers/es6-spread.js +++ b/lib/6to5/transformation/transformers/es6/spread.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); var _ = require("lodash"); var getSpreadLiteral = function (spread, file) { diff --git a/lib/6to5/transformation/transformers/es6-template-literals.js b/lib/6to5/transformation/transformers/es6/template-literals.js similarity index 97% rename from lib/6to5/transformation/transformers/es6-template-literals.js rename to lib/6to5/transformation/transformers/es6/template-literals.js index 682fbbe85b..b9a6f43150 100644 --- a/lib/6to5/transformation/transformers/es6-template-literals.js +++ b/lib/6to5/transformation/transformers/es6/template-literals.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); var buildBinaryExpression = function (left, right) { return t.binaryExpression("+", left, right); diff --git a/lib/6to5/transformation/transformers/es6-unicode-regex.js b/lib/6to5/transformation/transformers/es6/unicode-regex.js similarity index 100% rename from lib/6to5/transformation/transformers/es6-unicode-regex.js rename to lib/6to5/transformation/transformers/es6/unicode-regex.js diff --git a/lib/6to5/transformation/transformers/es7-abstract-references.js b/lib/6to5/transformation/transformers/es7/abstract-references.js similarity index 97% rename from lib/6to5/transformation/transformers/es7-abstract-references.js rename to lib/6to5/transformation/transformers/es7/abstract-references.js index f6c7eefb7e..a8ce0c1bd1 100644 --- a/lib/6to5/transformation/transformers/es7-abstract-references.js +++ b/lib/6to5/transformation/transformers/es7/abstract-references.js @@ -2,8 +2,8 @@ // https://github.com/zenparsing/es-abstract-refs -var util = require("../../util"); -var t = require("../../types"); +var util = require("../../../util"); +var t = require("../../../types"); exports.experimental = true; diff --git a/lib/6to5/transformation/transformers/es7-comprehensions.js b/lib/6to5/transformation/transformers/es7/comprehensions.js similarity index 71% rename from lib/6to5/transformation/transformers/es7-comprehensions.js rename to lib/6to5/transformation/transformers/es7/comprehensions.js index 0dd9661dfd..e57dce69b5 100644 --- a/lib/6to5/transformation/transformers/es7-comprehensions.js +++ b/lib/6to5/transformation/transformers/es7/comprehensions.js @@ -1,15 +1,19 @@ "use strict"; -var buildComprehension = require("../helpers/build-comprehension"); -var traverse = require("../../traverse"); -var util = require("../../util"); -var t = require("../../types"); +var buildComprehension = require("../../helpers/build-comprehension"); +var traverse = require("../../../traverse"); +var util = require("../../../util"); +var t = require("../../../types"); exports.experimental = true; -exports.ComprehensionExpression = function (node) { - if (!node.generator) return; +exports.ComprehensionExpression = function (node, parent, scope, context, file) { + var callback = array; + if (node.generator) callback = generator; + return callback(node, parent, scope, file); +}; +var generator = function (node) { var body = []; var container = t.functionExpression(null, [], t.blockStatement(body), true); container._aliasFunction = true; @@ -21,9 +25,7 @@ exports.ComprehensionExpression = function (node) { return t.callExpression(container, []); }; -exports.ComprehensionExpression = function (node, parent, scope, context, file) { - if (node.generator) return; - +var array = function (node, parent, scope, file) { var uid = scope.generateUidBasedOnNode(parent, file); var container = util.template("array-comprehension-container", { diff --git a/lib/6to5/transformation/transformers/es7-exponentiation-operator.js b/lib/6to5/transformation/transformers/es7/exponentiation-operator.js similarity index 71% rename from lib/6to5/transformation/transformers/es7-exponentiation-operator.js rename to lib/6to5/transformation/transformers/es7/exponentiation-operator.js index 9ef16713d8..3bc8071af3 100644 --- a/lib/6to5/transformation/transformers/es7-exponentiation-operator.js +++ b/lib/6to5/transformation/transformers/es7/exponentiation-operator.js @@ -4,8 +4,8 @@ exports.experimental = true; -var build = require("../helpers/build-binary-assignment-operator-transformer"); -var t = require("../../types"); +var build = require("../../helpers/build-binary-assignment-operator-transformer"); +var t = require("../../../types"); var MATH_POW = t.memberExpression(t.identifier("Math"), t.identifier("pow")); diff --git a/lib/6to5/transformation/transformers/es7-object-spread.js b/lib/6to5/transformation/transformers/es7/object-spread.js similarity index 96% rename from lib/6to5/transformation/transformers/es7-object-spread.js rename to lib/6to5/transformation/transformers/es7/object-spread.js index 87b32bff53..3d3deef6d1 100644 --- a/lib/6to5/transformation/transformers/es7-object-spread.js +++ b/lib/6to5/transformation/transformers/es7/object-spread.js @@ -2,7 +2,7 @@ // https://github.com/sebmarkbage/ecmascript-rest-spread -var t = require("../../types"); +var t = require("../../../types"); exports.experimental = true; diff --git a/lib/6to5/transformation/transformers/optional-async-to-generator.js b/lib/6to5/transformation/transformers/optional/async-to-generator.js similarity index 67% rename from lib/6to5/transformation/transformers/optional-async-to-generator.js rename to lib/6to5/transformation/transformers/optional/async-to-generator.js index 04f68f8cd9..017e7b3dd8 100644 --- a/lib/6to5/transformation/transformers/optional-async-to-generator.js +++ b/lib/6to5/transformation/transformers/optional/async-to-generator.js @@ -1,7 +1,7 @@ "use strict"; -var remapAsyncToGenerator = require("../helpers/remap-async-to-generator"); -var bluebirdCoroutines = require("./optional-bluebird-coroutines"); +var remapAsyncToGenerator = require("../../helpers/remap-async-to-generator"); +var bluebirdCoroutines = require("./bluebird-coroutines"); exports.optional = true; diff --git a/lib/6to5/transformation/transformers/optional-block-scoping-tdz.js b/lib/6to5/transformation/transformers/optional/block-scoping-tdz.js similarity index 93% rename from lib/6to5/transformation/transformers/optional-block-scoping-tdz.js rename to lib/6to5/transformation/transformers/optional/block-scoping-tdz.js index 27472f8bdf..81f7dcf5c4 100644 --- a/lib/6to5/transformation/transformers/optional-block-scoping-tdz.js +++ b/lib/6to5/transformation/transformers/optional/block-scoping-tdz.js @@ -1,5 +1,5 @@ -var traverse = require("../../traverse"); -var t = require("../../types"); +var traverse = require("../../../traverse"); +var t = require("../../../types"); exports.optional = true; diff --git a/lib/6to5/transformation/transformers/optional-bluebird-coroutines.js b/lib/6to5/transformation/transformers/optional/bluebird-coroutines.js similarity index 74% rename from lib/6to5/transformation/transformers/optional-bluebird-coroutines.js rename to lib/6to5/transformation/transformers/optional/bluebird-coroutines.js index 1aa2a24863..9608c5ec9a 100644 --- a/lib/6to5/transformation/transformers/optional-bluebird-coroutines.js +++ b/lib/6to5/transformation/transformers/optional/bluebird-coroutines.js @@ -1,7 +1,7 @@ "use strict"; -var remapAsyncToGenerator = require("../helpers/remap-async-to-generator"); -var t = require("../../types"); +var remapAsyncToGenerator = require("../../helpers/remap-async-to-generator"); +var t = require("../../../types"); exports.manipulateOptions = function (opts) { opts.experimental = true; diff --git a/lib/6to5/transformation/transformers/optional-proto-to-assign.js b/lib/6to5/transformation/transformers/optional/proto-to-assign.js similarity index 98% rename from lib/6to5/transformation/transformers/optional-proto-to-assign.js rename to lib/6to5/transformation/transformers/optional/proto-to-assign.js index 1533480b76..a9aaf62090 100644 --- a/lib/6to5/transformation/transformers/optional-proto-to-assign.js +++ b/lib/6to5/transformation/transformers/optional/proto-to-assign.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); var _ = require("lodash"); var isProtoKey = function (node) { diff --git a/lib/6to5/transformation/transformers/optional-self-contained.js b/lib/6to5/transformation/transformers/optional/self-contained.js similarity index 94% rename from lib/6to5/transformation/transformers/optional-self-contained.js rename to lib/6to5/transformation/transformers/optional/self-contained.js index 532235582c..5ce54bf13d 100644 --- a/lib/6to5/transformation/transformers/optional-self-contained.js +++ b/lib/6to5/transformation/transformers/optional/self-contained.js @@ -1,9 +1,9 @@ "use strict"; -var traverse = require("../../traverse"); -var util = require("../../util"); +var traverse = require("../../../traverse"); +var util = require("../../../util"); var core = require("core-js/library"); -var t = require("../../types"); +var t = require("../../../types"); var _ = require("lodash"); var coreHas = function (node) { diff --git a/lib/6to5/transformation/transformers/optional-typeof-symbol.js b/lib/6to5/transformation/transformers/optional/typeof-symbol.js similarity index 94% rename from lib/6to5/transformation/transformers/optional-typeof-symbol.js rename to lib/6to5/transformation/transformers/optional/typeof-symbol.js index a3d938ccf8..c4a10c6fa1 100644 --- a/lib/6to5/transformation/transformers/optional-typeof-symbol.js +++ b/lib/6to5/transformation/transformers/optional/typeof-symbol.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.optional = true; diff --git a/lib/6to5/transformation/transformers/optional-undeclared-variable-check.js b/lib/6to5/transformation/transformers/optional/undeclared-variable-check.js similarity index 100% rename from lib/6to5/transformation/transformers/optional-undeclared-variable-check.js rename to lib/6to5/transformation/transformers/optional/undeclared-variable-check.js diff --git a/lib/6to5/transformation/transformers/optional-undefined-to-void.js b/lib/6to5/transformation/transformers/optional/undefined-to-void.js similarity index 86% rename from lib/6to5/transformation/transformers/optional-undefined-to-void.js rename to lib/6to5/transformation/transformers/optional/undefined-to-void.js index f233becf74..9be98bf08a 100644 --- a/lib/6to5/transformation/transformers/optional-undefined-to-void.js +++ b/lib/6to5/transformation/transformers/optional/undefined-to-void.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.optional = true; diff --git a/lib/6to5/transformation/transformers/react.js b/lib/6to5/transformation/transformers/other/react.js similarity index 99% rename from lib/6to5/transformation/transformers/react.js rename to lib/6to5/transformation/transformers/other/react.js index f906cead68..2ecaa07523 100644 --- a/lib/6to5/transformation/transformers/react.js +++ b/lib/6to5/transformation/transformers/other/react.js @@ -6,7 +6,7 @@ // jsx var esutils = require("esutils"); -var t = require("../../types"); +var t = require("../../../types"); var _ = require("lodash"); exports.XJSIdentifier = function (node) { diff --git a/lib/6to5/transformation/transformers/use-strict.js b/lib/6to5/transformation/transformers/other/use-strict.js similarity index 66% rename from lib/6to5/transformation/transformers/use-strict.js rename to lib/6to5/transformation/transformers/other/use-strict.js index e8b813d253..5a06b90d7a 100644 --- a/lib/6to5/transformation/transformers/use-strict.js +++ b/lib/6to5/transformation/transformers/other/use-strict.js @@ -1,7 +1,7 @@ "use strict"; -var useStrict = require("../helpers/use-strict"); -var t = require("../../types"); +var useStrict = require("../../helpers/use-strict"); +var t = require("../../../types"); exports.ast = { exit: function (ast) { diff --git a/lib/6to5/transformation/transformers/playground-mallet-operator.js b/lib/6to5/transformation/transformers/playground/mallet-operator.js similarity index 77% rename from lib/6to5/transformation/transformers/playground-mallet-operator.js rename to lib/6to5/transformation/transformers/playground/mallet-operator.js index 5bd48d6046..514d7145ac 100644 --- a/lib/6to5/transformation/transformers/playground-mallet-operator.js +++ b/lib/6to5/transformation/transformers/playground/mallet-operator.js @@ -1,7 +1,7 @@ "use strict"; -var build = require("../helpers/build-conditional-assignment-operator-transformer"); -var t = require("../../types"); +var build = require("../../helpers/build-conditional-assignment-operator-transformer"); +var t = require("../../../types"); build(exports, { is: function (node, file) { diff --git a/lib/6to5/transformation/transformers/playground-memoization-operator.js b/lib/6to5/transformation/transformers/playground/memoization-operator.js similarity index 77% rename from lib/6to5/transformation/transformers/playground-memoization-operator.js rename to lib/6to5/transformation/transformers/playground/memoization-operator.js index 0f41ffb3c6..4d55676c42 100644 --- a/lib/6to5/transformation/transformers/playground-memoization-operator.js +++ b/lib/6to5/transformation/transformers/playground/memoization-operator.js @@ -1,7 +1,7 @@ "use strict"; -var build = require("../helpers/build-conditional-assignment-operator-transformer"); -var t = require("../../types"); +var build = require("../../helpers/build-conditional-assignment-operator-transformer"); +var t = require("../../../types"); build(exports, { is: function (node) { diff --git a/lib/6to5/transformation/transformers/playground-method-binding.js b/lib/6to5/transformation/transformers/playground/method-binding.js similarity index 97% rename from lib/6to5/transformation/transformers/playground-method-binding.js rename to lib/6to5/transformation/transformers/playground/method-binding.js index 69e901f628..f875dbc53c 100644 --- a/lib/6to5/transformation/transformers/playground-method-binding.js +++ b/lib/6to5/transformation/transformers/playground/method-binding.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.BindMemberExpression = function (node, parent, scope, context, file) { var object = node.object; diff --git a/lib/6to5/transformation/transformers/playground-object-getter-memoization.js b/lib/6to5/transformation/transformers/playground/object-getter-memoization.js similarity index 88% rename from lib/6to5/transformation/transformers/playground-object-getter-memoization.js rename to lib/6to5/transformation/transformers/playground/object-getter-memoization.js index d5acc71105..d80cea8bf3 100644 --- a/lib/6to5/transformation/transformers/playground-object-getter-memoization.js +++ b/lib/6to5/transformation/transformers/playground/object-getter-memoization.js @@ -1,7 +1,7 @@ "use strict"; -var traverse = require("../../traverse"); -var t = require("../../types"); +var traverse = require("../../../traverse"); +var t = require("../../../types"); exports.Property = exports.MethodDefinition = function (node, parent, scope, context, file) { diff --git a/lib/6to5/transformation/transformers/spec-block-scoped-functions.js b/lib/6to5/transformation/transformers/spec/block-scoped-functions.js similarity index 94% rename from lib/6to5/transformation/transformers/spec-block-scoped-functions.js rename to lib/6to5/transformation/transformers/spec/block-scoped-functions.js index 2359246b91..edae11d544 100644 --- a/lib/6to5/transformation/transformers/spec-block-scoped-functions.js +++ b/lib/6to5/transformation/transformers/spec/block-scoped-functions.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.BlockStatement = function (node, parent) { if (t.isFunction(parent) || t.isExportDeclaration(parent)) { diff --git a/lib/6to5/transformation/transformers/spec-member-expression-literals.js b/lib/6to5/transformation/transformers/spec/member-expression-literals.js similarity index 92% rename from lib/6to5/transformation/transformers/spec-member-expression-literals.js rename to lib/6to5/transformation/transformers/spec/member-expression-literals.js index d4c318a996..7b97bed4be 100644 --- a/lib/6to5/transformation/transformers/spec-member-expression-literals.js +++ b/lib/6to5/transformation/transformers/spec/member-expression-literals.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.MemberExpression = function (node) { var prop = node.property; diff --git a/lib/6to5/transformation/transformers/spec-no-for-in-of-assignment.js b/lib/6to5/transformation/transformers/spec/no-for-in-of-assignment.js similarity index 90% rename from lib/6to5/transformation/transformers/spec-no-for-in-of-assignment.js rename to lib/6to5/transformation/transformers/spec/no-for-in-of-assignment.js index 01de184aaa..165b888533 100644 --- a/lib/6to5/transformation/transformers/spec-no-for-in-of-assignment.js +++ b/lib/6to5/transformation/transformers/spec/no-for-in-of-assignment.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.ForInStatement = exports.ForOfStatement = function (node, parent, scope, context, file) { diff --git a/lib/6to5/transformation/transformers/spec-property-literals.js b/lib/6to5/transformation/transformers/spec/property-literals.js similarity index 92% rename from lib/6to5/transformation/transformers/spec-property-literals.js rename to lib/6to5/transformation/transformers/spec/property-literals.js index 3473aa9f26..b83882bac7 100644 --- a/lib/6to5/transformation/transformers/spec-property-literals.js +++ b/lib/6to5/transformation/transformers/spec/property-literals.js @@ -1,6 +1,6 @@ "use strict"; -var t = require("../../types"); +var t = require("../../../types"); exports.Property = function (node) { var key = node.key; diff --git a/lib/6to5/transformation/transformers/spec-setters.js b/lib/6to5/transformation/transformers/spec/setters.js similarity index 100% rename from lib/6to5/transformation/transformers/spec-setters.js rename to lib/6to5/transformation/transformers/spec/setters.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/getter-and-setter/actual.js b/test/fixtures/transformation/es5-property.mutators/getter-and-setter/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/getter-and-setter/actual.js rename to test/fixtures/transformation/es5-property.mutators/getter-and-setter/actual.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/getter-and-setter/expected.js b/test/fixtures/transformation/es5-property.mutators/getter-and-setter/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/getter-and-setter/expected.js rename to test/fixtures/transformation/es5-property.mutators/getter-and-setter/expected.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/getter/actual.js b/test/fixtures/transformation/es5-property.mutators/getter/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/getter/actual.js rename to test/fixtures/transformation/es5-property.mutators/getter/actual.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/getter/expected.js b/test/fixtures/transformation/es5-property.mutators/getter/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/getter/expected.js rename to test/fixtures/transformation/es5-property.mutators/getter/expected.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/setter/actual.js b/test/fixtures/transformation/es5-property.mutators/setter/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/setter/actual.js rename to test/fixtures/transformation/es5-property.mutators/setter/actual.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/setter/expected.js b/test/fixtures/transformation/es5-property.mutators/setter/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/setter/expected.js rename to test/fixtures/transformation/es5-property.mutators/setter/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/options.json b/test/fixtures/transformation/es6-computed-property-names-loose/options.json deleted file mode 100644 index 422293bd82..0000000000 --- a/test/fixtures/transformation/es6-computed-property-names-loose/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "loose": ["computedPropertyNames"] -} diff --git a/test/fixtures/transformation/es6-default-parameters/destructuring/exec.js b/test/fixtures/transformation/es6-parameters.default/destructuring/exec.js similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/destructuring/exec.js rename to test/fixtures/transformation/es6-parameters.default/destructuring/exec.js diff --git a/test/fixtures/transformation/es6-default-parameters/multiple/actual.js b/test/fixtures/transformation/es6-parameters.default/multiple/actual.js similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/multiple/actual.js rename to test/fixtures/transformation/es6-parameters.default/multiple/actual.js diff --git a/test/fixtures/transformation/es6-default-parameters/multiple/expected.js b/test/fixtures/transformation/es6-parameters.default/multiple/expected.js similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/multiple/expected.js rename to test/fixtures/transformation/es6-parameters.default/multiple/expected.js diff --git a/test/fixtures/transformation/es6-default-parameters/single/actual.js b/test/fixtures/transformation/es6-parameters.default/single/actual.js similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/single/actual.js rename to test/fixtures/transformation/es6-parameters.default/single/actual.js diff --git a/test/fixtures/transformation/es6-default-parameters/single/expected.js b/test/fixtures/transformation/es6-parameters.default/single/expected.js similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/single/expected.js rename to test/fixtures/transformation/es6-parameters.default/single/expected.js diff --git a/test/fixtures/transformation/es6-default-parameters/tdz-2/actual.js b/test/fixtures/transformation/es6-parameters.default/tdz-2/actual.js similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/tdz-2/actual.js rename to test/fixtures/transformation/es6-parameters.default/tdz-2/actual.js diff --git a/test/fixtures/transformation/es6-default-parameters/tdz-2/options.json b/test/fixtures/transformation/es6-parameters.default/tdz-2/options.json similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/tdz-2/options.json rename to test/fixtures/transformation/es6-parameters.default/tdz-2/options.json diff --git a/test/fixtures/transformation/es6-default-parameters/tdz-3/exec.js b/test/fixtures/transformation/es6-parameters.default/tdz-3/exec.js similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/tdz-3/exec.js rename to test/fixtures/transformation/es6-parameters.default/tdz-3/exec.js diff --git a/test/fixtures/transformation/es6-default-parameters/tdz/actual.js b/test/fixtures/transformation/es6-parameters.default/tdz/actual.js similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/tdz/actual.js rename to test/fixtures/transformation/es6-parameters.default/tdz/actual.js diff --git a/test/fixtures/transformation/es6-default-parameters/tdz/options.json b/test/fixtures/transformation/es6-parameters.default/tdz/options.json similarity index 100% rename from test/fixtures/transformation/es6-default-parameters/tdz/options.json rename to test/fixtures/transformation/es6-parameters.default/tdz/options.json diff --git a/test/fixtures/transformation/es6-rest-parameters/arrow-functions/actual.js b/test/fixtures/transformation/es6-parameters.rest/arrow-functions/actual.js similarity index 100% rename from test/fixtures/transformation/es6-rest-parameters/arrow-functions/actual.js rename to test/fixtures/transformation/es6-parameters.rest/arrow-functions/actual.js diff --git a/test/fixtures/transformation/es6-rest-parameters/arrow-functions/expected.js b/test/fixtures/transformation/es6-parameters.rest/arrow-functions/expected.js similarity index 100% rename from test/fixtures/transformation/es6-rest-parameters/arrow-functions/expected.js rename to test/fixtures/transformation/es6-parameters.rest/arrow-functions/expected.js diff --git a/test/fixtures/transformation/es6-rest-parameters/multiple/actual.js b/test/fixtures/transformation/es6-parameters.rest/multiple/actual.js similarity index 100% rename from test/fixtures/transformation/es6-rest-parameters/multiple/actual.js rename to test/fixtures/transformation/es6-parameters.rest/multiple/actual.js diff --git a/test/fixtures/transformation/es6-rest-parameters/multiple/expected.js b/test/fixtures/transformation/es6-parameters.rest/multiple/expected.js similarity index 100% rename from test/fixtures/transformation/es6-rest-parameters/multiple/expected.js rename to test/fixtures/transformation/es6-parameters.rest/multiple/expected.js diff --git a/test/fixtures/transformation/es6-rest-parameters/single/actual.js b/test/fixtures/transformation/es6-parameters.rest/single/actual.js similarity index 100% rename from test/fixtures/transformation/es6-rest-parameters/single/actual.js rename to test/fixtures/transformation/es6-parameters.rest/single/actual.js diff --git a/test/fixtures/transformation/es6-rest-parameters/single/expected.js b/test/fixtures/transformation/es6-parameters.rest/single/expected.js similarity index 100% rename from test/fixtures/transformation/es6-rest-parameters/single/expected.js rename to test/fixtures/transformation/es6-parameters.rest/single/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/argument/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/argument/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/argument/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/argument/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/argument/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/argument/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/argument/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/argument/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/assignment/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/assignment/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/assignment/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/assignment/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/assignment/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/assignment/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/assignment/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/assignment/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/ignore-symbol/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/ignore-symbol/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/ignore-symbol/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/ignore-symbol/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/ignore-symbol/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/ignore-symbol/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/ignore-symbol/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/ignore-symbol/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/method/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/method/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/method/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/method/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/method/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/method/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/method/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/method/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/mixed/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/mixed/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/mixed/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/mixed/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/mixed/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/mixed/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/mixed/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/mixed/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/multiple/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/multiple/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/multiple/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/multiple/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/multiple/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/multiple/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/multiple/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/multiple/expected.js diff --git a/test/fixtures/transformation/es6-properties.computed-loose/options.json b/test/fixtures/transformation/es6-properties.computed-loose/options.json new file mode 100644 index 0000000000..13af75f699 --- /dev/null +++ b/test/fixtures/transformation/es6-properties.computed-loose/options.json @@ -0,0 +1,3 @@ +{ + "loose": ["properties.computed"] +} diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/single/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/single/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/single/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/single/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/single/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/single/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/single/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/single/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/this/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/this/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/this/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/this/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/this/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/this/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/this/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/this/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/two/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/two/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/two/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/two/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/two/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/two/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/two/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/two/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/variable/actual.js b/test/fixtures/transformation/es6-properties.computed-loose/variable/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/variable/actual.js rename to test/fixtures/transformation/es6-properties.computed-loose/variable/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names-loose/variable/expected.js b/test/fixtures/transformation/es6-properties.computed-loose/variable/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names-loose/variable/expected.js rename to test/fixtures/transformation/es6-properties.computed-loose/variable/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/argument/actual.js b/test/fixtures/transformation/es6-properties.computed/argument/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/argument/actual.js rename to test/fixtures/transformation/es6-properties.computed/argument/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/argument/expected.js b/test/fixtures/transformation/es6-properties.computed/argument/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/argument/expected.js rename to test/fixtures/transformation/es6-properties.computed/argument/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/assignment/actual.js b/test/fixtures/transformation/es6-properties.computed/assignment/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/assignment/actual.js rename to test/fixtures/transformation/es6-properties.computed/assignment/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/assignment/expected.js b/test/fixtures/transformation/es6-properties.computed/assignment/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/assignment/expected.js rename to test/fixtures/transformation/es6-properties.computed/assignment/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/ignore-symbol/actual.js b/test/fixtures/transformation/es6-properties.computed/ignore-symbol/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/ignore-symbol/actual.js rename to test/fixtures/transformation/es6-properties.computed/ignore-symbol/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/ignore-symbol/expected.js b/test/fixtures/transformation/es6-properties.computed/ignore-symbol/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/ignore-symbol/expected.js rename to test/fixtures/transformation/es6-properties.computed/ignore-symbol/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/method/actual.js b/test/fixtures/transformation/es6-properties.computed/method/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/method/actual.js rename to test/fixtures/transformation/es6-properties.computed/method/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/method/expected.js b/test/fixtures/transformation/es6-properties.computed/method/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/method/expected.js rename to test/fixtures/transformation/es6-properties.computed/method/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/mixed/actual.js b/test/fixtures/transformation/es6-properties.computed/mixed/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/mixed/actual.js rename to test/fixtures/transformation/es6-properties.computed/mixed/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/mixed/expected.js b/test/fixtures/transformation/es6-properties.computed/mixed/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/mixed/expected.js rename to test/fixtures/transformation/es6-properties.computed/mixed/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/multiple/actual.js b/test/fixtures/transformation/es6-properties.computed/multiple/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/multiple/actual.js rename to test/fixtures/transformation/es6-properties.computed/multiple/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/multiple/expected.js b/test/fixtures/transformation/es6-properties.computed/multiple/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/multiple/expected.js rename to test/fixtures/transformation/es6-properties.computed/multiple/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/single/actual.js b/test/fixtures/transformation/es6-properties.computed/single/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/single/actual.js rename to test/fixtures/transformation/es6-properties.computed/single/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/single/expected.js b/test/fixtures/transformation/es6-properties.computed/single/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/single/expected.js rename to test/fixtures/transformation/es6-properties.computed/single/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/this/actual.js b/test/fixtures/transformation/es6-properties.computed/this/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/this/actual.js rename to test/fixtures/transformation/es6-properties.computed/this/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/this/expected.js b/test/fixtures/transformation/es6-properties.computed/this/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/this/expected.js rename to test/fixtures/transformation/es6-properties.computed/this/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/two/actual.js b/test/fixtures/transformation/es6-properties.computed/two/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/two/actual.js rename to test/fixtures/transformation/es6-properties.computed/two/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/two/expected.js b/test/fixtures/transformation/es6-properties.computed/two/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/two/expected.js rename to test/fixtures/transformation/es6-properties.computed/two/expected.js diff --git a/test/fixtures/transformation/es6-computed-property-names/variable/actual.js b/test/fixtures/transformation/es6-properties.computed/variable/actual.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/variable/actual.js rename to test/fixtures/transformation/es6-properties.computed/variable/actual.js diff --git a/test/fixtures/transformation/es6-computed-property-names/variable/expected.js b/test/fixtures/transformation/es6-properties.computed/variable/expected.js similarity index 100% rename from test/fixtures/transformation/es6-computed-property-names/variable/expected.js rename to test/fixtures/transformation/es6-properties.computed/variable/expected.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/computed/actual.js b/test/fixtures/transformation/es6-properties.shorthand/method-computed/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/computed/actual.js rename to test/fixtures/transformation/es6-properties.shorthand/method-computed/actual.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/computed/expected.js b/test/fixtures/transformation/es6-properties.shorthand/method-computed/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/computed/expected.js rename to test/fixtures/transformation/es6-properties.shorthand/method-computed/expected.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/method/actual.js b/test/fixtures/transformation/es6-properties.shorthand/method-plain/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/method/actual.js rename to test/fixtures/transformation/es6-properties.shorthand/method-plain/actual.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/method/expected.js b/test/fixtures/transformation/es6-properties.shorthand/method-plain/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/method/expected.js rename to test/fixtures/transformation/es6-properties.shorthand/method-plain/expected.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/method-self-reference/actual.js b/test/fixtures/transformation/es6-properties.shorthand/method-self-reference/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/method-self-reference/actual.js rename to test/fixtures/transformation/es6-properties.shorthand/method-self-reference/actual.js diff --git a/test/fixtures/transformation/es6-property-method-assignment/method-self-reference/expected.js b/test/fixtures/transformation/es6-properties.shorthand/method-self-reference/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-method-assignment/method-self-reference/expected.js rename to test/fixtures/transformation/es6-properties.shorthand/method-self-reference/expected.js diff --git a/test/fixtures/transformation/es6-property-name-shorthand/comments/actual.js b/test/fixtures/transformation/es6-properties.shorthand/shorthand-comments/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-name-shorthand/comments/actual.js rename to test/fixtures/transformation/es6-properties.shorthand/shorthand-comments/actual.js diff --git a/test/fixtures/transformation/es6-property-name-shorthand/comments/expected.js b/test/fixtures/transformation/es6-properties.shorthand/shorthand-comments/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-name-shorthand/comments/expected.js rename to test/fixtures/transformation/es6-properties.shorthand/shorthand-comments/expected.js diff --git a/test/fixtures/transformation/es6-property-name-shorthand/mixed/actual.js b/test/fixtures/transformation/es6-properties.shorthand/shorthand-mixed/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-name-shorthand/mixed/actual.js rename to test/fixtures/transformation/es6-properties.shorthand/shorthand-mixed/actual.js diff --git a/test/fixtures/transformation/es6-property-name-shorthand/mixed/expected.js b/test/fixtures/transformation/es6-properties.shorthand/shorthand-mixed/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-name-shorthand/mixed/expected.js rename to test/fixtures/transformation/es6-properties.shorthand/shorthand-mixed/expected.js diff --git a/test/fixtures/transformation/es6-property-name-shorthand/multiple/actual.js b/test/fixtures/transformation/es6-properties.shorthand/shorthand-multiple/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-name-shorthand/multiple/actual.js rename to test/fixtures/transformation/es6-properties.shorthand/shorthand-multiple/actual.js diff --git a/test/fixtures/transformation/es6-property-name-shorthand/multiple/expected.js b/test/fixtures/transformation/es6-properties.shorthand/shorthand-multiple/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-name-shorthand/multiple/expected.js rename to test/fixtures/transformation/es6-properties.shorthand/shorthand-multiple/expected.js diff --git a/test/fixtures/transformation/es6-property-name-shorthand/single/actual.js b/test/fixtures/transformation/es6-properties.shorthand/shorthand-single/actual.js similarity index 100% rename from test/fixtures/transformation/es6-property-name-shorthand/single/actual.js rename to test/fixtures/transformation/es6-properties.shorthand/shorthand-single/actual.js diff --git a/test/fixtures/transformation/es6-property-name-shorthand/single/expected.js b/test/fixtures/transformation/es6-properties.shorthand/shorthand-single/expected.js similarity index 100% rename from test/fixtures/transformation/es6-property-name-shorthand/single/expected.js rename to test/fixtures/transformation/es6-properties.shorthand/shorthand-single/expected.js diff --git a/test/fixtures/transformation/es7-array-comprehension/arguments/actual.js b/test/fixtures/transformation/es7-comprehensions/arguments/actual.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/arguments/actual.js rename to test/fixtures/transformation/es7-comprehensions/arguments/actual.js diff --git a/test/fixtures/transformation/es7-array-comprehension/arguments/expected.js b/test/fixtures/transformation/es7-comprehensions/arguments/expected.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/arguments/expected.js rename to test/fixtures/transformation/es7-comprehensions/arguments/expected.js diff --git a/test/fixtures/transformation/es7-array-comprehension/array-expression-single-if/actual.js b/test/fixtures/transformation/es7-comprehensions/array-expression-single-if/actual.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/array-expression-single-if/actual.js rename to test/fixtures/transformation/es7-comprehensions/array-expression-single-if/actual.js diff --git a/test/fixtures/transformation/es7-array-comprehension/array-expression-single-if/expected.js b/test/fixtures/transformation/es7-comprehensions/array-expression-single-if/expected.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/array-expression-single-if/expected.js rename to test/fixtures/transformation/es7-comprehensions/array-expression-single-if/expected.js diff --git a/test/fixtures/transformation/es7-array-comprehension/array-expression-single/actual.js b/test/fixtures/transformation/es7-comprehensions/array-expression-single/actual.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/array-expression-single/actual.js rename to test/fixtures/transformation/es7-comprehensions/array-expression-single/actual.js diff --git a/test/fixtures/transformation/es7-array-comprehension/array-expression-single/expected.js b/test/fixtures/transformation/es7-comprehensions/array-expression-single/expected.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/array-expression-single/expected.js rename to test/fixtures/transformation/es7-comprehensions/array-expression-single/expected.js diff --git a/test/fixtures/transformation/es7-array-comprehension/multiple-if/actual.js b/test/fixtures/transformation/es7-comprehensions/array-multiple-if/actual.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/multiple-if/actual.js rename to test/fixtures/transformation/es7-comprehensions/array-multiple-if/actual.js diff --git a/test/fixtures/transformation/es7-array-comprehension/multiple-if/expected.js b/test/fixtures/transformation/es7-comprehensions/array-multiple-if/expected.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/multiple-if/expected.js rename to test/fixtures/transformation/es7-comprehensions/array-multiple-if/expected.js diff --git a/test/fixtures/transformation/es7-array-comprehension/multiple/actual.js b/test/fixtures/transformation/es7-comprehensions/array-multiple/actual.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/multiple/actual.js rename to test/fixtures/transformation/es7-comprehensions/array-multiple/actual.js diff --git a/test/fixtures/transformation/es7-array-comprehension/multiple/expected.js b/test/fixtures/transformation/es7-comprehensions/array-multiple/expected.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/multiple/expected.js rename to test/fixtures/transformation/es7-comprehensions/array-multiple/expected.js diff --git a/test/fixtures/transformation/es7-array-comprehension/single-if/actual.js b/test/fixtures/transformation/es7-comprehensions/array-single-if/actual.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/single-if/actual.js rename to test/fixtures/transformation/es7-comprehensions/array-single-if/actual.js diff --git a/test/fixtures/transformation/es7-array-comprehension/single-if/expected.js b/test/fixtures/transformation/es7-comprehensions/array-single-if/expected.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/single-if/expected.js rename to test/fixtures/transformation/es7-comprehensions/array-single-if/expected.js diff --git a/test/fixtures/transformation/es7-array-comprehension/single/actual.js b/test/fixtures/transformation/es7-comprehensions/array-single/actual.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/single/actual.js rename to test/fixtures/transformation/es7-comprehensions/array-single/actual.js diff --git a/test/fixtures/transformation/es7-array-comprehension/single/expected.js b/test/fixtures/transformation/es7-comprehensions/array-single/expected.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/single/expected.js rename to test/fixtures/transformation/es7-comprehensions/array-single/expected.js diff --git a/test/fixtures/transformation/es7-array-comprehension/this/actual.js b/test/fixtures/transformation/es7-comprehensions/array-this/actual.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/this/actual.js rename to test/fixtures/transformation/es7-comprehensions/array-this/actual.js diff --git a/test/fixtures/transformation/es7-array-comprehension/this/expected.js b/test/fixtures/transformation/es7-comprehensions/array-this/expected.js similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/this/expected.js rename to test/fixtures/transformation/es7-comprehensions/array-this/expected.js diff --git a/test/fixtures/transformation/es7-generator-comprehension/simple/exec.js b/test/fixtures/transformation/es7-comprehensions/generator/exec.js similarity index 100% rename from test/fixtures/transformation/es7-generator-comprehension/simple/exec.js rename to test/fixtures/transformation/es7-comprehensions/generator/exec.js diff --git a/test/fixtures/transformation/es7-array-comprehension/options.json b/test/fixtures/transformation/es7-comprehensions/options.json similarity index 100% rename from test/fixtures/transformation/es7-array-comprehension/options.json rename to test/fixtures/transformation/es7-comprehensions/options.json diff --git a/test/fixtures/transformation/es7-generator-comprehension/options.json b/test/fixtures/transformation/es7-generator-comprehension/options.json deleted file mode 100644 index 252f473a73..0000000000 --- a/test/fixtures/transformation/es7-generator-comprehension/options.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "experimental": true -}