Skip to content

Commit

Permalink
Remove some easy to remove semicolons for ASI (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoferbaxter authored Feb 17, 2020
1 parent d34ed7c commit 679373c
Show file tree
Hide file tree
Showing 211 changed files with 261 additions and 209 deletions.
50 changes: 50 additions & 0 deletions src/transformers/chunk/asi.ts
Original file line number Diff line number Diff line change
@@ -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<MagicString> {
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;
}
}
2 changes: 1 addition & 1 deletion src/transformers/chunk/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class ConstTransform extends ChunkTransform {
*/
public async pre(source: MagicString): Promise<MagicString> {
const code = source.toString();
const program = parse(source.toString());
const program = parse(code);

walk.simple(program, {
VariableDeclaration(node: VariableDeclaration) {
Expand Down
2 changes: 2 additions & 0 deletions src/transformers/chunk/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -46,6 +47,7 @@ const TRANSFORMS: Array<typeof ChunkTransform> = [
StrictTransform,
ExportTransform,
ImportTransform,
ASITransform,
// Acorn cannot parse content starting here.
HashbangApplyTransform,
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export var multipleArguments=(a,b)=>console.log(a,b);
export var multipleArguments=(a,b)=>console.log(a,b)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export var multipleArguments=(a,b)=>console.log(a,b);
export var multipleArguments=(a,b)=>console.log(a,b)
2 changes: 1 addition & 1 deletion test/arrow-function/fixtures/multiple-arguments.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export function multipleArguments(a,b){return console.log(a,b)};
export function multipleArguments(a,b){return console.log(a,b)}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export var multipleArguments=(a, b) => console.log(a, b);
export var multipleArguments=(a, b) => console.log(a, b)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export var singleArgument=a=>console.log(a);
export var singleArgument=a=>console.log(a)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export var singleArgument=a=>console.log(a);
export var singleArgument=a=>console.log(a)
2 changes: 1 addition & 1 deletion test/arrow-function/fixtures/single-argument.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export function singleArgument(a){return console.log(a)};
export function singleArgument(a){return console.log(a)}
2 changes: 1 addition & 1 deletion test/arrow-function/fixtures/single-argument.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export var singleArgument=a => console.log(a);
export var singleArgument=a => console.log(a)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log("foo");
console.log("foo")
2 changes: 1 addition & 1 deletion test/const-rename/fixtures/rename.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -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)}
2 changes: 1 addition & 1 deletion test/const-rename/fixtures/rename.esm.default.js
Original file line number Diff line number Diff line change
@@ -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)}
2 changes: 1 addition & 1 deletion test/const-rename/fixtures/rename.esm.es5.js
Original file line number Diff line number Diff line change
@@ -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)}
2 changes: 1 addition & 1 deletion test/const-rename/fixtures/rename.esm.pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
let b = [3, 4], c = [5, 6];
export function yes(a) {
return 0 <= c.indexOf(a) && 0 <= b.indexOf(a);
};
}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/array.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default [];
export default []
2 changes: 1 addition & 1 deletion test/export-default/fixtures/array.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default [];
export default []
2 changes: 1 addition & 1 deletion test/export-default/fixtures/array.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default [];
export default []
2 changes: 1 addition & 1 deletion test/export-default/fixtures/array.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export default [];
export default []
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default a=>console.log(a);
export default a=>console.log(a)
2 changes: 1 addition & 1 deletion test/export-default/fixtures/arrow-function.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default a=>console.log(a);
export default a=>console.log(a)
2 changes: 1 addition & 1 deletion test/export-default/fixtures/arrow-function.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function(a){return console.log(a)};
export default function(a){return console.log(a)}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/arrow-function.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export default a => console.log(a);
export default a => console.log(a)
2 changes: 1 addition & 1 deletion test/export-default/fixtures/class.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/export-default/fixtures/class.esm.default.js
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/export-default/fixtures/class.esm.es5.js
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/export-default/fixtures/class.esm.pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class a {
console.log(this.name_);
}
}
export default a;
export default a
2 changes: 1 addition & 1 deletion test/export-default/fixtures/function.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function(a){console.log(a);console.log(1)};
export default function(a){console.log(a);console.log(1)}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/function.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function(a){console.log(a);console.log(1)};
export default function(a){console.log(a);console.log(1)}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/function.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function(a){console.log(a);console.log(1)};
export default function(a){console.log(a);console.log(1)}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/function.esm.pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
export default function(a) {
console.log(a);
console.log(1);
};
}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/identifier.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 1;
export default 1
2 changes: 1 addition & 1 deletion test/export-default/fixtures/identifier.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 1;
export default 1
2 changes: 1 addition & 1 deletion test/export-default/fixtures/identifier.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 1;
export default 1
2 changes: 1 addition & 1 deletion test/export-default/fixtures/identifier.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export default 1;
export default 1
2 changes: 1 addition & 1 deletion test/export-default/fixtures/named-class.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/export-default/fixtures/named-class.esm.default.js
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/export-default/fixtures/named-class.esm.es5.js
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion test/export-default/fixtures/named-class.esm.pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class a {
console.log(this.name_);
}
}
export default a;
export default a
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function(a){console.log(a);console.log(1)};
export default function(a){console.log(a);console.log(1)}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/named-function.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function(a){console.log(a);console.log(1)};
export default function(a){console.log(a);console.log(1)}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/named-function.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function(a){console.log(a);console.log(1)};
export default function(a){console.log(a);console.log(1)}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/named-function.esm.pretty.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
export default function(a) {
console.log(a);
console.log(1);
};
}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/number.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 42;
export default 42
2 changes: 1 addition & 1 deletion test/export-default/fixtures/number.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 42;
export default 42
2 changes: 1 addition & 1 deletion test/export-default/fixtures/number.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 42;
export default 42
2 changes: 1 addition & 1 deletion test/export-default/fixtures/number.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export default 42;
export default 42
2 changes: 1 addition & 1 deletion test/export-default/fixtures/object.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default {key:"value"};
export default {key:"value"}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/object.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default {key:"value"};
export default {key:"value"}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/object.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default {key:"value"};
export default {key:"value"}
2 changes: 1 addition & 1 deletion test/export-default/fixtures/object.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export default {key:"value"};
export default {key:"value"}
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/array.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedArray}from'./external.js';
export{exportedArray}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/array.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedArray}from'./external.js';
export{exportedArray}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/array.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedArray}from'./external.js';
export{exportedArray}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/array.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedArray}from'./external.js';
export{exportedArray}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/class.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedClass}from'./external.js';
export{exportedClass}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/class.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedClass}from'./external.js';
export{exportedClass}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/class.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedClass}from'./external.js';
export{exportedClass}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/class.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedClass}from'./external.js';
export{exportedClass}from'./external.js'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constFunction}from'./external.js';
export{constFunction}from'./external.js'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constFunction}from'./external.js';
export{constFunction}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/const-function.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constFunction}from'./external.js';
export{constFunction}from'./external.js'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constFunction}from'./external.js';
export{constFunction}from'./external.js'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constNumber}from'./external.js';
export{constNumber}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/const-number.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constNumber}from'./external.js';
export{constNumber}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/const-number.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constNumber}from'./external.js';
export{constNumber}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/const-number.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constNumber}from'./external.js';
export{constNumber}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/default.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{default as X}from'./external.js';
export{default as X}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/default.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{default as X}from'./external.js';
export{default as X}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/default.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{default as X}from'./external.js';
export{default as X}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/default.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{default as X}from'./external.js';
export{default as X}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/function.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction}from'./external.js';
export{exportedFunction}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/function.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction}from'./external.js';
export{exportedFunction}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/function.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction}from'./external.js';
export{exportedFunction}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/function.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction}from'./external.js';
export{exportedFunction}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/local.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction as exF}from'./external.js';
export{exportedFunction as exF}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/local.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction as exF}from'./external.js';
export{exportedFunction as exF}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/local.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction as exF}from'./external.js';
export{exportedFunction as exF}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/local.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction as exF}from'./external.js';
export{exportedFunction as exF}from'./external.js'
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/multiple-default.esm.es5.js
Original file line number Diff line number Diff line change
@@ -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'
Original file line number Diff line number Diff line change
@@ -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'

