diff --git a/src/transformers/chunk/asi.ts b/src/transformers/chunk/asi.ts new file mode 100644 index 00000000..a4840579 --- /dev/null +++ b/src/transformers/chunk/asi.ts @@ -0,0 +1,50 @@ +/** + * Copyright 2018 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ChunkTransform } from '../../transform'; +import { Range } from '../../types'; +import { parse } from '../../acorn'; +import MagicString from 'magic-string'; + +export default class ASITransform extends ChunkTransform { + public name = 'ASITransform'; + + /** + * Small reduction in semi-colons, removing from end of block statements. + * @param source source following closure compiler minification + */ + public async post(source: MagicString): Promise { + const code = source.toString(); + const program = parse(code); + + if (program.body) { + const lastStatement = program.body[program.body.length - 1]; + if (lastStatement) { + const [start, end] = lastStatement.range as Range; + if (lastStatement.type === 'EmptyStatement') { + source.remove(start, end); + } else { + const lastStatementSource = code.substring(start, end); + if (lastStatementSource.endsWith(';')) { + source.overwrite(start, end, code.substring(start, end - 1)); + } + } + } + } + + return source; + } +} diff --git a/src/transformers/chunk/const.ts b/src/transformers/chunk/const.ts index 5ef0854f..a9e49734 100644 --- a/src/transformers/chunk/const.ts +++ b/src/transformers/chunk/const.ts @@ -31,7 +31,7 @@ export default class ConstTransform extends ChunkTransform { */ public async pre(source: MagicString): Promise { const code = source.toString(); - const program = parse(source.toString()); + const program = parse(code); walk.simple(program, { VariableDeclaration(node: VariableDeclaration) { diff --git a/src/transformers/chunk/transforms.ts b/src/transformers/chunk/transforms.ts index e480b6b6..c7076359 100644 --- a/src/transformers/chunk/transforms.ts +++ b/src/transformers/chunk/transforms.ts @@ -30,6 +30,7 @@ import ExportTransform from './exports'; import ImportTransform from './imports'; import StrictTransform from './strict'; import ConstTransform from './const'; +import ASITransform from './asi'; import { ChunkTransform, chunkLifecycle } from '../../transform'; import { Mangle } from '../mangle'; import { Ebbinghaus } from '../ebbinghaus'; @@ -46,6 +47,7 @@ const TRANSFORMS: Array = [ StrictTransform, ExportTransform, ImportTransform, + ASITransform, // Acorn cannot parse content starting here. HashbangApplyTransform, ]; diff --git a/test/arrow-function/fixtures/multiple-arguments.esm.advanced.js b/test/arrow-function/fixtures/multiple-arguments.esm.advanced.js index 16a00282..56a427e3 100644 --- a/test/arrow-function/fixtures/multiple-arguments.esm.advanced.js +++ b/test/arrow-function/fixtures/multiple-arguments.esm.advanced.js @@ -1 +1 @@ -export var multipleArguments=(a,b)=>console.log(a,b); +export var multipleArguments=(a,b)=>console.log(a,b) diff --git a/test/arrow-function/fixtures/multiple-arguments.esm.default.js b/test/arrow-function/fixtures/multiple-arguments.esm.default.js index 16a00282..56a427e3 100644 --- a/test/arrow-function/fixtures/multiple-arguments.esm.default.js +++ b/test/arrow-function/fixtures/multiple-arguments.esm.default.js @@ -1 +1 @@ -export var multipleArguments=(a,b)=>console.log(a,b); +export var multipleArguments=(a,b)=>console.log(a,b) diff --git a/test/arrow-function/fixtures/multiple-arguments.esm.es5.js b/test/arrow-function/fixtures/multiple-arguments.esm.es5.js index 15c9f223..96b56e1b 100644 --- a/test/arrow-function/fixtures/multiple-arguments.esm.es5.js +++ b/test/arrow-function/fixtures/multiple-arguments.esm.es5.js @@ -1 +1 @@ -export function multipleArguments(a,b){return console.log(a,b)}; +export function multipleArguments(a,b){return console.log(a,b)} diff --git a/test/arrow-function/fixtures/multiple-arguments.esm.pretty.js b/test/arrow-function/fixtures/multiple-arguments.esm.pretty.js index 9440ca17..3c2d1f0f 100644 --- a/test/arrow-function/fixtures/multiple-arguments.esm.pretty.js +++ b/test/arrow-function/fixtures/multiple-arguments.esm.pretty.js @@ -1,2 +1,2 @@ -export var multipleArguments=(a, b) => console.log(a, b); +export var multipleArguments=(a, b) => console.log(a, b) diff --git a/test/arrow-function/fixtures/single-argument.esm.advanced.js b/test/arrow-function/fixtures/single-argument.esm.advanced.js index 83e603fd..7bed4f96 100644 --- a/test/arrow-function/fixtures/single-argument.esm.advanced.js +++ b/test/arrow-function/fixtures/single-argument.esm.advanced.js @@ -1 +1 @@ -export var singleArgument=a=>console.log(a); +export var singleArgument=a=>console.log(a) diff --git a/test/arrow-function/fixtures/single-argument.esm.default.js b/test/arrow-function/fixtures/single-argument.esm.default.js index 83e603fd..7bed4f96 100644 --- a/test/arrow-function/fixtures/single-argument.esm.default.js +++ b/test/arrow-function/fixtures/single-argument.esm.default.js @@ -1 +1 @@ -export var singleArgument=a=>console.log(a); +export var singleArgument=a=>console.log(a) diff --git a/test/arrow-function/fixtures/single-argument.esm.es5.js b/test/arrow-function/fixtures/single-argument.esm.es5.js index 525d7cfb..fa8eb34d 100644 --- a/test/arrow-function/fixtures/single-argument.esm.es5.js +++ b/test/arrow-function/fixtures/single-argument.esm.es5.js @@ -1 +1 @@ -export function singleArgument(a){return console.log(a)}; +export function singleArgument(a){return console.log(a)} diff --git a/test/arrow-function/fixtures/single-argument.esm.pretty.js b/test/arrow-function/fixtures/single-argument.esm.pretty.js index ebbf5176..38492b40 100644 --- a/test/arrow-function/fixtures/single-argument.esm.pretty.js +++ b/test/arrow-function/fixtures/single-argument.esm.pretty.js @@ -1,2 +1,2 @@ -export var singleArgument=a => console.log(a); +export var singleArgument=a => console.log(a) diff --git a/test/closure-config/fixtures/prefer-config.esm.javascript.js b/test/closure-config/fixtures/prefer-config.esm.javascript.js index 85ce559e..42288c9b 100644 --- a/test/closure-config/fixtures/prefer-config.esm.javascript.js +++ b/test/closure-config/fixtures/prefer-config.esm.javascript.js @@ -1 +1 @@ -console.log("foo"); +console.log("foo") diff --git a/test/const-rename/fixtures/rename.esm.advanced.js b/test/const-rename/fixtures/rename.esm.advanced.js index ef677923..d7af68d7 100644 --- a/test/const-rename/fixtures/rename.esm.advanced.js +++ b/test/const-rename/fixtures/rename.esm.advanced.js @@ -1 +1 @@ -let b=[3,4],c=[5,6];export function yes(a){return 0<=c.indexOf(a)&&0<=b.indexOf(a)}; +let b=[3,4],c=[5,6];export function yes(a){return 0<=c.indexOf(a)&&0<=b.indexOf(a)} diff --git a/test/const-rename/fixtures/rename.esm.default.js b/test/const-rename/fixtures/rename.esm.default.js index ef677923..d7af68d7 100644 --- a/test/const-rename/fixtures/rename.esm.default.js +++ b/test/const-rename/fixtures/rename.esm.default.js @@ -1 +1 @@ -let b=[3,4],c=[5,6];export function yes(a){return 0<=c.indexOf(a)&&0<=b.indexOf(a)}; +let b=[3,4],c=[5,6];export function yes(a){return 0<=c.indexOf(a)&&0<=b.indexOf(a)} diff --git a/test/const-rename/fixtures/rename.esm.es5.js b/test/const-rename/fixtures/rename.esm.es5.js index 3dc874d3..bd54adc3 100644 --- a/test/const-rename/fixtures/rename.esm.es5.js +++ b/test/const-rename/fixtures/rename.esm.es5.js @@ -1 +1 @@ -var b=[3,4],c=[5,6];export function yes(a){return 0<=c.indexOf(a)&&0<=b.indexOf(a)}; +var b=[3,4],c=[5,6];export function yes(a){return 0<=c.indexOf(a)&&0<=b.indexOf(a)} diff --git a/test/const-rename/fixtures/rename.esm.pretty.js b/test/const-rename/fixtures/rename.esm.pretty.js index 2bff2afb..9929c94f 100644 --- a/test/const-rename/fixtures/rename.esm.pretty.js +++ b/test/const-rename/fixtures/rename.esm.pretty.js @@ -2,4 +2,4 @@ let b = [3, 4], c = [5, 6]; export function yes(a) { return 0 <= c.indexOf(a) && 0 <= b.indexOf(a); -}; +} diff --git a/test/export-default/fixtures/array.esm.advanced.js b/test/export-default/fixtures/array.esm.advanced.js index d6d1738d..9859f079 100644 --- a/test/export-default/fixtures/array.esm.advanced.js +++ b/test/export-default/fixtures/array.esm.advanced.js @@ -1 +1 @@ -export default []; +export default [] diff --git a/test/export-default/fixtures/array.esm.default.js b/test/export-default/fixtures/array.esm.default.js index d6d1738d..9859f079 100644 --- a/test/export-default/fixtures/array.esm.default.js +++ b/test/export-default/fixtures/array.esm.default.js @@ -1 +1 @@ -export default []; +export default [] diff --git a/test/export-default/fixtures/array.esm.es5.js b/test/export-default/fixtures/array.esm.es5.js index d6d1738d..9859f079 100644 --- a/test/export-default/fixtures/array.esm.es5.js +++ b/test/export-default/fixtures/array.esm.es5.js @@ -1 +1 @@ -export default []; +export default [] diff --git a/test/export-default/fixtures/array.esm.pretty.js b/test/export-default/fixtures/array.esm.pretty.js index 4905173f..c9288429 100644 --- a/test/export-default/fixtures/array.esm.pretty.js +++ b/test/export-default/fixtures/array.esm.pretty.js @@ -1,2 +1,2 @@ -export default []; +export default [] diff --git a/test/export-default/fixtures/arrow-function.esm.advanced.js b/test/export-default/fixtures/arrow-function.esm.advanced.js index b221cc49..ff915c66 100644 --- a/test/export-default/fixtures/arrow-function.esm.advanced.js +++ b/test/export-default/fixtures/arrow-function.esm.advanced.js @@ -1 +1 @@ -export default a=>console.log(a); +export default a=>console.log(a) diff --git a/test/export-default/fixtures/arrow-function.esm.default.js b/test/export-default/fixtures/arrow-function.esm.default.js index b221cc49..ff915c66 100644 --- a/test/export-default/fixtures/arrow-function.esm.default.js +++ b/test/export-default/fixtures/arrow-function.esm.default.js @@ -1 +1 @@ -export default a=>console.log(a); +export default a=>console.log(a) diff --git a/test/export-default/fixtures/arrow-function.esm.es5.js b/test/export-default/fixtures/arrow-function.esm.es5.js index fc6d5fd7..8c81f93b 100644 --- a/test/export-default/fixtures/arrow-function.esm.es5.js +++ b/test/export-default/fixtures/arrow-function.esm.es5.js @@ -1 +1 @@ -export default function(a){return console.log(a)}; +export default function(a){return console.log(a)} diff --git a/test/export-default/fixtures/arrow-function.esm.pretty.js b/test/export-default/fixtures/arrow-function.esm.pretty.js index e0d72d2c..2649a156 100644 --- a/test/export-default/fixtures/arrow-function.esm.pretty.js +++ b/test/export-default/fixtures/arrow-function.esm.pretty.js @@ -1,2 +1,2 @@ -export default a => console.log(a); +export default a => console.log(a) diff --git a/test/export-default/fixtures/class.esm.advanced.js b/test/export-default/fixtures/class.esm.advanced.js index f03640cd..fa69ff65 100644 --- a/test/export-default/fixtures/class.esm.advanced.js +++ b/test/export-default/fixtures/class.esm.advanced.js @@ -1 +1 @@ -class a{constructor(b){this.a=b}console(){console.log(this.a)}}export default a; +class a{constructor(b){this.a=b}console(){console.log(this.a)}}export default a diff --git a/test/export-default/fixtures/class.esm.default.js b/test/export-default/fixtures/class.esm.default.js index 9f0a3f25..d9174a55 100644 --- a/test/export-default/fixtures/class.esm.default.js +++ b/test/export-default/fixtures/class.esm.default.js @@ -1 +1 @@ -class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export default a; +class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export default a diff --git a/test/export-default/fixtures/class.esm.es5.js b/test/export-default/fixtures/class.esm.es5.js index 8179aa91..10ba92e0 100644 --- a/test/export-default/fixtures/class.esm.es5.js +++ b/test/export-default/fixtures/class.esm.es5.js @@ -1 +1 @@ -function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export default a; +function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export default a diff --git a/test/export-default/fixtures/class.esm.pretty.js b/test/export-default/fixtures/class.esm.pretty.js index 0ac898b2..21469622 100644 --- a/test/export-default/fixtures/class.esm.pretty.js +++ b/test/export-default/fixtures/class.esm.pretty.js @@ -7,4 +7,4 @@ class a { console.log(this.name_); } } -export default a; +export default a diff --git a/test/export-default/fixtures/function.esm.advanced.js b/test/export-default/fixtures/function.esm.advanced.js index fb6cadf5..50d4e5bb 100644 --- a/test/export-default/fixtures/function.esm.advanced.js +++ b/test/export-default/fixtures/function.esm.advanced.js @@ -1 +1 @@ -export default function(a){console.log(a);console.log(1)}; +export default function(a){console.log(a);console.log(1)} diff --git a/test/export-default/fixtures/function.esm.default.js b/test/export-default/fixtures/function.esm.default.js index fb6cadf5..50d4e5bb 100644 --- a/test/export-default/fixtures/function.esm.default.js +++ b/test/export-default/fixtures/function.esm.default.js @@ -1 +1 @@ -export default function(a){console.log(a);console.log(1)}; +export default function(a){console.log(a);console.log(1)} diff --git a/test/export-default/fixtures/function.esm.es5.js b/test/export-default/fixtures/function.esm.es5.js index fb6cadf5..50d4e5bb 100644 --- a/test/export-default/fixtures/function.esm.es5.js +++ b/test/export-default/fixtures/function.esm.es5.js @@ -1 +1 @@ -export default function(a){console.log(a);console.log(1)}; +export default function(a){console.log(a);console.log(1)} diff --git a/test/export-default/fixtures/function.esm.pretty.js b/test/export-default/fixtures/function.esm.pretty.js index 017b1f63..06e3ebf5 100644 --- a/test/export-default/fixtures/function.esm.pretty.js +++ b/test/export-default/fixtures/function.esm.pretty.js @@ -2,4 +2,4 @@ export default function(a) { console.log(a); console.log(1); -}; +} diff --git a/test/export-default/fixtures/identifier.esm.advanced.js b/test/export-default/fixtures/identifier.esm.advanced.js index aef22247..b0d35f3a 100644 --- a/test/export-default/fixtures/identifier.esm.advanced.js +++ b/test/export-default/fixtures/identifier.esm.advanced.js @@ -1 +1 @@ -export default 1; +export default 1 diff --git a/test/export-default/fixtures/identifier.esm.default.js b/test/export-default/fixtures/identifier.esm.default.js index aef22247..b0d35f3a 100644 --- a/test/export-default/fixtures/identifier.esm.default.js +++ b/test/export-default/fixtures/identifier.esm.default.js @@ -1 +1 @@ -export default 1; +export default 1 diff --git a/test/export-default/fixtures/identifier.esm.es5.js b/test/export-default/fixtures/identifier.esm.es5.js index aef22247..b0d35f3a 100644 --- a/test/export-default/fixtures/identifier.esm.es5.js +++ b/test/export-default/fixtures/identifier.esm.es5.js @@ -1 +1 @@ -export default 1; +export default 1 diff --git a/test/export-default/fixtures/identifier.esm.pretty.js b/test/export-default/fixtures/identifier.esm.pretty.js index 657ac4a4..19313c83 100644 --- a/test/export-default/fixtures/identifier.esm.pretty.js +++ b/test/export-default/fixtures/identifier.esm.pretty.js @@ -1,2 +1,2 @@ -export default 1; +export default 1 diff --git a/test/export-default/fixtures/named-class.esm.advanced.js b/test/export-default/fixtures/named-class.esm.advanced.js index f03640cd..fa69ff65 100644 --- a/test/export-default/fixtures/named-class.esm.advanced.js +++ b/test/export-default/fixtures/named-class.esm.advanced.js @@ -1 +1 @@ -class a{constructor(b){this.a=b}console(){console.log(this.a)}}export default a; +class a{constructor(b){this.a=b}console(){console.log(this.a)}}export default a diff --git a/test/export-default/fixtures/named-class.esm.default.js b/test/export-default/fixtures/named-class.esm.default.js index 9f0a3f25..d9174a55 100644 --- a/test/export-default/fixtures/named-class.esm.default.js +++ b/test/export-default/fixtures/named-class.esm.default.js @@ -1 +1 @@ -class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export default a; +class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export default a diff --git a/test/export-default/fixtures/named-class.esm.es5.js b/test/export-default/fixtures/named-class.esm.es5.js index 8179aa91..10ba92e0 100644 --- a/test/export-default/fixtures/named-class.esm.es5.js +++ b/test/export-default/fixtures/named-class.esm.es5.js @@ -1 +1 @@ -function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export default a; +function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export default a diff --git a/test/export-default/fixtures/named-class.esm.pretty.js b/test/export-default/fixtures/named-class.esm.pretty.js index 0ac898b2..21469622 100644 --- a/test/export-default/fixtures/named-class.esm.pretty.js +++ b/test/export-default/fixtures/named-class.esm.pretty.js @@ -7,4 +7,4 @@ class a { console.log(this.name_); } } -export default a; +export default a diff --git a/test/export-default/fixtures/named-function.esm.advanced.js b/test/export-default/fixtures/named-function.esm.advanced.js index fb6cadf5..50d4e5bb 100644 --- a/test/export-default/fixtures/named-function.esm.advanced.js +++ b/test/export-default/fixtures/named-function.esm.advanced.js @@ -1 +1 @@ -export default function(a){console.log(a);console.log(1)}; +export default function(a){console.log(a);console.log(1)} diff --git a/test/export-default/fixtures/named-function.esm.default.js b/test/export-default/fixtures/named-function.esm.default.js index fb6cadf5..50d4e5bb 100644 --- a/test/export-default/fixtures/named-function.esm.default.js +++ b/test/export-default/fixtures/named-function.esm.default.js @@ -1 +1 @@ -export default function(a){console.log(a);console.log(1)}; +export default function(a){console.log(a);console.log(1)} diff --git a/test/export-default/fixtures/named-function.esm.es5.js b/test/export-default/fixtures/named-function.esm.es5.js index fb6cadf5..50d4e5bb 100644 --- a/test/export-default/fixtures/named-function.esm.es5.js +++ b/test/export-default/fixtures/named-function.esm.es5.js @@ -1 +1 @@ -export default function(a){console.log(a);console.log(1)}; +export default function(a){console.log(a);console.log(1)} diff --git a/test/export-default/fixtures/named-function.esm.pretty.js b/test/export-default/fixtures/named-function.esm.pretty.js index 017b1f63..06e3ebf5 100644 --- a/test/export-default/fixtures/named-function.esm.pretty.js +++ b/test/export-default/fixtures/named-function.esm.pretty.js @@ -2,4 +2,4 @@ export default function(a) { console.log(a); console.log(1); -}; +} diff --git a/test/export-default/fixtures/number.esm.advanced.js b/test/export-default/fixtures/number.esm.advanced.js index 7a4e8a72..02f8a326 100644 --- a/test/export-default/fixtures/number.esm.advanced.js +++ b/test/export-default/fixtures/number.esm.advanced.js @@ -1 +1 @@ -export default 42; +export default 42 diff --git a/test/export-default/fixtures/number.esm.default.js b/test/export-default/fixtures/number.esm.default.js index 7a4e8a72..02f8a326 100644 --- a/test/export-default/fixtures/number.esm.default.js +++ b/test/export-default/fixtures/number.esm.default.js @@ -1 +1 @@ -export default 42; +export default 42 diff --git a/test/export-default/fixtures/number.esm.es5.js b/test/export-default/fixtures/number.esm.es5.js index 7a4e8a72..02f8a326 100644 --- a/test/export-default/fixtures/number.esm.es5.js +++ b/test/export-default/fixtures/number.esm.es5.js @@ -1 +1 @@ -export default 42; +export default 42 diff --git a/test/export-default/fixtures/number.esm.pretty.js b/test/export-default/fixtures/number.esm.pretty.js index e894e332..14fc8cce 100644 --- a/test/export-default/fixtures/number.esm.pretty.js +++ b/test/export-default/fixtures/number.esm.pretty.js @@ -1,2 +1,2 @@ -export default 42; +export default 42 diff --git a/test/export-default/fixtures/object.esm.advanced.js b/test/export-default/fixtures/object.esm.advanced.js index 2c5a3a3f..e6ca3b4d 100644 --- a/test/export-default/fixtures/object.esm.advanced.js +++ b/test/export-default/fixtures/object.esm.advanced.js @@ -1 +1 @@ -export default {key:"value"}; +export default {key:"value"} diff --git a/test/export-default/fixtures/object.esm.default.js b/test/export-default/fixtures/object.esm.default.js index 2c5a3a3f..e6ca3b4d 100644 --- a/test/export-default/fixtures/object.esm.default.js +++ b/test/export-default/fixtures/object.esm.default.js @@ -1 +1 @@ -export default {key:"value"}; +export default {key:"value"} diff --git a/test/export-default/fixtures/object.esm.es5.js b/test/export-default/fixtures/object.esm.es5.js index 2c5a3a3f..e6ca3b4d 100644 --- a/test/export-default/fixtures/object.esm.es5.js +++ b/test/export-default/fixtures/object.esm.es5.js @@ -1 +1 @@ -export default {key:"value"}; +export default {key:"value"} diff --git a/test/export-default/fixtures/object.esm.pretty.js b/test/export-default/fixtures/object.esm.pretty.js index 4731076c..4330d41c 100644 --- a/test/export-default/fixtures/object.esm.pretty.js +++ b/test/export-default/fixtures/object.esm.pretty.js @@ -1,2 +1,2 @@ -export default {key:"value"}; +export default {key:"value"} diff --git a/test/export-externals/fixtures/array.esm.advanced.js b/test/export-externals/fixtures/array.esm.advanced.js index a78f36a6..2e6b9184 100644 --- a/test/export-externals/fixtures/array.esm.advanced.js +++ b/test/export-externals/fixtures/array.esm.advanced.js @@ -1 +1 @@ -export{exportedArray}from'./external.js'; +export{exportedArray}from'./external.js' diff --git a/test/export-externals/fixtures/array.esm.default.js b/test/export-externals/fixtures/array.esm.default.js index a78f36a6..2e6b9184 100644 --- a/test/export-externals/fixtures/array.esm.default.js +++ b/test/export-externals/fixtures/array.esm.default.js @@ -1 +1 @@ -export{exportedArray}from'./external.js'; +export{exportedArray}from'./external.js' diff --git a/test/export-externals/fixtures/array.esm.es5.js b/test/export-externals/fixtures/array.esm.es5.js index a78f36a6..2e6b9184 100644 --- a/test/export-externals/fixtures/array.esm.es5.js +++ b/test/export-externals/fixtures/array.esm.es5.js @@ -1 +1 @@ -export{exportedArray}from'./external.js'; +export{exportedArray}from'./external.js' diff --git a/test/export-externals/fixtures/array.esm.pretty.js b/test/export-externals/fixtures/array.esm.pretty.js index a78f36a6..2e6b9184 100644 --- a/test/export-externals/fixtures/array.esm.pretty.js +++ b/test/export-externals/fixtures/array.esm.pretty.js @@ -1 +1 @@ -export{exportedArray}from'./external.js'; +export{exportedArray}from'./external.js' diff --git a/test/export-externals/fixtures/class.esm.advanced.js b/test/export-externals/fixtures/class.esm.advanced.js index 63a130f5..cfd72215 100644 --- a/test/export-externals/fixtures/class.esm.advanced.js +++ b/test/export-externals/fixtures/class.esm.advanced.js @@ -1 +1 @@ -export{exportedClass}from'./external.js'; +export{exportedClass}from'./external.js' diff --git a/test/export-externals/fixtures/class.esm.default.js b/test/export-externals/fixtures/class.esm.default.js index 63a130f5..cfd72215 100644 --- a/test/export-externals/fixtures/class.esm.default.js +++ b/test/export-externals/fixtures/class.esm.default.js @@ -1 +1 @@ -export{exportedClass}from'./external.js'; +export{exportedClass}from'./external.js' diff --git a/test/export-externals/fixtures/class.esm.es5.js b/test/export-externals/fixtures/class.esm.es5.js index 63a130f5..cfd72215 100644 --- a/test/export-externals/fixtures/class.esm.es5.js +++ b/test/export-externals/fixtures/class.esm.es5.js @@ -1 +1 @@ -export{exportedClass}from'./external.js'; +export{exportedClass}from'./external.js' diff --git a/test/export-externals/fixtures/class.esm.pretty.js b/test/export-externals/fixtures/class.esm.pretty.js index 63a130f5..cfd72215 100644 --- a/test/export-externals/fixtures/class.esm.pretty.js +++ b/test/export-externals/fixtures/class.esm.pretty.js @@ -1 +1 @@ -export{exportedClass}from'./external.js'; +export{exportedClass}from'./external.js' diff --git a/test/export-externals/fixtures/const-function.esm.advanced.js b/test/export-externals/fixtures/const-function.esm.advanced.js index 08a33a3e..f63622d1 100644 --- a/test/export-externals/fixtures/const-function.esm.advanced.js +++ b/test/export-externals/fixtures/const-function.esm.advanced.js @@ -1 +1 @@ -export{constFunction}from'./external.js'; +export{constFunction}from'./external.js' diff --git a/test/export-externals/fixtures/const-function.esm.default.js b/test/export-externals/fixtures/const-function.esm.default.js index 08a33a3e..f63622d1 100644 --- a/test/export-externals/fixtures/const-function.esm.default.js +++ b/test/export-externals/fixtures/const-function.esm.default.js @@ -1 +1 @@ -export{constFunction}from'./external.js'; +export{constFunction}from'./external.js' diff --git a/test/export-externals/fixtures/const-function.esm.es5.js b/test/export-externals/fixtures/const-function.esm.es5.js index 08a33a3e..f63622d1 100644 --- a/test/export-externals/fixtures/const-function.esm.es5.js +++ b/test/export-externals/fixtures/const-function.esm.es5.js @@ -1 +1 @@ -export{constFunction}from'./external.js'; +export{constFunction}from'./external.js' diff --git a/test/export-externals/fixtures/const-function.esm.pretty.js b/test/export-externals/fixtures/const-function.esm.pretty.js index 08a33a3e..f63622d1 100644 --- a/test/export-externals/fixtures/const-function.esm.pretty.js +++ b/test/export-externals/fixtures/const-function.esm.pretty.js @@ -1 +1 @@ -export{constFunction}from'./external.js'; +export{constFunction}from'./external.js' diff --git a/test/export-externals/fixtures/const-number.esm.advanced.js b/test/export-externals/fixtures/const-number.esm.advanced.js index 75d7a4f2..49820348 100644 --- a/test/export-externals/fixtures/const-number.esm.advanced.js +++ b/test/export-externals/fixtures/const-number.esm.advanced.js @@ -1 +1 @@ -export{constNumber}from'./external.js'; +export{constNumber}from'./external.js' diff --git a/test/export-externals/fixtures/const-number.esm.default.js b/test/export-externals/fixtures/const-number.esm.default.js index 75d7a4f2..49820348 100644 --- a/test/export-externals/fixtures/const-number.esm.default.js +++ b/test/export-externals/fixtures/const-number.esm.default.js @@ -1 +1 @@ -export{constNumber}from'./external.js'; +export{constNumber}from'./external.js' diff --git a/test/export-externals/fixtures/const-number.esm.es5.js b/test/export-externals/fixtures/const-number.esm.es5.js index 75d7a4f2..49820348 100644 --- a/test/export-externals/fixtures/const-number.esm.es5.js +++ b/test/export-externals/fixtures/const-number.esm.es5.js @@ -1 +1 @@ -export{constNumber}from'./external.js'; +export{constNumber}from'./external.js' diff --git a/test/export-externals/fixtures/const-number.esm.pretty.js b/test/export-externals/fixtures/const-number.esm.pretty.js index 75d7a4f2..49820348 100644 --- a/test/export-externals/fixtures/const-number.esm.pretty.js +++ b/test/export-externals/fixtures/const-number.esm.pretty.js @@ -1 +1 @@ -export{constNumber}from'./external.js'; +export{constNumber}from'./external.js' diff --git a/test/export-externals/fixtures/default.esm.advanced.js b/test/export-externals/fixtures/default.esm.advanced.js index bae7c895..2e63da08 100644 --- a/test/export-externals/fixtures/default.esm.advanced.js +++ b/test/export-externals/fixtures/default.esm.advanced.js @@ -1 +1 @@ -export{default as X}from'./external.js'; +export{default as X}from'./external.js' diff --git a/test/export-externals/fixtures/default.esm.default.js b/test/export-externals/fixtures/default.esm.default.js index bae7c895..2e63da08 100644 --- a/test/export-externals/fixtures/default.esm.default.js +++ b/test/export-externals/fixtures/default.esm.default.js @@ -1 +1 @@ -export{default as X}from'./external.js'; +export{default as X}from'./external.js' diff --git a/test/export-externals/fixtures/default.esm.es5.js b/test/export-externals/fixtures/default.esm.es5.js index bae7c895..2e63da08 100644 --- a/test/export-externals/fixtures/default.esm.es5.js +++ b/test/export-externals/fixtures/default.esm.es5.js @@ -1 +1 @@ -export{default as X}from'./external.js'; +export{default as X}from'./external.js' diff --git a/test/export-externals/fixtures/default.esm.pretty.js b/test/export-externals/fixtures/default.esm.pretty.js index bae7c895..2e63da08 100644 --- a/test/export-externals/fixtures/default.esm.pretty.js +++ b/test/export-externals/fixtures/default.esm.pretty.js @@ -1 +1 @@ -export{default as X}from'./external.js'; +export{default as X}from'./external.js' diff --git a/test/export-externals/fixtures/function.esm.advanced.js b/test/export-externals/fixtures/function.esm.advanced.js index 50eb4c84..8af44bc6 100644 --- a/test/export-externals/fixtures/function.esm.advanced.js +++ b/test/export-externals/fixtures/function.esm.advanced.js @@ -1 +1 @@ -export{exportedFunction}from'./external.js'; +export{exportedFunction}from'./external.js' diff --git a/test/export-externals/fixtures/function.esm.default.js b/test/export-externals/fixtures/function.esm.default.js index 50eb4c84..8af44bc6 100644 --- a/test/export-externals/fixtures/function.esm.default.js +++ b/test/export-externals/fixtures/function.esm.default.js @@ -1 +1 @@ -export{exportedFunction}from'./external.js'; +export{exportedFunction}from'./external.js' diff --git a/test/export-externals/fixtures/function.esm.es5.js b/test/export-externals/fixtures/function.esm.es5.js index 50eb4c84..8af44bc6 100644 --- a/test/export-externals/fixtures/function.esm.es5.js +++ b/test/export-externals/fixtures/function.esm.es5.js @@ -1 +1 @@ -export{exportedFunction}from'./external.js'; +export{exportedFunction}from'./external.js' diff --git a/test/export-externals/fixtures/function.esm.pretty.js b/test/export-externals/fixtures/function.esm.pretty.js index 50eb4c84..8af44bc6 100644 --- a/test/export-externals/fixtures/function.esm.pretty.js +++ b/test/export-externals/fixtures/function.esm.pretty.js @@ -1 +1 @@ -export{exportedFunction}from'./external.js'; +export{exportedFunction}from'./external.js' diff --git a/test/export-externals/fixtures/local.esm.advanced.js b/test/export-externals/fixtures/local.esm.advanced.js index 7fd5c635..af8c12f5 100644 --- a/test/export-externals/fixtures/local.esm.advanced.js +++ b/test/export-externals/fixtures/local.esm.advanced.js @@ -1 +1 @@ -export{exportedFunction as exF}from'./external.js'; +export{exportedFunction as exF}from'./external.js' diff --git a/test/export-externals/fixtures/local.esm.default.js b/test/export-externals/fixtures/local.esm.default.js index 7fd5c635..af8c12f5 100644 --- a/test/export-externals/fixtures/local.esm.default.js +++ b/test/export-externals/fixtures/local.esm.default.js @@ -1 +1 @@ -export{exportedFunction as exF}from'./external.js'; +export{exportedFunction as exF}from'./external.js' diff --git a/test/export-externals/fixtures/local.esm.es5.js b/test/export-externals/fixtures/local.esm.es5.js index 7fd5c635..af8c12f5 100644 --- a/test/export-externals/fixtures/local.esm.es5.js +++ b/test/export-externals/fixtures/local.esm.es5.js @@ -1 +1 @@ -export{exportedFunction as exF}from'./external.js'; +export{exportedFunction as exF}from'./external.js' diff --git a/test/export-externals/fixtures/local.esm.pretty.js b/test/export-externals/fixtures/local.esm.pretty.js index 7fd5c635..af8c12f5 100644 --- a/test/export-externals/fixtures/local.esm.pretty.js +++ b/test/export-externals/fixtures/local.esm.pretty.js @@ -1 +1 @@ -export{exportedFunction as exF}from'./external.js'; +export{exportedFunction as exF}from'./external.js' diff --git a/test/export-externals/fixtures/multiple-default.esm.advanced.js b/test/export-externals/fixtures/multiple-default.esm.advanced.js index 4ac77caa..b7678039 100644 --- a/test/export-externals/fixtures/multiple-default.esm.advanced.js +++ b/test/export-externals/fixtures/multiple-default.esm.advanced.js @@ -1 +1 @@ -export{default as Y}from'./external-default.js';export{default as X}from'./external.js'; +export{default as Y}from'./external-default.js';export{default as X}from'./external.js' diff --git a/test/export-externals/fixtures/multiple-default.esm.default.js b/test/export-externals/fixtures/multiple-default.esm.default.js index 4ac77caa..b7678039 100644 --- a/test/export-externals/fixtures/multiple-default.esm.default.js +++ b/test/export-externals/fixtures/multiple-default.esm.default.js @@ -1 +1 @@ -export{default as Y}from'./external-default.js';export{default as X}from'./external.js'; +export{default as Y}from'./external-default.js';export{default as X}from'./external.js' diff --git a/test/export-externals/fixtures/multiple-default.esm.es5.js b/test/export-externals/fixtures/multiple-default.esm.es5.js index 4ac77caa..b7678039 100644 --- a/test/export-externals/fixtures/multiple-default.esm.es5.js +++ b/test/export-externals/fixtures/multiple-default.esm.es5.js @@ -1 +1 @@ -export{default as Y}from'./external-default.js';export{default as X}from'./external.js'; +export{default as Y}from'./external-default.js';export{default as X}from'./external.js' diff --git a/test/export-externals/fixtures/multiple-default.esm.pretty.js b/test/export-externals/fixtures/multiple-default.esm.pretty.js index d8584430..d9e5ccf9 100644 --- a/test/export-externals/fixtures/multiple-default.esm.pretty.js +++ b/test/export-externals/fixtures/multiple-default.esm.pretty.js @@ -1,2 +1,2 @@ -export{default as Y}from'./external-default.js';export{default as X}from'./external.js'; +export{default as Y}from'./external-default.js';export{default as X}from'./external.js' diff --git a/test/export-externals/fixtures/object.esm.advanced.js b/test/export-externals/fixtures/object.esm.advanced.js index a4316720..b4ce9141 100644 --- a/test/export-externals/fixtures/object.esm.advanced.js +++ b/test/export-externals/fixtures/object.esm.advanced.js @@ -1 +1 @@ -export{constObject}from'./external.js'; +export{constObject}from'./external.js' diff --git a/test/export-externals/fixtures/object.esm.default.js b/test/export-externals/fixtures/object.esm.default.js index a4316720..b4ce9141 100644 --- a/test/export-externals/fixtures/object.esm.default.js +++ b/test/export-externals/fixtures/object.esm.default.js @@ -1 +1 @@ -export{constObject}from'./external.js'; +export{constObject}from'./external.js' diff --git a/test/export-externals/fixtures/object.esm.es5.js b/test/export-externals/fixtures/object.esm.es5.js index a4316720..b4ce9141 100644 --- a/test/export-externals/fixtures/object.esm.es5.js +++ b/test/export-externals/fixtures/object.esm.es5.js @@ -1 +1 @@ -export{constObject}from'./external.js'; +export{constObject}from'./external.js' diff --git a/test/export-externals/fixtures/object.esm.pretty.js b/test/export-externals/fixtures/object.esm.pretty.js index a4316720..b4ce9141 100644 --- a/test/export-externals/fixtures/object.esm.pretty.js +++ b/test/export-externals/fixtures/object.esm.pretty.js @@ -1 +1 @@ -export{constObject}from'./external.js'; +export{constObject}from'./external.js' diff --git a/test/export-externals/fixtures/reserve-local-name.esm.advanced.js b/test/export-externals/fixtures/reserve-local-name.esm.advanced.js index 6e7d3412..419e8bd9 100644 --- a/test/export-externals/fixtures/reserve-local-name.esm.advanced.js +++ b/test/export-externals/fixtures/reserve-local-name.esm.advanced.js @@ -1 +1 @@ -export{exportedFunction as a}from'y.js';a("1"); +export{exportedFunction as a}from'y.js';a("1") diff --git a/test/export-externals/fixtures/reserve-local-name.esm.default.js b/test/export-externals/fixtures/reserve-local-name.esm.default.js index 6e7d3412..419e8bd9 100644 --- a/test/export-externals/fixtures/reserve-local-name.esm.default.js +++ b/test/export-externals/fixtures/reserve-local-name.esm.default.js @@ -1 +1 @@ -export{exportedFunction as a}from'y.js';a("1"); +export{exportedFunction as a}from'y.js';a("1") diff --git a/test/export-externals/fixtures/reserve-local-name.esm.es5.js b/test/export-externals/fixtures/reserve-local-name.esm.es5.js index 6e7d3412..419e8bd9 100644 --- a/test/export-externals/fixtures/reserve-local-name.esm.es5.js +++ b/test/export-externals/fixtures/reserve-local-name.esm.es5.js @@ -1 +1 @@ -export{exportedFunction as a}from'y.js';a("1"); +export{exportedFunction as a}from'y.js';a("1") diff --git a/test/export-externals/fixtures/reserve-local-name.esm.pretty.js b/test/export-externals/fixtures/reserve-local-name.esm.pretty.js index a3e3f872..38923dbb 100644 --- a/test/export-externals/fixtures/reserve-local-name.esm.pretty.js +++ b/test/export-externals/fixtures/reserve-local-name.esm.pretty.js @@ -1,2 +1,2 @@ export{exportedFunction as a}from'y.js'; -a("1"); +a("1") diff --git a/test/export-named/fixtures/identifier-default.esm.advanced.js b/test/export-named/fixtures/identifier-default.esm.advanced.js index aef22247..b0d35f3a 100644 --- a/test/export-named/fixtures/identifier-default.esm.advanced.js +++ b/test/export-named/fixtures/identifier-default.esm.advanced.js @@ -1 +1 @@ -export default 1; +export default 1 diff --git a/test/export-named/fixtures/identifier-default.esm.default.js b/test/export-named/fixtures/identifier-default.esm.default.js index aef22247..b0d35f3a 100644 --- a/test/export-named/fixtures/identifier-default.esm.default.js +++ b/test/export-named/fixtures/identifier-default.esm.default.js @@ -1 +1 @@ -export default 1; +export default 1 diff --git a/test/export-named/fixtures/identifier-default.esm.es5.js b/test/export-named/fixtures/identifier-default.esm.es5.js index aef22247..b0d35f3a 100644 --- a/test/export-named/fixtures/identifier-default.esm.es5.js +++ b/test/export-named/fixtures/identifier-default.esm.es5.js @@ -1 +1 @@ -export default 1; +export default 1 diff --git a/test/export-named/fixtures/identifier-default.esm.pretty.js b/test/export-named/fixtures/identifier-default.esm.pretty.js index 657ac4a4..19313c83 100644 --- a/test/export-named/fixtures/identifier-default.esm.pretty.js +++ b/test/export-named/fixtures/identifier-default.esm.pretty.js @@ -1,2 +1,2 @@ -export default 1; +export default 1 diff --git a/test/export-named/fixtures/identifier.esm.advanced.js b/test/export-named/fixtures/identifier.esm.advanced.js index 17fa4148..67165f42 100644 --- a/test/export-named/fixtures/identifier.esm.advanced.js +++ b/test/export-named/fixtures/identifier.esm.advanced.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-named/fixtures/identifier.esm.default.js b/test/export-named/fixtures/identifier.esm.default.js index 17fa4148..67165f42 100644 --- a/test/export-named/fixtures/identifier.esm.default.js +++ b/test/export-named/fixtures/identifier.esm.default.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-named/fixtures/identifier.esm.es5.js b/test/export-named/fixtures/identifier.esm.es5.js index 17fa4148..67165f42 100644 --- a/test/export-named/fixtures/identifier.esm.es5.js +++ b/test/export-named/fixtures/identifier.esm.es5.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-named/fixtures/identifier.esm.pretty.js b/test/export-named/fixtures/identifier.esm.pretty.js index 5aa259ba..ae80de70 100644 --- a/test/export-named/fixtures/identifier.esm.pretty.js +++ b/test/export-named/fixtures/identifier.esm.pretty.js @@ -1,2 +1,2 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-transpilation/fixtures/named-constant.esm.advanced.js b/test/export-transpilation/fixtures/named-constant.esm.advanced.js index 1158a89c..c301f03d 100644 --- a/test/export-transpilation/fixtures/named-constant.esm.advanced.js +++ b/test/export-transpilation/fixtures/named-constant.esm.advanced.js @@ -1 +1 @@ -var b=Symbol.for("smth");export var isSmth=a=>a&&!!a[b]; +var b=Symbol.for("smth");export var isSmth=a=>a&&!!a[b] diff --git a/test/export-transpilation/fixtures/named-constant.esm.default.js b/test/export-transpilation/fixtures/named-constant.esm.default.js index 1158a89c..c301f03d 100644 --- a/test/export-transpilation/fixtures/named-constant.esm.default.js +++ b/test/export-transpilation/fixtures/named-constant.esm.default.js @@ -1 +1 @@ -var b=Symbol.for("smth");export var isSmth=a=>a&&!!a[b]; +var b=Symbol.for("smth");export var isSmth=a=>a&&!!a[b] diff --git a/test/export-transpilation/fixtures/named-constant.esm.es5.js b/test/export-transpilation/fixtures/named-constant.esm.es5.js index d712a5a4..bbc691a1 100644 --- a/test/export-transpilation/fixtures/named-constant.esm.es5.js +++ b/test/export-transpilation/fixtures/named-constant.esm.es5.js @@ -3,4 +3,4 @@ a.getGlobal=function(b){b=["object"==typeof window&&window,"object"==typeof self a.SymbolClass.prototype.toString=function(){return this.$jscomp$symbol$id_};a.Symbol=function(){function b(d){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new a.SymbolClass(a.SYMBOL_PREFIX+(d||"")+"_"+c++,d)}var c=0;return b}(); a.initSymbolIterator=function(){a.initSymbol();var b=a.global.Symbol.iterator;b||(b=a.global.Symbol.iterator=a.global.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[b]&&a.defineProperty(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return a.iteratorPrototype(a.arrayIteratorImpl(this))}});a.initSymbolIterator=function(){}}; a.initSymbolAsyncIterator=function(){a.initSymbol();var b=a.global.Symbol.asyncIterator;b||(b=a.global.Symbol.asyncIterator=a.global.Symbol("Symbol.asyncIterator"));a.initSymbolAsyncIterator=function(){}};a.iteratorPrototype=function(b){a.initSymbolIterator();b={next:b};b[a.global.Symbol.iterator]=function(){return this};return b}; -a.polyfill=function(b,c){if(c){var d=a.global;b=b.split(".");for(var e=0;e a && !!a[b]; +export var isSmth=a => a && !!a[b] diff --git a/test/export-transpilation/fixtures/named-function.esm.advanced.js b/test/export-transpilation/fixtures/named-function.esm.advanced.js index ef6cffb0..c1c31c92 100644 --- a/test/export-transpilation/fixtures/named-function.esm.advanced.js +++ b/test/export-transpilation/fixtures/named-function.esm.advanced.js @@ -1 +1 @@ -var b=Symbol.for("smth");export function isSmth(a){return a&&!!a[b]}; +var b=Symbol.for("smth");export function isSmth(a){return a&&!!a[b]} diff --git a/test/export-transpilation/fixtures/named-function.esm.default.js b/test/export-transpilation/fixtures/named-function.esm.default.js index ef6cffb0..c1c31c92 100644 --- a/test/export-transpilation/fixtures/named-function.esm.default.js +++ b/test/export-transpilation/fixtures/named-function.esm.default.js @@ -1 +1 @@ -var b=Symbol.for("smth");export function isSmth(a){return a&&!!a[b]}; +var b=Symbol.for("smth");export function isSmth(a){return a&&!!a[b]} diff --git a/test/export-transpilation/fixtures/named-function.esm.es5.js b/test/export-transpilation/fixtures/named-function.esm.es5.js index ef6cffb0..c1c31c92 100644 --- a/test/export-transpilation/fixtures/named-function.esm.es5.js +++ b/test/export-transpilation/fixtures/named-function.esm.es5.js @@ -1 +1 @@ -var b=Symbol.for("smth");export function isSmth(a){return a&&!!a[b]}; +var b=Symbol.for("smth");export function isSmth(a){return a&&!!a[b]} diff --git a/test/export-transpilation/fixtures/named-function.esm.pretty.js b/test/export-transpilation/fixtures/named-function.esm.pretty.js index f7d7cece..4dec07bc 100644 --- a/test/export-transpilation/fixtures/named-function.esm.pretty.js +++ b/test/export-transpilation/fixtures/named-function.esm.pretty.js @@ -2,4 +2,4 @@ var b = Symbol.for("smth"); export function isSmth(a) { return a && !!a[b]; -}; +} diff --git a/test/export-variables/fixtures/class.esm.advanced.js b/test/export-variables/fixtures/class.esm.advanced.js index 9f2a3470..8c48980b 100644 --- a/test/export-variables/fixtures/class.esm.advanced.js +++ b/test/export-variables/fixtures/class.esm.advanced.js @@ -1 +1 @@ -class a{constructor(b){this.a=b}console(){console.log(this.a)}}export var Exported=a; +class a{constructor(b){this.a=b}console(){console.log(this.a)}}export var Exported=a diff --git a/test/export-variables/fixtures/class.esm.default.js b/test/export-variables/fixtures/class.esm.default.js index f0abc652..49c89d4f 100644 --- a/test/export-variables/fixtures/class.esm.default.js +++ b/test/export-variables/fixtures/class.esm.default.js @@ -1 +1 @@ -class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export var Exported=a; +class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export var Exported=a diff --git a/test/export-variables/fixtures/class.esm.es5.js b/test/export-variables/fixtures/class.esm.es5.js index a94cd2e3..6e65acf4 100644 --- a/test/export-variables/fixtures/class.esm.es5.js +++ b/test/export-variables/fixtures/class.esm.es5.js @@ -1 +1 @@ -function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export var Exported=a; +function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export var Exported=a diff --git a/test/export-variables/fixtures/class.esm.pretty.js b/test/export-variables/fixtures/class.esm.pretty.js index 60cb8fe4..dc1d0bce 100644 --- a/test/export-variables/fixtures/class.esm.pretty.js +++ b/test/export-variables/fixtures/class.esm.pretty.js @@ -7,4 +7,4 @@ class a { console.log(this.name_); } } -export var Exported=a; +export var Exported=a diff --git a/test/export-variables/fixtures/const-function.esm.advanced.js b/test/export-variables/fixtures/const-function.esm.advanced.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/const-function.esm.advanced.js +++ b/test/export-variables/fixtures/const-function.esm.advanced.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/const-function.esm.default.js b/test/export-variables/fixtures/const-function.esm.default.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/const-function.esm.default.js +++ b/test/export-variables/fixtures/const-function.esm.default.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/const-function.esm.es5.js b/test/export-variables/fixtures/const-function.esm.es5.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/const-function.esm.es5.js +++ b/test/export-variables/fixtures/const-function.esm.es5.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/const-function.esm.pretty.js b/test/export-variables/fixtures/const-function.esm.pretty.js index e09b9b65..cdab5642 100644 --- a/test/export-variables/fixtures/const-function.esm.pretty.js +++ b/test/export-variables/fixtures/const-function.esm.pretty.js @@ -1,4 +1,4 @@ export function foo(a) { console.log(a); -}; +} diff --git a/test/export-variables/fixtures/const-number.esm.advanced.js b/test/export-variables/fixtures/const-number.esm.advanced.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/const-number.esm.advanced.js +++ b/test/export-variables/fixtures/const-number.esm.advanced.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/const-number.esm.default.js b/test/export-variables/fixtures/const-number.esm.default.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/const-number.esm.default.js +++ b/test/export-variables/fixtures/const-number.esm.default.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/const-number.esm.es5.js b/test/export-variables/fixtures/const-number.esm.es5.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/const-number.esm.es5.js +++ b/test/export-variables/fixtures/const-number.esm.es5.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/const-number.esm.pretty.js b/test/export-variables/fixtures/const-number.esm.pretty.js index 5aa259ba..ae80de70 100644 --- a/test/export-variables/fixtures/const-number.esm.pretty.js +++ b/test/export-variables/fixtures/const-number.esm.pretty.js @@ -1,2 +1,2 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/function.esm.advanced.js b/test/export-variables/fixtures/function.esm.advanced.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/function.esm.advanced.js +++ b/test/export-variables/fixtures/function.esm.advanced.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/function.esm.default.js b/test/export-variables/fixtures/function.esm.default.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/function.esm.default.js +++ b/test/export-variables/fixtures/function.esm.default.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/function.esm.es5.js b/test/export-variables/fixtures/function.esm.es5.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/function.esm.es5.js +++ b/test/export-variables/fixtures/function.esm.es5.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/function.esm.pretty.js b/test/export-variables/fixtures/function.esm.pretty.js index e09b9b65..cdab5642 100644 --- a/test/export-variables/fixtures/function.esm.pretty.js +++ b/test/export-variables/fixtures/function.esm.pretty.js @@ -1,4 +1,4 @@ export function foo(a) { console.log(a); -}; +} diff --git a/test/export-variables/fixtures/let-function.esm.advanced.js b/test/export-variables/fixtures/let-function.esm.advanced.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/let-function.esm.advanced.js +++ b/test/export-variables/fixtures/let-function.esm.advanced.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/let-function.esm.default.js b/test/export-variables/fixtures/let-function.esm.default.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/let-function.esm.default.js +++ b/test/export-variables/fixtures/let-function.esm.default.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/let-function.esm.es5.js b/test/export-variables/fixtures/let-function.esm.es5.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/let-function.esm.es5.js +++ b/test/export-variables/fixtures/let-function.esm.es5.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/let-function.esm.pretty.js b/test/export-variables/fixtures/let-function.esm.pretty.js index e09b9b65..cdab5642 100644 --- a/test/export-variables/fixtures/let-function.esm.pretty.js +++ b/test/export-variables/fixtures/let-function.esm.pretty.js @@ -1,4 +1,4 @@ export function foo(a) { console.log(a); -}; +} diff --git a/test/export-variables/fixtures/let-identifier.esm.advanced.js b/test/export-variables/fixtures/let-identifier.esm.advanced.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/let-identifier.esm.advanced.js +++ b/test/export-variables/fixtures/let-identifier.esm.advanced.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/let-identifier.esm.default.js b/test/export-variables/fixtures/let-identifier.esm.default.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/let-identifier.esm.default.js +++ b/test/export-variables/fixtures/let-identifier.esm.default.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/let-identifier.esm.es5.js b/test/export-variables/fixtures/let-identifier.esm.es5.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/let-identifier.esm.es5.js +++ b/test/export-variables/fixtures/let-identifier.esm.es5.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/let-identifier.esm.pretty.js b/test/export-variables/fixtures/let-identifier.esm.pretty.js index 5aa259ba..ae80de70 100644 --- a/test/export-variables/fixtures/let-identifier.esm.pretty.js +++ b/test/export-variables/fixtures/let-identifier.esm.pretty.js @@ -1,2 +1,2 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/let-number.esm.advanced.js b/test/export-variables/fixtures/let-number.esm.advanced.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/let-number.esm.advanced.js +++ b/test/export-variables/fixtures/let-number.esm.advanced.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/let-number.esm.default.js b/test/export-variables/fixtures/let-number.esm.default.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/let-number.esm.default.js +++ b/test/export-variables/fixtures/let-number.esm.default.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/let-number.esm.es5.js b/test/export-variables/fixtures/let-number.esm.es5.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/let-number.esm.es5.js +++ b/test/export-variables/fixtures/let-number.esm.es5.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/let-number.esm.pretty.js b/test/export-variables/fixtures/let-number.esm.pretty.js index 5aa259ba..ae80de70 100644 --- a/test/export-variables/fixtures/let-number.esm.pretty.js +++ b/test/export-variables/fixtures/let-number.esm.pretty.js @@ -1,2 +1,2 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/var-function.esm.advanced.js b/test/export-variables/fixtures/var-function.esm.advanced.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/var-function.esm.advanced.js +++ b/test/export-variables/fixtures/var-function.esm.advanced.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/var-function.esm.default.js b/test/export-variables/fixtures/var-function.esm.default.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/var-function.esm.default.js +++ b/test/export-variables/fixtures/var-function.esm.default.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/var-function.esm.es5.js b/test/export-variables/fixtures/var-function.esm.es5.js index 10085a94..e510d787 100644 --- a/test/export-variables/fixtures/var-function.esm.es5.js +++ b/test/export-variables/fixtures/var-function.esm.es5.js @@ -1 +1 @@ -export function foo(a){console.log(a)}; +export function foo(a){console.log(a)} diff --git a/test/export-variables/fixtures/var-function.esm.pretty.js b/test/export-variables/fixtures/var-function.esm.pretty.js index e09b9b65..cdab5642 100644 --- a/test/export-variables/fixtures/var-function.esm.pretty.js +++ b/test/export-variables/fixtures/var-function.esm.pretty.js @@ -1,4 +1,4 @@ export function foo(a) { console.log(a); -}; +} diff --git a/test/export-variables/fixtures/var-identifier.esm.advanced.js b/test/export-variables/fixtures/var-identifier.esm.advanced.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/var-identifier.esm.advanced.js +++ b/test/export-variables/fixtures/var-identifier.esm.advanced.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/var-identifier.esm.default.js b/test/export-variables/fixtures/var-identifier.esm.default.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/var-identifier.esm.default.js +++ b/test/export-variables/fixtures/var-identifier.esm.default.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/var-identifier.esm.es5.js b/test/export-variables/fixtures/var-identifier.esm.es5.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/var-identifier.esm.es5.js +++ b/test/export-variables/fixtures/var-identifier.esm.es5.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/var-identifier.esm.pretty.js b/test/export-variables/fixtures/var-identifier.esm.pretty.js index 5aa259ba..ae80de70 100644 --- a/test/export-variables/fixtures/var-identifier.esm.pretty.js +++ b/test/export-variables/fixtures/var-identifier.esm.pretty.js @@ -1,2 +1,2 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/var-number.esm.advanced.js b/test/export-variables/fixtures/var-number.esm.advanced.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/var-number.esm.advanced.js +++ b/test/export-variables/fixtures/var-number.esm.advanced.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/var-number.esm.default.js b/test/export-variables/fixtures/var-number.esm.default.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/var-number.esm.default.js +++ b/test/export-variables/fixtures/var-number.esm.default.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/var-number.esm.es5.js b/test/export-variables/fixtures/var-number.esm.es5.js index 17fa4148..67165f42 100644 --- a/test/export-variables/fixtures/var-number.esm.es5.js +++ b/test/export-variables/fixtures/var-number.esm.es5.js @@ -1 +1 @@ -export var foo=1; +export var foo=1 diff --git a/test/export-variables/fixtures/var-number.esm.pretty.js b/test/export-variables/fixtures/var-number.esm.pretty.js index 5aa259ba..ae80de70 100644 --- a/test/export-variables/fixtures/var-number.esm.pretty.js +++ b/test/export-variables/fixtures/var-number.esm.pretty.js @@ -1,2 +1,2 @@ -export var foo=1; +export var foo=1 diff --git a/test/hashbang/fixtures/hashbang-banner.esm.advanced.js b/test/hashbang/fixtures/hashbang-banner.esm.advanced.js index 418b688d..02f804bb 100644 --- a/test/hashbang/fixtures/hashbang-banner.esm.advanced.js +++ b/test/hashbang/fixtures/hashbang-banner.esm.advanced.js @@ -1,2 +1,2 @@ #!/usr/bin/env node -export function foo(){return"hello world"}; +export function foo(){return"hello world"} diff --git a/test/hashbang/fixtures/hashbang-banner.esm.default.js b/test/hashbang/fixtures/hashbang-banner.esm.default.js index 418b688d..02f804bb 100644 --- a/test/hashbang/fixtures/hashbang-banner.esm.default.js +++ b/test/hashbang/fixtures/hashbang-banner.esm.default.js @@ -1,2 +1,2 @@ #!/usr/bin/env node -export function foo(){return"hello world"}; +export function foo(){return"hello world"} diff --git a/test/hashbang/fixtures/hashbang-banner.esm.es5.js b/test/hashbang/fixtures/hashbang-banner.esm.es5.js index 418b688d..02f804bb 100644 --- a/test/hashbang/fixtures/hashbang-banner.esm.es5.js +++ b/test/hashbang/fixtures/hashbang-banner.esm.es5.js @@ -1,2 +1,2 @@ #!/usr/bin/env node -export function foo(){return"hello world"}; +export function foo(){return"hello world"} diff --git a/test/hashbang/fixtures/hashbang-banner.esm.pretty.js b/test/hashbang/fixtures/hashbang-banner.esm.pretty.js index 81b9a55f..9f73d3ad 100644 --- a/test/hashbang/fixtures/hashbang-banner.esm.pretty.js +++ b/test/hashbang/fixtures/hashbang-banner.esm.pretty.js @@ -2,4 +2,4 @@ export function foo(){ return "hello world"; -}; +} diff --git a/test/hashbang/fixtures/hashbang-preserved.esm.advanced.js b/test/hashbang/fixtures/hashbang-preserved.esm.advanced.js index 418b688d..02f804bb 100644 --- a/test/hashbang/fixtures/hashbang-preserved.esm.advanced.js +++ b/test/hashbang/fixtures/hashbang-preserved.esm.advanced.js @@ -1,2 +1,2 @@ #!/usr/bin/env node -export function foo(){return"hello world"}; +export function foo(){return"hello world"} diff --git a/test/hashbang/fixtures/hashbang-preserved.esm.default.js b/test/hashbang/fixtures/hashbang-preserved.esm.default.js index 418b688d..02f804bb 100644 --- a/test/hashbang/fixtures/hashbang-preserved.esm.default.js +++ b/test/hashbang/fixtures/hashbang-preserved.esm.default.js @@ -1,2 +1,2 @@ #!/usr/bin/env node -export function foo(){return"hello world"}; +export function foo(){return"hello world"} diff --git a/test/hashbang/fixtures/hashbang-preserved.esm.es5.js b/test/hashbang/fixtures/hashbang-preserved.esm.es5.js index 418b688d..02f804bb 100644 --- a/test/hashbang/fixtures/hashbang-preserved.esm.es5.js +++ b/test/hashbang/fixtures/hashbang-preserved.esm.es5.js @@ -1,2 +1,2 @@ #!/usr/bin/env node -export function foo(){return"hello world"}; +export function foo(){return"hello world"} diff --git a/test/hashbang/fixtures/hashbang-preserved.esm.pretty.js b/test/hashbang/fixtures/hashbang-preserved.esm.pretty.js index 81b9a55f..9f73d3ad 100644 --- a/test/hashbang/fixtures/hashbang-preserved.esm.pretty.js +++ b/test/hashbang/fixtures/hashbang-preserved.esm.pretty.js @@ -2,4 +2,4 @@ export function foo(){ return "hello world"; -}; +} diff --git a/test/iife/fixtures/iife-wrapped-safely.iife.advanced.js b/test/iife/fixtures/iife-wrapped-safely.iife.advanced.js index 10fabcef..124bf3a4 100644 --- a/test/iife/fixtures/iife-wrapped-safely.iife.advanced.js +++ b/test/iife/fixtures/iife-wrapped-safely.iife.advanced.js @@ -1 +1 @@ -'use strict';var wrapper=function(a){a.a=function(b){document.body.innerHTML="hello "+b};return a}({}); +'use strict';var wrapper=function(a){a.a=function(b){document.body.innerHTML="hello "+b};return a}({}) diff --git a/test/iife/fixtures/iife-wrapped-safely.iife.default.js b/test/iife/fixtures/iife-wrapped-safely.iife.default.js index 1c994df3..432d82ae 100644 --- a/test/iife/fixtures/iife-wrapped-safely.iife.default.js +++ b/test/iife/fixtures/iife-wrapped-safely.iife.default.js @@ -1 +1 @@ -'use strict';var wrapper=function(a){a.greeting=function(a){document.body.innerHTML="hello "+a};return a}({}); +'use strict';var wrapper=function(a){a.greeting=function(a){document.body.innerHTML="hello "+a};return a}({}) diff --git a/test/iife/fixtures/iife-wrapped-safely.iife.es5.js b/test/iife/fixtures/iife-wrapped-safely.iife.es5.js index 1c994df3..432d82ae 100644 --- a/test/iife/fixtures/iife-wrapped-safely.iife.es5.js +++ b/test/iife/fixtures/iife-wrapped-safely.iife.es5.js @@ -1 +1 @@ -'use strict';var wrapper=function(a){a.greeting=function(a){document.body.innerHTML="hello "+a};return a}({}); +'use strict';var wrapper=function(a){a.greeting=function(a){document.body.innerHTML="hello "+a};return a}({}) diff --git a/test/iife/fixtures/iife-wrapped-safely.iife.pretty.js b/test/iife/fixtures/iife-wrapped-safely.iife.pretty.js index ec910afd..49a382df 100644 --- a/test/iife/fixtures/iife-wrapped-safely.iife.pretty.js +++ b/test/iife/fixtures/iife-wrapped-safely.iife.pretty.js @@ -4,5 +4,5 @@ var wrapper = function(a) { document.body.innerHTML = "hello " + a; }; return a; -}({}); +}({}) diff --git a/test/import/fixtures/chunk-5275c9cc.esm.default.js b/test/import/fixtures/chunk-5275c9cc.esm.default.js index 31e45e44..c7c02379 100644 --- a/test/import/fixtures/chunk-5275c9cc.esm.default.js +++ b/test/import/fixtures/chunk-5275c9cc.esm.default.js @@ -1 +1 @@ -var a=function(){console.log("foo")};var b=function(){console.log("baz")};var c=function(){console.log("bar")};export{a,b,c}; +var a=function(){console.log("foo")};var b=function(){console.log("baz")};var c=function(){console.log("bar")};export{a,b,c} diff --git a/test/import/fixtures/dynamic-imported-67216f69.esm.advanced.js b/test/import/fixtures/dynamic-imported-67216f69.esm.advanced.js index b75ccace..b67add67 100644 --- a/test/import/fixtures/dynamic-imported-67216f69.esm.advanced.js +++ b/test/import/fixtures/dynamic-imported-67216f69.esm.advanced.js @@ -1 +1 @@ -export function handleImport(){return 2}; +export function handleImport(){return 2} diff --git a/test/import/fixtures/dynamic-imported-67216f69.esm.default.js b/test/import/fixtures/dynamic-imported-67216f69.esm.default.js index b75ccace..b67add67 100644 --- a/test/import/fixtures/dynamic-imported-67216f69.esm.default.js +++ b/test/import/fixtures/dynamic-imported-67216f69.esm.default.js @@ -1 +1 @@ -export function handleImport(){return 2}; +export function handleImport(){return 2} diff --git a/test/import/fixtures/dynamic-imported-67216f69.esm.es5.js b/test/import/fixtures/dynamic-imported-67216f69.esm.es5.js index b75ccace..b67add67 100644 --- a/test/import/fixtures/dynamic-imported-67216f69.esm.es5.js +++ b/test/import/fixtures/dynamic-imported-67216f69.esm.es5.js @@ -1 +1 @@ -export function handleImport(){return 2}; +export function handleImport(){return 2} diff --git a/test/import/fixtures/dynamic-imported-67216f69.esm.pretty.js b/test/import/fixtures/dynamic-imported-67216f69.esm.pretty.js index 1b5365bd..b77087e6 100644 --- a/test/import/fixtures/dynamic-imported-67216f69.esm.pretty.js +++ b/test/import/fixtures/dynamic-imported-67216f69.esm.pretty.js @@ -1,4 +1,4 @@ export function handleImport(){ return 2; -}; +} diff --git a/test/import/fixtures/dynamic.esm.advanced.js b/test/import/fixtures/dynamic.esm.advanced.js index b5b6a37c..102dec3b 100644 --- a/test/import/fixtures/dynamic.esm.advanced.js +++ b/test/import/fixtures/dynamic.esm.advanced.js @@ -1 +1 @@ -export function exported(){import("./dynamic-imported-67216f69.js").then(a=>a.a())}; +export function exported(){import("./dynamic-imported-67216f69.js").then(a=>a.a())} diff --git a/test/import/fixtures/dynamic.esm.default.js b/test/import/fixtures/dynamic.esm.default.js index 299fe098..7f0ba777 100644 --- a/test/import/fixtures/dynamic.esm.default.js +++ b/test/import/fixtures/dynamic.esm.default.js @@ -1 +1 @@ -export function exported(){import("./dynamic-imported-67216f69.js").then(a=>a.handleImport())}; +export function exported(){import("./dynamic-imported-67216f69.js").then(a=>a.handleImport())} diff --git a/test/import/fixtures/dynamic.esm.es5.js b/test/import/fixtures/dynamic.esm.es5.js index 8da15353..b7c25a24 100644 --- a/test/import/fixtures/dynamic.esm.es5.js +++ b/test/import/fixtures/dynamic.esm.es5.js @@ -1 +1 @@ -export function exported(){import("./dynamic-imported-67216f69.js").then(function(a){return a.handleImport()})}; +export function exported(){import("./dynamic-imported-67216f69.js").then(function(a){return a.handleImport()})} diff --git a/test/import/fixtures/dynamic.esm.pretty.js b/test/import/fixtures/dynamic.esm.pretty.js index 75ca0e07..102b857d 100644 --- a/test/import/fixtures/dynamic.esm.pretty.js +++ b/test/import/fixtures/dynamic.esm.pretty.js @@ -1,4 +1,4 @@ export function exported(){ import("./dynamic-imported-67216f69.js").then(a => a.handleImport()); -}; +} diff --git a/test/import/fixtures/external.esm.advanced.js b/test/import/fixtures/external.esm.advanced.js index 007eba0a..5badf4ff 100644 --- a/test/import/fixtures/external.esm.advanced.js +++ b/test/import/fixtures/external.esm.advanced.js @@ -1 +1 @@ -import j from'lodash3';import{thing,thing2}from'lodash2';import _,{foo,bar}from'lodash';console.log("lodash",_,foo,bar,thing,thing2,j); +import j from'lodash3';import{thing,thing2}from'lodash2';import _,{foo,bar}from'lodash';console.log("lodash",_,foo,bar,thing,thing2,j) diff --git a/test/import/fixtures/external.esm.default.js b/test/import/fixtures/external.esm.default.js index 007eba0a..5badf4ff 100644 --- a/test/import/fixtures/external.esm.default.js +++ b/test/import/fixtures/external.esm.default.js @@ -1 +1 @@ -import j from'lodash3';import{thing,thing2}from'lodash2';import _,{foo,bar}from'lodash';console.log("lodash",_,foo,bar,thing,thing2,j); +import j from'lodash3';import{thing,thing2}from'lodash2';import _,{foo,bar}from'lodash';console.log("lodash",_,foo,bar,thing,thing2,j) diff --git a/test/import/fixtures/external.esm.es5.js b/test/import/fixtures/external.esm.es5.js index 007eba0a..5badf4ff 100644 --- a/test/import/fixtures/external.esm.es5.js +++ b/test/import/fixtures/external.esm.es5.js @@ -1 +1 @@ -import j from'lodash3';import{thing,thing2}from'lodash2';import _,{foo,bar}from'lodash';console.log("lodash",_,foo,bar,thing,thing2,j); +import j from'lodash3';import{thing,thing2}from'lodash2';import _,{foo,bar}from'lodash';console.log("lodash",_,foo,bar,thing,thing2,j) diff --git a/test/import/fixtures/external.esm.pretty.js b/test/import/fixtures/external.esm.pretty.js index df672c89..81a73812 100644 --- a/test/import/fixtures/external.esm.pretty.js +++ b/test/import/fixtures/external.esm.pretty.js @@ -1,2 +1,2 @@ import j from'lodash3';import{thing,thing2}from'lodash2';import _,{foo,bar}from'lodash'; -console.log("lodash", _, foo, bar, thing, thing2, j); +console.log("lodash", _, foo, bar, thing, thing2, j) diff --git a/test/import/fixtures/flattened.esm.advanced.js b/test/import/fixtures/flattened.esm.advanced.js index 54cf868b..2687ec4d 100644 --- a/test/import/fixtures/flattened.esm.advanced.js +++ b/test/import/fixtures/flattened.esm.advanced.js @@ -1 +1 @@ -export function exported(a){console.log(a);console.log(1)}; +export function exported(a){console.log(a);console.log(1)} diff --git a/test/import/fixtures/flattened.esm.default.js b/test/import/fixtures/flattened.esm.default.js index 54cf868b..2687ec4d 100644 --- a/test/import/fixtures/flattened.esm.default.js +++ b/test/import/fixtures/flattened.esm.default.js @@ -1 +1 @@ -export function exported(a){console.log(a);console.log(1)}; +export function exported(a){console.log(a);console.log(1)} diff --git a/test/import/fixtures/flattened.esm.es5.js b/test/import/fixtures/flattened.esm.es5.js index 54cf868b..2687ec4d 100644 --- a/test/import/fixtures/flattened.esm.es5.js +++ b/test/import/fixtures/flattened.esm.es5.js @@ -1 +1 @@ -export function exported(a){console.log(a);console.log(1)}; +export function exported(a){console.log(a);console.log(1)} diff --git a/test/import/fixtures/flattened.esm.pretty.js b/test/import/fixtures/flattened.esm.pretty.js index bd87aa64..99dc2d98 100644 --- a/test/import/fixtures/flattened.esm.pretty.js +++ b/test/import/fixtures/flattened.esm.pretty.js @@ -2,4 +2,4 @@ export function exported(a) { console.log(a); console.log(1); -}; +} diff --git a/test/import/fixtures/star.esm.advanced.js b/test/import/fixtures/star.esm.advanced.js index 3ba7dfdd..1f265551 100644 --- a/test/import/fixtures/star.esm.advanced.js +++ b/test/import/fixtures/star.esm.advanced.js @@ -1 +1 @@ -var a=Object.freeze({__proto__:null,c:1,a:2,b:()=>console.log("foo")});console.log(...a); +var a=Object.freeze({__proto__:null,c:1,a:2,b:()=>console.log("foo")});console.log(...a) diff --git a/test/import/fixtures/star.esm.default.js b/test/import/fixtures/star.esm.default.js index a987e674..faa8004a 100644 --- a/test/import/fixtures/star.esm.default.js +++ b/test/import/fixtures/star.esm.default.js @@ -1 +1 @@ -var a=Object.freeze({__proto__:null,yay:1,baaaa:2,foo:()=>console.log("foo")});console.log(...a); +var a=Object.freeze({__proto__:null,yay:1,baaaa:2,foo:()=>console.log("foo")});console.log(...a) diff --git a/test/import/fixtures/star.esm.es5.js b/test/import/fixtures/star.esm.es5.js index 8528076c..c510d1d1 100644 --- a/test/import/fixtures/star.esm.es5.js +++ b/test/import/fixtures/star.esm.es5.js @@ -1,2 +1,2 @@ var b=b||{};b.scope={};b.arrayIteratorImpl=function(a){var c=0;return function(){return c console.log("foo")}); -console.log(...a); +console.log(...a) diff --git a/test/import/fixtures/utf8-lazy-48cd6a70.esm.advanced.js b/test/import/fixtures/utf8-lazy-48cd6a70.esm.advanced.js index 874f27d6..a8abc61b 100644 --- a/test/import/fixtures/utf8-lazy-48cd6a70.esm.advanced.js +++ b/test/import/fixtures/utf8-lazy-48cd6a70.esm.advanced.js @@ -1 +1 @@ -import{ɵ as ɵɵbar}from'./utf8-3e9ae737.js';\u0275\u0275bar(); +import{ɵ as ɵɵbar}from'./utf8-3e9ae737.js';\u0275\u0275bar() diff --git a/test/import/fixtures/utf8-lazy-48cd6a70.esm.default.js b/test/import/fixtures/utf8-lazy-48cd6a70.esm.default.js index 874f27d6..a8abc61b 100644 --- a/test/import/fixtures/utf8-lazy-48cd6a70.esm.default.js +++ b/test/import/fixtures/utf8-lazy-48cd6a70.esm.default.js @@ -1 +1 @@ -import{ɵ as ɵɵbar}from'./utf8-3e9ae737.js';\u0275\u0275bar(); +import{ɵ as ɵɵbar}from'./utf8-3e9ae737.js';\u0275\u0275bar() diff --git a/test/import/fixtures/utf8-lazy-48cd6a70.esm.es5.js b/test/import/fixtures/utf8-lazy-48cd6a70.esm.es5.js index 874f27d6..a8abc61b 100644 --- a/test/import/fixtures/utf8-lazy-48cd6a70.esm.es5.js +++ b/test/import/fixtures/utf8-lazy-48cd6a70.esm.es5.js @@ -1 +1 @@ -import{ɵ as ɵɵbar}from'./utf8-3e9ae737.js';\u0275\u0275bar(); +import{ɵ as ɵɵbar}from'./utf8-3e9ae737.js';\u0275\u0275bar() diff --git a/test/import/fixtures/utf8-lazy-48cd6a70.esm.pretty.js b/test/import/fixtures/utf8-lazy-48cd6a70.esm.pretty.js index 4f6dd00f..c506405c 100644 --- a/test/import/fixtures/utf8-lazy-48cd6a70.esm.pretty.js +++ b/test/import/fixtures/utf8-lazy-48cd6a70.esm.pretty.js @@ -1,2 +1,2 @@ import{ɵ as ɵɵbar}from'./utf8-3e9ae737.js'; -\u0275\u0275bar(); +\u0275\u0275bar() diff --git a/test/import/fixtures/utf8.esm.advanced.js b/test/import/fixtures/utf8.esm.advanced.js index 8d938ceb..95d04f61 100644 --- a/test/import/fixtures/utf8.esm.advanced.js +++ b/test/import/fixtures/utf8.esm.advanced.js @@ -1 +1 @@ -import './utf8-3e9ae737.js'; +import './utf8-3e9ae737.js' diff --git a/test/import/fixtures/utf8.esm.default.js b/test/import/fixtures/utf8.esm.default.js index 8d938ceb..95d04f61 100644 --- a/test/import/fixtures/utf8.esm.default.js +++ b/test/import/fixtures/utf8.esm.default.js @@ -1 +1 @@ -import './utf8-3e9ae737.js'; +import './utf8-3e9ae737.js' diff --git a/test/import/fixtures/utf8.esm.es5.js b/test/import/fixtures/utf8.esm.es5.js index 8d938ceb..95d04f61 100644 --- a/test/import/fixtures/utf8.esm.es5.js +++ b/test/import/fixtures/utf8.esm.es5.js @@ -1 +1 @@ -import './utf8-3e9ae737.js'; +import './utf8-3e9ae737.js' diff --git a/test/import/fixtures/utf8.esm.pretty.js b/test/import/fixtures/utf8.esm.pretty.js index 8d938ceb..95d04f61 100644 --- a/test/import/fixtures/utf8.esm.pretty.js +++ b/test/import/fixtures/utf8.esm.pretty.js @@ -1 +1 @@ -import './utf8-3e9ae737.js'; +import './utf8-3e9ae737.js' diff --git a/test/literal-computed-keys/fixtures/literal-computed.esm.advanced.js b/test/literal-computed-keys/fixtures/literal-computed.esm.advanced.js index a6641ef1..9a4bdd62 100644 --- a/test/literal-computed-keys/fixtures/literal-computed.esm.advanced.js +++ b/test/literal-computed-keys/fixtures/literal-computed.esm.advanced.js @@ -1 +1 @@ -console.log({0:"value"}); +console.log({0:"value"}) diff --git a/test/literal-computed-keys/fixtures/literal-computed.esm.default.js b/test/literal-computed-keys/fixtures/literal-computed.esm.default.js index a6641ef1..9a4bdd62 100644 --- a/test/literal-computed-keys/fixtures/literal-computed.esm.default.js +++ b/test/literal-computed-keys/fixtures/literal-computed.esm.default.js @@ -1 +1 @@ -console.log({0:"value"}); +console.log({0:"value"}) diff --git a/test/literal-computed-keys/fixtures/literal-computed.esm.es5.js b/test/literal-computed-keys/fixtures/literal-computed.esm.es5.js index c11ecf3c..192b4f73 100644 --- a/test/literal-computed-keys/fixtures/literal-computed.esm.es5.js +++ b/test/literal-computed-keys/fixtures/literal-computed.esm.es5.js @@ -1 +1 @@ -var a={};console.log((a[0]="value",a)); +var a={};console.log((a[0]="value",a)) diff --git a/test/literal-computed-keys/fixtures/literal-computed.esm.pretty.js b/test/literal-computed-keys/fixtures/literal-computed.esm.pretty.js index 88c8d132..250772bd 100644 --- a/test/literal-computed-keys/fixtures/literal-computed.esm.pretty.js +++ b/test/literal-computed-keys/fixtures/literal-computed.esm.pretty.js @@ -1,2 +1,2 @@ -console.log({0:"value"}); +console.log({0:"value"}) diff --git a/test/literal-computed-keys/fixtures/mixed-keys.esm.advanced.js b/test/literal-computed-keys/fixtures/mixed-keys.esm.advanced.js index 57d0ce18..9fd59376 100644 --- a/test/literal-computed-keys/fixtures/mixed-keys.esm.advanced.js +++ b/test/literal-computed-keys/fixtures/mixed-keys.esm.advanced.js @@ -1 +1 @@ -console.log({0:"value",1:"value",2:"value2",3:"value3",4(a){console.log(a)},5(a){console.log(a)}}); +console.log({0:"value",1:"value",2:"value2",3:"value3",4(a){console.log(a)},5(a){console.log(a)}}) diff --git a/test/literal-computed-keys/fixtures/mixed-keys.esm.default.js b/test/literal-computed-keys/fixtures/mixed-keys.esm.default.js index 57d0ce18..9fd59376 100644 --- a/test/literal-computed-keys/fixtures/mixed-keys.esm.default.js +++ b/test/literal-computed-keys/fixtures/mixed-keys.esm.default.js @@ -1 +1 @@ -console.log({0:"value",1:"value",2:"value2",3:"value3",4(a){console.log(a)},5(a){console.log(a)}}); +console.log({0:"value",1:"value",2:"value2",3:"value3",4(a){console.log(a)},5(a){console.log(a)}}) diff --git a/test/literal-computed-keys/fixtures/mixed-keys.esm.es5.js b/test/literal-computed-keys/fixtures/mixed-keys.esm.es5.js index 7c87d8ab..8d16f940 100644 --- a/test/literal-computed-keys/fixtures/mixed-keys.esm.es5.js +++ b/test/literal-computed-keys/fixtures/mixed-keys.esm.es5.js @@ -1 +1 @@ -var a={};console.log((a["0"]="value",a[1]="value",a[2]="value2",a[3]="value3",a[4]=function(b){console.log(b)},a[5]=function(b){console.log(b)},a)); +var a={};console.log((a["0"]="value",a[1]="value",a[2]="value2",a[3]="value3",a[4]=function(b){console.log(b)},a[5]=function(b){console.log(b)},a)) diff --git a/test/literal-computed-keys/fixtures/mixed-keys.esm.pretty.js b/test/literal-computed-keys/fixtures/mixed-keys.esm.pretty.js index 6205395d..11e90e62 100644 --- a/test/literal-computed-keys/fixtures/mixed-keys.esm.pretty.js +++ b/test/literal-computed-keys/fixtures/mixed-keys.esm.pretty.js @@ -3,4 +3,4 @@ console.log({0:"value", 1:"value", 2:"value2", 3:"value3", 4(a) { console.log(a); }, 5(a) { console.log(a); -}}); +}}) diff --git a/test/literal-computed-keys/fixtures/spread-expression.esm.advanced.js b/test/literal-computed-keys/fixtures/spread-expression.esm.advanced.js index ea1a42f0..0730eeab 100644 --- a/test/literal-computed-keys/fixtures/spread-expression.esm.advanced.js +++ b/test/literal-computed-keys/fixtures/spread-expression.esm.advanced.js @@ -1 +1 @@ -let a=["put","add","delete","clear"];export function SpreadExpression(){return Object.assign({},a,{get:()=>console.log("get thing")})}; +let a=["put","add","delete","clear"];export function SpreadExpression(){return Object.assign({},a,{get:()=>console.log("get thing")})} diff --git a/test/literal-computed-keys/fixtures/spread-expression.esm.default.js b/test/literal-computed-keys/fixtures/spread-expression.esm.default.js index 5866647a..8a3724ca 100644 --- a/test/literal-computed-keys/fixtures/spread-expression.esm.default.js +++ b/test/literal-computed-keys/fixtures/spread-expression.esm.default.js @@ -1 +1 @@ -let a=["put","add","delete","clear"];export function SpreadExpression(){return{...a,get:()=>console.log("get thing")}}; +let a=["put","add","delete","clear"];export function SpreadExpression(){return{...a,get:()=>console.log("get thing")}} diff --git a/test/literal-computed-keys/fixtures/spread-expression.esm.es5.js b/test/literal-computed-keys/fixtures/spread-expression.esm.es5.js index 4ca5f638..e01f425c 100644 --- a/test/literal-computed-keys/fixtures/spread-expression.esm.es5.js +++ b/test/literal-computed-keys/fixtures/spread-expression.esm.es5.js @@ -1 +1 @@ -var a=["put","add","delete","clear"];export function SpreadExpression(){return Object.assign({},a,{get:function(){return console.log("get thing")}})}; +var a=["put","add","delete","clear"];export function SpreadExpression(){return Object.assign({},a,{get:function(){return console.log("get thing")}})} diff --git a/test/literal-computed-keys/fixtures/spread-expression.esm.pretty.js b/test/literal-computed-keys/fixtures/spread-expression.esm.pretty.js index 12538864..be903809 100644 --- a/test/literal-computed-keys/fixtures/spread-expression.esm.pretty.js +++ b/test/literal-computed-keys/fixtures/spread-expression.esm.pretty.js @@ -2,4 +2,4 @@ let a = ["put", "add", "delete", "clear"]; export function SpreadExpression(){ return {...a, get:() => console.log("get thing")}; -}; +} diff --git a/test/provided-externs/fixtures/class.esm.advanced.js b/test/provided-externs/fixtures/class.esm.advanced.js index 4ae1c575..eced490c 100644 --- a/test/provided-externs/fixtures/class.esm.advanced.js +++ b/test/provided-externs/fixtures/class.esm.advanced.js @@ -1 +1 @@ -class a{constructor(b){this.a=b}console(){console.log(this.a)}}export var ExportThis=a; +class a{constructor(b){this.a=b}console(){console.log(this.a)}}export var ExportThis=a diff --git a/test/provided-externs/fixtures/class.esm.default.js b/test/provided-externs/fixtures/class.esm.default.js index 527965ca..5fcfb03f 100644 --- a/test/provided-externs/fixtures/class.esm.default.js +++ b/test/provided-externs/fixtures/class.esm.default.js @@ -1 +1 @@ -class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export var ExportThis=a; +class a{constructor(b){this.name_=b}console(){console.log(this.name_)}}export var ExportThis=a diff --git a/test/provided-externs/fixtures/class.esm.es5.js b/test/provided-externs/fixtures/class.esm.es5.js index e306655d..ced4ab70 100644 --- a/test/provided-externs/fixtures/class.esm.es5.js +++ b/test/provided-externs/fixtures/class.esm.es5.js @@ -1 +1 @@ -function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export var ExportThis=a; +function a(b){this.name_=b}a.prototype.console=function(){console.log(this.name_)};export var ExportThis=a diff --git a/test/provided-externs/fixtures/class.esm.pretty.js b/test/provided-externs/fixtures/class.esm.pretty.js index 012ff548..373d58e4 100644 --- a/test/provided-externs/fixtures/class.esm.pretty.js +++ b/test/provided-externs/fixtures/class.esm.pretty.js @@ -7,4 +7,4 @@ class a { console.log(this.name_); } } -export var ExportThis=a; +export var ExportThis=a diff --git a/test/strict-removal/fixtures/mjs-suffix.iife.default.mjs b/test/strict-removal/fixtures/mjs-suffix.iife.default.mjs index 8f92af18..05b7d1f2 100644 --- a/test/strict-removal/fixtures/mjs-suffix.iife.default.mjs +++ b/test/strict-removal/fixtures/mjs-suffix.iife.default.mjs @@ -1 +1 @@ -var modular=function(a){a.thing=1;return a}({}); +var modular=function(a){a.thing=1;return a}({}) diff --git a/test/strict-removal/fixtures/option.iife.default.js b/test/strict-removal/fixtures/option.iife.default.js index 6fb117a5..ff055120 100644 --- a/test/strict-removal/fixtures/option.iife.default.js +++ b/test/strict-removal/fixtures/option.iife.default.js @@ -1 +1 @@ -(function(a){a.thing=1;return a})({}); +(function(a){a.thing=1;return a})({}) diff --git a/test/strict-removal/fixtures/top-level.esm.advanced.js b/test/strict-removal/fixtures/top-level.esm.advanced.js index 89ba6b68..de78b900 100644 --- a/test/strict-removal/fixtures/top-level.esm.advanced.js +++ b/test/strict-removal/fixtures/top-level.esm.advanced.js @@ -1 +1 @@ -export var thing=1; +export var thing=1 diff --git a/test/strict-removal/fixtures/top-level.esm.default.js b/test/strict-removal/fixtures/top-level.esm.default.js index 89ba6b68..de78b900 100644 --- a/test/strict-removal/fixtures/top-level.esm.default.js +++ b/test/strict-removal/fixtures/top-level.esm.default.js @@ -1 +1 @@ -export var thing=1; +export var thing=1 diff --git a/test/strict-removal/fixtures/top-level.esm.es5.js b/test/strict-removal/fixtures/top-level.esm.es5.js index 89ba6b68..de78b900 100644 --- a/test/strict-removal/fixtures/top-level.esm.es5.js +++ b/test/strict-removal/fixtures/top-level.esm.es5.js @@ -1 +1 @@ -export var thing=1; +export var thing=1 diff --git a/test/strict-removal/fixtures/top-level.esm.pretty.js b/test/strict-removal/fixtures/top-level.esm.pretty.js index 012f2dc6..c894cf8d 100644 --- a/test/strict-removal/fixtures/top-level.esm.pretty.js +++ b/test/strict-removal/fixtures/top-level.esm.pretty.js @@ -1,2 +1,2 @@ -export var thing=1; +export var thing=1