Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'kellyselden-line-collapse' into release-0.54.0
# Conflicts:
#	src/Graph.ts
#	src/Module.ts
#	src/ast/enhance.ts
#	src/ast/nodes/ExpressionStatement.ts
#	src/ast/nodes/Import.ts
#	src/ast/nodes/TemplateLiteral.ts
  • Loading branch information
lukastaegert committed Jan 12, 2018
2 parents 407709c + bd45dea commit 46f273f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/ast/nodes/ExpressionStatement.ts
Expand Up @@ -4,7 +4,7 @@ import Scope from '../scopes/Scope';

export default class ExpressionStatement extends StatementBase {
directive?: string;

initialiseNode(_parentScope: Scope){
if (this.directive && this.directive !== 'use strict' && this.parent.type === "Program") {
this.module.warn( // This is necessary, because either way (deleting or not) can lead to errors.
Expand All @@ -22,10 +22,10 @@ export default class ExpressionStatement extends StatementBase {
shouldBeIncluded() {
if (this.directive && this.directive !== 'use strict')
return this.parent.type !== "Program";

return super.shouldBeIncluded();
}

render (code: MagicString, es: boolean) {
super.render(code, es);
if (this.included) this.insertSemicolon(code);
Expand Down
3 changes: 1 addition & 2 deletions src/utils/mergeOptions.ts
@@ -1,7 +1,6 @@
import ensureArray from './ensureArray.js';
import deprecateOptions from './deprecateOptions.js';
import deprecateOptions, { Deprecation } from './deprecateOptions';
import { InputOptions, WarningHandler, OutputOptions } from '../../src/rollup/index';
import { Deprecation } from './deprecateOptions';

function normalizeObjectOptionValue (optionValue: any) {
if (!optionValue) {
Expand Down

0 comments on commit 46f273f

Please sign in to comment.