2 changes: 1 addition & 1 deletion test/export-externals/fixtures/object.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constObject}from'./external.js';
export{constObject}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/object.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constObject}from'./external.js';
export{constObject}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/object.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constObject}from'./external.js';
export{constObject}from'./external.js'
2 changes: 1 addition & 1 deletion test/export-externals/fixtures/object.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{constObject}from'./external.js';
export{constObject}from'./external.js'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction as a}from'y.js';a("1");
export{exportedFunction as a}from'y.js';a("1")
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction as a}from'y.js';a("1");
export{exportedFunction as a}from'y.js';a("1")
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export{exportedFunction as a}from'y.js';a("1");
export{exportedFunction as a}from'y.js';a("1")
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export{exportedFunction as a}from'y.js';
a("1");
a("1")
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 1;
export default 1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 1;
export default 1
2 changes: 1 addition & 1 deletion test/export-named/fixtures/identifier-default.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default 1;
export default 1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export default 1;
export default 1
2 changes: 1 addition & 1 deletion test/export-named/fixtures/identifier.esm.advanced.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export var foo=1;
export var foo=1
2 changes: 1 addition & 1 deletion test/export-named/fixtures/identifier.esm.default.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export var foo=1;
export var foo=1
2 changes: 1 addition & 1 deletion test/export-named/fixtures/identifier.esm.es5.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export var foo=1;
export var foo=1
2 changes: 1 addition & 1 deletion test/export-named/fixtures/identifier.esm.pretty.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export var foo=1;
export var foo=1
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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]
Loading

0 comments on commit 679373c

Please sign in to comment.